/* =========================================================
   KCSPL Product Catalog — catalog.css
   Shared across products.html and category.html
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Inter:wght@300;400;500;600&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

:root {
    --cream: #f5f0e8;
    --sand: #e8dfc8;
    --gold: #c9a96e;
    --charcoal: #1c1f1a;
    --moss: #4a5c3f;
    --sage: #7a9e6e;
    --olive: #3a4a2e;
    --dark: #191c17;
    --ff-serif: 'Cormorant Garamond', Georgia, serif;
    --ff-sans: 'Inter', system-ui, sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
    scroll-behavior: smooth
}

body {
    background: var(--charcoal);
    color: var(--cream);
    font-family: var(--ff-sans);
    overflow-x: hidden
}

::-webkit-scrollbar {
    width: 5px
}

::-webkit-scrollbar-track {
    background: var(--charcoal)
}

::-webkit-scrollbar-thumb {
    background: var(--moss);
    border-radius: 3px
}

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

ul {
    list-style: none
}

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

/* ── SHARED NAV ─────────────────────────────────────── */
.c-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 5%;
    transition: background .4s, backdrop-filter .4s
}

.c-nav.scrolled {
    background: rgba(25, 28, 23, .92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(201, 169, 110, .12)
}

.c-logo {
    padding: 0.4rem 1rem;
    background: var(--cream);
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    height: 52px;
    display: inline-flex;
    align-items: center;
    overflow: hidden;
}

.c-logo .nav-logo-img {
    height: 40px;
    width: auto;
    display: block;
    max-width: 140px;
    object-fit: contain;
}

.c-nav-links {
    display: flex;
    gap: 2rem;
    align-items: center
}

.c-nav-links a {
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(245, 240, 232, .65);
    transition: color .3s
}

.c-nav-links a:hover,
.c-nav-links a.active {
    color: var(--gold)
}

.c-nav-cta {
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: .5rem 1.3rem;
    border: 1px solid var(--gold);
    color: var(--gold);
    border-radius: 2px;
    transition: background .3s, color .3s
}

.c-nav-cta:hover {
    background: var(--gold);
    color: var(--charcoal)
}

/* ── BREADCRUMB ─────────────────────────────────────── */
.breadcrumb {
    padding: 6.5rem 5% 1rem;
    font-size: .68rem;
    color: rgba(245, 240, 232, .38);
    letter-spacing: .08em;
    background: var(--dark);
    border-bottom: 1px solid rgba(201, 169, 110, .08);
    position: relative;
    z-index: 10;
}

.breadcrumb a {
    color: var(--gold);
    transition: opacity .3s
}

.breadcrumb a:hover {
    opacity: .75
}

.breadcrumb span {
    margin: 0 .5rem;
    opacity: .4
}

/* ── SHARED HELPERS ─────────────────────────────────── */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 5%
}

.label {
    font-size: .62rem;
    font-weight: 500;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: .6rem
}

.h-serif {
    font-family: var(--ff-serif);
    font-weight: 300;
    line-height: 1.1;
    color: var(--cream)
}

.gold-bar {
    width: 40px;
    height: 1px;
    background: var(--gold);
    margin: 1rem 0 1.6rem
}

.btn-primary {
    display: inline-block;
    padding: .8rem 2.2rem;
    background: var(--gold);
    color: var(--charcoal);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    border-radius: 2px;
    transition: transform .3s var(--ease), box-shadow .3s;
    border: none;
    cursor: pointer
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(201, 169, 110, .3)
}

.btn-outline {
    display: inline-block;
    padding: .7rem 1.8rem;
    border: 1px solid rgba(245, 240, 232, .25);
    color: rgba(245, 240, 232, .7);
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    border-radius: 2px;
    transition: border-color .3s, color .3s
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold)
}

/* Back button */
.back-btn {
    position: absolute;
    top: 2rem;
    left: 5%;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
    transition: transform 0.3s var(--ease), opacity 0.3s;
}

.back-btn:hover {
    transform: translateX(-5px);
    opacity: 0.8;
}

.back-btn svg {
    width: 14px;
    height: 14px;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s var(--ease), transform .8s var(--ease)
}

.reveal.d1 {
    transition-delay: .1s
}

.reveal.d2 {
    transition-delay: .2s
}

.reveal.d3 {
    transition-delay: .3s
}

.reveal.d4 {
    transition-delay: .4s
}

.reveal.in {
    opacity: 1;
    transform: none
}

/* =========================================================
   PRODUCTS LANDING — category grid
   ========================================================= */
.products-hero {
    min-height: 55vh;
    display: flex;
    align-items: flex-end;
    padding: 7rem 5% 4rem;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse 80% 60% at 60% 30%, rgba(74, 92, 63, .5) 0%, transparent 70%),
        linear-gradient(155deg, #0e1409 0%, #1a2015 50%, #1c1f1a 100%);
}

.products-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a96e' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")
}

.products-hero-content {
    position: relative;
    z-index: 2
}

.products-hero h1 {
    font-family: var(--ff-serif);
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 300;
    color: var(--cream);
    line-height: 1.1;
    margin: .6rem 0 1rem
}

.products-hero h1 em {
    font-style: italic;
    color: var(--gold)
}

.products-hero p {
    font-size: .95rem;
    font-weight: 300;
    color: rgba(245, 240, 232, .6);
    max-width: 500px;
    line-height: 1.8
}

.products-search-bar {
    display: flex;
    align-items: center;
    margin-top: 1.8rem;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(201, 169, 110, .2);
    border-radius: 2px;
    max-width: 420px;
    overflow: hidden
}

.products-search-bar input {
    flex: 1;
    padding: .8rem 1.2rem;
    background: transparent;
    border: none;
    outline: none;
    font-size: .88rem;
    color: var(--cream);
    font-family: var(--ff-sans)
}

.products-search-bar input::placeholder {
    color: rgba(245, 240, 232, .3)
}

.products-search-bar button {
    padding: .8rem 1.2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(201, 169, 110, .7)
}

/* Category count bar */
.cat-meta {
    background: var(--dark);
    border-bottom: 1px solid rgba(201, 169, 110, .1);
    padding: .9rem 5%
}

.cat-meta-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto
}

.cat-count {
    font-size: .72rem;
    letter-spacing: .1em;
    color: rgba(245, 240, 232, .4)
}

.cat-legend {
    display: flex;
    gap: 1.5rem
}

.cat-legend span {
    font-size: .65rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(245, 240, 232, .3);
    transition: color 0.3s;
}

.cat-legend span:not(:empty):hover {
    color: rgba(245, 240, 232, .7);
}

.cat-legend span.active {
    color: var(--gold);
    font-weight: 500;
}

/* Category grid */
.categories-section {
    padding: 4rem 5%;
    background: var(--charcoal)
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2px;
    max-width: 1280px;
    margin: 0 auto
}

.cat-card {
    position: relative;
    height: 240px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.8rem;
    border: 1px solid rgba(255, 255, 255, .0);
    transition: border-color .4s
}

.cat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--card-bg);
    z-index: 0;
    transition: transform .7s var(--ease)
}

.cat-card:hover::before {
    transform: scale(1.05)
}

.cat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 20, 12, .95) 0%, rgba(15, 20, 12, .5) 50%, rgba(15, 20, 12, .15) 100%);
    z-index: 1
}

.cat-card:hover {
    border-color: rgba(201, 169, 110, .3)
}

.cat-emoji {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 3.2rem;
    opacity: .25;
    z-index: 2;
    transition: opacity .4s, transform .4s
}

.cat-card:hover .cat-emoji {
    opacity: .5;
    transform: scale(1.1) rotate(-5deg)
}

.cat-card-body {
    position: relative;
    z-index: 2
}

.cat-card-label {
    font-size: .6rem;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: .35rem
}

.cat-card-name {
    font-family: var(--ff-serif);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--cream);
    line-height: 1.2;
    margin-bottom: .5rem
}

.cat-card-count {
    font-size: .68rem;
    color: rgba(245, 240, 232, .45)
}

.cat-card-arrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .65rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold);
    margin-top: .7rem;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity .35s, transform .35s
}

.cat-card:hover .cat-card-arrow {
    opacity: 1;
    transform: translateX(0)
}

/* =========================================================
   CATEGORY PAGE — product cards
   ========================================================= */
.cat-hero {
    min-height: 62vh;
    display: flex;
    align-items: flex-end;
    padding: 7rem 5% 5rem;
    position: relative;
    overflow: hidden
}

.cat-hero-bg {
    position: absolute;
    inset: 0;
    background: var(--hero-bg);
    transition: transform 8s ease-out;
    will-change: transform
}

.cat-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(12, 16, 10, .85) 0%, rgba(12, 16, 10, .5) 55%, rgba(12, 16, 10, .25) 100%)
}

.cat-hero-content {
    position: relative;
    z-index: 2;
    max-width: 620px
}

.cat-hero-pill {
    display: inline-block;
    font-size: .62rem;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    border: 1px solid rgba(201, 169, 110, .4);
    color: var(--gold);
    padding: .28rem 1rem;
    border-radius: 100px;
    margin-bottom: 1.4rem
}

.cat-hero-title {
    font-family: var(--ff-serif);
    font-size: clamp(2.6rem, 6vw, 5rem);
    font-weight: 300;
    line-height: 1.08;
    color: var(--cream);
    margin-bottom: 1rem
}

.cat-hero-title em {
    font-style: italic;
    color: var(--gold)
}

.cat-hero-desc {
    font-size: .95rem;
    font-weight: 300;
    color: rgba(245, 240, 232, .68);
    line-height: 1.8;
    max-width: 480px;
    margin-bottom: 1.5rem
}

.cat-hero-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap
}

.cat-badge {
    font-size: .65rem;
    font-weight: 500;
    letter-spacing: .1em;
    padding: .3rem .9rem;
    background: rgba(201, 169, 110, .12);
    border: 1px solid rgba(201, 169, 110, .2);
    border-radius: 100px;
    color: rgba(245, 240, 232, .6)
}

/* Products section */
.products-section {
    padding: 5rem 5%;
    background: var(--charcoal)
}

.products-section-header {
    max-width: 1280px;
    margin: 0 auto 3rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem
}

.varieties-count {
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(245, 240, 232, .3)
}

/* Product grid */
.product-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2px
}

.prod-card {
    background: #1e2219;
    border: 1px solid rgba(201, 169, 110, .06);
    padding: 2.2rem;
    transition: background .4s, border-color .4s, transform .4s var(--ease);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.prod-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(201, 169, 110, .4), transparent);
    transform: scaleX(0);
    transition: transform .5s var(--ease)
}

.prod-card:hover::before {
    transform: scaleX(1)
}

.prod-card:hover {
    background: #242b1e;
    border-color: rgba(201, 169, 110, .22);
    transform: translateY(-3px)
}

.prod-code-badge {
    display: inline-block;
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: .18em;
    padding: .25rem .8rem;
    background: rgba(201, 169, 110, .12);
    border: 1px solid rgba(201, 169, 110, .25);
    border-radius: 100px;
    color: var(--gold);
    margin-bottom: .9rem
}

.prod-name {
    font-family: var(--ff-serif);
    font-size: 1.45rem;
    font-weight: 400;
    color: var(--cream);
    margin-bottom: 1.2rem;
    line-height: 1.2
}

.prod-highlights {
    margin-bottom: 1.3rem
}

.prod-highlights li {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    font-size: .8rem;
    font-weight: 300;
    color: rgba(245, 240, 232, .58);
    line-height: 1.5;
    margin-bottom: .4rem
}

.prod-highlights li::before {
    content: '✦';
    color: var(--gold);
    font-size: .5rem;
    flex-shrink: 0;
    margin-top: .25rem
}

.prod-stats {
    display: flex;
    gap: 0;
    border-top: 1px solid rgba(245, 240, 232, .07);
    margin-top: 1.3rem;
    padding-top: 1.2rem
}

.prod-stat {
    flex: 1;
    text-align: center;
    border-right: 1px solid rgba(245, 240, 232, .07)
}

.prod-stat:last-child {
    border-right: none
}

.prod-stat-val {
    font-family: var(--ff-serif);
    font-size: 1rem;
    font-weight: 400;
    color: var(--cream);
    display: block;
    margin-bottom: .15rem
}

.prod-stat-label {
    font-size: .58rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(245, 240, 232, .3)
}

.prod-resistance {
    margin-top: auto;
    padding-top: 1.2rem;
    padding-left: .9rem;
    padding-right: .9rem;
    padding-bottom: .6rem;
    padding: .6rem .9rem;
    background: rgba(74, 92, 63, .18);
    border-left: 2px solid rgba(122, 158, 110, .4);
    border-radius: 0 2px 2px 0
}

.prod-resistance-label {
    font-size: .58rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: .2rem
}

.prod-resistance-val {
    font-size: .78rem;
    font-weight: 300;
    color: rgba(245, 240, 232, .55)
}

/* Related categories footer strip */
.related-cats {
    background: var(--dark);
    padding: 3.5rem 5%;
    border-top: 1px solid rgba(201, 169, 110, .1)
}

.related-cats .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem
}

.related-cats-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap
}

.related-cats-links a {
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(245, 240, 232, .4);
    padding: .35rem .9rem;
    border: 1px solid rgba(245, 240, 232, .12);
    border-radius: 2px;
    transition: color .3s, border-color .3s
}

.related-cats-links a:hover {
    color: var(--gold);
    border-color: rgba(201, 169, 110, .4)
}

/* Footer mini */
.c-footer {
    background: #111410;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-top: 1px solid rgba(201, 169, 110, .08)
}

.c-footer .c-logo {
    font-size: 1.3rem
}

.c-copy {
    font-size: .68rem;
    color: rgba(245, 240, 232, .25)
}

.c-footer-nav {
    display: flex;
    gap: 1.5rem
}

.c-footer-nav a {
    font-size: .68rem;
    color: rgba(245, 240, 232, .3);
    transition: color .3s
}

.c-footer-nav a:hover {
    color: var(--cream)
}

/* ── Filter / sort bar ───────────────────────────── */
.filter-bar {
    background: var(--dark);
    border-bottom: 1px solid rgba(201, 169, 110, .08);
    padding: .9rem 5%;
    position: sticky;
    top: 0;
    z-index: 50
}

.filter-bar-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .8rem
}

.filter-btns {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap
}

.f-btn {
    font-size: .65rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: .35rem 1rem;
    border: 1px solid rgba(245, 240, 232, .15);
    border-radius: 100px;
    background: transparent;
    color: rgba(245, 240, 232, .5);
    cursor: pointer;
    transition: all .3s
}

.f-btn.active,
.f-btn:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--charcoal)
}

.sort-select {
    font-size: .68rem;
    background: transparent;
    border: 1px solid rgba(245, 240, 232, .15);
    color: rgba(245, 240, 232, .5);
    padding: .32rem .8rem;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    font-family: var(--ff-sans)
}

/* ── RESPONSIVE ─────────────────────────────────── */
@media(max-width:900px) {
    .c-nav-links {
        display: none
    }

    .products-section-header {
        flex-direction: column;
        align-items: flex-start
    }
}

@media(max-width:600px) {
    .categories-grid {
        grid-template-columns: 1fr
    }

    .product-grid {
        grid-template-columns: 1fr
    }

    .cat-hero {
        min-height: 50vh
    }

    .category-filters {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
        /* Room for scrollbar */
        justify-content: flex-start;
    }

    .products-hero {
        padding-top: 6rem;
    }
}