/* ==========================================================================
   Luxury Store Design System
   Inspiration: Hermes, Prada, Gucci
   Style: Minimalist, Monochromatic, Image-Focused, Sharp
   ========================================================================== */

:root {
    /* Colors - Strict Monochrome Palette */
    --bg-body: #ffffff;
    --bg-secondary: #fdfdfd; 
    --bg-contrast: #111111;
    
    --text-primary: #111111;
    --text-secondary: #555555;
    --text-muted: #888888;
    --text-inverse: #ffffff;
    
    --border-light: #eaddd7;
    --border-medium: #cccccc;
    --border-dark: #111111;

    --accent-color: #111111; /* Luxury relies on structure, not color */
    
    /* Spacing */
    --container-padding: 5vw;
    --header-height: 80px;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
}

/* --- Resets & Base --- */
body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 400; /* Regular weight for elegance */
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.3s ease, border-bottom 0.3s ease;
}

a:hover {
    color: var(--text-primary);
    opacity: 0.7;
}

/* --- Utility Classes --- */
.container-fluid-luxury {
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
    max-width: 1920px;
    margin: 0 auto;
}

.text-luxury-heading {
    font-family: var(--font-heading);
    font-size: 3rem;
    line-height: 1.1;
}

@media (max-width: 768px) {
    .text-luxury-heading {
        font-size: 2rem;
    }
}

.text-uppercase-tracking {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.75rem;
    font-weight: 500;
}

/* --- Buttons --- */
.btn {
    border-radius: 0 !important; /* Sharp edges */
    padding: 1rem 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: none !important;
}

.btn-dark, .btn-primary {
    background-color: var(--bg-contrast);
    border: 1px solid var(--bg-contrast);
    color: var(--text-inverse);
}

.btn-dark:hover, .btn-primary:hover {
    background-color: transparent;
    color: var(--text-primary);
}

.btn-outline-dark {
    background-color: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
}

.btn-outline-dark:hover {
    border-color: var(--bg-contrast);
    background-color: var(--bg-contrast);
    color: var(--text-inverse);
}

/* --- Header / Navbar --- */
.store-navbar {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    height: var(--header-height);
    transition: border-color 0.3s ease;
    padding: 0;
}

.store-navbar.scrolled {
    border-bottom: 1px solid var(--border-light);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    color: var(--text-primary) !important;
}

.nav-link {
    color: var(--text-primary) !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    padding: 0 1.5rem !important;
    font-weight: 400;
}

.nav-link:hover {
    opacity: 0.6;
}

/* --- Mega Menu (Desktop) --- */
.mega-menu-item {
    position: relative;
}

.mega-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 300px;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    margin-top: 0.5rem;
}

.mega-menu-item:hover .mega-menu-dropdown {
    opacity: 1;
    visibility: visible;
}

.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.mega-menu-column {
    /* Column styling */
}

.mega-menu-heading {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.mega-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-list li {
    margin-bottom: 0.75rem;
}

.mega-menu-link {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    display: block;
}

.mega-menu-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Hide mega menu on mobile */
@media (max-width: 991px) {
    .mega-menu-dropdown {
        display: none !important;
    }
}

/* --- Mobile Drawer Menu --- */
.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    left: -100%;
    height: 100vh;
    width: 85%;
    max-width: 400px;
    background-color: var(--bg-body);
    z-index: 9999;
    transition: left 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-drawer.active {
    left: 0;
}

.mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem var(--container-padding);
    border-bottom: 1px solid var(--border-light);
}

.mobile-drawer-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 0.2em;
    color: var(--text-primary);
}

.mobile-drawer-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    transition: opacity 0.2s ease;
}

.mobile-drawer-close:hover {
    opacity: 0.6;
}

.mobile-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--container-padding);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background-color 0.2s ease;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    background-color: rgba(0, 0, 0, 0.02);
    color: var(--text-primary);
}

.mobile-nav-chevron {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.mobile-nav-toggle.active .mobile-nav-chevron {
    transform: rotate(180deg);
}

.mobile-nav-sublist {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: var(--bg-secondary);
}

.mobile-nav-sublist.active {
    max-height: 500px; /* Adjust based on content */
}

.mobile-nav-sublink {
    display: block;
    padding: 0.75rem var(--container-padding);
    padding-left: calc(var(--container-padding) + 1rem);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: none;
    letter-spacing: 0.05em;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-nav-sublink:hover {
    background-color: rgba(0, 0, 0, 0.02);
    color: var(--text-primary);
}

.mobile-drawer-footer {
    display: flex;
    border-top: 1px solid var(--border-light);
    padding: 1rem var(--container-padding);
    gap: 1rem;
}

.mobile-drawer-footer-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background-color 0.2s ease;
    border: 1px solid var(--border-light);
}

.mobile-drawer-footer-link:hover {
    background-color: rgba(0, 0, 0, 0.02);
    color: var(--text-primary);
}

.mobile-drawer-footer-link i {
    font-size: 1.25rem;
}

/* Hide drawer on desktop */
@media (min-width: 992px) {
    .mobile-drawer,
    .mobile-drawer-overlay {
        display: none !important;
    }
}

/* --- Product Card (Grid) --- */
.product-card {
    border: none;
    background: transparent;
    margin-bottom: 4rem;
    group: hover;
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 135%; /* 3:4 Aspect Portrait */
    overflow: hidden;
    background-color: #f0f0f0;
}

.product-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

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

.product-info {
    padding-top: 1.5rem;
    text-align: center;
}

.product-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
}

.product-title {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.product-price {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 90vh;
    width: 100%;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 10;
    max-width: 800px;
    padding: 2rem;
}

.hero-subtitle {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
    opacity: 1;
}

/* --- Product Detail Page --- */
.product-detail-container {
    padding-top: 2rem;
}

/* Gallery Container */
.gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Desktop: Thumbnails on Left, Main on Right */
.gallery-thumbs {
    display: none; /* Hidden on mobile */
    flex-direction: column;
    gap: 1rem;
    width: 100px;
    height: 600px;
    overflow-y: auto;
}

.gallery-thumbs img {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, border-color 0.2s;
    border: 1px solid transparent;
}

.gallery-thumbs img:hover, .gallery-thumbs img.active {
    opacity: 1;
    border-color: var(--border-dark);
}

.gallery-main {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 80vh;
}

/* Mobile: Snap Carousel */
.mobile-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE */
    margin-right: calc(-1 * var(--container-padding)); /* Bleed to edge */
    margin-left: calc(-1 * var(--container-padding));
    padding-left: var(--container-padding); /* Re-align first item */
    padding-right: var(--container-padding);
}

.mobile-carousel::-webkit-scrollbar {
    display: none;
}

.mobile-carousel-item {
    min-width: 85%; /* Shows a peek of the next image */
    scroll-snap-align: center;
    margin-right: 1rem;
    position: relative;
}

.mobile-carousel-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 3/4;
}

@media (min-width: 992px) {
    .gallery-container {
        flex-wrap: nowrap;
    }
    
    .gallery-thumbs {
        display: flex;
        position: sticky;
        top: 120px;
    }
    
    .mobile-carousel {
        display: none; /* Hide mobile carousel on desktop */
    }
    
    /* On desktop, we hide the mobile items logic and use .gallery-main */
    .gallery-desktop-view {
        display: block;
    }
}

@media (max-width: 991px) {
    .gallery-desktop-view {
        display: none;
    }
}

.product-sticky-info {
    position: sticky;
    top: 120px;
    padding: 2rem;
    background-color: var(--bg-body); /* Ensure text readability */
    z-index: 10;
}

.detail-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.detail-price {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 300;
}

.variant-selector {
    border: 1px solid var(--border-medium);
    padding: 0.5rem;
    width: 100%;
    border-radius: 0;
    background: transparent;
    margin-bottom: 1rem;
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--border-light);
    padding: 5rem 0 3rem;
    background-color: var(--bg-secondary);
    margin-top: 5rem;
}

.footer-heading {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-link {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.newsletter-input {
    border: none;
    border-bottom: 1px solid var(--border-medium);
    background: transparent;
    width: 100%;
    padding: 0.5rem 0;
    border-radius: 0;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--bg-contrast);
}

/* --- Cart & Checkout --- */
.cart-header {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.cart-item {
    border-bottom: 1px solid var(--border-light);
    padding: 1.5rem 0;
    transition: opacity 0.3s ease;
    position: relative;
}

.cart-item.updating {
    opacity: 0.5;
    pointer-events: none;
}

.cart-item-loading-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.summary-card {
    background-color: var(--bg-secondary);
    padding: 2rem;
}

/* Quantity Stepper Component */
.quantity-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-medium);
    background-color: var(--bg-body);
}

.qty-btn {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    user-select: none;
}

.qty-btn:hover:not(:disabled) {
    background-color: var(--bg-contrast);
    color: var(--text-inverse);
}

.qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.qty-input {
    border: none;
    border-left: 1px solid var(--border-medium);
    border-right: 1px solid var(--border-medium);
    background: transparent;
    width: 50px;
    height: 36px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-primary);
    -moz-appearance: textfield; /* Firefox */
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input:focus {
    outline: none;
}

/* Delete Button */
.cart-delete-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-delete-btn:hover {
    background-color: var(--bg-contrast);
    color: var(--text-inverse);
    border-color: var(--bg-contrast);
}

.cart-delete-btn i {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .cart-delete-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .qty-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .qty-input {
        height: 32px;
        width: 45px;
    }
}

/* --- Search Overlay --- */
.search-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), visibility 0.4s;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-content {
    width: 90%;
    max-width: 700px;
    transform: translateY(-20px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.search-overlay.active .search-overlay-content {
    transform: translateY(0);
}

.search-close-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: opacity 0.3s ease;
}

.search-close-btn:hover {
    opacity: 0.6;
}

.search-form {
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--border-dark);
    padding-bottom: 0.75rem;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-primary);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .search-input {
        font-size: 1.25rem;
    }
    .search-overlay {
        padding-top: 15vh;
    }
}

.search-submit-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: transform 0.3s ease;
}

.search-submit-btn:hover {
    transform: translateX(5px);
}

.search-results {
    margin-top: 2rem;
    max-height: 50vh;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: var(--text-primary);
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.search-result-img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    background-color: #f0f0f0;
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.search-result-price {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.search-no-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.search-result-options {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Mobile: Larger search results */
@media (max-width: 768px) {
    .search-result-item {
        padding: 1.25rem 0;
    }
    
    .search-result-img {
        width: 80px;
        height: 100px;
    }
    
    .search-result-name {
        font-size: 1rem;
    }
    
    .search-result-price {
        font-size: 0.9rem;
    }
    
    .search-result-options {
        font-size: 0.8rem;
    }
}

/* --- SweetAlert2 Customization for Luxury Theme --- */
.luxury-swal-popup {
    font-family: var(--font-body) !important;
    border-radius: 0 !important;
}

.luxury-swal-popup .swal2-title {
    font-family: var(--font-heading) !important;
    font-weight: 400 !important;
    color: var(--text-primary) !important;
    font-size: 1.5rem !important;
}

.luxury-swal-popup .swal2-html-container {
    font-family: var(--font-body) !important;
    color: var(--text-secondary) !important;
    font-size: 0.95rem !important;
}

.luxury-swal-confirm,
.luxury-swal-cancel {
    border-radius: 0 !important;
    padding: 0.75rem 2rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.luxury-swal-confirm:hover {
    background-color: transparent !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--bg-contrast) !important;
}

.luxury-swal-cancel:hover {
    background-color: var(--bg-contrast) !important;
    color: var(--text-inverse) !important;
}

