/* Product Gallery Modal Styles */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.product-modal.active {
    opacity: 1;
    visibility: visible;
}

.product-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.7);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.product-modal.active .product-modal-content {
    transform: scale(1);
}

.product-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    font-size: 18px;
    color: #333;
    transition: all 0.3s ease;
}

.product-modal-close:hover {
    background: #fff;
    transform: scale(1.1);
}

.product-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

/* Image Gallery Section */
.product-gallery {
    position: relative;
}

.gallery-main {
    position: relative;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
}

.gallery-main img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #333;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.gallery-main:hover .gallery-nav {
    opacity: 1;
    visibility: visible;
}

.gallery-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 15px;
}

.gallery-nav.next {
    right: 15px;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #c9a961;
    border-radius: 2px;
}

.gallery-thumb {
    min-width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: #c9a961;
    transform: scale(1.05);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-indicator {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

/* Product Details Section */
.product-details {
    padding: 20px 0;
}

.product-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.3;
}

.product-code {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #ffd700;
    font-size: 16px;
}

.rating-text {
    color: #666;
    font-size: 14px;
}

.product-price {
    font-size: 32px;
    font-weight: 700;
    color: #c9a961;
    margin-bottom: 25px;
}

.price-note {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Product Options */
.product-options {
    margin-bottom: 30px;
}

.option-group {
    margin-bottom: 25px;
}

.option-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: block;
}

.metal-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.metal-option {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metal-option:hover,
.metal-option.active {
    border-color: #c9a961;
    transform: scale(1.1);
}

.metal-option.platinum { background: linear-gradient(135deg, #e5e4e2, #f8f8ff); }
.metal-option.white-gold { background: linear-gradient(135deg, #f8f8ff, #e6e6fa); }
.metal-option.yellow-gold { background: linear-gradient(135deg, #ffd700, #ffed4e); }
.metal-option.rose-gold { background: linear-gradient(135deg, #e8b4b8, #f4c2c2); }

.metal-option::after {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.size-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.size-select:focus {
    outline: none;
    border-color: #c9a961;
}

/* Product Specifications */
.product-specs {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.specs-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    color: #666;
    font-size: 14px;
}

.spec-value {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

/* Action Buttons */
.product-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.btn-primary {
    flex: 1;
    background: #c9a961;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: #b8984e;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201, 169, 97, 0.3);
}

.btn-secondary {
    flex: 1;
    background: transparent;
    color: #c9a961;
    border: 2px solid #c9a961;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-secondary:hover {
    background: #c9a961;
    color: white;
    transform: translateY(-2px);
}

.wishlist-btn {
    background: transparent;
    border: 2px solid #e0e0e0;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    transition: all 0.3s ease;
}

.wishlist-btn:hover,
.wishlist-btn.active {
    border-color: #ff6b6b;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

/* Share Options */
.share-section {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.share-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    transition: transform 0.3s ease;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.pinterest { background: #bd081c; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.email { background: #666; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .product-modal-content {
        width: 100%;
        height: 100vh;
        max-height: none;
        border-radius: 0;
        overflow-y: auto;
    }

    .product-modal-body {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .product-modal-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .gallery-main img {
        height: 300px;
    }

    .product-title {
        font-size: 24px;
    }

    .product-price {
        font-size: 28px;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }

    .product-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 14px;
    }

    .metal-options {
        justify-content: center;
    }

    .gallery-thumbnails {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .product-modal-body {
        padding: 15px;
    }

    .gallery-main img {
        height: 250px;
    }

    .product-title {
        font-size: 20px;
    }

    .product-price {
        font-size: 24px;
    }

    .gallery-thumb {
        min-width: 60px;
        height: 60px;
    }

    .metal-option {
        width: 40px;
        height: 40px;
    }
}

/* Loading States */
.gallery-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    background: #f8f9fa;
    border-radius: 12px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #c9a961;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Smooth Transitions */
.product-modal * {
    box-sizing: border-box;
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Touch Gestures */
.gallery-main {
    touch-action: pan-y;
    user-select: none;
}

.gallery-main.swiping {
    cursor: grabbing;
}

/* Accessibility */
.product-modal:focus-within .product-modal-close {
    outline: 2px solid #c9a961;
    outline-offset: 2px;
}

.gallery-nav:focus,
.metal-option:focus,
.size-select:focus,
.btn-primary:focus,
.btn-secondary:focus {
    outline: 2px solid #c9a961;
    outline-offset: 2px;
}

/* High DPI Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .gallery-main img,
    .gallery-thumb img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}
