/*
 * category.css — Zukro Farm Fresh Modernized Category Stylesheet
 *
 * Consolidated from inline <style> blocks in category.html.
 * Implements Apple Liquid Glass 2026 and Baymard Mobile Responsive Standards.
 */

.zk-skip-link {
    position: absolute;
    left: -9999px;
    top: 4px;
    z-index: 10000;
    background: #123D2A;
    color: #fff;
    padding: 8px 18px;
    border-radius: 0 0 6px 6px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}
.zk-skip-link:focus { left: 4px; }

:root {
    --zukro-green: #123D2A;
    --gold: #FAC40B;
    --bg-warm: #F3EEE3;
    --paper: #fffdf7;
    --sage: #CED6C9;
    --muted: #5f6b60;
    --line: #dbe3d8;
    --border: #e6e8e6;
    --shadow-soft: 0 16px 36px rgba(18, 61, 42, .08);
    --shadow-deep: 0 26px 60px rgba(16, 24, 40, .16);
}

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

body {
    font-family: var(--font-body, system-ui, -apple-system, sans-serif);
    background: #F3EEE3;
    color: #1a1a1a;
    padding-top: var(--zk-header-offset, 72px) !important;
}

/* ==========================================================================
   Category Cinematic Hero & Trust Pills
   ========================================================================== */
.cat-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 64px 5% 84px;
    min-height: 610px;
    background: #123D2A;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    box-shadow: var(--shadow-deep);
}
.cat-hero .wrap {
    max-width: 1180px;
    margin: 0 auto;
}
.cat-bc {
    font-size: 13px;
    opacity: .8;
    margin-bottom: 14px;
}
.cat-bc a {
    color: #fff;
    text-decoration: none;
}
.cat-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: .95;
    margin-bottom: 14px;
    letter-spacing: -.05em;
    max-width: 12ch;
    font-weight: 700;
}
.cat-hero p {
    font-size: clamp(1rem, 1.5vw, 1.14rem);
    max-width: 54ch;
    line-height: 1.7;
    opacity: .9;
}
.cat-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}
.cat-benefits div {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    padding: 10px 14px;
}
.cat-benefits i {
    color: var(--gold, #FAC40B);
}

.cat-trust {
    margin-top: -24px;
    position: relative;
    z-index: 3;
}
.cat-trust .row {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px;
    justify-content: center;
    font-size: 13px;
    background: rgba(255, 253, 247, .92);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(206, 214, 201, .8);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}
.cat-trust span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--zukro-green);
    font-weight: 700;
    min-height: 44px;
    white-space: nowrap;
}
.cat-trust i {
    color: var(--gold, #FAC40B);
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Category Shell & Filtering Toolbar
   ========================================================================== */
.cat-shell {
    max-width: 1180px;
    margin: 20px auto 0;
    padding: 18px;
    background: rgba(255, 253, 247, .88);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(206, 214, 201, .75);
    border-radius: 30px;
    box-shadow: var(--shadow-soft);
}
.cat-tools {
    max-width: none;
    margin: 0;
    padding: 0;
}
.cat-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, .55fr);
    gap: 16px;
    align-items: end;
    margin-bottom: 18px;
}
.cat-head h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: .96;
    letter-spacing: -.05em;
    color: var(--zukro-green);
    margin-bottom: 8px;
    max-width: 11ch;
    font-weight: 700;
}
.cat-head p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    max-width: 50ch;
}
.cat-summary {
    background: #123D2A;
    color: #fff;
    border-radius: 24px;
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    box-shadow: var(--shadow-deep);
}
.cat-summary .sum {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    padding: 14px;
}
.cat-summary b {
    display: block;
    font-size: 22px;
    letter-spacing: -.04em;
    margin-bottom: 4px;
    font-weight: 800;
}
.cat-summary span {
    font-size: 12px;
    color: rgba(255, 255, 255, .75);
    line-height: 1.5;
}

.cat-toolrow {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    position: sticky;
    top: calc(var(--zk-header-offset, 72px) + 8px);
    z-index: 35;
    background: rgba(255, 253, 247, .94);
    border: 1px solid rgba(206, 214, 201, .88);
    border-radius: 26px;
    padding: 18px;
    box-shadow: 0 16px 34px rgba(18, 61, 42, .08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.cat-search {
    flex: 1;
    min-width: 220px;
    position: relative;
}
.cat-search i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #7a887d;
    font-size: 13px;
    width: 16px;
    height: 16px;
    pointer-events: none;
}
.cat-search input,
.cat-toolrow select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    font: inherit;
    font-size: 14px;
    background: #fff;
    min-height: 44px;
}
.cat-search input {
    padding: 12px 16px 12px 46px;
}
.cat-toolrow select {
    width: auto;
    min-width: 220px;
    padding: 12px 16px;
    color: #1a1a1a;
    cursor: pointer;
}
.cat-search input:focus,
.cat-toolrow select:focus {
    outline: none;
    border-color: #123D2A;
    box-shadow: 0 0 0 3px rgba(45, 91, 50, .12);
}

.cat-valuebar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 18px 0 0;
}
.cv {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.cv i {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f1efe6;
    color: #123D2A;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    flex: 0 0 auto;
}
.cv b {
    display: block;
    color: #123D2A;
    font-size: 13px;
    margin-bottom: 2px;
    letter-spacing: -.02em;
    font-weight: 700;
}
.cv span {
    color: #5f6b60;
    font-size: 12px;
    line-height: 1.5;
}

/* ==========================================================================
   Product Grid & Liquid Glass Cards
   ========================================================================== */
.cat-body {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 0 80px;
}
.cat-count {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    padding: 0 4px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
    gap: 20px;
}

.product-card {
    background: rgba(255, 253, 247, .96);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(206, 214, 201, .92);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    transition: transform .25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .25s ease, border-color .2s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 48px rgba(18, 61, 42, .12);
    border-color: #c6d0c5;
}
.product-card.oos {
    opacity: .74;
}

.card-img-box {
    aspect-ratio: 1 / 1;
    background: #F3E2BD;
    cursor: pointer;
    overflow: hidden;
    padding: 18px;
}
.card-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}
.product-card:hover .card-img-box img {
    transform: scale(1.05);
}

.zk-skel {
    position: relative;
}
.zk-skel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: #eef1ec;
}
.zk-skel.zk-done::before {
    display: none;
}
.zk-skel img {
    position: relative;
    z-index: 1;
}
img.zk-fade {
    opacity: 0;
    transition: opacity .45s ease;
}
img.zk-fade.zk-loaded {
    opacity: 1;
}

@keyframes zkShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@media(prefers-reduced-motion: reduce) {
    .zk-skel::before { animation: none; }
    img.zk-fade { transition: none; }
}

.card-body {
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}
.card-category {
    font-size: 11px;
    color: var(--gold, #FAC40B);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: .12em;
}
.card-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    cursor: pointer;
    line-height: 1.22;
    margin-bottom: 2px;
    letter-spacing: -.03em;
}
.card-rating {
    font-size: 12px;
    color: var(--gold, #FAC40B);
}
.card-rating span {
    color: #999;
}
.card-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 2px;
}
.card-signal {
    font-size: 11px;
    font-weight: 700;
    color: #123D2A;
    background: #f1efe6;
    border: 1px solid var(--sage);
    padding: 5px 8px;
    border-radius: 999px;
}
.card-helper {
    color: #5f6b60;
    font-size: 12px;
    line-height: 1.5;
    margin: 0 0 6px;
    min-height: 34px;
}
.card-price-row {
    margin: 4px 0 10px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.card-price {
    color: var(--zukro-green);
    font-weight: 800;
    font-size: 24px;
    letter-spacing: -.04em;
}
.card-mrp {
    color: #97a094;
    text-decoration: line-through;
    font-size: 13px;
    margin-left: 0;
}

.card-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
}
.btn-view,
.btn-add {
    min-height: 44px;
    padding: 10px 8px;
    font: 700 12.5px/1 var(--font-body, system-ui, -apple-system, sans-serif);
    cursor: pointer;
    border-radius: 999px;
    letter-spacing: .02em;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-view {
    background: var(--zukro-green);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(18, 61, 42, 0.15);
}
.btn-view:hover {
    background: #0e2f21;
    transform: translateY(-1px);
}
.btn-add {
    background: #F3EEE3;
    color: #123D2A;
    border: 1px solid var(--sage);
}
.btn-add:hover {
    background: #123D2A;
    color: #fff;
    border-color: #123D2A;
    transform: translateY(-1px);
}

.badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--gold, #FAC40B);
    color: #123D2A;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 999px;
    z-index: 2;
}
.oos-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #555;
    color: #fff;
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 999px;
    z-index: 2;
}
.stock-low {
    font-size: 12px;
    color: #9a3412;
    font-weight: 700;
    margin-bottom: 6px;
}

.cat-empty {
    text-align: center;
    padding: 70px 24px;
    color: #777;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
}
.cat-empty i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 14px;
}

.cat-links {
    max-width: 1180px;
    margin: 0 auto 70px;
    padding: 0 5%;
}
.cat-links h2 {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    color: #1a1a1a;
    margin-bottom: 16px;
    letter-spacing: -.04em;
    font-weight: 700;
}
.cat-links .row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.cat-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 12px 20px;
    color: var(--zukro-green);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    min-height: 44px;
}
.cat-links a:hover {
    background: var(--zukro-green);
    color: #fff;
}

#loader {
    text-align: center;
    padding: 60px 24px;
    color: #888;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
}

/* ==========================================================================
   Responsive Breakpoints (Baymard Standard)
   ========================================================================== */
@media(max-width: 1040px) {
    .cat-head {
        grid-template-columns: 1fr;
    }
    .cat-summary {
        max-width: 480px;
    }
    .cat-valuebar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 768px) {
    .cat-toolrow {
        position: static !important;
        width: 100% !important;
        margin-bottom: 16px !important;
    }
    .cat-search input,
    .cat-toolrow select {
        font-size: 16px !important;
    }
}

@media(max-width: 680px) {
    .cat-hero {
        min-height: 610px;
        padding: 58px 5% 78px;
    }
    .cat-shell {
        width: min(94%, 1180px);
        padding: 16px;
        border-radius: 24px;
    }
    .cat-valuebar,
    .cat-summary {
        grid-template-columns: 1fr;
    }
    .cat-toolrow {
        padding: 14px;
        border-radius: 22px;
    }
    .cat-toolrow select {
        width: 100%;
        min-width: 0;
    }
    .card-actions {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        gap: 6px !important;
    }
    .btn-view,
    .btn-add {
        min-height: 44px;
        font-size: 11.5px;
        padding: 7px 4px;
    }
}

@media(max-width: 360px) {
    .grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
    .card-actions {
        gap: 8px !important;
    }
    .btn-view,
    .btn-add {
        font-size: 13px !important;
        padding: 10px 12px !important;
        min-height: 44px !important;
    }
}
