/* BlancheWear - Clean Minimal Design System */

:root {
    --color-primary: #FAFAFA;      /* Off-white background */
    --color-text: #2C2C2C;         /* Charcoal text */
    --color-accent: #8B7355;       /* Warm taupe accent */
    --color-border: #E5E5E5;       /* Subtle borders */
    --color-white: #FFFFFF;
    
    --font-primary: 'Inter', -apple-system, sans-serif;
    --font-secondary: 'Cormorant Garamond', Georgia, serif;
    
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
}

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

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

/* Typography */
h1, h2, h3 {
    font-family: var(--font-secondary);
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

h1 { font-size: 3rem; margin-bottom: var(--spacing-md); }
h2 { font-size: 2rem; margin-bottom: var(--spacing-sm); }
h3 { font-size: 1.5rem; margin-bottom: var(--spacing-sm); }

p {
    margin-bottom: var(--spacing-sm);
    font-size: 1rem;
    letter-spacing: 0.01em;
}

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

a:hover {
    opacity: 0.6;
}

/* Header */
.header {
    background-color: var(--color-white);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-secondary);
    font-size: 1.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav > ul {
    display: flex;
    gap: var(--spacing-lg);
    list-style: none;
}

.nav a {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Hero Section */
.hero {
    height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--color-white);
    margin-bottom: var(--spacing-xl);
}

.hero-content {
    max-width: 600px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
    color: #666;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid var(--color-text);
    background: transparent;
    color: var(--color-text);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--color-text);
    color: var(--color-white);
    opacity: 1;
}

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

.btn-primary:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-xl);
    margin: var(--spacing-xl) 0;
}

.product-card {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    aspect-ratio: 3/4;
    background-color: #f5f5f5;
    margin-bottom: var(--spacing-md);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

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

.product-name {
    font-family: var(--font-secondary);
    font-size: 1.3rem;
    margin-bottom: var(--spacing-xs);
    letter-spacing: 0.05em;
}

.product-price {
    font-size: 1rem;
    color: #666;
    letter-spacing: 0.05em;
}

/* Product Detail Page */
.product-detail {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--spacing-xl);
    margin: var(--spacing-xl) 0;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.main-image {
    width: 100%;
    aspect-ratio: 3/4;
    background-color: #f5f5f5;
}

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

.thumbnail-strip {
    display: flex;
    gap: var(--spacing-sm);
}

.thumbnail {
    width: 80px;
    height: 100px;
    background-color: #f5f5f5;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
    opacity: 1;
}

.product-details {
    padding: var(--spacing-md) 0;
}

.product-details h1 {
    margin-bottom: var(--spacing-sm);
}

.price-large {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    letter-spacing: 0.05em;
}

.product-description {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-lg) 0;
    border-top: none;
    border-bottom: 1px solid var(--color-border);
}

.size-selector {
    margin: var(--spacing-lg) 0;
}

.size-options {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.size-option {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--color-border);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Reviews Section */
.reviews-section {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: none;
}

.review {
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--color-border);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.review-author {
    font-weight: 600;
}

.review-stars {
    color: var(--color-accent);
}

.review-text {
    color: #666;
    line-height: 1.7;
}

/* Blog Section */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: var(--spacing-xl);
    margin: var(--spacing-xl) 0;
}

.blog-card {
    cursor: pointer;
}

.blog-image {
    width: 100%;
    aspect-ratio: 16/10;
    background-color: #f5f5f5;
    margin-bottom: var(--spacing-md);
    overflow: hidden;
}

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

.blog-meta {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: var(--spacing-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.blog-title {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.blog-excerpt {
    color: #666;
    line-height: 1.7;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--color-border);
    background-color: var(--color-white);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-text);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
.footer {
    background-color: var(--color-white);
    border-top: none;
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(5, 1fr);  /* always 5 columns — one per section */
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: #666;
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: none;
    color: #999;
    font-size: 0.85rem;
}

/* Section Spacing */
.section {
    margin: var(--spacing-xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 0 var(--spacing-sm);
    }

    /* Nav — shrink gap on small screens */
    .nav > ul {
        gap: var(--spacing-sm);
    }

    .nav a {
        font-size: 0.8rem;
    }

    /* Hero */
    .hero h1 {
        font-size: 2.5rem;
    }

    /* Products grid */
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: var(--spacing-lg);
    }

    /* Product detail — stack to single column */
    .product-detail {
        grid-template-columns: 1fr;
    }

    /* Product page main image — show full photo, no cropping */
    .main-image {
        aspect-ratio: auto;
        background-color: #fff;
        max-height: 55vh;          /* cap height so product info stays visible on load */
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .main-image img {
        width: 100%;
        height: 100%;
        max-height: 55vh;          /* match container cap */
        object-fit: contain;       /* full garment always visible, no cropping */
        display: block;
    }

    /* Product thumbnails — horizontal scroll on mobile */
    .thumbnail-gallery {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        gap: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .thumbnail-gallery img {
        width: 80px;
        height: 107px;
        flex-shrink: 0;
    }

    /* Size buttons — wrap on mobile */
    .size-buttons {
        flex-wrap: wrap;
    }

    /* Blog grid */
    .blog-grid {
        grid-template-columns: 1fr;
    }

    /* Footer — 2 columns on tablet */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-md);
    }

    /* Containers — full width with padding */
    .container {
        padding: 0 1rem;
    }

    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
}

@media (max-width: 480px) {
    /* Nav — very small screens */
    .nav a {
        font-size: 0.75rem;
        letter-spacing: 0;
    }

    /* Hero */
    .hero h1 {
        font-size: 2rem;
    }

    /* Footer — single column on small phones */
    .footer-content {
        grid-template-columns: 1fr;
    }

    /* Product pages */
    .product-detail {
        gap: var(--spacing-md);
    }

    /* Tighter image cap on small phones */
    .main-image,
    .main-image img {
        max-height: 48vh;
    }

    .price-large {
        font-size: 1.4rem;
    }

    /* Section padding reduction */
    .py-xl {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-xl { margin-top: var(--spacing-xl); }
.mb-xl { margin-bottom: var(--spacing-xl); }
.py-xl { padding: var(--spacing-xl) 0; }

/* =====================================================
   Shop Dropdown Nav
   ===================================================== */
/* ── Shop Dropdown ──────────────────────────────────────── */
/* Remove relative from nav-dropdown so header is the containing block */
.nav-dropdown {
    position: static;
}

.dropdown-menu {
    display: none !important;
    position: absolute;      /* relative to .header (sticky = containing block) */
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--color-white);
    border: none;
    border-top: none;
    z-index: 1100;
    padding: 0;
    box-shadow: none;
}

.nav-dropdown.open .dropdown-menu {
    display: block !important;   /* JS-controlled — no pure CSS hover */
}

/* Inner: left links + right images, constrained to content width */
.dropdown-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    align-items: flex-start;
    gap: 3rem;
}

/* Left column: collection links */
.dropdown-collections {
    list-style: none;
    padding: 1.25rem 0;
    min-width: 180px;
    display: flex !important;
    flex-direction: column !important;
    gap: 0;
    flex-shrink: 0;
}

.dropdown-collections li a {
    display: block;
    padding: 0.55rem 0;
    font-size: 0.8rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--color-text);
    white-space: nowrap;
    transition: color 0.15s ease;
    text-decoration: none;
    opacity: 1;
    font-family: var(--font-primary);
}

.dropdown-collections li a:hover {
    color: var(--color-accent);
    opacity: 1;
}

/* Hidden on desktop — image cards serve this purpose */
.mobile-category-link {
    display: none;
}

/* Mobile section headings inside dropdown — never a link */
.mobile-nav-heading {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #999;
    padding: 0.75rem 0 0.25rem;
    pointer-events: none;
    cursor: default;
}

/* Footer shop section subheadings */
.footer-subheading {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #999;
    padding: 0.6rem 0 0.2rem;
    pointer-events: none;
    cursor: default;
    list-style: none;
}

/* Right section: 3 image cards */
.dropdown-images {
    flex: 1;
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    align-items: flex-start;
}

/* Each card: image + label below */
.dropdown-img-card {
    flex: 1;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.dropdown-img-card-img {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 2 / 3;
    background: #e8e6e2;
}

.dropdown-img-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.dropdown-img-card:hover .dropdown-img-card-img img {
    transform: scale(1.03);
    opacity: 1;
}

/* Label overlaid on image — bottom left, Cormorant Garamond */
.dropdown-img-card span {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.52) 0%, transparent 100%);
    color: #fff;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-align: left;
    text-transform: none;
}

/* Mobile: stack, hide images */
@media (max-width: 768px) {
    .nav-dropdown.open .dropdown-menu {
        display: block !important;
        border-top: none;
    }
    .dropdown-inner {
        flex-direction: column;
        gap: 0;
        padding: 0 var(--spacing-sm);
    }
    .dropdown-images {
        display: none;
    }
    .dropdown-collections {
        padding: 1rem 0;
    }
    .dropdown-collections li a {
        padding: 0.85rem 0; /* larger tap targets on mobile — min ~44px */
    }
    .mobile-category-link {
        display: block !important; /* visible on mobile */
    }
    .mobile-hide {
        display: none !important; /* All Products hidden on mobile */
    }
}

/* =====================================================
   Collection Gallery Pages
   ===================================================== */
.gallery-header {
    text-align: center;
    padding: 4rem 0 3rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 4rem;
}

.gallery-header h1 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 0.75rem;
}

.gallery-header p {
    color: #888;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto 6rem;
    padding: 0 2rem;
}

.gallery-card {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.gallery-card-image {
    position: relative;           /* establishes stacking context for dots/arrows/slides */
    width: 100%;
    aspect-ratio: 2 / 3;
    background-color: #f5f5f5;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.gallery-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.gallery-card:hover .gallery-card-image img {
    transform: scale(1.04);
}

.gallery-card-info {
    text-align: center;
}

.gallery-card-name {
    font-family: var(--font-secondary);
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
    letter-spacing: 0.03em;
}

.gallery-card-price {
    font-size: 0.9rem;
    color: #888;
    letter-spacing: 0.04em;
}

.gallery-back-link {
    text-align: center;
    padding: 0 0 4rem;
}

.gallery-back-link a {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    border: 1px solid var(--color-text);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.gallery-back-link a:hover {
    background: var(--color-text);
    color: var(--color-white);
    opacity: 1;
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem 1.5rem;
    }
    .gallery-header h1 { font-size: 2.2rem; }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem 1rem;
        padding: 0 1rem;
    }
    .gallery-header { padding: 2.5rem 0 2rem; }
    .gallery-header h1 { font-size: 1.8rem; }
}

/* =====================================================
   Gallery Carousel Cards
   ===================================================== */

/* Slides container fills the 2:3 box */
.card-slides {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;        /* below dots (z-index:4) and arrows (z-index:4) */
}

.card-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card-slide.active {
    opacity: 1;
}

.card-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Dot indicators */
.card-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 4;
    pointer-events: all;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gallery-card-image:hover .card-dots {
    opacity: 1;
}

.card-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    border: none;
    padding: 6px;            /* larger invisible tap area — critical for mobile */
    box-sizing: content-box;
    background-clip: content-box;
}

.card-dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* Prev / Next arrows */
.card-prev,
.card-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    background: rgba(255, 255, 255, 0.88);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    font-size: 1.25rem;
    line-height: 1;
    color: #2C2C2C;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.card-prev { left: 9px; }
.card-next { right: 9px; }

.gallery-card-image:hover .card-prev,
.gallery-card-image:hover .card-next {
    opacity: 1;
}

.card-prev:hover,
.card-next:hover {
    background: #fff;
}

/* Touch devices: hide arrows (swipe instead), show dots always */
@media (hover: none) {
    .card-prev,
    .card-next { display: none; }
    .card-dots { opacity: 0.7; }   /* always visible — no hover on mobile */
}


/* ── Product page — wishlist button & modal ── */
.wishlist-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #fff;
    border: 1px solid #000;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}
.wishlist-btn:hover {
    background: #000;
    color: #fff;
}
.wishlist-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.wishlist-modal-content {
    background: #fff;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
}
.wishlist-modal-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}
.wishlist-modal-close {
    float: right;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

/* ── Product page mobile overrides ── */
@media (max-width: 768px) {
    .product-container { padding: 0 1rem; }
    .product-info { padding: 1.5rem 0; }
    .product-title { font-size: 1.6rem; }
    .price-large { font-size: 1.4rem; }
    .size-grid { grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
    .btn { width: 100%; text-align: center; }
    .color-btn { padding: 0.5rem 0.8rem; font-size: 0.78rem; }
    .product-actions { flex-direction: column; gap: 0.75rem; }
    .product-actions button, .product-actions a { width: 100%; }
}
@media (max-width: 480px) {
    .product-title { font-size: 1.3rem; }
    .size-grid { grid-template-columns: repeat(3, 1fr); }
}
