        @font-face {
            font-family: 'Ethnocentric';
            src: url('ethnocentric-regular.otf') format('opentype');
            font-weight: normal;
            font-style: normal;
            font-display: swap;
        }
        :root {
            --red-primary: #C82424;
            --red-text: #B91C1C;
            --red-hover: #A91D1D;
            --red-light: #FEE2E2;
            --red-dark: #991B1B;
            --red-glow: rgba(220, 38, 38, 0.3);
            --gold: #D9A441;
            --gold-soft: rgba(217, 164, 65, 0.16);
            --teal: #0F766E;
            --ink: #111827;
            --green-primary: #166534;
            --green-light: #DCFCE7;
            --bg-primary: #F8F7F3;
            --bg-secondary: #FFFFFF;
            --bg-tertiary: #EEF0EF;
            --bg-card: #FFFFFF;
            --text-primary: #141414;
            --text-secondary: #4B5563;
            --text-muted: #626975;
            --border-color: rgba(20,20,20,0.09);
            --hairline: rgba(255,255,255,0.74);
            --shadow-sm: 0 1px 2px rgba(15,23,42,0.06), 0 1px 0 rgba(255,255,255,0.8) inset;
            --shadow-md: 0 12px 30px rgba(15,23,42,0.10);
            --shadow-lg: 0 26px 70px rgba(15,23,42,0.18);
            --shadow-premium: 0 18px 45px rgba(124, 18, 18, 0.13), 0 2px 0 rgba(255,255,255,0.8) inset;
            --overlay-bg: rgba(0,0,0,0.5);
            --ease-out: cubic-bezier(.16,1,.3,1);
            --ease-spring: cubic-bezier(.2,1.35,.32,1);
        }
        :root { color-scheme: light; }
        [data-theme="dark"] {
            color-scheme: dark;
            --red-text: #FF9292;
            --green-primary: #63D995;
            --gold-soft: rgba(217, 164, 65, 0.11);
            --bg-primary: #101113;
            --bg-secondary: #191B1F;
            --bg-tertiary: #24272D;
            --bg-card: #191B1F;
            --text-primary: #FFFFFF;
            --text-secondary: #D3D5DA;
            --text-muted: #A6ADB9;
            --border-color: rgba(255,255,255,0.10);
            --hairline: rgba(255,255,255,0.08);
            --shadow-sm: 0 1px 2px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.05) inset;
            --shadow-md: 0 10px 24px rgba(0,0,0,0.75);
            --shadow-lg: 0 22px 50px rgba(0,0,0,0.85);
            --shadow-premium: 0 20px 55px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.08) inset;
            --overlay-bg: rgba(0,0,0,0.88);
            --red-light: #3C2024;
            --green-light: #183024;
        }
        *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
        .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
        html { width: 100%; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; font-size: 16px; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; scroll-padding-top: 150px; }
        body {
            font-family: 'Space Grotesk', -apple-system, sans-serif;
            width: 100%;
            min-width: 0;
            background:
                linear-gradient(145deg, rgba(220,38,38,0.09), transparent 27rem),
                linear-gradient(315deg, rgba(15,118,110,0.08), transparent 24rem),
                var(--bg-primary);
            color: var(--text-primary);
            min-height: 100dvh;
            transition: background 0.3s, color 0.3s;
            overflow-x: hidden;
            overflow-y: auto;
            overscroll-behavior-y: auto;
            -webkit-font-smoothing: antialiased;
            text-rendering: optimizeLegibility;
        }
        body.modal-open { overflow: hidden; }
        button, input, select, textarea { font: inherit; touch-action: manipulation; }
        button, a, select { -webkit-tap-highlight-color: transparent; }
        img, svg, video, canvas { max-width: 100%; height: auto; }
        img { -webkit-user-drag: none; }
        ::selection { background: var(--red-primary); color: white; }
        ::-webkit-scrollbar { width: 10px; height: 10px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-muted) 35%, transparent); border: 3px solid transparent; border-radius: 999px; background-clip: content-box; }

        /* Splash */
        .splash { position: fixed; inset: 0; background: radial-gradient(circle at center, #000 0 52%, rgba(70, 6, 6, 0.42) 78%, rgba(220, 38, 38, 0.18) 100%), #000; display: flex; align-items: center; justify-content: center; z-index: 9999; transition: opacity 0.55s var(--ease-out), visibility 0.55s var(--ease-out); }
        .splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
        .splash img { width: 180px; height: 180px; object-fit: contain; filter: drop-shadow(0 22px 42px rgba(0,0,0,0.7)); animation: splashPulse 1.5s ease-in-out infinite; }
        @keyframes splashPulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.8; } }

        .shop-banner { min-height: 34px; padding: 0.45rem 1rem; text-align: center; font-size: 0.76rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 0.5rem; border-bottom: 1px solid var(--border-color); letter-spacing: 0.01em; }
        .shop-banner.open { background: var(--green-light); color: var(--green-primary); }
        .shop-banner.closed { background: var(--red-light); color: var(--red-text); }
        .pulse { width: 8px; height: 8px; border-radius: 50%; animation: pulse 2s ease infinite; }
        .shop-banner.open .pulse { background: var(--green-primary); }
        .shop-banner.closed .pulse { background: var(--red-primary); }
        @keyframes pulse { 0%,100% { opacity:1; transform:scale(1); box-shadow: 0 0 0 0 currentColor; } 50% { opacity:0.55; transform:scale(0.82); box-shadow: 0 0 0 7px transparent; } }

        .header { position: sticky; top: 0; z-index: 100; background: var(--bg-secondary); border-bottom: 1px solid var(--border-color); padding: 0.7rem max(0.85rem, calc((100vw - 1200px) / 2)) 0.8rem; box-shadow: 0 12px 32px rgba(15,23,42,0.055); }
        .header-top { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; margin-bottom: 0.6rem; }
        .logo { display: flex; align-items: center; gap: 0.55rem; cursor: pointer; min-width: 0; background: none; border: none; padding: 0; }
        .logo:hover .logo-mark { transform: translateY(-1px) rotate(-2deg); box-shadow: var(--shadow-md); }
        .logo-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--bg-secondary); border: 1px solid var(--hairline); box-shadow: var(--shadow-sm); object-fit: contain; flex-shrink: 0; transition: transform 0.25s var(--ease-spring), box-shadow 0.25s; }
        .logo-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 0.22rem; min-width: 0; }
        .logo-text { font-family: 'Ethnocentric', 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1rem; color: #DC2626; letter-spacing: 0.8px; line-height: 1; white-space: nowrap; text-shadow: 0 8px 26px rgba(220,38,38,0.2); }
        .logo-sub { color: var(--text-muted); font-family: 'JetBrains Mono', monospace; font-size: 0.58rem; font-weight: 600; letter-spacing: 0.12em; line-height: 1; white-space: nowrap; }
        .header-actions { display: flex; align-items: center; gap: 0.4rem; }
        .icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border-color); background: linear-gradient(180deg, color-mix(in srgb, var(--bg-secondary) 98%, white), var(--bg-secondary)); color: var(--text-primary); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s var(--ease-out), box-shadow 0.18s; font-size: 0.98rem; position: relative; box-shadow: var(--shadow-sm); }
        .icon-btn:hover { background: var(--red-light); border-color: color-mix(in srgb, var(--red-primary) 55%, var(--border-color)); color: var(--red-text); transform: translateY(-1px); box-shadow: var(--shadow-md); }
        .icon-btn:active { transform: scale(0.93) translateY(1px); }
        .icon-btn.has-dot::after { content: ''; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; background: var(--red-primary); border-radius: 50%; border: 2px solid var(--bg-secondary); }
        .cart-badge { position: absolute; top: -4px; right: -4px; background: var(--red-primary); color: white; font-size: 0.65rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid var(--bg-secondary); }
        .cart-badge[data-count="0"] { display: none; }

        .search-box { position: relative; }
        .search-input { width: 100%; height: 46px; padding: 0 2.6rem 0 2.65rem; border: 1px solid var(--border-color); border-radius: 12px; background: color-mix(in srgb, var(--bg-secondary) 92%, transparent); color: var(--text-primary); font-size: 1rem; box-shadow: var(--shadow-sm); transition: border-color 0.18s, box-shadow 0.18s, background 0.18s; }
        .search-input:focus { outline: none; border-color: var(--red-text); background: var(--bg-secondary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red-glow) 70%, transparent), var(--shadow-md); }
        .search-input::placeholder { color: var(--text-muted); }
        .search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
        .search-clear { position: absolute; right: 0.6rem; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 1px solid var(--border-color); background: var(--bg-tertiary); border-radius: 999px; color: var(--text-muted); cursor: pointer; display: none; align-items: center; justify-content: center; font-size: 0.8rem; transition: transform 0.16s var(--ease-out), background 0.16s, color 0.16s; }
        .search-clear:hover { transform: translateY(-50%) scale(1.06); background: var(--red-light); color: var(--red-text); }
        .search-clear.show { display: flex; }

        .toolbar { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem max(0.85rem, calc((100vw - 1200px) / 2)); background: var(--bg-secondary); border-bottom: 1px solid var(--border-color); overflow: hidden; }
        .view-toggle { display: flex; background: color-mix(in srgb, var(--bg-tertiary) 76%, transparent); border: 1px solid var(--border-color); border-radius: 11px; padding: 3px; flex-shrink: 0; box-shadow: var(--shadow-sm); }
        .view-btn { width: 34px; height: 34px; border: none; background: transparent; border-radius: 8px; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.16s var(--ease-out), background 0.16s, color 0.16s; }
        .view-btn:hover { color: var(--text-primary); }
        .view-btn.active { background: var(--bg-secondary); color: var(--red-text); box-shadow: var(--shadow-sm); }
        .view-btn:active { transform: scale(0.94); }
        .categories { display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; overscroll-behavior-x: contain; scroll-padding-inline: 0.85rem; }
        .categories::-webkit-scrollbar { display: none; }
        .cat-chip { flex-shrink: 0; min-height: 40px; padding: 0.32rem 0.42rem 0.32rem 0.78rem; border-radius: 999px; border: 1px solid var(--border-color); background: var(--bg-secondary); color: var(--text-secondary); font-size: 0.78rem; font-weight: 700; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm); transition: transform 0.18s var(--ease-out), border-color 0.18s, color 0.18s, background 0.18s; display: inline-flex; align-items: center; gap: 0.48rem; }
        .cat-label { display: inline-flex; align-items: center; gap: 0.38rem; }
        .cat-count { min-width: 28px; padding: 0.22rem 0.44rem; border-radius: 999px; background: var(--bg-tertiary); color: var(--text-muted); font-family: 'JetBrains Mono', monospace; font-size: 0.66rem; line-height: 1; text-align: center; }
        .cat-chip:hover { border-color: var(--red-text); color: var(--red-text); transform: translateY(-1px); }
        .cat-chip.active { background: linear-gradient(135deg, var(--red-primary), var(--red-hover)); border-color: var(--red-text); color: white; box-shadow: 0 10px 22px rgba(220,38,38,0.22); }
        .cat-chip.active .cat-count { background: rgba(255,255,255,0.18); color: white; }

        .quick-bar { display: flex; gap: 0.5rem; padding: 0.58rem max(0.85rem, calc((100vw - 1200px) / 2)); background: color-mix(in srgb, var(--bg-tertiary) 70%, transparent); border-bottom: 1px solid var(--border-color); overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; scroll-padding-inline: 0.85rem; }
        .quick-bar::-webkit-scrollbar { display: none; }
        .quick-btn { flex-shrink: 0; display: flex; align-items: center; gap: 0.45rem; min-height: 40px; padding: 0.5rem 0.84rem; border: 1px solid var(--border-color); border-radius: 999px; background: var(--bg-secondary); color: var(--text-secondary); font-size: 0.78rem; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform 0.18s var(--ease-out), border-color 0.18s, color 0.18s, background 0.18s; }
        .quick-btn:hover { border-color: var(--red-text); color: var(--red-text); transform: translateY(-1px); }
        .quick-btn.hl { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 70%, var(--border-color)); color: #80540D; }
        .quick-btn.on { background: linear-gradient(135deg, var(--red-primary), var(--red-hover)); border-color: var(--red-text); color: white; box-shadow: 0 12px 24px rgba(220,38,38,0.23); }

        .main { padding: 1.2rem 0.85rem 126px;  }
        .catalog-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
        .catalog-kicker { display: block; margin-bottom: 0.32rem; color: var(--red-text); font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
        .catalog-title { font-size: clamp(1.35rem, 2.5vw, 2rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.08; }
        .catalog-benefit { flex-shrink: 0; padding: 0.5rem 0.72rem; border: 1px solid color-mix(in srgb, var(--green-primary) 24%, var(--border-color)); border-radius: 999px; background: var(--green-light); color: var(--green-primary); font-size: 0.74rem; font-weight: 800; }
        .count-bar { margin-bottom: 0.85rem; padding: 0.65rem 0.72rem; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; border: 1px solid var(--border-color); border-radius: 12px; background: color-mix(in srgb, var(--bg-secondary) 76%, transparent); box-shadow: var(--shadow-sm); }
        .count-text { font-size: 0.78rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; letter-spacing: 0.01em; }
        .sort-control { display: flex; align-items: center; gap: 0.5rem; }
        .sort-label { color: var(--text-muted); font-size: 0.72rem; font-weight: 700; }
        .sort-select { min-height: 36px; max-width: 155px; padding: 0.38rem 2rem 0.38rem 0.7rem; border: 1px solid var(--border-color); border-radius: 9px; background: var(--bg-secondary); color: var(--text-primary); font-size: 0.76rem; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-sm); }
        .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 0.9rem; }
        .grid.list { grid-template-columns: 1fr; gap: 0.75rem; }

        .card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; overflow: hidden; position: relative; box-shadow: var(--shadow-sm); transition: transform 0.28s var(--ease-out), border-color 0.2s, box-shadow 0.2s, background 0.2s; cursor: pointer; content-visibility: auto; contain-intrinsic-size: auto 310px; }
        .card::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(135deg, rgba(255,255,255,0.32), transparent 42%); opacity: 0; transition: opacity 0.2s; }
        .grid.list .card { contain-intrinsic-size: auto 136px; }
        .card:hover { border-color: color-mix(in srgb, var(--red-primary) 60%, var(--border-color)); box-shadow: var(--shadow-premium); transform: translateY(-4px); }
        .card:hover::after { opacity: 1; }
        .card.list { display: flex; min-height: 96px; }
        .card-img { width: 100%; aspect-ratio: 1; background: linear-gradient(180deg, color-mix(in srgb, var(--bg-secondary) 88%, white), var(--bg-tertiary)); display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
        .card-img::after { content: ''; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(to top, rgba(0,0,0,0.18), transparent); opacity: 0; transition: opacity 0.2s; }
        .card:hover .card-img::after { opacity: 1; }
        .card.list .card-img { width: 94px; height: 94px; aspect-ratio: unset; flex-shrink: 0; }
        .card-img img { width: 100%; height: 100%; object-fit: contain; padding: 0.32rem; background: white; transition: transform 0.2s var(--ease-out); }
        .card:hover .card-img img { transform: scale(1.025); }
        .card-img.noimg::before { content: '📦'; color: var(--text-muted); font-size: 2rem; filter: drop-shadow(0 8px 18px rgba(0,0,0,0.12)); }
        .unit-badge { position: absolute; top: 8px; right: 8px; background: var(--bg-secondary); border: 1px solid var(--hairline); padding: 0.24rem 0.52rem; border-radius: 999px; font-size: 0.68rem; font-weight: 700; color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; box-shadow: var(--shadow-sm); z-index: 2; }
        .fav-btn { position: absolute; top: 8px; left: 8px; width: 33px; height: 33px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--bg-secondary); color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1rem; box-shadow: var(--shadow-sm); transition: transform 0.18s var(--ease-spring), color 0.18s, background 0.18s; z-index: 2; }
        .fav-btn:hover { transform: scale(1.08); color: var(--red-text); background: var(--bg-secondary); }
        .fav-btn.on { color: var(--red-text); animation: heartPop 0.34s var(--ease-spring); }
        .fav-btn.pop { animation: heartPop 0.34s var(--ease-spring); }
        .card.list .fav-btn { top: 4px; left: 4px; }
        .card.list .unit-badge { top: auto; bottom: 6px; right: 5px; }
        .card-info { padding: 0.78rem; flex: 1; min-width: 0; }
        .card.list .card-info { display: flex; flex-direction: column; justify-content: center; padding: 0.5rem 0.75rem; }
        .card-name { width: 100%; border: 0; background: none; padding: 0; color: inherit; text-align: left; cursor: pointer; font-size: 0.92rem; font-weight: 700; margin-bottom: 0.32rem; line-height: 1.32; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; letter-spacing: 0; }
        .card.list .card-name { -webkit-line-clamp: 1; }
        .card-brand { font-size: 0.74rem; color: var(--text-muted); margin-bottom: 0.65rem; min-height: 1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
        .card-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.18rem; font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 1rem; color: var(--red-text); line-height: 1.15; }
        .card-price .currency { color: var(--red-text); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.04em; }
        .card-price small { font-size: 0.7rem; font-weight: 400; color: var(--text-muted); }
        .add-btn { min-width: 70px; height: 38px; padding: 0 0.72rem; border-radius: 11px; border: none; background: linear-gradient(135deg, var(--red-primary), var(--red-hover)); color: white; font-size: 0.78rem; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.28rem; box-shadow: 0 10px 22px rgba(220,38,38,0.23); flex-shrink: 0; transition: transform 0.14s var(--ease-spring), box-shadow 0.18s, filter 0.18s; }
        .add-plus { font-size: 1.1rem; font-weight: 500; line-height: 1; }
        .add-btn:hover { filter: brightness(1.05); box-shadow: 0 13px 28px rgba(220,38,38,0.3); }
        .add-btn:active { transform: scale(0.88); }
        .add-btn.pop { animation: addPop 0.38s var(--ease-spring); }

        .sentinel { grid-column: 1 / -1; display: flex; justify-content: center; padding: 0.75rem 0; }
        .load-more-btn { min-width: 180px; height: 46px; border: 1px solid var(--border-color); border-radius: 999px; background: var(--bg-secondary); color: var(--text-primary); font-weight: 700; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform 0.18s var(--ease-out), border-color 0.18s, color 0.18s, box-shadow 0.18s; }
        .load-more-btn:hover { border-color: var(--red-text); color: var(--red-text); }
        .load-more-btn:active { transform: scale(0.97); }
        .empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); grid-column: 1 / -1; background: color-mix(in srgb, var(--bg-card) 72%, transparent); border: 1px solid var(--border-color); border-radius: 16px; box-shadow: var(--shadow-sm); }
        .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
        .empty-reset { margin-top: 1rem; min-height: 42px; padding: 0.58rem 1rem; border: 1px solid var(--red-primary); border-radius: 10px; background: var(--red-light); color: var(--red-text); font-weight: 800; cursor: pointer; }
        .skeleton-card { min-width: 0; overflow: hidden; position: relative; border: 1px solid var(--border-color); border-radius: 14px; background: var(--bg-card); box-shadow: var(--shadow-sm); }
        .skeleton-card::after { content: ''; position: absolute; inset: 0; transform: translateX(-110%); background: linear-gradient(100deg, transparent 20%, color-mix(in srgb, var(--text-primary) 8%, transparent) 48%, transparent 76%); animation: skeletonShimmer 1.35s ease-in-out infinite; }
        .skeleton-media { width: 100%; aspect-ratio: 1; background: var(--bg-tertiary); }
        .skeleton-body { padding: 0.78rem; }
        .skeleton-line { height: 12px; border-radius: 999px; background: var(--bg-tertiary); margin-bottom: 0.58rem; }
        .skeleton-line.title { width: 82%; height: 14px; }
        .skeleton-line.meta { width: 54%; }
        .skeleton-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.75rem; }
        .skeleton-price { width: 46%; height: 15px; border-radius: 999px; background: var(--bg-tertiary); }
        .skeleton-action { width: 38px; height: 38px; border-radius: 11px; background: color-mix(in srgb, var(--red-primary) 16%, var(--bg-tertiary)); flex-shrink: 0; }
        .grid.list .skeleton-card { display: flex; min-height: 96px; }
        .grid.list .skeleton-media { width: 94px; height: 94px; aspect-ratio: auto; flex-shrink: 0; }
        .grid.list .skeleton-body { flex: 1; min-width: 0; }
        .loading { text-align: center; padding: 3rem 1rem; grid-column: 1 / -1; }
        .loading p { color: var(--text-muted); font-weight: 600; }
        .spinner { width: 44px; height: 44px; border: 3px solid color-mix(in srgb, var(--red-primary) 16%, var(--border-color)); border-top-color: var(--red-text); border-right-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 1rem; box-shadow: 0 0 30px rgba(220,38,38,0.18); }
        @keyframes spin { to { transform: rotate(360deg); } }
        @keyframes skeletonShimmer { to { transform: translateX(110%); } }
        @keyframes addPop { 0% { transform: scale(1); } 45% { transform: scale(1.18) rotate(8deg); } 100% { transform: scale(1); } }
        @keyframes heartPop { 0% { transform: scale(1); } 45% { transform: scale(1.28); } 100% { transform: scale(1); } }

        .cart-bar { position: fixed; bottom: 16px; left: 50%; width: min(720px, calc(100% - 2rem)); background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 18px; padding: 0.75rem 0.78rem 0.75rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; transform: translate(-50%, calc(100% + 32px)); transition: transform 0.42s var(--ease-spring); z-index: 90; box-shadow: var(--shadow-lg); }
        .cart-bar.show { transform: translate(-50%, 0); }
        .cart-sum { flex: 1; min-width: 0; }
        .cart-count { font-size: 0.8rem; color: var(--text-muted); }
        .cart-total { font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 1.1rem; }
        .min-bar { height: 5px; background: var(--bg-tertiary); border-radius: 999px; margin-top: 0.52rem; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.08); }
        .min-fill { height: 100%; background: linear-gradient(90deg, var(--red-primary), var(--gold)); border-radius: 999px; transition: width 0.38s var(--ease-out), background 0.2s; }
        .min-fill.done { background: linear-gradient(90deg, var(--green-primary), var(--teal)); }
        .view-btn-cart { min-height: 48px; padding: 0.75rem 1.25rem; border-radius: 13px; border: none; background: linear-gradient(135deg, var(--red-primary), var(--red-hover)); color: white; font-weight: 800; font-size: 0.95rem; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; box-shadow: 0 14px 30px rgba(220,38,38,0.28); transition: transform 0.16s var(--ease-spring), box-shadow 0.18s, filter 0.18s; }
        .view-btn-cart:hover { filter: brightness(1.05); box-shadow: 0 18px 38px rgba(220,38,38,0.33); }
        .view-btn-cart:active { transform: scale(0.96); }

        .modal-bg { position: fixed; inset: 0; background: color-mix(in srgb, var(--overlay-bg) 86%, transparent); display: flex; align-items: flex-end; justify-content: center; z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.28s var(--ease-out), visibility 0.28s var(--ease-out); }
        .modal-bg.show { opacity: 1; visibility: visible; }
        .modal { width: 100%; max-width: 500px; max-height: 90dvh; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 22px 22px 0 0; overflow: hidden; transform: translateY(105%) scale(0.98); transition: transform 0.34s var(--ease-spring); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
        .modal-bg.show .modal { transform: translateY(0); }
        .modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-color); flex-shrink: 0; background: var(--bg-secondary); }
        .modal-title { font-weight: 800; font-size: 1.08rem; }
        .modal-x { width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--border-color); background: var(--bg-tertiary); color: var(--text-primary); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: transform 0.16s var(--ease-out), color 0.16s, background 0.16s; }
        .modal-x:hover { transform: rotate(8deg) scale(1.04); background: var(--red-light); color: var(--red-text); }
        .modal-body { flex: 1; overflow-y: auto; padding: 1.25rem; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
        .modal-foot { padding: 1rem 1.25rem max(1rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--border-color); flex-shrink: 0; }
        .btn { width: 100%; padding: 1rem; border-radius: 12px; border: none; font-weight: 800; font-size: 1rem; cursor: pointer; transition: transform 0.16s var(--ease-spring), box-shadow 0.18s, background 0.18s, border-color 0.18s, color 0.18s; }
        .btn:active { transform: scale(0.98); }
        .btn-red { background: linear-gradient(135deg, var(--red-primary), var(--red-hover)); color: white; box-shadow: 0 12px 28px rgba(220,38,38,0.24); }
        .btn-red:hover { filter: brightness(1.05); box-shadow: 0 16px 34px rgba(220,38,38,0.3); }
        .btn-red:disabled { opacity: 0.5; cursor: not-allowed; }
        .btn-gray { background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border-color); }
        .btn-viber { background: #654BD6; color: white; }
        .btn-viber:hover { background: #5B4BD1; }
        .btn-viber:disabled { opacity: 0.5; cursor: not-allowed; }
        .btn-row { display: flex; gap: 0.75rem; }
        .btn-row .btn { flex: 1; }
        .foot-hint { font-size: 0.78rem; color: var(--text-muted); text-align: center; margin-top: 0.6rem; min-height: 1em; }

        .wt-preview { display: flex; gap: 1rem; margin-bottom: 1.5rem; padding: 1rem; border: 1px solid var(--border-color); border-radius: 16px; background: var(--bg-card); box-shadow: var(--shadow-sm); }
        .wt-img { width: 82px; height: 82px; border-radius: 14px; background: var(--bg-tertiary); overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); }
        .wt-img img { width: 100%; height: 100%; object-fit: cover; }
        .wt-info { flex: 1; min-width: 0; }
        .wt-name { font-weight: 600; font-size: 1rem; margin-bottom: 0.25rem; }
        .wt-price { font-family: 'JetBrains Mono', monospace; color: var(--red-text); font-weight: 600; }
        .wt-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1.5rem; }
        .wt-opt { padding: 0.8rem 0.6rem; border: 1px solid var(--border-color); border-radius: 14px; background: var(--bg-card); color: var(--text-primary); text-align: center; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform 0.16s var(--ease-out), border-color 0.18s, background 0.18s, box-shadow 0.18s; }
        .wt-opt:hover { border-color: var(--red-text); transform: translateY(-2px); }
        .wt-opt.sel { border-color: var(--red-text); background: var(--red-light); box-shadow: 0 12px 26px rgba(220,38,38,0.16); }
        .wt-opt-val { display: block; font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 1.1rem; }
        .wt-opt-price { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }
        .custom-wt-label { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
        .custom-wt-input { width: 100%; height: 50px; padding: 0 1rem; border: 1px solid var(--border-color); border-radius: 14px; background: var(--bg-card); color: var(--text-primary); font-family: 'JetBrains Mono', monospace; font-size: 1.1rem; text-align: center; box-shadow: var(--shadow-sm); }
        .custom-wt-input:focus { outline: none; border-color: var(--red-text); }
        .wt-total { display: flex; align-items: center; justify-content: space-between; padding: 1rem; background: linear-gradient(135deg, var(--bg-card), color-mix(in srgb, var(--red-light) 34%, var(--bg-card))); border: 1px solid var(--border-color); border-radius: 14px; margin-top: 1rem; box-shadow: var(--shadow-sm); }
        .wt-total-lbl { color: var(--text-secondary); }
        .wt-total-val { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 1.25rem; color: var(--red-text); }

        .prod-hero { aspect-ratio: 1.15; border-radius: 18px; background: linear-gradient(180deg, var(--bg-secondary), var(--bg-tertiary)); border: 1px solid var(--border-color); overflow: hidden; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; box-shadow: var(--shadow-md); }
        .prod-hero img { width: 100%; height: 100%; object-fit: contain; background: white; transition: transform 0.45s var(--ease-out); }
        .prod-hero:hover img { transform: scale(1.035); }
        .prod-hero.noimg::before { content: '📦'; color: var(--text-muted); font-size: 3rem; }
        .prod-name { font-size: 1.25rem; font-weight: 700; line-height: 1.25; margin-bottom: 0.45rem; }
        .prod-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
        .prod-chip { padding: 0.28rem 0.6rem; border-radius: 999px; border: 1px solid var(--border-color); background: var(--bg-tertiary); color: var(--text-secondary); font-size: 0.76rem; font-weight: 600; }
        .prod-price { font-family: 'JetBrains Mono', monospace; font-size: 1.25rem; font-weight: 700; color: var(--red-text); margin-bottom: 1rem; }
        .prod-note { color: var(--text-muted); font-size: 0.86rem; line-height: 1.5; }
        .prod-actions { display: flex; gap: 0.75rem; }
        .prod-actions .btn-fav { width: 56px; flex: 0 0 56px; background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border-color); }
        .prod-actions .btn-fav.on { color: var(--red-text); border-color: var(--red-text); background: var(--red-light); }

        .cart-empty { text-align: center; padding: 2rem; color: var(--text-muted); }
        .cart-empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
        .cart-item { display: flex; gap: 0.75rem; padding: 1rem; border: 1px solid var(--border-color); border-radius: 14px; background: var(--bg-card); box-shadow: var(--shadow-sm); margin-bottom: 0.75rem;  }
        .cart-item:last-child { margin-bottom: 0; }
        .cart-item-img { width: 62px; height: 62px; border-radius: 12px; background: var(--bg-tertiary); overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); }
        .cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
        .cart-item-info { flex: 1; min-width: 0; }
        .cart-item-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.25rem; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
        .cart-item-det { font-size: 0.8rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
        .cart-item-price { font-family: 'JetBrains Mono', monospace; font-weight: 600; color: var(--red-text); margin-top: 0.25rem; }
        .cart-item-note { margin-top: 0.5rem; }
        .note-input { width: 100%; min-height: 40px; padding: 0.48rem 0.65rem; border: 1px solid var(--border-color); border-radius: 9px; background: var(--bg-tertiary); color: var(--text-primary); font-size: 0.9rem; transition: border-color 0.18s, box-shadow 0.18s; }
        .note-input::placeholder { color: var(--text-muted); }
        .note-input:focus { outline: none; border-color: var(--red-text); }
        .cart-item-act { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
        .rm-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border-color); background: var(--bg-tertiary); color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.16s var(--ease-out), border-color 0.18s, color 0.18s, background 0.18s; }
        .rm-btn:hover { border-color: var(--red-text); color: var(--red-text); background: var(--red-light); }
        .rm-btn:active { transform: scale(0.92); }
        .edit-wt-btn { min-width: 58px; height: 34px; padding: 0 0.55rem; border-radius: 9px; border: 1px solid var(--border-color); background: var(--bg-tertiary); color: var(--text-secondary); cursor: pointer; font-size: 0.78rem; font-weight: 700; }
        .edit-wt-btn:hover { border-color: var(--red-text); color: var(--red-text); background: var(--red-light); }
        .qty-ctrl { display: flex; align-items: center; gap: 0.5rem; background: var(--bg-tertiary); border-radius: 10px; padding: 0.25rem; border: 1px solid var(--border-color); }
        .qty-btn { width: 34px; height: 34px; border-radius: 8px; border: none; background: var(--bg-secondary); color: var(--text-primary); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: transform 0.14s var(--ease-spring), background 0.18s, color 0.18s; }
        .qty-btn:hover { background: var(--red-light); color: var(--red-text); }
        .qty-btn:active { transform: scale(0.9); }
        .qty-val { min-width: 24px; text-align: center; font-family: 'JetBrains Mono', monospace; font-weight: 600; }

        .del-sec { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); }
        .del-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
        .saved-badge { font-size: 0.7rem; padding: 0.2rem 0.5rem; background: #166534; color: white; border-radius: 4px; }
        .input-grp { margin-bottom: 1rem; }
        .input-lbl { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
        .input-fld { width: 100%; height: 50px; padding: 0 1rem; border: 1px solid var(--border-color); border-radius: 13px; background: var(--bg-card); color: var(--text-primary); font-size: 0.95rem; box-shadow: var(--shadow-sm); transition: border-color 0.18s, box-shadow 0.18s, background 0.18s; }
        .input-fld:focus { outline: none; border-color: var(--red-text); box-shadow: 0 0 0 3px var(--red-glow); }
        .input-fld.invalid { border-color: var(--red-text); }
        .txt-area { height: auto; min-height: 80px; padding: 0.75rem 1rem; resize: vertical; }
        .loc-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1rem; border: 1px dashed var(--border-color); border-radius: 12px; background: var(--bg-card); color: var(--text-secondary); font-size: 0.85rem; font-weight: 700; cursor: pointer; margin-top: 0.5rem; width: 100%; justify-content: center; box-shadow: var(--shadow-sm); transition: transform 0.16s var(--ease-out), border-color 0.18s, color 0.18s; }
        .loc-btn:active { transform: scale(0.98); }
        .loc-btn:hover { border-color: var(--red-text); color: var(--red-text); }
        .loc-btn.got { border-style: solid; border-color: var(--green-primary); color: var(--green-primary); }
        .totals { margin-top: 1.5rem; padding: 1rem; background: linear-gradient(135deg, var(--bg-card), color-mix(in srgb, var(--gold-soft) 60%, var(--bg-card))); border: 1px solid var(--border-color); border-radius: 16px; box-shadow: var(--shadow-sm); }
        .total-row { display: flex; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.5rem; font-size: 0.9rem; }
        .total-row:last-child { margin-bottom: 0; padding-top: 0.5rem; border-top: 1px solid var(--border-color); font-weight: 700; font-size: 1.1rem; }
        .total-row span:last-child { text-align: right; font-variant-numeric: tabular-nums; font-family: 'JetBrains Mono', monospace; }
        .min-notice { margin-top: 1rem; padding: 0.75rem 1rem; background: var(--red-light); border: 1px solid color-mix(in srgb, var(--red-primary) 60%, var(--border-color)); border-radius: 12px; font-size: 0.85rem; color: var(--red-text); display: flex; align-items: center; gap: 0.5rem; box-shadow: var(--shadow-sm); }

        .about-sec { margin-bottom: 1.5rem; }
        .about-sec:last-child { margin-bottom: 0; }
        .about-sec h3 { font-size: 1rem; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
        .about-sec p, .about-sec li { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }
        .about-sec ul { padding-left: 1.25rem; }
        .about-sec li { margin-bottom: 0.5rem; }
        .about-link { color: var(--red-text); text-decoration: none; }
        .about-link:hover { text-decoration: underline; }
        .about-logo { text-align: center; margin-bottom: 1.5rem; }
        .about-logo img { height: 80px; width: auto; }
        .privacy { padding: 1rem; background: var(--green-light); border: 1px solid color-mix(in srgb, var(--green-primary) 24%, transparent); border-radius: 14px; margin-top: 1rem; box-shadow: var(--shadow-sm); }
        .privacy h4 { font-size: 0.9rem; margin-bottom: 0.5rem; color: var(--green-primary); display: flex; align-items: center; gap: 0.5rem; }
        .privacy p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }

        .fav-empty { text-align: center; padding: 2rem; color: var(--text-muted); }
        .fav-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; border: 1px solid var(--border-color); border-radius: 13px; background: var(--bg-card); box-shadow: var(--shadow-sm); margin-bottom: 0.65rem; }
        .fav-item:last-child { border-bottom: none; }
        .fav-item-img { width: 52px; height: 52px; border-radius: 10px; background: var(--bg-tertiary); overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
        .fav-item-img img { width: 100%; height: 100%; object-fit: cover; }
        .fav-item-info { flex: 1; min-width: 0; }
        .fav-item-name { font-weight: 500; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .fav-item-price { font-size: 0.8rem; color: var(--red-text); font-family: 'JetBrains Mono', monospace; }
        .fav-item-act { display: flex; gap: 0.5rem; }
        .fav-item-act button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border-color); background: var(--bg-tertiary); color: var(--text-primary); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.16s var(--ease-out), border-color 0.18s, color 0.18s; }
        .fav-item-act button:active { transform: scale(0.93); }
        .fav-item-act button:hover { border-color: var(--red-text); color: var(--red-text); }
        .fav-item-act .add-f { background: var(--red-primary); border-color: var(--red-text); color: white; }

        .toast { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(100px) scale(0.96); background: var(--bg-card); border: 1px solid var(--border-color); padding: 0.78rem 1.25rem; border-radius: 999px; box-shadow: var(--shadow-lg); font-size: 0.9rem; font-weight: 700; z-index: 2000; opacity: 0; transition: transform 0.28s var(--ease-spring), opacity 0.25s; pointer-events: none; max-width: 90vw; text-align: center; }
        .toast.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
        .toast.ok { border-color: var(--green-primary); color: var(--green-primary); }

        a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--red-text); outline-offset: 3px; }

        @media (prefers-reduced-motion: reduce) {
            html { scroll-behavior: auto; }
            *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
        }
        @media (max-width: 639px) {
            .shop-banner { min-height: 30px; padding: 0.38rem 0.75rem; font-size: 0.7rem; }
            .header { padding: 0.62rem 0.75rem 0.72rem; }
            .header-top { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.55rem; }
            .logo { flex: 1 1 auto; min-height: 44px; }
            .logo-mark { width: 34px; height: 34px; border-radius: 9px; }
            .logo-text { font-size: 0.84rem; letter-spacing: 0.2px; }
            .logo-sub { display: none; }
            .header-actions { gap: 0.25rem; flex-shrink: 0; margin-left: auto; }
            .icon-btn { width: 44px; height: 44px; border-radius: 10px; font-size: 1rem; }
            #themeBtn, #favBtn, #aboutBtn, #cartBtn { display: flex; }
            .search-input { height: 44px; border-radius: 11px; font-size: 1rem; }
            .toolbar { gap: 0.45rem; padding: 0.5rem 0.75rem; }
            .view-toggle { padding: 2px; border-radius: 10px; }
            .view-btn { width: 34px; height: 34px; }
            .cat-chip { min-height: 38px; padding: 0.28rem 0.36rem 0.28rem 0.66rem; font-size: 0.74rem; }
            .cat-count { min-width: 25px; padding: 0.2rem 0.36rem; font-size: 0.62rem; }
            .quick-btn { min-height: 38px; padding: 0.42rem 0.7rem; font-size: 0.74rem; }
            .quick-bar { padding: 0.5rem 0.75rem; }
            .main { padding: 0.88rem 0.72rem 112px; }
            .catalog-heading { align-items: center; flex-wrap: wrap; gap: 0.65rem; margin-bottom: 0.72rem; }
            .catalog-kicker { margin-bottom: 0.32rem; font-size: 0.65rem; }
            .catalog-title { font-size: 1.22rem; }
            .catalog-benefit { padding: 0.42rem 0.62rem; font-size: 0.7rem; }
            .count-bar { margin-bottom: 0.72rem; padding: 0.52rem 0.58rem; }
            .sort-label { display: none; }
            .sort-select { max-width: 150px; min-height: 44px; font-size: 0.8rem; }
            .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.72rem; }
            .card { border-radius: 12px; contain-intrinsic-size: auto 290px; }
            .card-info { padding: 0.66rem; }
            .card-name { font-size: 0.9rem; line-height: 1.35; min-height: 2.7em; }
            .card-brand { font-size: 0.75rem; margin-bottom: 0.54rem; }
            .card-price { font-size: 0.84rem; }
            .add-btn { width: 100%; min-height: 44px; padding: 0.5rem; border-radius: 10px; box-shadow: 0 3px 8px rgba(220,38,38,0.12); }
            .add-label { display: inline; }
            .card.list .card-name { min-height: auto; -webkit-line-clamp: 2; }
            .card.list .card-img { height: 120px; width: 90px; align-self: center; }
            .card.list .card-foot { gap: 0.6rem; }
            .card.list .add-btn { width: auto; margin-left: auto; padding-inline: 0.8rem; }
            .cart-bar { bottom: max(8px, env(safe-area-inset-bottom)); width: calc(100% - 1rem); padding: 0.66rem 0.68rem 0.66rem 0.82rem; gap: 0.72rem; border-radius: 16px; }
            .view-btn-cart { min-height: 44px; padding: 0.65rem 0.9rem; border-radius: 12px; font-size: 0.88rem; white-space: nowrap; }
            .cart-total { font-size: 1rem; }
            .modal { max-height: min(92dvh, 760px); border-radius: 18px 18px 0 0; }
            .modal-head { padding: 0.82rem 1rem; }
            .modal-title { font-size: 1rem; }
            .modal-x { width: 35px; height: 35px; }
            .modal-body { padding: 1rem; }
            .modal-foot { padding: 0.85rem 1rem max(0.85rem, env(safe-area-inset-bottom)); }
            .btn { padding: 0.86rem 0.8rem; font-size: 0.94rem; }
            .wt-preview { gap: 0.75rem; padding: 0.82rem; margin-bottom: 1rem; }
            .wt-img { width: 68px; height: 68px; border-radius: 12px; }
            .wt-name { font-size: 0.92rem; line-height: 1.25; }
            .wt-opts { gap: 0.55rem; margin-bottom: 1rem; }
            .wt-opt { padding: 0.68rem 0.4rem; border-radius: 12px; }
            .wt-opt-val { font-size: 0.98rem; }
            .wt-opt-price { font-size: 0.72rem; }
            .cart-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 0.65rem; padding: 0.78rem; border-radius: 12px; }
            .cart-item-img { width: 52px; height: 52px; border-radius: 10px; }
            .cart-item-name { white-space: normal; overflow-wrap: anywhere; }
            .cart-item-act { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; gap: 0.75rem; border-top: 1px solid var(--border-color); padding-top: 0.65rem; }
            .qty-ctrl { gap: 0.35rem; }
            .qty-btn, .rm-btn { width: 34px; height: 34px; }
            .input-fld, .note-input, .custom-wt-input { min-height: 46px; border-radius: 12px; font-size: 1rem; }
            .txt-area { min-height: 76px; }
            .totals { padding: 0.85rem; border-radius: 13px; }
            .total-row:last-child { font-size: 1rem; }
            .fav-item { gap: 0.6rem; padding: 0.65rem; }
            .fav-item-img { width: 46px; height: 46px; }
            .fav-item-act { gap: 0.35rem; }
            .fav-item-act button { width: 36px; height: 36px; }
        }
        @media (max-width: 374px) {
            .logo-text { font-size: 1rem; letter-spacing: 0.35px; }
            .header-actions { justify-content: space-between; width: 100%; gap: 0.5rem; }
            .icon-btn { width: 44px; height: 44px; font-size: 1rem; }
            .header-top { gap: 0.45rem; }
            .header-actions .icon-btn { flex: 1; }
            .count-bar { align-items: flex-start; flex-direction: column; gap: 0.5rem; }
            .sort-control, .sort-select { width: 100%; max-width: none; }
            .toolbar { gap: 0.36rem; padding-inline: 0.62rem; }
            .grid { gap: 0.58rem; }
            .card-info { padding: 0.56rem; }
            .card-name { font-size: 0.86rem; }
            .card-price { font-size: 0.78rem; }
            .card-price small { font-size: 0.62rem; }
            .add-btn { width: 100%; min-height: 44px; }
            .wt-opts { grid-template-columns: repeat(2, 1fr); }
            .cart-bar { gap: 0.48rem; }
            .view-btn-cart { padding-inline: 0.72rem; justify-content: center; }
            .btn-row { gap: 0.5rem; }
            .cart-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); }
            .cart-item-img { width: 48px; height: 48px; }
            .cart-item-act { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }
        }
        @media (min-width: 640px) {
            .categories { padding-bottom: 5px; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-muted) 38%, transparent) transparent; }
            .categories::-webkit-scrollbar { display: block; height: 7px; }
            .categories::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-muted) 38%, transparent); border: 2px solid transparent; border-radius: 999px; background-clip: content-box; }
            .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
            .modal { max-height: 85vh; border-radius: 16px; margin: auto; }
        }
        @media (min-width: 768px) { .main { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.5rem 110px; } .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; } }

        /* Accessible actions and clear feedback throughout the ordering flow. */
        [hidden] { display: none !important; }
        .skip-link { position: fixed; top: 0.6rem; left: 0.6rem; z-index: 10000; padding: 0.85rem 1rem; border-radius: 10px; background: var(--text-primary); color: var(--bg-primary); font-weight: 700; transform: translateY(-160%); }
        .skip-link:focus { transform: translateY(0); }
        .main:focus { outline: none; }
        .icon-btn, .view-btn, .fav-btn, .card.list .fav-btn, .modal-x, .qty-btn, .rm-btn, .fav-item-act button { min-width: 44px; min-height: 44px; flex-shrink: 0; }
        .logo, .cat-chip, .quick-btn, .add-btn, .sort-select, .edit-wt-btn, .empty-reset, .loc-btn, .btn, .text-btn { min-height: 44px; }
        .search-clear { right: 0; width: 44px; height: 44px; border: 0; background: transparent; }
        .card-name { min-height: 44px; }
        .card.list .card-name { min-height: 44px; }
        .grid.list .card-info { min-width: 0; }
        .catalogue-note { margin: -0.2rem 0 0.9rem; font-size: 0.86rem; color: var(--text-secondary); line-height: 1.5; }
        .cart-feedback, .connection-note { padding: 0.8rem 0.9rem; margin-bottom: 1rem; border: 1px solid var(--border-color); border-left: 3px solid var(--red-primary); border-radius: 10px; background: var(--red-light); color: var(--text-primary); font-size: 0.85rem; line-height: 1.5; }
        .cart-feedback:empty, .connection-note:empty { display: none; }
        .cart-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem; margin-bottom: 0.75rem; }
        .cart-tools > span { flex: 1; min-width: 10rem; font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
        .text-btn { padding: 0.6rem 0.8rem; border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-secondary); color: var(--red-text); font-size: 0.85rem; font-weight: 700; cursor: pointer; }
        .text-btn:hover { background: var(--red-light); border-color: var(--red-primary); }
        .checkout-note, .weight-help { margin-top: 0.65rem; font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }
        .field-error { margin-top: 0.4rem; color: var(--red-text); font-size: 0.82rem; line-height: 1.45; }
        .field-error:empty { display: none; }
        [aria-invalid="true"] { border-color: var(--red-primary); }
        .order-preview { display: block; width: 100%; margin-top: 1rem; min-height: 240px; max-height: 50dvh; resize: vertical; padding: 1rem; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-tertiary); color: var(--text-primary); font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; line-height: 1.6; tab-size: 2; }
        .in-cart { position: absolute; left: 7px; bottom: 7px; z-index: 3; max-width: calc(100% - 14px); border: 1px solid var(--border-color); padding: 0.3rem 0.48rem; border-radius: 7px; background: var(--green-light); color: var(--green-primary); font-size: 0.7rem; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
        .card.list .in-cart { bottom: 32px; font-size: 0.64rem; }
        .toast { width: max-content; border-radius: 14px; line-height: 1.45; display: flex; align-items: center; justify-content: center; gap: 0.7rem; bottom: max(106px, calc(env(safe-area-inset-bottom) + 100px)); }
        .toast button { min-width: 60px; min-height: 44px; padding: 0.5rem 0.7rem; border: 1px solid currentColor; border-radius: 8px; background: transparent; color: inherit; font-weight: 800; cursor: pointer; flex-shrink: 0; }
        .modal-body { min-height: 0; scrollbar-gutter: stable; }
        .modal-head { gap: 1rem; }
        .modal-title, .prod-name, .wt-name { overflow-wrap: anywhere; }
        .btn-row .btn { min-width: 0; }
        .cart-total, .card-price, .cart-item-price { font-variant-numeric: tabular-nums; }
        .qty-val { min-width: 2ch; }
        button:disabled { cursor: not-allowed; }
        [data-theme="dark"] .quick-btn.hl { color: #F0C977; }
        [data-theme="dark"] .quick-btn.hl.on { color: white; }
        [data-theme="dark"] .logo-text { color: #FF3030; text-shadow: none; }
        @media (hover: none) {
            .card:hover, .cat-chip:hover, .quick-btn:hover, .wt-opt:hover { transform: none; }
            .card:hover .card-img img { transform: none; }
            .card:hover::after, .card:hover .card-img::after { opacity: 0; }
        }
        @media (max-width: 639px) {
            .main { padding-bottom: calc(125px + env(safe-area-inset-bottom)); }
            .header { padding-top: max(0.62rem, env(safe-area-inset-top)); }
            .header-top { gap: 0.4rem; }
            .logo { gap: 0.4rem; }
            .logo-mark { width: 30px; height: 30px; }
            .logo-text { font-size: 0.7rem; }
            .header-actions { gap: 0.2rem; }
            .card-foot { gap: 0.55rem; }
            .card-price { min-height: 1.4em; }
            .fav-btn { top: 5px; left: 5px; }
            .unit-badge { top: 9px; right: 5px; font-size: 0.62rem; padding-inline: 0.35rem; }
            .modal-body, .modal-head, .modal-foot { padding-inline: 0.85rem; }
            .order-preview { font-size: 1rem; }
            .toast { padding: 0.6rem 0.8rem; max-width: calc(100vw - 1.25rem); font-size: 0.82rem; }
            .fav-item { flex-wrap: wrap; }
            .fav-item-info { flex-basis: calc(100% - 64px); }
            .fav-item-act { margin-left: auto; }
        }
        @media (max-width: 374px) {
            .logo-text { font-size: 1rem; }
            .logo-mark { width: 34px; height: 34px; }
            .header-actions { gap: 0.5rem; }
            .card.list .card-img { width: 78px; }
            .cart-count { font-size: 0.72rem; }
            .cart-total { font-size: 0.94rem; }
            .wt-total { gap: 0.5rem; padding-inline: 0.75rem; }
            .wt-total-val { font-size: 1.08rem; }
            .btn-row { flex-wrap: wrap; }
            .btn-row .btn { flex-basis: 100%; }
        }

html.modal-open { overflow: hidden; }
.cart-item-img.noimg::before, .fav-item-img.noimg::before, .wt-img.noimg::before { content: "📦"; }

/* Theme colors switch together so text never crosses an unreadable intermediate state. */
body { transition: none; }
button, .card, .cart-bar, .search-input, .cat-chip, .quick-btn { transition-property: transform, opacity, box-shadow, border-color; }
/* Visibility changes immediately so keyboard focus can enter a newly opened dialog. */
.modal-bg { transition: opacity 0.18s ease; }
body.modal-open .toast { top: max(0.75rem, env(safe-area-inset-top)); bottom: auto; }
