/* Premium Detail Page Styles */
:root {
    --primary-color: #a64d79;
    --accent-color: #fdfafb;
}

.detail-container {
    padding-top: 3rem;
    padding-bottom: 5rem;
    background: #fff;
}

/* Modern Gallery Layout */
.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #fdfdfd;
    aspect-ratio: 1 / 1;
    border: 1px solid #f0f0f0;
    cursor: crosshair;
}

/* Gallery Navigation Arrows */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    opacity: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.main-image-wrapper:hover .gallery-nav {
    opacity: 1;
}

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

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

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

.main-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* .main-image-wrapper:hover img — no scale transform; it shifts zoom-lens coordinates */

.thumbnail-gallery {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.thumb-item {
    width: 80px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    opacity: 0.7;
}

.thumb-item.active {
    border-color: var(--primary-color);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(166, 77, 121, 0.15);
}

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

/* Product Info Column */
.product-info-col {
    padding-left: 3rem;
}

.product-meta {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 0.5rem;
    display: block;
}

.product-title {
    font-family: 'Playfair Display', 'Inter', serif;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem;
}

.rating-stars {
    color: #ffc107;
    font-size: 0.9rem;
}

.price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 2.5rem;
}

.current-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.old-price {
    font-size: 1.3rem;
    color: #999;
    text-decoration: line-through;
}

.discount-badge {
    background: #e63946;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    margin-left: 5px;
}

/* Selectors & Options */
.option-label {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: block;
    color: #333;
}

.variant-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 2rem;
}

.variant-link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: block;
    border: 2px solid #eee;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    padding: 2px;
}

.variant-link:hover {
    transform: scale(1.15);
    border-color: var(--primary-color);
}

.variant-link.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(166, 77, 121, 0.2);
}

.variant-swatch {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.variant-link.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #fff;
    font-size: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* White variant checkmark fix */
.variant-link[title="White"].active::after,
.variant-link[title="Beige"].active::after {
    color: #333;
    text-shadow: none;
}

/* CTA Section */
.purchase-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 3rem;
}

.qty-selector {
    display: flex;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    overflow: hidden;
    height: 54px;
    background: #fff;
}

.qty-btn {
    width: 45px;
    border: none;
    background: transparent;
    font-size: 1.2rem;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #f8f9fa;
}

.qty-input {
    width: 50px;
    border: none;
    text-align: center;
    font-weight: 600;
    background: transparent;
}

.add-to-cart-premium {
    flex: 1;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    height: 54px;
    transition: all 0.3s;
    box-shadow: 0 8px 20px rgba(166, 77, 121, 0.25);
}

.add-to-cart-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(166, 77, 121, 0.35);
    background: #914168;
    color: #fff !important;
    text-decoration: none;
}

/* Benefits Section */
.product-benefits {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 3rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: transparent;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.benefit-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    opacity: 0.8;
}

.benefit-item span {
    font-size: 0.8rem;
    font-weight: 500;
    color: #4a5568;
    letter-spacing: 0.3px;
}

.section-heading {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    color: #1a1a1a;
}

.description-content {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #4a5568 !important;
}

.product-features-content ul, .care-instructions-content ul {
    padding-left: 1.2rem;
    margin-bottom: 0;
}

.product-features-content li, .care-instructions-content li {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

/* Accordion Custom */
.premium-accordion .card {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    background-color: #fff !important;
    border-radius: 0 !important;
}

.premium-accordion .card-header {
    background-color: #fff !important;
    border: none;
    padding: 20px 0 !important;
}

.premium-accordion .btn-link {
    padding: 0;
    text-decoration: none !important;
    color: #1a1a1a !important;
    background-color: #fff !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.premium-accordion .collapse-icon {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.btn-link[aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
}

/* Related Products Section */
.related-section {
    background: #fafafa;
    padding: 5rem 0;
}

.product-card-luxury {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s;
    border: 1px solid #f0f0f0;
}

.product-card-luxury:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.custom-file-luxury {
    position: relative;
}

.media-upload-label {
    display: block;
    padding: 15px 20px;
    background: #fff;
    border: 1px dashed #ddd;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    font-size: 0.9rem;
    color: #666;
}

.media-upload-label:hover {
    border-color: #a64d79;
    background: #fdfcfd;
    color: #a64d79;
}

.star-rating .fa-star.active {
    color: #ffc107 !important;
}

.luxury-img-container {
    aspect-ratio: 1 / 1.2;
    overflow: hidden;
}

.luxury-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 991px) {
    .product-info-col {
        padding-left: 15px;
        margin-top: 2rem;
    }

    .product-title {
        font-size: 2.2rem;
    }

    .gallery-nav {
        opacity: 1;
    }
}

/* Lightbox Styles */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 100000;
}

.lightbox-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

body.lightbox-open {
    overflow: hidden;
}

/* Product title mobile adjustment */
@media (max-width: 576px) {
    .product-title {
        font-size: 1.4rem;
    }
    .current-price {
        font-size: 1.4rem;
    }
    .benefit-item {
        font-size: 0.75rem;
    }
}

/* Benefit items hover effect */
.benefit-item {
    transition: all 0.3s ease;
}
.benefit-item:hover {
    background: #fff;
    border-color: rgba(166, 77, 121, 0.3);
    transform: translateY(-2px);
}

/* Thumbnail hover effect */
.thumb-item {
    transition: transform 0.2s, border-color 0.2s;
}
.thumb-item:hover {
    transform: scale(1.05);
}

.text-muted {
    color: #6c757d !important; /* Override any light grey */
}

/* Purchase actions stacking on mobile */
@media (max-width: 576px) {
    .purchase-actions {
        flex-direction: column;
        gap: 15px;
    }
    .purchase-actions .qty-selector {
        width: 100%;
        justify-content: center;
    }
    .purchase-actions .add-to-cart-premium {
        width: 100%;
    }
    .product-benefits {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .thumbnail-gallery .thumb-item {
        width: 60px;
        height: 80px;
    }
    .rating-summary {
        flex-wrap: wrap;
    }
}

/* ===== Product Image Inline Hover Zoom ===== */
.product-gallery {
    position: sticky;
    top: 100px;
}

.gallery-zoom-wrapper {
    position: relative;
    width: 100%;
}

/* The main image wrapper doubles as the zoom container */
.main-image-wrapper.zooming {
    cursor: crosshair;
}

.main-image-wrapper.zooming img {
    opacity: 0;
}

/* Zoom is done via background-image on the wrapper itself */
.main-image-wrapper.zooming {
    background-repeat: no-repeat;
    background-size: 200%;  /* 2x zoom factor */
}

/* Hide the separate zoom elements — we no longer use them */
#zoomLens,
#zoomResult {
    display: none !important;
}

.zoom-hint {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.45);
    color: #fff;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
    pointer-events: none;
    transition: opacity 0.4s;
    z-index: 5;
    white-space: nowrap;
}

/* Hide zoom hint on small screens — lightbox is the mobile experience */
@media (max-width: 991px) {
    .zoom-hint { display: none !important; }
}
