
        :root {
            --green: #4a7c59;
            --green-d: #3d6b4a;
            --green-l: #e8f0e8;
            --red: #e63946;
            --ink: #1c1c1c;
            --ink-2: #424242;
            --muted: #757575;
            --muted-2: #9e9e9e;
            --line: #e5e5e5;
            --line-2: #d0d0d0;
            --bg: #fff;
            --bg-soft: #f8f8f6;
            --bg-warm: #faf8f3
        }

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

        html {
            scroll-behavior: smooth
        }

        body {
            font-family: "Vazirmatn", sans-serif;
            background: var(--bg);
            color: var(--ink);
            line-height: 1.7;
            -webkit-font-smoothing: antialiased;
            font-size: 14px
        }

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

        button,
        input,
        select {
            font: inherit;
            color: inherit
        }

        button {
            cursor: pointer
        }

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

        .container {
            width: min(1240px, calc(100% - 32px));
            margin: 0 auto
        }

        .utility {
            background: #2a2a2a;
            color: rgba(255, 255, 255, .72);
            font-size: 12px;
            padding: 8px 0
        }

        .utility-inner {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap
        }

        .utility-left {
            display: flex;
            gap: 18px
        }

        .utility a:hover {
            color: #fff
        }

        .header {
            background: #fff;
            border-bottom: 1px solid var(--line);
            padding: 16px 0
        }

        .header-inner {
            display: flex;
            align-items: center;
            gap: 28px
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-shrink: 0
        }

        .logo-mark {
            width: 42px;
            height: 42px;
            background: var(--green);
            border-radius: 10px;
            display: grid;
            place-items: center;
            color: #fff;
            font-size: 23px;
            font-weight: 800
        }

        .logo-text {
            display: flex;
            flex-direction: column;
            gap: 1px
        }

        .logo-fa {
            font-size: 16px;
            font-weight: 800;
            line-height: 1.2
        }

        .logo-en {
            font-size: 10px;
            font-weight: 600;
            color: var(--muted);
            letter-spacing: .08em;
            direction: ltr
        }

        .search-form {
            flex: 1;
            max-width: 600px;
            position: relative
        }

        .search-form input {
            width: 100%;
            height: 46px;
            padding: 0 16px 0 52px;
            border: 1px solid var(--line-2);
            border-radius: 8px;
            background: var(--bg-soft);
            font-size: 13px;
            transition: .15s
        }

        .search-form input:focus {
            outline: none;
            border-color: var(--green);
            background: #fff
        }

        .search-form button {
            position: absolute;
            left: 4px;
            top: 4px;
            bottom: 4px;
            width: 40px;
            border: 0;
            background: var(--green);
            color: #fff;
            border-radius: 6px;
            display: grid;
            place-items: center
        }

        .search-form button svg {
            width: 18px;
            height: 18px
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0
        }

        .action-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            height: 44px;
            padding: 0 13px;
            border-radius: 8px;
            border: 1px solid var(--line-2);
            background: #fff;
            font-size: 12px;
            font-weight: 600;
            white-space: nowrap
        }

        .action-btn.cart {
            background: var(--green);
            border-color: var(--green);
            color: #fff
        }

        .action-btn svg {
            width: 18px;
            height: 18px
        }

        .nav {
            background: #fff;
            border-bottom: 1px solid var(--line);
            position: sticky;
            top: 0;
            z-index: 20;
            box-shadow: 0 1px 3px #00000008
        }

        .nav-inner {
            display: flex;
            align-items: center;
            gap: 8px;
            min-height: 50px
        }

        .cat-menu {
            position: relative;
            flex-shrink: 0
        }

        .cat-menu summary {
            list-style: none;
            display: flex;
            align-items: center;
            gap: 8px;
            height: 50px;
            padding: 0 14px;
            font-weight: 700;
            cursor: pointer;
            border-bottom: 2px solid transparent
        }

        .cat-menu summary::-webkit-details-marker {
            display: none
        }

        .cat-menu[open] summary {
            color: var(--green);
            border-color: var(--green)
        }

        .cat-panel {
            position: absolute;
            top: 100%;
            right: 0;
            width: 230px;
            background: #fff;
            border: 1px solid var(--line);
            border-radius: 8px;
            box-shadow: 0 8px 24px #00000012;
            padding: 6px;
            z-index: 30
        }

        .cat-panel a {
            display: block;
            padding: 10px 12px;
            border-radius: 6px;
            color: var(--ink-2)
        }

        .cat-panel a:hover {
            background: var(--green-l);
            color: var(--green-d)
        }

        .nav-links {
            display: flex;
            align-items: center;
            gap: 4px;
            flex: 1;
            overflow: auto;
            scrollbar-width: none
        }

        .nav-links::-webkit-scrollbar {
            display: none
        }

        .nav-links a {
            white-space: nowrap;
            padding: 0 12px;
            height: 50px;
            line-height: 50px;
            color: var(--ink-2);
            border-bottom: 2px solid transparent
        }

        .nav-links a:hover {
            color: var(--green);
            border-color: var(--green)
        }

        .nav-links .hot {
            color: var(--red);
            font-weight: 700
        }

        .breadcrumb {
            padding: 18px 0 8px;
            font-size: 12px;
            color: var(--muted);
            display: flex;
            gap: 8px;
            align-items: center;
            flex-wrap: wrap
        }

        .breadcrumb a:hover {
            color: var(--green)
        }

        .page-heading {
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 18px;
            padding: 8px 0 22px;
            border-bottom: 1px solid var(--line)
        }

        .page-heading h1 {
            font-size: clamp(22px, 3vw, 29px);
            line-height: 1.4;
            font-weight: 800
        }

        .page-heading p {
            color: var(--muted);
            font-size: 13px;
            margin-top: 5px
        }

        .query-pill {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            background: var(--green-l);
            color: var(--green-d);
            padding: 6px 11px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            margin-top: 10px
        }

        .search-layout {
            display: grid;
            grid-template-columns: 255px minmax(0, 1fr);
            gap: 24px;
            padding: 26px 0 54px;
            align-items: start
        }

        .filters {
            border: 1px solid var(--line);
            border-radius: 10px;
            background: #fff;
            overflow: hidden
        }

        .filter-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 16px;
            border-bottom: 1px solid var(--line);
            font-size: 15px;
            font-weight: 800
        }

        .reset {
            border: 0;
            background: transparent;
            color: var(--green);
            font-size: 12px;
            font-weight: 600
        }

        .filter-group {
            padding: 16px;
            border-bottom: 1px solid var(--line)
        }

        .filter-group:last-child {
            border-bottom: 0
        }

        .filter-title {
            font-size: 13px;
            font-weight: 800;
            margin-bottom: 12px;
            display: flex;
            justify-content: space-between;
            align-items: center
        }

        .check-list {
            display: grid;
            gap: 10px
        }

        .check-item {
            display: flex;
            align-items: center;
            gap: 9px;
            color: var(--ink-2);
            font-size: 12.5px;
            cursor: pointer
        }

        .check-item input {
            accent-color: var(--green);
            width: 15px;
            height: 15px;
            cursor: pointer
        }

        .price-inputs {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px
        }

        .price-inputs label {
            display: block;
            font-size: 10px;
            color: var(--muted);
            margin-bottom: 4px
        }

        .price-inputs input {
            width: 100%;
            height: 36px;
            border: 1px solid var(--line-2);
            border-radius: 6px;
            padding: 0 8px;
            font-size: 12px
        }

        .apply-filter {
            width: 100%;
            height: 40px;
            border: 0;
            background: var(--green);
            color: #fff;
            border-radius: 7px;
            font-weight: 700;
            font-size: 12px;
            margin-top: 12px
        }

        .apply-filter:hover {
            background: var(--green-d)
        }

        .results-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 18px;
            flex-wrap: wrap
        }

        .results-count {
            font-size: 12px;
            color: var(--muted)
        }

        .results-count b {
            color: var(--ink);
            font-size: 14px
        }

        .toolbar-actions {
            display: flex;
            align-items: center;
            gap: 8px
        }

        .sort-select {
            height: 39px;
            border: 1px solid var(--line-2);
            background: #fff;
            border-radius: 7px;
            padding: 0 12px;
            font-size: 12px;
            min-width: 155px
        }

        .mobile-filter {
            display: none;
            align-items: center;
            gap: 7px;
            height: 39px;
            padding: 0 12px;
            border: 1px solid var(--line-2);
            background: #fff;
            border-radius: 7px;
            font-weight: 600;
            font-size: 12px
        }

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

        .product-card {
            background: #fff;
            border: 1px solid var(--line);
            border-radius: 9px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            transition: .18s;
            min-width: 0
        }

        .product-card:hover {
            border-color: var(--line-2);
            box-shadow: 0 5px 18px #0000000b;
            transform: translateY(-2px)
        }

        .product-img {
            position: relative;
            aspect-ratio: 1/1;
            background: var(--bg-warm);
            overflow: hidden
        }

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

        .product-card:hover .product-img img {
            transform: scale(1.035)
        }

        .product-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            background: var(--red);
            color: #fff;
            font-size: 10px;
            font-weight: 700;
            padding: 3px 7px;
            border-radius: 4px
        }

        .product-fav {
            position: absolute;
            top: 9px;
            left: 9px;
            width: 32px;
            height: 32px;
            border: 1px solid #e5e5e5;
            background: #ffffffeb;
            border-radius: 50%;
            display: grid;
            place-items: center;
            font-size: 17px;
            color: #777
        }

        .product-fav.active {
            color: var(--red);
            border-color: #f4c8cb
        }

        .product-info {
            padding: 13px;
            display: flex;
            flex-direction: column;
            gap: 5px;
            flex: 1
        }

        .product-cat {
            font-size: 10.5px;
            color: var(--green);
            font-weight: 700
        }

        .product-name {
            font-size: 13px;
            font-weight: 700;
            line-height: 1.8;
            min-height: 46px
        }

        .product-meta {
            display: flex;
            align-items: center;
            gap: 5px;
            color: var(--muted);
            font-size: 10px
        }

        .star {
            color: #d99b25;
            font-size: 13px
        }

        .price-row {
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 6px;
            margin-top: auto;
            padding-top: 9px
        }

        .price {
            font-size: 15px;
            font-weight: 800;
            white-space: nowrap
        }

        .currency {
            font-size: 10px;
            color: var(--muted);
            font-weight: 500
        }

        .old-price {
            font-size: 10px;
            color: var(--muted-2);
            text-decoration: line-through;
            white-space: nowrap
        }

        .add-cart {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            height: 37px;
            border: 1px solid var(--green);
            background: #fff;
            color: var(--green-d);
            border-radius: 6px;
            font-size: 11px;
            font-weight: 700;
            margin-top: 12px;
            transition: .15s
        }

        .add-cart:hover {
            background: var(--green);
            color: #fff
        }

        .empty-state {
            display: none;
            text-align: center;
            border: 1px dashed var(--line-2);
            border-radius: 10px;
            padding: 45px 18px;
            color: var(--muted);
            grid-column: 1/-1
        }

        .empty-state strong {
            display: block;
            color: var(--ink);
            font-size: 16px;
            margin-bottom: 6px
        }

        .pagination {
            display: flex;
            justify-content: center;
            gap: 7px;
            margin-top: 28px
        }

        .pagination button {
            min-width: 37px;
            height: 37px;
            border: 1px solid var(--line);
            border-radius: 7px;
            background: #fff;
            font-size: 12px
        }

        .pagination button.active,
        .pagination button:hover {
            background: var(--green);
            border-color: var(--green);
            color: #fff
        }

        .footer {
            background: #f8f8f6;
            border-top: 1px solid var(--line);
            padding: 34px 0 0
        }

        .footer-top {
            display: grid;
            grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
            gap: 30px;
            padding-bottom: 28px
        }

        .footer-about p {
            font-size: 12px;
            line-height: 2;
            color: var(--muted);
            margin-top: 12px;
            max-width: 300px
        }

        .footer-col h4 {
            font-size: 13px;
            font-weight: 800;
            margin-bottom: 12px
        }

        .footer-col a,
        .footer-col span {
            display: block;
            font-size: 12px;
            color: var(--muted);
            line-height: 2.2;
            overflow-wrap: anywhere
        }

        .footer-col a:hover {
            color: var(--green)
        }

        .footer-bottom {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            flex-wrap: wrap;
            border-top: 1px solid var(--line);
            padding: 16px 0;
            color: var(--muted);
            font-size: 11px
        }

        .heart {
            color: var(--red)
        }

        .mobile-filter-panel {
            display: none
        }

        @media(max-width:1000px) {
            .header-inner {
                gap: 16px
            }

            .header-actions .action-btn span.label {
                display: none
            }

            .header-actions .action-btn {
                padding: 0 12px
            }

            .search-layout {
                grid-template-columns: 220px minmax(0, 1fr);
                gap: 16px
            }

            .product-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr))
            }

            .footer-top {
                gap: 20px
            }
        }

        @media(max-width:700px) {
            .utility {
                font-size: 10px
            }

            .utility-left {
                display: none
            }

            .header {
                padding: 12px 0
            }

            .header-inner {
                gap: 12px;
                flex-wrap: wrap
            }

            .logo-mark {
                width: 38px;
                height: 38px
            }

            .logo-fa {
                font-size: 14px
            }

            .logo-en {
                font-size: 9px
            }

            .header .search-form {
                order: 3;
                flex-basis: 100%;
                max-width: none
            }

            .header-actions {
                margin-right: auto
            }

            .action-btn {
                height: 38px !important;
                padding: 0 10px !important
            }

            .action-btn svg {
                width: 17px;
                height: 17px
            }

            .nav-inner {
                gap: 0;
                min-height: 46px
            }

            .cat-menu summary {
                height: 46px;
                padding: 0 8px;
                font-size: 12px;
                gap: 5px
            }

            .cat-panel {
                position: absolute;
                right: 0;
                left: 0;
                width: min(280px, calc(100vw - 32px));
                max-height: 65vh;
                overflow: auto
            }

            .nav-links a {
                height: 46px;
                line-height: 46px;
                padding: 0 10px;
                font-size: 12px
            }

            .breadcrumb {
                padding-top: 14px;
                font-size: 11px
            }

            .page-heading {
                align-items: flex-start;
                flex-direction: column;
                padding-bottom: 16px;
                gap: 8px
            }

            .page-heading h1 {
                font-size: 23px
            }

            .page-heading p {
                font-size: 12px
            }

            .search-layout {
                display: block;
                padding-top: 18px
            }

            .desktop-filters {
                display: none
            }

            .mobile-filter {
                display: inline-flex
            }

            .results-toolbar {
                margin-bottom: 14px
            }

            .sort-select {
                min-width: 130px;
                max-width: 52vw
            }

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

            .product-info {
                padding: 10px;
                gap: 4px
            }

            .product-name {
                font-size: 12px;
                min-height: 44px;
                line-height: 1.7
            }

            .price {
                font-size: 13px
            }

            .old-price {
                font-size: 9px
            }

            .add-cart {
                height: 34px;
                margin-top: 9px;
                font-size: 10px
            }

            .product-badge {
                top: 7px;
                right: 7px;
                font-size: 9px
            }

            .product-fav {
                width: 28px;
                height: 28px;
                font-size: 15px;
                top: 7px;
                left: 7px
            }

            .footer {
                padding-top: 26px
            }

            .footer-top {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 22px 14px
            }

            .footer-about {
                grid-column: 1/-1
            }

            .footer-about p {
                max-width: none;
                font-size: 12px
            }

            .footer-col h4 {
                font-size: 12px;
                margin-bottom: 7px
            }

            .footer-col a,
            .footer-col span {
                font-size: 11px;
                line-height: 2
            }

            .footer-bottom {
                font-size: 10px;
                flex-direction: column;
                gap: 5px
            }

            .mobile-filter-panel {
                position: fixed;
                inset: 0;
                z-index: 100;
                background: #0006;
                display: none;
                align-items: flex-end
            }

            .mobile-filter-panel.open {
                display: flex
            }

            .mobile-filter-sheet {
                width: 100%;
                max-height: 85vh;
                overflow: auto;
                background: #fff;
                border-radius: 16px 16px 0 0;
                padding: 18px 16px 24px;
                box-shadow: 0 -8px 30px #0002
            }

            .sheet-head {
                display: flex;
                align-items: center;
                justify-content: space-between;
                padding-bottom: 12px;
                border-bottom: 1px solid var(--line);
                margin-bottom: 8px;
                font-size: 16px;
                font-weight: 800
            }

            .sheet-close {
                border: 0;
                background: var(--bg-soft);
                border-radius: 7px;
                width: 34px;
                height: 34px;
                font-size: 20px
            }
        }

        @media(max-width:360px) {
            .product-grid {
                gap: 7px
            }

            .product-info {
                padding: 8px
            }

            .price {
                font-size: 12px
            }

            .sort-select {
                min-width: 118px;
                font-size: 11px
            }

            .results-count {
                font-size: 11px
            }
        }

        @media (max-width: 768px) {

            /* Navigation and categories */
            .nav {
                position: sticky;
                top: 0;
                z-index: 100;
                overflow: visible;
            }

            .nav-inner {
                height: auto;
                min-height: 48px;
                overflow: visible;
                gap: 0;
            }

            .cat-menu {
                position: static;
                flex-shrink: 0;
            }

            .cat-menu>summary {
                height: 48px;
                padding: 0 10px;
                font-size: 13px;
                white-space: nowrap;
            }

            .cat-panel {
                position: absolute;
                top: 100%;
                right: 12px;
                left: 12px;
                width: auto;
                max-height: 60vh;
                overflow-y: auto;
                padding: 8px;
                border-radius: 10px;
                box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
                z-index: 101;
            }

            .cat-panel a {
                padding: 12px;
                font-size: 14px;
            }

            .nav-links {
                flex: 1;
                min-width: 0;
                overflow-x: auto;
                scrollbar-width: none;
            }

            .nav-links::-webkit-scrollbar {
                display: none;
            }

            .nav-links a {
                height: 48px;
                line-height: 48px;
                padding: 0 10px;
                font-size: 12px;
            }

            /* Compact footer */
            .footer {
                padding-top: 28px;
            }

            .footer-top {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 24px 16px;
                padding-bottom: 24px;
            }

            .footer-about {
                grid-column: 1 / -1;
            }

            .footer-about .logo {
                margin-bottom: 8px;
            }

            .footer-about p {
                font-size: 12px;
                line-height: 1.8;
                max-width: 100%;
            }

            .footer-col h4 {
                font-size: 12px;
                margin-bottom: 8px;
            }

            .footer-col a,
            .footer-col span {
                font-size: 12px;
                line-height: 2;
                overflow-wrap: anywhere;
            }

            .footer-bottom {
                padding: 14px 0;
                gap: 8px;
                font-size: 10px;
            }
        }

        /* Extra-small screens */
        @media (max-width: 380px) {
            .cat-menu>summary {
                gap: 5px;
                padding: 0 6px;
                font-size: 12px;
            }

            .nav-links a {
                padding: 0 8px;
                font-size: 11px;
            }

            .footer-bottom {
                flex-direction: column;
                align-items: flex-start;
            }
        }
    

/* Dynamic Razor storefront state */
.store-message { margin: 14px 0; padding: 12px 16px; border: 1px solid #ead7a5; border-radius: 10px; background: #fff9e9; color: #72551b; }
.empty-cart, .empty-state { text-align: center; padding: 56px 20px; background: #fff; border: 1px solid var(--line, #e5e5e5); border-radius: 16px; }
.empty-cart h2, .empty-state strong { display: block; margin: 10px 0; font-size: 20px; }
.empty-cart p, .empty-state span { color: var(--muted, #757575); display: block; margin: 8px auto 18px; max-width: 520px; }
.qty-form { display:flex; align-items:center; gap:8px; }
.qty-form .qty-input { width:70px; text-align:center; border:1px solid var(--line, #ddd); border-radius:8px; padding:7px; }
.checkout-note { color: var(--muted, #757575); font-size:12px; line-height:1.9; margin:12px 0; }
.btn-checkout:disabled { opacity:.5; cursor:not-allowed; }
.comment-form { display:grid; gap:10px; margin-top:18px; }
.comment-form textarea { width:100%; border:1px solid var(--line,#ddd); border-radius:10px; padding:12px; font:inherit; }
.product-tabs-section .tab-content { display:none; }
.product-tabs-section .tab-content.active { display:block; }
.pagination a { display:inline-flex; align-items:center; justify-content:center; min-width:36px; min-height:36px; }
.sort-inline { display:inline-flex; }

/* -------------------------------------------------------------------------- */
/* Search filters and sorting – refreshed storefront UI                       */
/* -------------------------------------------------------------------------- */
.filters {
    border: 1px solid #e7ece8;
    border-radius: 18px;
    box-shadow: 0 8px 26px rgba(25, 59, 41, .055);
}

.filter-head {
    min-height: 66px;
    padding: 15px 18px;
    background: linear-gradient(180deg, #fbfdfb 0%, #fff 100%);
}

.filter-head-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #193b29;
}

.filter-head-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #2f6845;
    background: #edf4ef;
}

.filter-head-icon svg {
    width: 18px;
    height: 18px;
}

.reset {
    padding: 6px 9px;
    border-radius: 8px;
    color: #62816d;
    background: #f1f6f2;
    font-size: 11px;
    transition: background .18s ease, color .18s ease;
}

.reset:hover {
    color: #193b29;
    background: #e5efe7;
}

.filter-group {
    padding: 17px 16px;
    border-bottom-color: #edf0ed;
}

.filter-title {
    color: #263a2d;
    font-size: 12px;
    margin-bottom: 11px;
}

.filter-title-hint {
    font-size: 10px;
    font-weight: 500;
    color: #9aa69d;
}

.filter-search-control {
    position: relative;
}

.filter-search-control svg {
    position: absolute;
    top: 50%;
    right: 13px;
    width: 18px;
    height: 18px;
    color: #84958a;
    transform: translateY(-50%);
    pointer-events: none;
}

.filter-search-control input {
    width: 100%;
    height: 45px;
    padding: 0 40px 0 12px;
    border: 1px solid #e3e9e4;
    border-radius: 11px;
    outline: none;
    background: #fafcfb;
    color: #26352b;
    font: inherit;
    font-size: 12px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.filter-search-control input::placeholder {
    color: #a3ada6;
}

.filter-search-control input:focus {
    border-color: #78a187;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(65, 126, 83, .10);
}

.category-filter-group {
    padding-bottom: 13px;
}

.filter-choice-list {
    display: grid;
    gap: 6px;
    max-height: 318px;
    overflow-y: auto;
    padding: 2px 2px 3px 4px;
    scrollbar-width: thin;
    scrollbar-color: #cbd9ce transparent;
}

.filter-choice {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 43px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #58665d;
    background: #f8faf8;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.filter-choice:hover {
    color: #274b34;
    background: #f0f6f1;
    border-color: #e4eee6;
}

.filter-choice.is-selected {
    color: #193b29;
    background: #edf5ef;
    border-color: #d6e6d9;
}

.filter-choice input,
.sort-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.choice-radio {
    position: relative;
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    border: 1.5px solid #c6d1c9;
    border-radius: 50%;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.filter-choice.is-selected .choice-radio {
    border-color: #39734d;
    box-shadow: inset 0 0 0 4px #fff;
    background: #39734d;
}

.filter-choice:focus-within .choice-radio,
.sort-choice:focus-within {
    outline: 3px solid rgba(65, 126, 83, .16);
    outline-offset: 2px;
}

.choice-name {
    min-width: 0;
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
}

.choice-count {
    flex: 0 0 auto;
    min-width: 27px;
    padding: 3px 6px;
    border-radius: 7px;
    color: #819087;
    background: #edf1ee;
    text-align: center;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.filter-choice.is-selected .choice-count {
    color: #376548;
    background: #dceade;
}

.filter-submit-wrap {
    padding: 14px 16px 17px;
}

.apply-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 44px;
    margin-top: 0;
    border-radius: 11px;
    background: #193b29;
    box-shadow: 0 5px 13px rgba(25, 59, 41, .13);
    font-size: 12px;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.apply-filter:hover {
    background: #28543a;
    box-shadow: 0 7px 16px rgba(25, 59, 41, .18);
    transform: translateY(-1px);
}

.apply-filter svg {
    width: 16px;
    height: 16px;
}

.results-toolbar {
    min-height: 62px;
    padding: 10px 14px;
    margin-bottom: 18px;
    border: 1px solid #e9eeea;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(25, 59, 41, .035);
}

.results-count {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #78847c;
    font-size: 12px;
}

.results-count b {
    color: #193b29;
    font-size: 15px;
    font-weight: 800;
}

.results-count-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5b936b;
    box-shadow: 0 0 0 4px #edf5ef;
}

.toolbar-actions {
    gap: 10px;
}

.sort-inline {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 4px 6px 4px 12px;
    border: 1px solid #e4eae5;
    border-radius: 11px;
    background: #fbfcfb;
}

.sort-inline > label {
    color: #7a887f;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.sort-select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.sort-select-wrap svg {
    position: absolute;
    left: 8px;
    width: 15px;
    height: 15px;
    color: #55745f;
    pointer-events: none;
}

.sort-select {
    min-width: 132px;
    max-width: 180px;
    height: 32px;
    padding: 0 10px 0 29px;
    border: 0;
    border-radius: 8px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background: #edf4ef;
    color: #244b32;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    text-align: right;
    cursor: pointer;
    transition: background .18s ease, box-shadow .18s ease;
}

.sort-select:hover,
.sort-select:focus {
    background: #e3eee5;
    box-shadow: 0 0 0 3px rgba(65, 126, 83, .09);
}

.mobile-filter {
    height: 42px;
    padding: 0 13px;
    border-color: #dce7df;
    border-radius: 11px;
    color: #285239;
    background: #f2f7f3;
    font-size: 11px;
    transition: background .18s ease, border-color .18s ease;
}

.mobile-filter:hover {
    background: #e7f1e9;
    border-color: #c7ddcc;
}

.mobile-filter svg {
    width: 16px;
    height: 16px;
}

/* Mobile filter sheet */
@media (max-width: 700px) {
    .results-toolbar {
        min-height: 58px;
        padding: 8px 10px;
        border-radius: 13px;
        gap: 8px;
    }

    .results-count {
        gap: 7px;
        font-size: 10px;
    }

    .results-count b {
        font-size: 13px;
    }

    .toolbar-actions {
        gap: 7px;
    }

    .sort-inline {
        min-height: 40px;
        padding: 3px 4px 3px 7px;
        gap: 5px;
        border-radius: 10px;
    }

    .sort-inline > label {
        display: none;
    }

    .sort-select {
        min-width: 112px;
        max-width: 40vw;
        height: 32px;
        font-size: 10px;
    }

    .mobile-filter {
        height: 40px;
        padding: 0 9px;
        gap: 5px;
    }

    .mobile-filter-panel {
        z-index: 1200;
        align-items: flex-end;
        padding-top: 24px;
        background: rgba(12, 24, 16, .48);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .mobile-filter-sheet {
        max-height: min(88dvh, 760px);
        padding: 9px 17px calc(18px + env(safe-area-inset-bottom));
        overflow-y: auto;
        overscroll-behavior: contain;
        border: 1px solid #e6ece7;
        border-bottom: 0;
        border-radius: 22px 22px 0 0;
    }

    .sheet-grabber {
        width: 38px;
        height: 4px;
        margin: 2px auto 13px;
        border-radius: 99px;
        background: #d9e1db;
    }

    .sheet-head {
        align-items: center;
        padding: 0 0 14px;
        margin-bottom: 0;
        border-bottom: 1px solid #edf0ed;
    }

    .sheet-head > div {
        display: grid;
        gap: 3px;
    }

    .sheet-head strong {
        color: #193b29;
        font-size: 15px;
    }

    .sheet-head span {
        color: #8a968e;
        font-size: 10px;
        font-weight: 400;
    }

    .sheet-close {
        flex: 0 0 34px;
        color: #52675a;
        background: #f0f5f1;
        border: 1px solid #e5ece6;
        border-radius: 10px;
    }

    .mobile-filter-form .filter-group {
        padding: 15px 0;
    }

    .mobile-category-list {
        max-height: 215px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .mobile-category-list .filter-choice {
        min-height: 42px;
        gap: 7px;
        padding: 7px 8px;
    }

    .mobile-category-list .choice-name {
        font-size: 10px;
    }

    .mobile-category-list .choice-radio {
        flex-basis: 15px;
        width: 15px;
        height: 15px;
    }

    .mobile-category-list .choice-count {
        min-width: 22px;
        padding: 2px 4px;
        font-size: 9px;
    }

    .sort-choice-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .sort-choice {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        padding: 8px 10px;
        border: 1px solid #e5ebe6;
        border-radius: 10px;
        color: #68756c;
        background: #fafcfa;
        font-size: 11px;
        font-weight: 600;
        cursor: pointer;
    }

    .sort-choice.is-selected {
        color: #234a31;
        background: #edf5ef;
        border-color: #bfd7c4;
    }

    .mobile-filter-actions {
        position: sticky;
        bottom: -18px;
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0 -17px -18px;
        padding: 12px 17px calc(12px + env(safe-area-inset-bottom));
        border-top: 1px solid #e9eee9;
        background: rgba(255, 255, 255, .97);
        backdrop-filter: blur(12px);
    }

    .mobile-filter-actions .apply-filter {
        flex: 1;
        margin: 0;
    }

    .mobile-reset-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0 13px;
        border: 1px solid #e3eae4;
        border-radius: 11px;
        color: #65746a;
        background: #fff;
        font-size: 11px;
        font-weight: 600;
    }
}

@media (max-width: 380px) {
    .mobile-category-list {
        grid-template-columns: 1fr;
    }

    .mobile-category-list .filter-choice {
        min-height: 39px;
    }

    .sort-select {
        min-width: 100px;
    }
}

/* Final mobile search-sheet fixes: keep the submit action above the global bottom nav. */
.results-toolbar {
    height: auto;
    pointer-events: auto;
}

@media (max-width: 700px) {
    .mobile-filter-panel {
        z-index: 1500 !important;
        position: fixed;
        inset: 0;
        align-items: flex-end;
        overflow: hidden;
    }

    .mobile-filter-sheet {
        position: relative;
        z-index: 1501;
        display: flex;
        flex-direction: column;
        width: 100%;
        max-height: min(90dvh, 760px);
        min-height: 0;
        overflow: hidden;
        padding: 9px 17px 0;
    }

    .sheet-head {
        flex: 0 0 auto;
    }

    .mobile-filter-form {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
        margin: 0 -17px;
        padding: 0 17px;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-filter-form .filter-group {
        flex: 0 0 auto;
    }

    .mobile-filter-actions {
        position: sticky;
        bottom: 0;
        z-index: 5;
        flex: 0 0 auto;
        margin: auto -17px 0;
        padding: 12px 17px calc(12px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .98);
        border-top: 1px solid #e9eee9;
        box-shadow: 0 -6px 18px rgba(20, 45, 28, .06);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .mobile-filter-actions .apply-filter {
        min-height: 46px;
        flex: 1 1 auto;
        margin: 0;
    }
}


/* ==========================================================
   Mobile filter sheet V2
   - Actions are outside the scroll viewport and always visible.
   - Global bottom navigation is hidden while the sheet is open.
   ========================================================== */
@media (max-width: 700px) {
    body.filter-modal-open {
        overflow: hidden !important;
        touch-action: none;
    }

    body.filter-modal-open .mobile-bottom-nav {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .mobile-filter-panel {
        position: fixed !important;
        inset: 0 !important;
        z-index: 10000 !important;
        display: none;
        align-items: flex-end;
        justify-content: center;
        padding: 12px 0 0 !important;
        overflow: hidden;
    }

    .mobile-filter-panel.open {
        display: flex !important;
    }

    .mobile-filter-sheet {
        position: relative;
        display: flex !important;
        flex-direction: column;
        width: 100%;
        height: min(90dvh, 760px);
        max-height: calc(100dvh - 12px);
        min-height: 0;
        overflow: hidden !important;
        padding: 9px 17px 0 !important;
        border-radius: 22px 22px 0 0;
        background: #fff;
    }

    .sheet-grabber,
    .sheet-head {
        flex: 0 0 auto;
    }

    .mobile-filter-form {
        display: flex !important;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
        margin: 0 -17px !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .mobile-filter-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 0 17px 14px;
    }

    .mobile-filter-form .filter-group {
        flex: 0 0 auto;
    }

    .mobile-filter-actions {
        position: relative !important;
        inset: auto !important;
        z-index: 2;
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        gap: 10px;
        margin: 0 !important;
        padding: 12px 17px calc(12px + env(safe-area-inset-bottom)) !important;
        border-top: 1px solid #e9eee9;
        background: rgba(255, 255, 255, .99);
        box-shadow: 0 -6px 18px rgba(20, 45, 28, .07);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .mobile-filter-actions .apply-filter {
        display: inline-flex;
        flex: 1 1 auto;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        margin: 0 !important;
        border: 0;
        border-radius: 12px;
    }

    .mobile-reset-button {
        flex: 0 0 auto;
        min-height: 48px;
    }
}

@media (max-width: 380px) {
    .mobile-filter-sheet {
        height: min(92dvh, 760px);
    }
}
