/* Base Variables */
:root {
    --color-bg: #F6F3EE; /* Warm off-white */
    --color-text: #2D2D2A; /* Soft Charcoal */
    --color-text-light: #6E6D68;
    --color-accent: #B89C6A;
    --color-border: #E8E2D6;
    --color-card-bg: #FFFFFF;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition-slow: 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast: 0.3s ease;
    
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.06);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* Typography */
h1, h2, h3, .logo {
    font-family: var(--font-heading);
    font-weight: 300;
}

.section-title {
    font-size: 2rem;
    color: var(--color-text);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    border-bottom: 1px solid rgba(45, 45, 42, 0.04);
}

.logo {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.08em;
}

.nav a {
    margin-left: 2rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    transition: color var(--transition-fast);
}

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

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 5% 7rem;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 60vh;
}

.hero-content {
    flex: 1;
    padding-right: 4rem;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 2.5rem;
    max-width: 450px;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--color-text);
    color: #fff;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    border-radius: 40px;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn:hover {
    background-color: #000;
    transform: translateY(-2px);
}

.hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-image {
    width: 90%;
    max-width: 550px;
    box-shadow: var(--shadow-soft);
    border-radius: 6px;
}

/* Sticky Brand Element */
.sticky-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 1.8rem;
    opacity: 0;
    pointer-events: none;
    font-family: var(--font-heading);
    letter-spacing: 0.15em;
    font-size: 0.95rem;
    color: rgba(45, 45, 42, 0.45);
    font-weight: 300;
    text-transform: uppercase;
    transition: opacity var(--transition-fast);
}

.sticky-filter-wrapper.is-stuck .sticky-brand {
    opacity: 1;
}

.sticky-filter-wrapper.is-stuck .collection-flex {
    /* To ensure exact vertical centering on desktop */
}

/* Sticky Filter Wrapper */
.sticky-filter-wrapper {
    position: sticky;
    top: 0;
    z-index: 90;
    background-color: var(--color-bg);
    box-shadow: 0 15px 40px rgba(0,0,0,0.03);
    padding-top: 2rem;
    padding-bottom: 0.5rem;
}

/* Collection Header & Search */
.collection-header-section {
    padding: 0 5% 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.collection-flex {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid rgba(45, 45, 42, 0.04);
    padding-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.search-container input {
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 40px;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text);
    width: 280px;
    outline: none;
    transition: border-color var(--transition-fast);
}

.search-container input:focus {
    border-color: var(--color-text-light);
}

/* Filters Section */
.filters-section {
    padding: 1.5rem 5% 1rem;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.filter-label {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1rem;
    min-width: 80px;
    padding-top: 0.5rem;
    color: var(--color-text);
}

.filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: rgba(45, 45, 42, 0.5);
    cursor: pointer;
    padding: 0.35rem 1rem;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    color: var(--color-text);
    background-color: rgba(45, 45, 42, 0.04);
}

.filter-btn.active {
    color: var(--color-bg);
    background-color: var(--color-text);
    border-color: var(--color-text);
}

/* Collection Grid */
.collection {
    padding: 3rem 5% 6rem;
    max-width: 1400px;
    margin: 0 auto;
}

.no-results {
    text-align: center;
    color: var(--color-text-light);
    font-size: 1.1rem;
    margin-top: 2rem;
}

.no-results.hidden {
    display: none;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.product-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.image-container {
    overflow: hidden;
    background-color: var(--color-card-bg);
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    box-shadow: var(--shadow-soft);
    transition: box-shadow var(--transition-slow), transform var(--transition-slow);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem; 
}

.product-card:hover .image-container {
    box-shadow: var(--shadow-hover);
    transform: translateY(-6px);
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform var(--transition-slow);
}

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

.product-info {
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.product-name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-tag {
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background-color: rgba(0,0,0,0.04);
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(246, 243, 238, 0.97); /* Match background */
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 3rem;
    background: none;
    border: none;
    font-size: 3rem;
    color: var(--color-text);
    cursor: pointer;
    font-weight: 300;
    transition: transform var(--transition-fast);
    z-index: 1010;
}

.lightbox-close:hover {
    transform: scale(1.1);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 3rem;
    color: var(--color-text-light);
    cursor: pointer;
    transition: color var(--transition-fast);
    padding: 1rem;
    z-index: 1010;
}

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

.nav-btn:disabled {
    opacity: 0.2;
    cursor: default;
}

.prev { left: 5%; }
.next { right: 5%; }

.lightbox-content {
    max-width: 70%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-height: 70vh;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08); /* slight soft shadow on lightbox img */
}

.lightbox-info {
    margin-top: 2rem;
    text-align: center;
}

.lightbox-info h3 {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.lightbox-tag {
    font-size: 0.8rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.custom-dropdown {
    position: relative;
    font-family: var(--font-body);
    font-size: 0.85rem;
}

.custom-dropdown-btn {
    padding: 0.4rem 1.2rem;
    border: 1px solid rgba(45, 45, 42, 0.06);
    border-radius: 30px;
    background-color: rgba(45, 45, 42, 0.02);
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
    user-select: none;
}

.custom-dropdown-btn:hover {
    background-color: rgba(45, 45, 42, 0.05);
    border-color: rgba(45, 45, 42, 0.1);
}

.dropdown-arrow {
    font-size: 0.8em;
}

.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 180px;
    background-color: var(--color-card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    z-index: 100;
}

.custom-dropdown.open .custom-dropdown-menu {
    display: flex;
}

.custom-dropdown-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 6px;
    color: var(--color-text-light);
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.custom-dropdown-item:hover {
    background-color: rgba(45, 45, 42, 0.05);
    color: var(--color-text);
}

.custom-dropdown-item.active {
    background-color: rgba(45, 45, 42, 0.04);
    color: var(--color-text);
    font-weight: 500;
}

.show-on-mobile {
    display: none;
}

.desktop-text { display: inline; }
.mobile-text { display: none; }

/* Expand Button Inner Styling */
.expand-btn {
    border: 1px solid rgba(45, 45, 42, 0.15);
    color: rgba(45, 45, 42, 0.7);
}

.expand-btn:hover {
    background-color: rgba(45, 45, 42, 0.05);
    color: var(--color-text);
}

.expand-btn.active {
    background-color: transparent;
    color: rgba(45, 45, 42, 0.7);
    border-color: rgba(45, 45, 42, 0.15);
}

.expand-btn span {
    font-size: 0.8em;
    margin-left: 2px;
}

.hidden {
    display: none !important;
}

/* Compact Sticky State */
.sticky-filter-wrapper,
.collection-header-section,
.collection-flex,
.section-title,
.search-container input,
.filters-section,
.filter-group,
.filter-btn,
.custom-dropdown-btn,
.filter-label {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.sticky-filter-wrapper.is-stuck {
    padding-top: 1rem;
    margin-bottom: 3.5rem; /* Eliminates layout shift by replacing 3.5rem total vertical compression lost inside children */
    box-shadow: 0 15px 40px rgba(0,0,0,0.06);
}

.sticky-filter-wrapper.is-stuck .collection-header-section {
    padding-bottom: 0.5rem; /* -1.0rem */
}

.sticky-filter-wrapper.is-stuck .collection-flex {
    padding-bottom: 1rem; /* -0.5rem */
    gap: 1rem;
}

.sticky-filter-wrapper.is-stuck .section-title {
    font-size: 1.4rem;
}

.sticky-filter-wrapper.is-stuck .search-container input {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    width: 220px;
}

.sticky-filter-wrapper.is-stuck .filters-section {
    padding-top: 1rem; /* -0.5rem */
    padding-bottom: 0.5rem; /* -0.5rem */
    gap: 1rem;
}

.sticky-filter-wrapper.is-stuck .filter-group {
    gap: 1rem;
}

.sticky-filter-wrapper.is-stuck .filter-btn {
    padding: 0.25rem 0.8rem;
    font-size: 0.75rem;
}

.sticky-filter-wrapper.is-stuck .custom-dropdown-btn {
    padding: 0.25rem 1.8rem 0.25rem 1rem;
    font-size: 0.75rem;
}

.sticky-filter-wrapper.is-stuck .filter-label {
    font-size: 0.85rem;
    padding-top: 0.2rem;
}

/* Footer */
.footer {
    padding: 4rem 5%;
    border-top: 1px solid var(--color-border);
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.footer p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin: 0;
}

.bni-badge-container {
    display: flex;
    align-items: center;
}

.bni-badge {
    height: 60px;
    width: auto;
    opacity: 0.65;
    transition: opacity var(--transition-fast);
    mix-blend-mode: multiply; /* Elegantly drops the image's JPEG white bounding box assuming standard logo format */
}

.bni-badge:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 2rem;
    }
    .hero-content {
        padding-right: 0;
        margin-bottom: 3rem;
    }
    .hero p {
        margin: 0 auto 2.5rem;
    }
    .hero-image {
        width: 100%;
    }
    .filter-group {
        align-items: center;
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 3rem;
    }
    
    /* Sticky Wrapper Compression for Mobile */
    .sticky-filter-wrapper {
        padding-top: 1rem;
    }
    .sticky-filter-wrapper.is-stuck {
        padding-top: 0.5rem;
        margin-bottom: 0.5rem; /* Compensate 0.5rem padding loss */
    }
    
    /* Cancel inherited desktop is-stuck specificity overrides for mobile layout stability */
    .sticky-filter-wrapper.is-stuck .collection-header-section {
        padding-bottom: 0.5rem;
    }
    .sticky-filter-wrapper.is-stuck .collection-flex {
        padding-bottom: 0.8rem;
        gap: 0.8rem;
    }
    .sticky-filter-wrapper.is-stuck .filters-section {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        flex: 1;
        min-width: max-content;
    }
    
    .sticky-brand {
        position: static;
        transform: none;
        text-align: right;
        font-size: 0.75rem;
        letter-spacing: 0.08em;
        margin-bottom: 0;
        display: block;
        width: auto;
        opacity: 0;
    }
    
    .sticky-filter-wrapper.is-stuck .sticky-brand {
        opacity: 1;
    }
    
    .collection-header-section {
        padding: 0 5% 0.5rem;
    }
    
    .collection-flex {
        flex-direction: row;
        align-items: center;
        gap: 0.8rem;
        padding-bottom: 0.8rem;
    }
    
    .search-container {
        width: 100%;
    }
    
    .search-container input {
        width: 100%;
        padding: 0.5rem 1rem;
    }
    
    .filters-section {
        padding: 0.5rem 5% 0.5rem;
        flex-direction: row-reverse;
        justify-content: space-between;
        gap: 0.8rem;
    }
    
    .filter-group {
        flex: 1;
        width: 50%;
        gap: 0;
    }
    
    .custom-dropdown {
        width: 100%;
    }
    
    .custom-dropdown-btn {
        justify-content: space-between;
    }
    
    .custom-dropdown-menu {
        width: 100%;
    }
    
    .hide-on-mobile {
        display: none !important;
    }
    
    .show-on-mobile {
        display: block !important;
    }
    
    .desktop-text { display: none; }
    .mobile-text { display: inline; }
    
    .custom-dropdown-btn .is-placeholder {
        color: rgba(45, 45, 42, 0.45);
    }
    
    .lightbox-content {
        max-width: 85%;
    }
    .nav-btn {
        font-size: 2rem;
    }
    .prev { left: 2%; }
    .next { right: 2%; }
    
    .footer-content {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }
    
    .footer p {
        font-size: 0.8rem; /* Ensures text fits comfortably on small screens beside the badge */
        text-align: left;
    }
    
    .bni-badge {
        height: 45px; /* Scales down slightly to maintain clean row balance */
        flex-shrink: 0;
    }
}
