:root {
    /* Premium Neutral Palette */
    --bg-white: #ffffff;
    --bg-off-white: #fcfcfc;
    --bg-light-grey: #f4f4f5;

    --text-primary: #121212;
    /* Deep Black/Grey */
    --text-secondary: #5a5a5a;
    /* Muted Grey */
    --text-light: #888888;

    --accent-color: #121212;
    /* Black accent */
    --accent-hover: #333333;

    --border-color: #e6e6e6;
    --border-light: #f0f0f0;

    /* Typography */
    --font-heading: 'Kanit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --container-width: 1440px;
    --header-height: 80px;

    /* Effects */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.08);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-pill: 500px;
}

/* Global Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-white);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease, opacity 0.2s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.2;
    font-weight: 600;
    /* Slightly lighter than black/900 for elegance */
    letter-spacing: -0.02em;
}

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

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-pill);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* Animations */
@keyframes marquee {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Announcement Bar */
.announcement-bar {
    background-color: var(--text-primary);
    color: var(--bg-white);
    font-size: 0.75rem;
    padding: 0.6rem 0;
    overflow: hidden;
    position: relative;
    z-index: 1001;
}

.marquee-container {
    white-space: nowrap;
    overflow: hidden;
}

.marquee-content {
    display: inline-block;
    animation: marquee 25s linear infinite;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Header */
.main-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

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

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    /* Ensure black text */
    text-transform: uppercase;
}

.logo img {
    height: 32px;
    width: auto;
}

.main-nav ul {
    display: flex;
    gap: 3rem;
}

.main-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text-primary);
    transition: width 0.3s ease;
}

.main-nav a:hover {
    color: var(--text-primary);
}

.main-nav a:hover::after {
    width: 100%;
}

.header-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header-icons a {
    font-size: 1.25rem;
    color: var(--text-primary);
    transition: transform 0.2s;
}

.header-icons a:hover {
    transform: scale(1.1);
}

/* Footer */
.main-footer {
    background-color: var(--bg-light-grey);
    color: var(--text-primary);
    padding: 5rem 0 2rem;
    margin-top: 6rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Standard e-com columns */
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-col h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: var(--text-primary);
}

.subscribe-form .input-group {
    position: relative;
    border-bottom: 1px solid var(--text-primary);
}

.subscribe-form input {
    width: 100%;
    padding: 0.8rem 0;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
}

.subscribe-form button {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 4rem;
    background-color: var(--bg-off-white);
}

.hero-image-wrapper {
    /* Adjust as needed for containment or full bleed */
    width: 100%;
    max-width: 100%;
}

.hero-image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.hero-cta-overlay {
    /* Overlap slightly if desired, or standard spacing */
    position: relative;
    z-index: 2;
    text-align: center;
    padding-bottom: 3rem;
}

/* Product Listings */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 500;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem 3rem;
    margin-bottom: 5rem;
}

.product-card {
    display: block;
    /* group: hover; removed invalid property */
}

.product-image {
    position: relative;
    aspect-ratio: 3/4;
    background-color: var(--bg-light-grey);
    overflow: hidden;
    border-radius: var(--radius-md);
    margin-bottom: 1.2rem;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-image .main-img {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    opacity: 1;
}

.product-image .hover-img {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    opacity: 0;
}

.product-card:hover .main-img {
    opacity: 0;
    /* Fade out main to reveal hover, or keep main and fade in hover on top? */
    /* If hover-img is on top (z-index higher), we just fade it in. If it's below, we fade main out.
       Let's put hover-img on top with z-index 2 and opacity 0. */
}

/* Revised approach for cleaner code below */
.product-image .img-front {
    z-index: 2;
    opacity: 1;
}

.product-image .img-back {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    /* Actually, if we want cross-fade, put back on top but hidden? Or front on top?
       Standard: Front on top. Front fades out. Back is visible behind. 
       Or: Back on top, opacity 0. Hover -> opacity 1. This prevents flicker if back doesn't load.
       Let's go with Back on Top (Hover Image). */
    z-index: 3;
    opacity: 0;
}

.product-card:hover .img-back {
    opacity: 1;
    transform: scale(1.05);
    /* Ensure zoom applies to both or just the visible one */
}

.product-card:hover .img-front {
    /* Optional: transform matches */
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: black;
    color: white;
    padding: 0.3rem 0.8rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 2;
}

.product-info h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    font-family: var(--font-body);
}

.product-price {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.price-original {
    color: var(--text-light);
    text-decoration: line-through;
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

/* Filters */
.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.filter-group select {
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    margin-right: 1.5rem;
    outline: none;
}

/* Product Detail */
.product-detail-container {
    padding-top: 3rem;
    padding-bottom: 6rem;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 5rem;
}

.gallery-section {
    display: grid;
    gap: 1rem;
}

.main-image-frame {
    aspect-ratio: 3/4;
    background-color: var(--bg-light-grey);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.main-image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbnails {
    display: flex;
    gap: 1rem;
}

.thumb {
    width: 80px;
    height: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.thumb:hover {
    opacity: 1;
}

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

.product-info-section {
    position: sticky;
    top: 120px;
    height: max-content;
}

.product-info-section h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.price-block {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.option-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

.color-selector,
.size-selector {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.color-option {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border: 2px solid var(--text-primary);
}

.size-option {
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    /* Soft square for premium look? Or Pill? User asked for rounded. */
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.size-option:hover {
    border-color: var(--text-primary);
}

.size-option.selected {
    background-color: var(--text-primary);
    color: var(--bg-white);
    border-color: var(--text-primary);
}

.buy-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.buy-buttons .btn {
    width: 100%;
}

/* Contact Form */
.contact-container {
    max-width: 600px;
    margin: 5rem auto;
    text-align: center;
}

.contact-form .form-control {
    background: var(--bg-light-grey);
    border: 1px solid transparent;
    padding: 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.contact-form .form-control:focus {
    background: var(--bg-white);
    border-color: var(--border-color);
    box-shadow: var(--shadow-soft);
}

/* Responsiveness */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        padding: 0 20px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .container {
        padding: 0 20px;
    }

    .header-content {
        justify-content: space-between;
        position: relative;
    }

    .main-nav {
        display: none;
        /* Implement hamburger later or stacked */
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-info-section {
        position: static;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

/* --- Gallery Split: Desktop vs Mobile --- */
.desktop-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-gallery {
    display: none;
    /* Hidden by default */
}

/* Desktop Main Image */
.main-image-display {
    width: 100%;
    aspect-ratio: 3/4;
    background-color: var(--bg-light-grey);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: zoom-in;
}

.main-image-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease;
}

/* Desktop Thumbnails Carousel */
.thumbnails-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.thumbnails-track {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2px;
    /* Prevent crop on focus */
}

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

.thumb-item {
    min-width: 80px;
    width: 80px;
    height: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.thumb-item:hover {
    opacity: 0.9;
}

.thumb-item.active {
    opacity: 1;
    border-color: var(--text-primary);
}

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

.thumb-nav {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
}

.thumb-nav:hover {
    color: var(--text-primary);
}


/* --- Mobile View --- */
@media (max-width: 768px) {
    .desktop-gallery {
        display: none;
    }

    .mobile-gallery {
        display: block;
        margin: 0 -20px;
        /* Full bleed */
        width: calc(100% + 40px);
        position: relative;
    }

    .mobile-slider {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 10px;
        padding: 0 20px;
        scroll-padding: 0 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

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

    .mobile-slide-image {
        min-width: 85vw;
        width: 85vw;
        height: auto;
        aspect-ratio: 3/4;
        object-fit: cover;
        scroll-snap-align: center;
        border-radius: 4px;
        display: block;
    }

    .mobile-image-counter {
        position: absolute;
        bottom: 1rem;
        right: 1.5rem;
        background: rgba(0, 0, 0, 0.6);
        color: white;
        padding: 0.2rem 0.6rem;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
        pointer-events: none;
        z-index: 10;
        backdrop-filter: blur(4px);
    }
}

/* Lightbox / Zoom Overlay */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    overflow: auto;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
}