.category-products-page {
    --tea-green: #315411;
    --tea-green-2: #527526;
    --tea-leaf: #1f7a3a;
    --tea-yellow: #f5d63f;
    --tea-cream: #fff9c7;
    --tea-mist: #f6faed;
    --tea-brown: #8b3e0d;
    --tea-ink: #233214;
    --tea-muted: #65735b;
    --tea-line: #dfe6c4;
    width: min(1340px, calc(100% - 32px));
    margin: 26px auto 76px;
    color: var(--tea-ink);
    font-family: Georgia, "Times New Roman", serif;
}

.category-products-page a {
    color: inherit;
}

.category-products-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    gap: clamp(18px, 4vw, 44px);
    align-items: center;
    min-height: 340px;
    overflow: hidden;
    padding: clamp(28px, 5vw, 58px);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(24, 58, 20, .94), rgba(49, 84, 17, .76) 52%, rgba(49, 84, 17, .4)),
        var(--category-hero-image, linear-gradient(135deg, #315411, #d5ca55)) center / cover;
    box-shadow: 0 24px 46px rgba(49, 84, 17, .18);
}

.category-products-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 15%, rgba(245, 214, 63, .28), transparent 24%),
        radial-gradient(circle at 14% 96%, rgba(255, 249, 199, .22), transparent 26%);
    pointer-events: none;
}

.category-products-hero::after {
    content: "";
    position: absolute;
    inset: auto -8% -22%;
    height: 44%;
    background: linear-gradient(180deg, rgba(108, 126, 37, 0), rgba(89, 92, 20, .88));
    pointer-events: none;
}

.category-hero-copy,
.category-hero-side {
    position: relative;
    z-index: 1;
}

.category-products-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, .82);
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
}

.category-products-breadcrumb a {
    color: var(--tea-yellow);
    text-decoration: none;
}

.category-eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--tea-yellow);
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 900;
}

.category-products-hero h1 {
    max-width: 760px;
    margin: 0;
    color: var(--tea-yellow);
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 900;
    line-height: .96;
    letter-spacing: 0;
    text-shadow: 0 4px 16px rgba(0, 0, 0, .28);
}

.category-products-hero p {
    max-width: 690px;
    margin: 16px 0 0;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: clamp(16px, 1.7vw, 20px);
    font-weight: 700;
    line-height: 1.45;
}

.category-hero-side {
    display: grid;
    gap: 14px;
    justify-items: end;
}

.category-hero-side img,
.category-hero-side > i {
    width: min(100%, 230px);
    aspect-ratio: 1;
    border: 10px solid rgba(255, 255, 255, .78);
    border-radius: 50%;
    background: linear-gradient(180deg, #fafff7, #e0edcf);
    box-shadow: 0 22px 36px rgba(0, 0, 0, .24);
}

.category-hero-side img {
    object-fit: cover;
}

.category-hero-side > i {
    display: grid;
    place-items: center;
    color: var(--tea-green);
    font-size: 92px;
}

.category-products-summary {
    min-width: 170px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 249, 199, .7);
    border-radius: 8px;
    background: rgba(255, 249, 199, .92);
    color: var(--tea-green);
    text-align: right;
}

.category-products-summary strong {
    display: block;
    font-family: Arial, sans-serif;
    font-size: 38px;
    line-height: 1;
}

.category-products-summary span {
    color: var(--tea-brown);
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.category-products-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
    margin-top: 26px;
}

.category-filter-panel,
.category-products-toolbar,
.category-product-card,
.category-empty-state {
    border: 1px solid var(--tea-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(49, 84, 17, .07);
}

.category-filter-panel {
    position: sticky;
    top: 18px;
    align-self: start;
    padding: 18px;
}

.category-filter-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #edf3d6;
}

.category-filter-head span,
.price-filter-grid label span,
.sort-control span {
    display: block;
    color: var(--tea-muted);
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.category-filter-head strong {
    display: block;
    margin-top: 3px;
    color: var(--tea-green);
    font-size: 18px;
}

.category-filter-head a {
    color: var(--tea-brown);
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.category-filter-group {
    padding: 16px 0;
    border-bottom: 1px solid #edf3d6;
}

.category-filter-group:last-of-type {
    border-bottom: 0;
}

.category-filter-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--tea-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
}

.category-filter-toggle i {
    color: var(--tea-green-2);
    transition: transform .2s ease;
}

.category-filter-group.is-collapsed .category-filter-toggle i {
    transform: rotate(-90deg);
}

.category-filter-body {
    margin-top: 14px;
}

.category-filter-group.is-collapsed .category-filter-body {
    display: none;
}

.price-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.price-filter-grid label span {
    margin-bottom: 6px;
}

.price-filter-grid input,
.sort-control select {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--tea-line);
    border-radius: 8px;
    background: #fffef2;
    color: var(--tea-ink);
    font: inherit;
}

.price-filter-grid input {
    padding: 0 11px;
}

.price-filter-grid input:focus,
.sort-control select:focus {
    border-color: var(--tea-green);
    outline: 2px solid rgba(245, 214, 63, .36);
}

.price-filter-range {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: var(--tea-muted);
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
}

.stock-filter,
.option-filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.stock-filter {
    color: var(--tea-green);
    font-weight: 900;
}

.stock-filter input,
.option-filter-item input {
    width: 16px;
    height: 16px;
    accent-color: var(--tea-green);
}

.option-filter-list {
    display: grid;
    gap: 11px;
}

.option-filter-item span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #3f4b35;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 800;
}

.option-filter-item em {
    width: 14px;
    height: 14px;
    border: 1px solid var(--tea-line);
    border-radius: 999px;
    background: var(--swatch-color);
}

.apply-filter-btn,
.category-product-actions button,
.mobile-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    font-family: Arial, sans-serif;
    font-weight: 900;
    cursor: pointer;
}

.apply-filter-btn {
    width: 100%;
    min-height: 48px;
    margin-top: 14px;
    background: var(--tea-green);
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(49, 84, 17, .18);
}

.category-products-content {
    min-width: 0;
}

.category-products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 66px;
    padding: 12px 14px;
}

.mobile-filter-btn {
    display: none;
    min-height: 42px;
    padding: 0 15px;
    background: var(--tea-green);
    color: #ffffff;
}

.mobile-filter-btn span {
    min-width: 22px;
    min-height: 22px;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--tea-yellow);
    color: var(--tea-green);
    font-size: 12px;
}

.active-filter-strip {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: 8px;
}

.active-filter-strip span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    border: 1px solid #dce9b8;
    border-radius: 999px;
    background: #f4f9df;
    color: var(--tea-green);
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 900;
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.sort-control select {
    min-width: 190px;
    padding: 0 34px 0 12px;
}

.category-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.category-product-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(49, 84, 17, .24);
    border-radius: 14px;
    background: #ffffff;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.category-product-card:hover {
    transform: translateY(-2px);
    border-color: rgba(49, 84, 17, .58);
    box-shadow: 0 18px 34px rgba(49, 84, 17, .12);
}

.category-product-media {
    position: relative;
    display: block;
    width: calc(100% - 28px);
    aspect-ratio: 1 / .86;
    margin: 14px auto 0;
    overflow: hidden;
    background: #d8eef8;
    text-decoration: none;
}

.category-product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-product-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px 18px 20px;
}

.category-product-title {
    display: -webkit-box;
    min-height: 44px;
    margin: 0;
    overflow: hidden;
    color: #076c2c;
    font-size: clamp(21px, 1.9vw, 28px);
    font-weight: 700;
    line-height: 1.15;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.category-product-title:hover {
    color: var(--tea-green);
}

.category-product-ingredients {
    display: -webkit-box;
    min-height: 24px;
    margin: 7px 0 12px;
    overflow: hidden;
    color: #969696;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.category-product-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 18px;
}

.category-product-price strong {
    color: #0b0b0b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(24px, 2.4vw, 32px);
    font-weight: 900;
    line-height: 1;
}

.category-product-price del {
    color: #a7a7a7;
    font-size: clamp(15px, 1.45vw, 19px);
    font-weight: 700;
}

.category-product-size {
    margin-top: auto;
}

.category-product-size > span {
    display: block;
    margin-bottom: 12px;
    color: #1f2933;
    font-size: 17px;
    font-weight: 900;
}

.category-product-size > div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-product-size button {
    min-width: 78px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #149247;
    border-radius: 8px;
    background: #ffffff;
    color: #149247;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.category-product-size button.is-selected {
    background: #149247;
    color: #ffffff;
}

.category-product-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 0;
    margin-top: auto;
    border-top: 1px solid rgba(49, 84, 17, .28);
}

.category-product-actions button,
.category-product-actions a {
    min-height: 64px;
    border: 0;
    border-radius: 0;
    background: #2d6a43;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    font-weight: 900;
    text-decoration: none;
}

.category-product-actions button:last-child {
    border-left: 1px solid rgba(49, 84, 17, .28);
    background: #ffffff;
    color: #ff5b67;
    font-size: 30px;
}

.category-product-actions button.is-added {
    background: var(--tea-brown);
}

.category-product-actions button.is-active {
    background: #fff4f5;
    color: #e83c4c;
}

.category-products-pagination {
    margin-top: 24px;
}

.category-products-pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0;
    padding: 16px;
    border: 1px solid var(--tea-line);
    border-radius: 8px;
    background: #ffffff;
    list-style: none;
    box-shadow: 0 14px 34px rgba(49, 84, 17, .07);
}

.category-products-pagination .page-link {
    display: grid;
    min-width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid #dce9b8;
    border-radius: 999px;
    background: #fffef2;
    color: var(--tea-green);
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
}

.category-products-pagination .page-link:hover {
    border-color: var(--tea-green);
    background: #f4f9df;
}

.category-products-pagination .page-item.active .page-link {
    border-color: var(--tea-green);
    background: var(--tea-green);
    color: #ffffff;
}

.category-products-pagination .page-item.disabled .page-link {
    cursor: not-allowed;
    opacity: .45;
}

.category-empty-state {
    display: grid;
    min-height: 360px;
    place-items: center;
    margin-top: 18px;
    padding: 40px;
    border-style: dashed;
    background: var(--tea-mist);
    text-align: center;
}

.category-empty-state i {
    color: var(--tea-green-2);
    font-size: 54px;
}

.category-empty-state h2 {
    margin: 12px 0 0;
    color: var(--tea-green);
    font-size: 28px;
}

.category-empty-state p {
    margin: 8px 0 18px;
    color: var(--tea-muted);
    font-family: Arial, sans-serif;
}

.category-empty-state a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--tea-green);
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-weight: 900;
    text-decoration: none;
}

@media (max-width: 1180px) {
    .category-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .category-products-page {
        width: min(100% - 20px, 720px);
        margin-top: 18px;
    }

    .category-products-hero {
        grid-template-columns: 1fr;
        padding: 26px;
    }

    .category-hero-side {
        grid-template-columns: auto minmax(130px, 1fr);
        align-items: center;
        justify-items: start;
    }

    .category-hero-side img,
    .category-hero-side > i {
        width: 116px;
        border-width: 6px;
    }

    .category-hero-side > i {
        font-size: 48px;
    }

    .category-products-summary {
        text-align: left;
    }

    .category-products-layout {
        display: block;
    }

    .category-filter-panel {
        position: fixed;
        inset: auto 10px 12px;
        z-index: 50;
        max-height: min(78vh, 680px);
        overflow: auto;
        transform: translateY(calc(100% + 24px));
        box-shadow: 0 18px 48px rgba(15, 23, 42, .22);
        transition: transform .22s ease;
    }

    .category-filter-panel.is-open {
        transform: translateY(0);
    }

    .category-products-toolbar {
        position: sticky;
        top: 0;
        z-index: 10;
        flex-wrap: wrap;
        margin-top: 18px;
    }

    .mobile-filter-btn {
        display: inline-flex;
    }

    .active-filter-strip {
        order: 3;
        flex-basis: 100%;
    }
}

@media (max-width: 640px) {
    .category-products-page {
        width: min(100% - 14px, 520px);
    }

    .category-products-hero {
        min-height: 0;
        padding: 22px;
    }

    .category-hero-side {
        grid-template-columns: 1fr;
    }

    .category-products-summary {
        width: 100%;
    }

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

    .category-product-title {
        font-size: 24px;
    }

    .category-product-price strong {
        font-size: 28px;
    }

    .category-product-actions {
        grid-template-columns: minmax(0, 1fr) 70px;
    }

    .category-products-toolbar {
        align-items: stretch;
    }

    .sort-control {
        flex: 1;
        justify-content: space-between;
    }

    .sort-control select {
        min-width: 0;
        flex: 1;
    }
}
