/* PRODUCT LISTING & FILTERING - MINA LIDYA ELITE */

.products-page {
    background: #fff;
    padding-top: 140px;
    /* Space for fixed header */
}

/* SECTION 1: HERO */
.products-hero {
    text-align: center;
    padding: 60px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.products-hero h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 20px;
    letter-spacing: 0.05em;
    color: #111;
}

.products-hero p {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
}

/* SECTION 2: FILTERS & GRID */
.products-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 50px;
    position: sticky;
    top: 90px;
    background: #fff;
    z-index: 1000;
}

.filter-group {
    display: flex;
    gap: 30px;
}

.filter-wrapper {
    position: relative;
}

.filter-item {
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
}

.filter-item::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.filter-wrapper:hover .filter-item::after {
    transform: rotate(180deg);
}

.filter-item.selected {
    color: #b76e79;
}

.filter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    padding: 15px 0;
    border: 1px solid #f0f0f0;
}

.filter-wrapper:hover .filter-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* UNIVERSAL BUTTON STYLE OVERRIDE */
.main-button-round,
.load-more-btn,
.products-container button {
    border-radius: 0 !important;
    background: transparent !important;
    border: 1px solid #111 !important;
    color: #111 !important;
    padding: 14px 40px !important;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

/* LIGHTBOX (GLOBAL & PRODUCTS) */
.product-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    /* Dark overlay */
    z-index: 10000;
    /* Topmost */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(5px);
}

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

.main-button-round:hover,
.load-more-btn:hover,
.products-container button:hover {
    background: #111 !important;
    color: #fff !important;
}

/* WA BUTTON EXCEPTION FOR HOVER COLOR */
.wa-button:hover {
    background: transparent !important;
    color: #111 !important;
    border-color: #25D366 !important;
}

.filter-option {
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-option:hover {
    background: #f9f9f9;
    color: #000;
}

.filter-option.active {
    font-weight: 600;
    color: #b76e79;
}

.clear-filters-btn {
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #999;
    padding: 10px 15px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.clear-filters-btn:hover {
    color: #b76e79;
    border-color: #f0f0f0;
}

.clear-filters-btn i {
    font-size: 0.7rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px 30px;
    margin-bottom: 80px;
}

/* PRODUCT CARD */
.product-card {
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    transition: transform 0.4s ease;
}

.product-title-top {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    color: #111;
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: #f9f9f9;
    margin-bottom: 15px;
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.product-card:hover img {
    transform: scale(1.08);
}

.wishlist-btn-wrapper {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    /* White icon default */
    font-size: 1.2rem;
    z-index: 50;
    /* Ensure above image hover */
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    /* Shadow for visibility */
}

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

.wishlist-btn-wrapper i.fa-solid {
    color: #b76e79;
    /* Filled heart color */
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.5));
}

.product-info {
    text-align: center;
}

.product-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 400;
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-title-top {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

.load-more-container {
    text-align: center;
    padding: 60px 0;
}

/* SECTION 3: SILHOUETTE SELECTOR */
.silhouette-section {
    background: #fbfbfb;
    padding: 100px 20px;
    text-align: center;
}

.silhouette-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.silhouette-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.silhouette-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.silhouette-item:hover {
    opacity: 0.7;
}

.silhouette-icon,
.silhouette-item img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.silhouette-item:hover img {
    transform: scale(1.1);
}

.silhouette-name,
.silhouette-item p {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
    margin-top: 10px;
}

/* SECTION 4: ABOUT TEXT */
.about-dresses-section {
    max-width: 1000px;
    margin: 100px auto;
    padding: 0 20px;
    text-align: center;
}

.about-text-content {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
    max-height: 120px;
    /* Collapsed state */
    overflow: hidden;
    position: relative;
    transition: max-height 0.5s ease;
}

.about-text-content.expanded {
    max-height: 2000px;
}

.about-text-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to top, #fff, transparent);
    transition: opacity 0.3s;
}

.about-text-content.expanded::after {
    opacity: 0;
    pointer-events: none;
}

.read-more-btn {
    display: inline-block;
    margin-top: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #b76e79;
    cursor: pointer;
    border-bottom: 1px solid #b76e79;
}

/* LIGHTBOX CONTENT STYLES */
.lightbox-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 60px;
    min-height: 80vh;
    width: 90%;
    background: #fff;
    /* Ensure content has background */
    padding: 40px;
    position: relative;
}

.lightbox-left {
    flex: 1;
}

.lightbox-left img {
    flex: 1.2;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    /* Stack image and thumbs */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lb-main-img-wrapper {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#lb-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.lb-thumbnails {
    width: 100%;
    height: 80px;
    margin-top: 15px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
    justify-content: center;
    /* Center initially */
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.lb-thumb {
    height: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.5;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.lb-thumb:hover,
.lb-thumb.active {
    opacity: 1;
    border-color: #333;
    transform: scale(1.05);
}

.lightbox-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
}

.lb-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: #111;
}

.lb-desc {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 40px;
}

.lb-attrs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lb-attr {
    display: flex;
    justify-content: space-between;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

.lb-attr label {
    font-weight: 600;
    color: #222;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.lb-attr value {
    color: #666;
}

.lightbox-close {
    position: fixed;
    top: 40px;
    right: 40px;
    font-size: 2rem;
    cursor: pointer;
    color: #333;
}

/* MOBILE RESPONSIVE */
/* MOBILE RESPONSIVE GRID OVERRIDES */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        /* 4 cols usually ok for 1200px */
    }
}

@media (max-width: 991px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px 20px;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 15px;
    }

    /* Mobile Filter Drawer Styles */
    .filter-bar {
        position: relative;
        z-index: 1000;
        top: 0;
        padding: 10px 0;
    }

    /* Initial Mobile State: Hide Groups */
    .filter-group {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #fff;
        z-index: 20000;
        /* High z-index */
        flex-direction: column;
        padding: 40px;
        align-items: flex-start;
        gap: 15px;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all 0.3s ease;
        overflow-y: auto;
    }

    .filter-group.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Mobile Filter Toggle Button */
    .mobile-filter-toggle {
        display: flex !important;
        /* Force show */
        align-items: center;
        gap: 10px;
        font-family: 'Inter', sans-serif;
        text-transform: uppercase;
        font-weight: 600;
        font-size: 0.9rem;
        cursor: pointer;
        border: 1px solid #111;
        padding: 10px 25px;
        border-radius: 30px;
        width: fit-content;
    }

    /* Close Button Inside Drawer */
    .mobile-filter-close {
        display: block !important;
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 1.5rem;
        cursor: pointer;
    }

    /* Ensure filter items take full width in drawer */
    .filter-wrapper {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .filter-item {
        width: 100%;
        justify-content: space-between;
        padding: 15px 0;
    }

    .filter-dropdown {
        position: static;
        /* Stack flow */
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        padding: 0 0 15px 0;
        display: none;
        /* Hide default, show via JS toggle if needed, or CSS hover replacement */
    }

    .filter-wrapper.expanded .filter-dropdown {
        display: block;
    }

    .filter-item::after {
        transform: rotate(0deg);
    }

    .filter-wrapper.expanded .filter-item::after {
        transform: rotate(180deg);
    }

    .products-hero h1 {
        font-size: 2.2rem;
    }
}

CRITICAL LIGHTBOX FIX - V-FINAL Forces lightbox to be hidden unless .active class is present.=========================================================================*/

/* Helper classes for mobile filters */
.mobile-filter-toggle,
.mobile-filter-close {
    display: none;
}

top: 0 !important;
left: 0 !important;
width: 100vw !important;
height: 100vh !important;
background: rgba(0, 0, 0, 0.85) !important;
z-index: 20000 !important;
/* Higher than anything */

/* Default State: Hidden & Non-Interactive */
opacity: 0 !important;
visibility: hidden !important;
pointer-events: none !important;

display: flex !important;
justify-content: center;
align-items: center;
transition: opacity 0.3s ease,
visibility 0.3s ease !important;
backdrop-filter: blur(5px);
}

.product-lightbox.active {
    /* Active State: Visible & Interactive */
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.lightbox-content {
    width: 95%;
    /* More width on mobile */
    max-width: 1200px;
    height: auto;
    max-height: 90vh;
    /* Don't exceed viewport */
    background: #fff;
    display: flex;
    gap: 0;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    /* Allow scrolling content */
    overflow-x: hidden;
}

/* LIGHTBOX LAYOUT - RESTORED (Thumbs Below, Rounded Buttons) */
.lightbox-left {
    flex: 1.5;
    background: #f9f9f9;
    padding: 20px;
    display: flex;
    flex-direction: column;
    /* Thumbs Below Image */
    gap: 15px;
    /* Spacing */
    align-items: center;
    justify-content: center;
}

.lb-main-img-wrapper {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lb-main-img-wrapper img {
    max-width: 100%;
    max-height: 60vh;
    /* Adjust height to fit thumbs below */
    object-fit: contain;
}

.lb-thumbnails-container {
    width: 100%;
    height: 120px;
    /* Increased height for portrait thumbs */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

.lb-thumbnails {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    /* Horizontal Strip */
    gap: 12px;
    overflow-x: auto;
    /* Scroll Horizontally */
    overflow-y: hidden;
    padding: 5px 2px;
    scroll-behavior: smooth;

    /* Hide Scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.lb-thumbnails::-webkit-scrollbar {
    display: none;
}

.lb-thumb {
    height: 100%;
    /* Fill container height */
    width: auto;
    aspect-ratio: 2 / 3 !important;
    /* Portrait Ratio preserved */
    object-fit: cover;
    cursor: pointer;
    opacity: 0.5;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.lb-thumb:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.lb-thumb.active {
    opacity: 1;
    border: 1px solid #111;
    transform: scale(1.05);
}

/* Horizontal Nav Arrows */
.lb-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #eee;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    /* Rounded Arrows */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.lb-prev {
    left: -10px;
}

.lb-next {
    right: -10px;
}

/* LOAD MORE BUTTON RESTORE (ROUNDED) */
.load-more-container button {
    border-radius: 30px !important;
    /* Back to Round */
    border: 1px solid #111 !important;
    padding: 15px 50px !important;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    background: transparent !important;
    color: #111 !important;
    transition: all 0.3s ease;
}

.load-more-container button:hover {
    background: #111 !important;
    color: #fff !important;
}

/* Mobile Fixes */
@media (max-width: 768px) {
    .lightbox-content {
        flex-direction: column;
        width: 95%;
        margin-top: 50px;
        /* Space for close button */
    }

    .lightbox-left {
        flex: none;
        width: 100%;
        padding: 15px;
    }

    .lightbox-right {
        flex: none;
        width: 100%;
        padding: 20px 25px 40px;
        /* More bottom padding for scroll */
    }

    .lb-thumbnails-container {
        height: 80px;
        /* Slightly smaller for mobile */
        width: 100%;
    }

    .lb-main-img-wrapper img {
        max-height: 50vh;
        /* Better ratio for mobile */
    }

    .lb-title {
        font-size: 2rem;
        /* Scaled down */
        margin-bottom: 10px;
    }

    .lb-desc {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        color: #fff;
        /* White close button on mobile over dark backdrop */
        background: rgba(0, 0, 0, 0.5);
        width: 40px;
        height: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 50%;
        z-index: 20005;
    }

    /* Mobile Product Count Fix (16 / 37) */
    .product-counter {
        font-size: 0.75rem;
        /* Smaller font */
        color: #666;
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .product-counter span[data-i18n="showing"],
    .product-counter span[data-i18n="of"],
    .product-counter span[data-i18n="products"] {
        display: none !important;
    }

    #current-count::after {
        content: "/";
        margin-left: 5px;
        color: #999;
    }
}