        html:has(body.page-catalog) {
            height: auto !important;
            min-height: 100vh !important;
            overflow-y: scroll !important;
            overflow-x: hidden !important;
        }
        body.page-catalog {
            height: auto !important;
            min-height: 100vh !important;
            overflow: visible !important;
            display: flex;
            flex-direction: column;
        }

        body.page-catalog {
            background: transparent !important;
            color: var(--text-secondary);
            font-family: 'Codec Pro', 'Segoe UI', Arial, sans-serif;
            position: static !important;
        }

        body.page-catalog .site-footer {
            position: relative !important;
            margin-top: 60px;
            background: #000 !important;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
        }
        body.page-catalog .site-footer .footer-content {
            width: 100%;
        }

        body.page-catalog .header-logo,
        body.page-catalog .nav-panel {
            position: absolute !important;
        }

        body.page-catalog .cinematic-bars {
            position: absolute;
            height: 10vh;
        }
        body.page-catalog .cinematic-bars::after {
            display: none;
        }

        body.page-catalog::before {
            background: var(--gradient-page) !important;
        }

        .koi-pond {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            z-index: 2;
            pointer-events: none;
            overflow: hidden;
        }
        .koi {
            position: absolute;
            top: 0;
            left: 0;
            width: 72px;
            height: 30px;
            margin: -15px 0 0 -36px;
            pointer-events: auto;
            cursor: pointer;
            opacity: 0.88;
            filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.4));
            will-change: transform;
        }
        .koi svg { width: 100%; height: 100%; display: block; }
        .koi-tail {
            transform-origin: 24px 25px;
            animation: koi-tail-wag 1s ease-in-out infinite;
        }
        .koi.is-scared .koi-tail { animation-duration: 0.22s; }
        @keyframes koi-tail-wag {
            0%, 100% { transform: rotate(-14deg); }
            50% { transform: rotate(14deg); }
        }

        .koi.is-popping {
            transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.4, 1), opacity 0.2s ease-out;
            pointer-events: none;
        }
        .koi.is-popping .koi-tail { animation: none; }

        .koi-particle {
            position: absolute;
            top: 0;
            left: 0;
            border-radius: 1px;
            pointer-events: none;
            opacity: 0.9;
            transition: transform 0.48s cubic-bezier(0.2, 0.8, 0.3, 1), opacity 0.45s ease-in;
            will-change: transform;
        }
        @media (max-width: 768px) {
            .koi { width: 52px; height: 22px; margin: -11px 0 0 -26px; }
        }

        .catalog-wrap {
            position: relative;
            z-index: 1;
            flex: 1 0 auto;
            width: 100%;
            max-width: 1240px;
            margin: 0 auto;
            padding: 110px 24px 60px;
        }

        body.catalog-menu-open .catalog-wrap {
            z-index: 3;
        }

        .catalog-wrap.has-order-bar {
            padding-bottom: 110px;
        }
        .catalog-head { text-align: center; margin-bottom: 36px; margin-top: 20px; }
        .catalog-head h1 {
            font-size: clamp(28px, 4vw, 42px);
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.2;
            margin-bottom: 10px;
            font-family: 'Codec Pro', 'Segoe UI', Arial, sans-serif;
        }
        .catalog-sub-row {
            position: relative;
            max-width: 560px;
            margin: 0 auto;
        }
        .catalog-sub-slider {
            display: grid;
            padding-right: 34px;
        }
        .catalog-sub-slide {
            grid-area: 1 / 1;
            font-size: 15px;
            color: var(--text-muted);
            line-height: 1.6;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.5s ease;
        }
        .catalog-sub-slide.active {
            opacity: 1;
            visibility: visible;
        }
        .catalog-sub-dots {
            /* Anchored to the slider's own vertical center via top:50% +
               translateY(-50%) — stays pinned to middle no matter what
               height the active slide's text needs, no reliance on flex
               sibling alignment or reflow timing. */
            position: absolute;
            top: 50%;
            right: 0;
            transform: translateY(-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
        }
        .catalog-sub-dot {
            /* Sized as a comfortable tap target; the visible dot itself is
               drawn smaller via ::before so mobile's global button rule
               (min 44px touch target) doesn't blow it up to a giant circle.
               Kept fairly tight (not 44px) so the vertical stack of 3 stays
               compact instead of stretching tall next to the text. */
            width: 18px !important;
            height: 18px !important;
            min-width: 18px !important;
            min-height: 18px !important;
            padding: 0;
            border: none;
            background: transparent;
            border-radius: 50%;
            position: relative;
            cursor: pointer;
        }
        .catalog-sub-dot::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            transform: translate(-50%, -50%);
            transition: background 0.2s ease, transform 0.2s ease;
        }
        .catalog-sub-dot.active::before {
            background: var(--color-primary);
            transform: translate(-50%, -50%) scale(1.3);
        }

        .catalog-controls {
            display: flex;
            justify-content: center;
            margin-bottom: 32px;
        }
        .catalog-city-dropdown .catalog-filter-btn { max-width: 150px; }
        .catalog-city-dropdown #cityDropdownLabel {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .catalog-search-row {
            display: flex;
            justify-content: center;
            gap: 10px;
            width: 100%;
            max-width: 620px;
        }
        .catalog-search {
            flex: 1;
            min-width: 0;
            padding: 12px 16px;
            border-radius: var(--radius-pill);
            border: 1px solid rgba(255, 255, 255, 0.15);
            background: var(--bg-card);
            color: var(--text-primary);
            font-size: 14px;
            font-family: inherit;
            outline: none;
            transition: border-color 0.2s ease;
        }
        .catalog-search::placeholder { color: var(--text-muted); }
        .catalog-search:focus { border-color: var(--color-accent); }

        .catalog-filter-dropdown { position: relative; flex-shrink: 0; }
        .catalog-filter-btn {
            display: flex;
            align-items: center;
            gap: 7px;
            height: 100%;
            padding: 0 16px;
            border-radius: var(--radius-pill);
            border: 1px solid rgba(255, 255, 255, 0.15);
            background: var(--bg-card);
            color: var(--text-primary);
            font-size: 13.5px;
            font-weight: 500;
            font-family: inherit;
            cursor: pointer;
            white-space: nowrap;
            transition: border-color 0.2s ease;
        }
        .catalog-filter-btn:hover { border-color: var(--color-accent); }
        .catalog-filter-icon { width: 16px; height: 16px; flex-shrink: 0; }
        .catalog-filter-chevron {
            width: 14px;
            height: 14px;
            flex-shrink: 0;
            transition: transform 0.25s ease;
        }
        .catalog-filter-btn[aria-expanded="true"] .catalog-filter-chevron { transform: rotate(180deg); }
        .catalog-filter-menu {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            min-width: 200px;
            background: var(--bg-card);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: var(--radius-card);
            padding: 8px;
            box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
            z-index: 50;
            display: flex;
            flex-direction: column;
            gap: 3px;
            animation: fadeInUp 0.15s ease;
        }
        .catalog-filter-menu.hidden { display: none; }
        .filter-pill {
            width: 100%;
            text-align: left;
            padding: 9px 12px;
            border-radius: var(--radius-pill);
            border: none;
            background: transparent;
            color: var(--text-secondary);
            font-size: 13.5px;
            font-weight: 500;
            cursor: pointer;
            font-family: inherit;
            transition: all 0.2s ease;
        }
        .filter-pill:hover { background: rgba(255, 255, 255, 0.06); color: var(--text-primary); }
        .filter-pill.active {
            background: var(--gradient-primary);
            color: #fff;
        }

        .catalog-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
            gap: 18px;
            align-content: start;
        }

        .catalog-grid.is-loading {
            min-height: 100vh;
        }
        .catalog-empty {
            grid-column: 1 / -1;
            text-align: center;
            color: var(--text-muted);
            padding: 60px 0;
            font-size: 15px;
        }

        .tea-card {
            background: var(--bg-card);
            border-radius: var(--radius-card);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            animation: fadeInUp 0.35s ease backwards;
        }
        .tea-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
        }
        .tea-photo {
            position: relative;
            aspect-ratio: 1 / 1;
            background: var(--gradient-dark);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            cursor: pointer;
            touch-action: pan-y;
        }
        .tea-photo-icon {
            position: relative;
            z-index: 1;
            font-size: 56px;
            opacity: 0.9;
            filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4));
        }

        .tea-photo-img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            -webkit-user-drag: none;
            user-select: none;
        }

        .tea-card-badge {
            position: absolute;
            left: 8px;
            bottom: 8px;
            z-index: 2;
            background: rgba(0, 0, 0, 0.7);
            color: #fff;
            font-size: 10px;
            font-weight: 600;
            padding: 4px 9px;
            border-radius: 8px;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            backdrop-filter: blur(4px);
        }

        .tea-card-series {
            position: absolute;
            top: 8px;
            right: 8px;
            z-index: 2;
            background: var(--gradient-primary);
            color: #fff;
            font-size: 10px;
            font-weight: 600;
            padding: 4px 9px;
            border-radius: 8px;
            letter-spacing: 0.2px;
        }

        .tea-card-dots {
            position: absolute;
            left: 50%;
            bottom: 8px;
            transform: translateX(-50%);
            z-index: 3;
            display: flex;
            align-items: center;
            gap: 4px;
            max-width: calc(100% - 16px);
            flex-wrap: wrap;
            justify-content: center;
        }
        .tea-card-dot {
            width: 5px !important;
            height: 5px !important;
            min-width: 5px !important;
            min-height: 5px !important;
            border-radius: 50%;
            border: none;
            padding: 0;
            background: rgba(255, 255, 255, 0.45);
            cursor: pointer;
            box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
            transition: background 0.2s ease, transform 0.2s ease;
        }
        .tea-card-dot.active { background: #fff; transform: scale(1.3); }
        .tea-card-info {
            padding: 12px 12px 10px;
            display: flex;
            flex-direction: column;
            gap: 4px;
            flex: 1;
        }
        .tea-card-price {
            font-size: 19px;
            font-weight: 800;
            color: var(--text-primary);
            line-height: 1.15;
            white-space: normal;
        }
        .tea-card-price span {
            font-size: 11.5px;
            font-weight: 500;
            color: var(--text-muted);
            margin-left: 2px;
            white-space: nowrap;
        }
        .tea-card-title {
            font-size: 13px;
            font-weight: 500;
            color: var(--text-secondary);
            line-height: 1.35;
            margin: 2px 0 0;
            cursor: pointer;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            transition: color 0.15s ease;
        }
        .tea-card-title:hover { color: var(--text-primary); }
        .tea-card-meta {
            font-size: 11px;
            color: var(--text-muted);
            margin-top: auto;
            padding-top: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .tea-stock {
            font-size: 11px;
            font-weight: 600;
            color: var(--color-gold);
            margin-top: auto;
            padding-top: 4px;
        }
        .tea-card-meta + .tea-stock { margin-top: 0; padding-top: 0; }
        .tea-stock.is-out { color: var(--text-muted); }
        .tea-stock.is-special { color: var(--color-gold); }
        .qty-btn {
            width: 30px;
            height: 30px;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.18);
            background: transparent;
            color: var(--text-primary);
            font-size: 17px;
            line-height: 1;
            cursor: pointer;
            font-family: inherit;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
            flex-shrink: 0;
        }
        .qty-btn:hover {
            border-color: var(--color-accent);
            color: var(--color-accent);
        }
        .qty-btn:disabled {
            opacity: 0.35;
            cursor: not-allowed;
            border-color: rgba(255, 255, 255, 0.18);
            color: var(--text-primary);
        }

        .qty-input-wrap {
            display: flex;
            align-items: baseline;
            justify-content: center;
            gap: 3px;
            flex: 1;
            min-width: 0;
        }
        .qty-input {
            /* Width is CSS-driven, not left to the `size` attribute (which
               catalog.js sets to the digit count of the value) — for
               unlimited-stock items nothing caps how many digits someone
               can type, and `size` alone would let the box balloon across
               the card. `ch` still grows a little with longer numbers,
               but max-width stops it from ever stretching past a few
               digits' worth; overflow just scrolls inside the box. */
            flex-shrink: 0;
            width: 2ch;
            max-width: 34px;
            overflow: hidden;
            border: none;
            background: transparent;
            color: var(--text-primary);
            font-size: 14px;
            font-weight: 600;
            font-family: inherit;
            text-align: center;
            padding: 0;
            border-radius: 4px;
            transition: background 0.15s ease;
        }
        .qty-input:hover { background: rgba(255, 255, 255, 0.06); }
        .qty-input:focus {
            outline: none;
            background: rgba(255, 255, 255, 0.1);
        }
        .qty-unit {
            font-size: 13px;
            color: var(--text-muted);
            white-space: nowrap;
            flex-shrink: 0;
        }

        .tea-card-add {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 11px 18px;
            border: none;
            border-radius: var(--radius-pill);
            background: var(--gradient-primary);
            color: #fff;
            font-size: 13px;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            white-space: nowrap;
            transition: filter 0.2s ease, background 0.2s ease;
        }
        .tea-card-add svg { width: 14px; height: 14px; flex-shrink: 0; }
        .tea-card-add:hover { filter: brightness(1.1); }
        .tea-card-add.active {
            background: var(--bg-medium);
            color: var(--color-gold);
        }

        .tea-card-add--oos {
            background: rgba(255, 255, 255, 0.06);
            color: var(--text-muted);
            cursor: not-allowed;
        }
        .tea-card-add--oos:hover { filter: none; }

        .tea-card > .tea-card-add,
        .tea-card > .qty-split {
            margin: 0 12px 12px;
            min-height: 42px;
        }
        .tea-card > .tea-card-add {
            width: calc(100% - 24px);
        }

        .qty-split {
            display: flex;
            gap: 6px;
        }
        .qty-split-status {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 4px 8px;
            background: var(--gradient-primary);
            color: #fff;
            border-radius: var(--radius-pill);
            text-align: center;
            line-height: 1.25;
            overflow: hidden;
        }
        .qty-split-status-label {
            font-weight: 700;
            white-space: nowrap;
        }
        .qty-split-status-sub {
            opacity: 0.85;
            white-space: nowrap;
        }

        .qty-split-controls {
            flex: 1;
            min-width: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            background: linear-gradient(273deg,
                rgba(82, 12, 12, 0.95) 0%,
                rgba(45, 7, 7, 0.95) 60%,
                rgba(15, 2, 2, 0.95) 100%);
            border-radius: var(--radius-pill);
        }

        .qty-split-controls .qty-btn {
            border-color: rgba(255, 255, 255, 0.35);
        }
        .qty-split-controls .qty-btn:hover {
            border-color: #fff;
            color: #fff;
            background: rgba(255, 255, 255, 0.18);
        }

        .tea-card > .qty-split .qty-split-status {
            /* The base --radius-pill (15px) eats too far into the padding
               on this narrow card-width pill, clipping "В заказе" against
               the curve. Smaller radius gives the text its full width. */
            border-radius: 10px;
        }
        .tea-card > .qty-split .qty-split-status-label { font-size: 12px; }
        .tea-card > .qty-split .qty-split-status-sub { font-size: 10.5px; }
        .tea-card > .qty-split .qty-split-controls { padding: 4px; }
        .tea-card > .qty-split .qty-btn { width: 22px; height: 22px; font-size: 14px; }
        .tea-card > .qty-split .qty-input { font-size: 13px; }

        /* Normal flow, no pinning and no backdrop — the button sits wherever
           it naturally falls at the end of the card content. */
        .tea-modal-footer-slot {
            margin-top: 18px;
        }

        .tea-modal-footer {
            display: flex;
            justify-content: center;
            margin: 4px 0 0;
            border-radius: var(--radius-card);
            overflow: hidden;
        }

        .tea-modal-footer > .tea-card-add,
        .tea-modal-footer > .qty-split {
            min-height: 44px;
            width: 100%;
        }
        .tea-modal-footer > .qty-split {
            width: 100%;
            gap: 0;
            justify-content: center;
        }
        .tea-modal-footer .qty-split-status,
        .tea-modal-footer .qty-split-controls {
            border-radius: 0;
            padding: 6px 12px;
        }

        .tea-modal-footer .qty-split-status {
            flex: 0 0 40%;
            border-radius: var(--radius-card) 0 0 var(--radius-card);
            border-right: 1px solid rgba(0, 0, 0, 0.25);
        }
        .tea-modal-footer .qty-split-status-label { font-size: 13px; }
        .tea-modal-footer .qty-split-status-sub { font-size: 11.5px; }
        .tea-modal-footer .qty-split-controls { flex: 0 0 60%; gap: 8px; border-radius: 0 var(--radius-card) var(--radius-card) 0; }
        .tea-modal-footer .qty-split .qty-btn { width: 26px; height: 26px; font-size: 15px; }
        .tea-modal-footer .qty-split .qty-input { font-size: 14px; }

        .tea-modal-head {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-bottom: 4px;
        }
        .tea-modal-head .tea-modal-title {
            margin-bottom: 0;
        }

        .order-bar-item-stepper {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            margin-top: 4px;
        }
        .order-bar-item-stepper .qty-btn {
            width: 22px;
            height: 22px;
            font-size: 13px;
            border-radius: 6px;
        }
        .order-bar-item-stepper .qty-input {
            font-size: 11.5px;
            color: var(--text-secondary);
            font-weight: 500;
        }
        .order-bar-item-stepper .qty-unit { font-size: 11px; }

        .tea-modal {
            position: fixed;
            inset: 0;
            z-index: 2500;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        .tea-modal-backdrop {
            position: absolute;
            inset: 0;
            background: rgba(0, 0, 0, 0.75);
            backdrop-filter: blur(6px);
        }
        .tea-modal-content {
            position: relative;
            background: var(--bg-card);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: var(--radius-card) 12px 12px var(--radius-card);
            width: 100%;
            max-width: 600px;
            max-height: 90vh;
            max-height: 90dvh;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            transform: translateZ(0);
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
            animation: fadeInUp 0.3s ease;
        }

        .tea-modal-content {
            scrollbar-width: thin;
            scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
        }
        .tea-modal-content::-webkit-scrollbar {
            width: 9px;
        }
        .tea-modal-content::-webkit-scrollbar-track {
            background: transparent;
            margin-block: var(--radius-card);
        }
        .tea-modal-content::-webkit-scrollbar-thumb {
            background-color: rgba(255, 255, 255, 0.22);
            border-radius: 8px;
            border: 2.5px solid var(--bg-card);
            background-clip: padding-box;
        }
        .tea-modal-content::-webkit-scrollbar-thumb:hover {
            background-color: rgba(255, 255, 255, 0.38);
        }
        .tea-modal-close {
            position: absolute;
            top: 12px;
            right: 14px;
            z-index: 2;
            background: rgba(0, 0, 0, 0.45);
            border: none;
            color: var(--text-primary);
            font-size: 22px;
            line-height: 1;
            cursor: pointer;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            transition: background 0.2s ease;
        }
        .tea-modal-close:hover { background: rgba(226, 5, 5, 0.55); }
        .tea-modal-back {
            position: absolute;
            top: 12px;
            left: 14px;
            z-index: 2;
            background: rgba(0, 0, 0, 0.45);
            border: none;
            color: var(--text-primary);
            cursor: pointer;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s ease;
        }
        .tea-modal-back svg { width: 19px; height: 19px; }
        .tea-modal-back:hover { background: rgba(226, 5, 5, 0.55); }
        .tea-modal-photo {
            height: 240px;
            background: var(--gradient-dark);
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: var(--radius-card) 12px 0 0;
            overflow: hidden;
        }
        .tea-modal-photo-icon {
            position: relative;
            z-index: 1;
            font-size: 80px;
            filter: drop-shadow(0 6px 16px rgba(0,0,0,0.5));
        }

        .tea-modal-gallery {
            position: absolute;
            inset: 0;
            touch-action: pan-y;
        }
        .tea-modal-gallery-img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: 0;
            cursor: zoom-in;
            transition: opacity 0.25s ease;
            -webkit-user-drag: none;
            user-select: none;
        }
        .tea-modal-gallery-img.active { opacity: 1; z-index: 1; }

        .tea-modal-gallery-dots {
            position: absolute;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 2;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .tea-modal-gallery-dot {
            width: 6px !important;
            height: 6px !important;
            min-width: 6px !important;
            min-height: 6px !important;
            border-radius: 50%;
            border: none;
            padding: 0;
            background: rgba(255, 255, 255, 0.45);
            cursor: pointer;
            transition: background 0.2s ease, transform 0.2s ease;
        }
        .tea-modal-gallery-dot.active { background: #fff; transform: scale(1.3); }

        .tea-modal-gallery-zone {
            position: absolute;
            top: 0;
            bottom: 0;
            z-index: 1;
            width: 30%;
            border: none;
            background: transparent;
            cursor: pointer;
            transition: background 0.15s ease;
        }
        .tea-modal-gallery-zone.prev {
            left: 0;
            background: linear-gradient(to right, rgba(0, 0, 0, 0.22), transparent);
        }
        .tea-modal-gallery-zone.next {
            right: 0;
            background: linear-gradient(to left, rgba(0, 0, 0, 0.22), transparent);
        }
        @media (hover: hover) {
            .tea-modal-gallery-zone.prev:hover { background: linear-gradient(to right, rgba(0, 0, 0, 0.4), transparent); }
            .tea-modal-gallery-zone.next:hover { background: linear-gradient(to left, rgba(0, 0, 0, 0.4), transparent); }
        }

        .photo-lightbox {
            position: fixed;
            inset: 0;
            z-index: 3000;
            background: rgba(0, 0, 0, 0.94);
            display: flex;
            flex-direction: column;
        }
        .photo-lightbox.hidden { display: none; }
        .photo-lightbox-grip {
            display: none;
            position: absolute;
            top: 10px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 5;
            width: 44px;
            height: 4px;
            border-radius: 2px;
            background: rgba(255, 255, 255, 0.6);
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
            pointer-events: none;
        }
        @media (max-width: 744px) {
            .photo-lightbox-grip { display: block; }
        }
        .photo-lightbox-close {
            position: absolute;
            top: 14px;
            right: 14px;
            z-index: 2;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: none;
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
            font-size: 24px;
            line-height: 1;
            cursor: pointer;
            transition: background 0.2s ease;
        }
        .photo-lightbox-close:hover { background: rgba(255, 255, 255, 0.2); }
        .photo-lightbox-stage {
            position: relative;
            flex: 1;
            min-height: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            touch-action: none;
            cursor: grab;
        }

        .photo-lightbox-zone {
            position: absolute;
            z-index: 1;
            border: none;
            background: transparent;
            cursor: pointer;
            display: flex;
            align-items: center;
            transition: background 0.25s ease;
            animation: lightboxZoneFadeIn 0.4s ease;
        }
        @keyframes lightboxZoneFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        .photo-lightbox-zone.prev {
            justify-content: flex-start;
            background: linear-gradient(to right, rgba(0, 0, 0, 0.32), transparent);
        }
        .photo-lightbox-zone.next {
            justify-content: flex-end;
            background: linear-gradient(to left, rgba(0, 0, 0, 0.32), transparent);
        }
        @media (hover: hover) {
            .photo-lightbox-zone.prev:hover { background: linear-gradient(to right, rgba(0, 0, 0, 0.5), transparent); }
            .photo-lightbox-zone.next:hover { background: linear-gradient(to left, rgba(0, 0, 0, 0.5), transparent); }
        }
        .photo-lightbox-img {
            max-width: 100%;
            max-height: 100%;
            width: auto;
            height: auto;
            object-fit: contain;
            user-select: none;
            -webkit-user-drag: none;
            opacity: 0;
            transition: opacity 0.15s ease;
            will-change: transform;
        }
        .photo-lightbox-dots {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 7px;
            padding: 14px 0 max(14px, env(safe-area-inset-bottom));
            flex-shrink: 0;
        }
        .photo-lightbox-dot {
            width: 7px !important;
            height: 7px !important;
            min-width: 7px !important;
            min-height: 7px !important;
            border-radius: 50%;
            border: none;
            padding: 0;
            background: rgba(255, 255, 255, 0.4);
            cursor: pointer;
            transition: background 0.2s ease, transform 0.2s ease;
        }
        .photo-lightbox-dot.active { background: #fff; transform: scale(1.3); }
        .tea-modal-body { padding: 26px 28px 28px; }
        .tea-modal-badges {
            display: flex;
            gap: 8px;
            margin-bottom: 12px;
            flex-wrap: wrap;
        }
        .tea-modal-badge {
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            padding: 4px 10px;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.08);
            color: var(--text-muted);
        }
        .tea-modal-badge.series {
            background: var(--gradient-primary);
            color: #fff;
        }

        .tea-modal-title {
            font-size: 21px;
            font-weight: 700;
            line-height: 1.3;
            color: var(--text-primary);
            margin-bottom: 4px;
        }
        .tea-modal-meta {
            font-size: 11.5px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-primary);
            padding-bottom: 8px;
            margin-bottom: 12px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        }
        .tea-modal-stock {
            font-size: 13px;
            margin-top: -6px;
            margin-bottom: 18px;
        }
        /* Description is rendered server-side through the same Parsedown
           pipeline as journal articles (see catalog_render_description()
           in lib/catalog_repo.php / .journal-article-body in journal_render.php),
           so it carries the full markdown element set, not just <p>. */
        .tea-modal-desc-block {
            margin-bottom: 18px;
            font-size: 15px;
            line-height: 1.7;
            color: var(--text-secondary);
        }
        .tea-modal-desc-block > *:last-child { margin-bottom: 0; }
        .tea-modal-desc-block p { margin-bottom: 12px; }
        .tea-modal-desc-block strong { color: var(--text-primary); font-weight: 700; }
        .tea-modal-desc-block em { color: var(--text-primary); font-style: italic; }
        .tea-modal-desc-block a { color: var(--color-gold); }
        .tea-modal-desc-block img { max-width: 100%; height: auto; border-radius: 10px; margin: 4px 0 12px; display: block; }
        .tea-modal-desc-block ul, .tea-modal-desc-block ol { margin: 0 0 12px 20px; }
        .tea-modal-desc-block blockquote {
            margin: 0 0 12px;
            padding: 4px 14px;
            border-left: 3px solid var(--color-gold);
            color: var(--text-muted);
            font-style: italic;
        }
        .tea-modal-desc-block code { background: rgba(255,255,255,0.08); padding: 1px 6px; border-radius: 4px; font-size: 0.9em; }
        .tea-modal-desc-block pre { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; overflow-x: auto; }
        .tea-modal-desc-block pre code { background: none; padding: 0; }
        .tea-modal-desc-block hr { border: none; border-top: 1px solid rgba(255,255,255,0.12); margin: 18px 0; }
        .tea-modal-desc-block table { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: 13.5px; }
        .tea-modal-desc-block th, .tea-modal-desc-block td { padding: 6px 10px; border: 1px solid rgba(255,255,255,0.12); text-align: left; }
        .tea-modal-desc-block th { background: rgba(255,255,255,0.06); color: var(--text-primary); }
        .tea-modal-desc-block li.task-list-item { list-style: none; margin-left: -20px; }
        .tea-modal-desc-block li.task-list-item input { margin-right: 6px; }
        .tea-modal-desc-block h1, .tea-modal-desc-block h2, .tea-modal-desc-block h3 {
            color: var(--text-primary);
            font-weight: 700;
            line-height: 1.3;
            margin: 20px 0 10px;
        }
        .tea-modal-desc-block h1:first-child, .tea-modal-desc-block h2:first-child, .tea-modal-desc-block h3:first-child { margin-top: 0; }
        .tea-modal-desc-block h1 { font-size: 1.4em; }
        .tea-modal-desc-block h2 { font-size: 1.2em; }
        .tea-modal-desc-block h3 { font-size: 1.08em; }
        .tea-modal-desc-block dl { margin: 0 0 12px; }
        .tea-modal-desc-block dt { font-weight: 700; color: var(--text-primary); }
        .tea-modal-desc-block dd { margin: 2px 0 10px 20px; }
        .tea-modal-desc-block .footnotes { margin-top: 20px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 12.5px; color: var(--text-muted); }
        .tea-modal-desc-block .footnotes ol { margin-left: 18px; }
        .tea-modal-desc-block .footnote-ref { font-size: 0.75em; vertical-align: super; }
        .tea-modal-desc-block .footnote-backref { margin-left: 4px; text-decoration: none; color: var(--color-gold); }
        .tea-modal-desc-block .md-align { margin: 0 0 12px; }
        .tea-modal-desc-block .md-align-left { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
        .tea-modal-desc-block .md-align-center { display: flex; flex-direction: column; align-items: center; text-align: center; }
        .tea-modal-desc-block .md-align-right { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
        .tea-modal-desc-block .md-align p:last-child, .tea-modal-desc-block .md-align h1:last-child,
        .tea-modal-desc-block .md-align h2:last-child, .tea-modal-desc-block .md-align h3:last-child,
        .tea-modal-desc-block .md-align img:last-child { margin-bottom: 0; }

        .tea-modal-section-label {
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            color: var(--text-muted);
            margin-bottom: 12px;
        }

        .tea-modal-passport,
        .tea-modal-index {
            padding-top: 18px;
            margin-bottom: 18px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
        }
        .tea-modal-passport-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px 10px;
            margin-bottom: 14px;
        }
        .tea-passport-field { display: flex; flex-direction: column; gap: 3px; }
        .tea-passport-label {
            font-size: 10.5px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-muted);
        }
        .tea-passport-value {
            font-size: 15px;
            font-weight: 700;
            color: var(--text-primary);
        }
        .tea-modal-passport-guide {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-accent);
            text-decoration: none;
            transition: gap 0.2s ease;
        }
        .tea-modal-passport-guide:hover { gap: 9px; }

        .tea-modal-index-head {
            display: flex;
            align-items: center;
            margin-bottom: 14px;
        }
        .tea-modal-index-head .tea-modal-section-label { margin-bottom: 0; }
        .tea-index-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 9px;
        }
        .tea-index-row:last-of-type { margin-bottom: 0; }
        .tea-index-pole {
            flex: 0 0 72px;
            min-width: 0;
            overflow-wrap: break-word;
            font-size: 10.5px;
            font-weight: 600;
            line-height: 1.2;
            letter-spacing: 0.2px;
            text-transform: uppercase;
            opacity: 0.85;
        }
        .tea-index-pole--left { text-align: right; color: rgb(255, 107, 53); }
        .tea-index-pole--right { text-align: left; color: rgb(226, 5, 5); }
        .tea-index-track {
            position: relative;
            flex: 1;
            height: 4px;
            border-radius: 2px;
            background: linear-gradient(90deg,
                rgba(255, 107, 53, 0.28) 0%,
                rgba(255, 107, 53, 0.1) 50%,
                rgba(226, 5, 5, 0.1) 50%,
                rgba(226, 5, 5, 0.28) 100%);
        }
        .tea-index-track::before {
            content: '';
            position: absolute;
            left: 50%;
            top: -4px;
            bottom: -4px;
            width: 1px;
            background: rgba(255, 255, 255, 0.2);
            transform: translateX(-50%);
        }
        .tea-index-thumb {
            position: absolute;
            top: 50%;
            width: 13px;
            height: 13px;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            box-shadow: 0 0 0 3px var(--bg-card);
        }
        .tea-index-notes-label { margin-top: 16px; }
        .tea-modal-index-notes {
            display: flex;
            flex-wrap: wrap;
            gap: 7px;
        }
        .tea-note-tag {
            font-size: 12px;
            font-weight: 600;
            padding: 5px 11px;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.07);
            color: var(--text-secondary);
        }

        .tea-modal-price {
            font-size: 26px;
            font-weight: 800;
            letter-spacing: -0.3px;
            color: var(--color-gold);
        }
        .tea-modal-price span {
            font-size: 13px;
            font-weight: 500;
            color: var(--text-primary);
            margin-left: 4px;
        }

        .price-old {
            font-size: 0.6em;
            font-weight: 500;
            color: var(--text-muted);
            margin-left: 4px;
            white-space: nowrap;
        }
        .tea-modal-price .price-old {
            color: var(--text-primary);
        }

        @keyframes sheetUp {
            from { transform: translateY(48px); opacity: 0.4; }
            to { transform: translateY(0); opacity: 1; }
        }

        .qty-split-status {
            cursor: pointer;
            transition: filter 0.2s ease;
        }
        .qty-split-status:hover { filter: brightness(1.15); }

        .cart-modal-content {
            max-width: 560px;
            border-radius: var(--radius-card);
        }
        .cart-modal-body { padding: 56px 24px 24px; }
        .cart-modal-items { display: flex; flex-direction: column; }

        .cart-modal-item {
            display: flex;
            gap: 12px;
            padding: 14px 4px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        }
        .cart-modal-item-photo {
            position: relative;
            flex-shrink: 0;
            width: 76px;
            height: 104px;
            border-radius: 12px;
            overflow: hidden;
            background: var(--gradient-dark);
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .cart-modal-item-photo-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            -webkit-user-drag: none;
            user-select: none;
        }
        .cart-modal-item-photo-icon { font-size: 28px; opacity: 0.9; }
        .cart-modal-item-info {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
        }
        .cart-modal-item-price-row {
            display: flex;
            align-items: baseline;
            gap: 8px;
            margin-bottom: 2px;
        }
        .cart-modal-item-price {
            font-size: 17px;
            font-weight: 800;
            color: #fff;
            white-space: nowrap;
        }
        .cart-modal-item-price-old {
            font-size: 12.5px;
            font-weight: 500;
            color: var(--text-muted);
            white-space: nowrap;
        }
        .cart-modal-item-name {
            font-size: 14.5px;
            font-weight: 600;
            color: var(--text-primary);
            line-height: 1.3;
            margin-bottom: 3px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .cart-modal-item-series {
            display: inline-block;
            align-self: flex-start;
            font-size: 10px;
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 8px;
            background: var(--gradient-primary);
            color: #fff;
            margin-bottom: 4px;
        }
        .cart-modal-item-meta {
            font-size: 11.5px;
            color: var(--text-muted);
            margin-bottom: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .cart-modal-item-info .tea-stock { font-size: 11px; margin-top: 2px; padding-top: 0; }

        .cart-modal-item-actions {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 8px;
        }
        .cart-modal-item-actions .order-bar-item-stepper { margin-top: 0; }
        .cart-modal-empty {
            text-align: center;
            color: var(--text-muted);
            padding: 28px 0 10px;
            font-size: 14.5px;
        }

        .special-order-notice {
            font-size: 12.5px;
            line-height: 1.5;
            color: var(--color-gold);
            background: rgba(255, 107, 53, 0.1);
            border: 1px solid rgba(255, 107, 53, 0.3);
            border-radius: 12px;
            padding: 10px 12px;
            margin: 10px 0;
        }
        @keyframes specialNoticeShake {
            10%, 90% { transform: translateX(-1px); }
            20%, 80% { transform: translateX(2px); }
            30%, 50%, 70% { transform: translateX(-4px); }
            40%, 60% { transform: translateX(4px); }
        }
        .special-order-notice.is-shake {
            animation: specialNoticeShake 0.5s ease;
        }

        .cart-modal-total {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            padding: 14px 4px 0;
            font-size: 15px;
            color: var(--text-secondary);
        }
        .cart-modal-total-prices { display: flex; align-items: baseline; gap: 8px; }
        .cart-modal-total b { font-size: 22px; color: #fff; }
        .cart-modal-total-old { font-size: 13px; font-weight: 500; color: var(--text-muted); }
        .cart-modal-actions {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-top: 18px;
        }
        .cart-modal-actions-row {
            display: flex;
            align-items: stretch;
            gap: 8px;
        }

        .cart-modal-tg {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            min-width: 0;
            font-family: inherit;
            font-size: 13px;
            font-weight: 700;
            border-radius: var(--radius-pill);
            padding: 12px 14px;
            cursor: pointer;
            background: var(--gradient-primary);
            color: #fff;
            border: none;
            text-decoration: none;
            transition: filter 0.2s ease;
        }
        .cart-modal-tg:hover { filter: brightness(1.1); }
        .cart-modal-tg svg { width: 16px; height: 16px; flex-shrink: 0; }
        .cart-modal-tg span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .cart-modal-icon-btn {
            flex-shrink: 0;
            width: 42px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 10px;
            background: var(--bg-medium);
            border: 1px solid rgba(255, 255, 255, 0.15);
            color: var(--text-muted);
            cursor: pointer;
            transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
        }
        .cart-modal-icon-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
        .cart-modal-icon-btn:hover { color: var(--text-primary); border-color: var(--color-gold); }
        .cart-modal-icon-btn--clear:hover { color: #fff; border-color: var(--color-accent); background: rgba(226, 5, 5, 0.12); }

        .cart-modal-alt {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            padding: 11px 14px;
            border-radius: var(--radius-pill);
            border: 1px solid rgba(255, 255, 255, 0.2);
            background: var(--bg-medium);
            color: var(--text-primary);
            font-family: inherit;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: border-color 0.2s ease;
        }
        .cart-modal-alt:hover { border-color: var(--color-accent); }
        .cart-modal-alt svg { width: 15px; height: 15px; flex-shrink: 0; }

        .order-bar {
            position: fixed;
            left: 50%;
            bottom: 18px;
            transform: translateX(-50%);
            width: min(460px, calc(100% - 24px));
            background: rgba(15, 15, 15, 0.95);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: var(--radius-card);
            backdrop-filter: blur(14px);
            box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
            z-index: 500;
            overflow: hidden;
            transition: bottom 0.25s ease, border-radius 0.25s ease;
        }

        .order-bar:has(.order-bar-panel:not(.hidden)) {
            border-radius: var(--radius-card);
        }
        .order-bar.hidden { display: none; }

        /* Docked state: while the page hasn't scrolled far enough to reveal
           the site footer, the bar sits flush against the viewport bottom
           (full width, square bottom corners) instead of floating as a
           rounded pill — avoids it looking like it's hovering over nothing.
           Once the footer scrolls into view, it reverts to the floating
           pill so it doesn't overlap the footer content. */
        .order-bar.is-docked {
            bottom: 0;
            border-radius: var(--radius-card) var(--radius-card) 0 0;
            border-bottom: none;
        }
        .order-bar.is-docked:has(.order-bar-panel:not(.hidden)) {
            border-radius: var(--radius-card) var(--radius-card) 0 0;
        }
        .order-bar-main {
            display: flex;
            align-items: stretch;
            touch-action: none;
        }
        .order-bar-summary {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
            background: none;
            border: none;
            color: var(--text-secondary);
            font-family: inherit;
            font-size: 13px;
            font-weight: 600;
            padding: 14px 6px 14px 16px;
            cursor: pointer;
            text-align: left;
            transition: background 0.2s ease;
        }
        .order-bar-summary:hover { background: rgba(255, 255, 255, 0.04); }
        .order-bar-icon { width: 17px; height: 17px; flex-shrink: 0; }
        .order-bar-count { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .order-bar-count b { color: var(--color-gold); }
        .order-bar-chevron {
            width: 16px;
            height: 16px;
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
            margin-left: auto;
            flex-shrink: 0;
            transition: transform 0.25s ease;
        }
        .order-bar-summary[aria-expanded="true"] .order-bar-chevron { transform: rotate(180deg); }
        .order-bar-tg {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 18px;
            background: var(--gradient-primary);
            color: #fff;
            font-family: inherit;
            font-size: 13px;
            font-weight: 700;
            text-decoration: none;
            white-space: nowrap;
            transition: filter 0.2s ease;
        }
        .order-bar-tg:hover { filter: brightness(1.12); }
        .order-bar-panel {
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            max-height: 46vh;
            overflow-y: auto;
            animation: fadeInUp 0.2s ease;
        }

        .order-bar-panel {
            scrollbar-width: thin;
            scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
        }
        .order-bar-panel::-webkit-scrollbar {
            width: 8px;
        }
        .order-bar-panel::-webkit-scrollbar-track {
            background: transparent;
            margin-block: 10px;
        }
        .order-bar-panel::-webkit-scrollbar-thumb {
            background-color: rgba(255, 255, 255, 0.22);
            border-radius: 8px;
            border: 2px solid #0f0f0f;
            background-clip: padding-box;
        }
        .order-bar-panel::-webkit-scrollbar-thumb:hover {
            background-color: rgba(255, 255, 255, 0.38);
        }
        .order-bar-panel.hidden { display: none; }
        .order-bar-items { padding: 6px 8px; }
        .order-bar-item {
            display: flex;
            align-items: flex-end;
            gap: 10px;
            padding: 8px 8px;
            border-radius: 10px;
        }
        .order-bar-item:hover { background: rgba(255, 255, 255, 0.04); }
        .order-bar-item-info { flex: 1; min-width: 0; }
        .order-bar-item-name {
            font-size: 12.5px;
            font-weight: 600;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .order-bar-item-qty {
            font-size: 11.5px;
            color: var(--text-muted);
        }
        .order-bar-item-price {
            font-size: 12.5px;
            font-weight: 700;
            color: var(--text-secondary);
            white-space: nowrap;
            align-self: center;
        }
        .order-bar-item-remove {
            width: 22px;
            height: 22px;
            border-radius: 50%;
            border: none;
            background: rgba(255, 255, 255, 0.08);
            color: var(--text-muted);
            font-size: 13px;
            line-height: 1;
            cursor: pointer;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            align-self: center;
            transition: background 0.2s ease, color 0.2s ease;
        }
        .order-bar-item-remove:hover { background: var(--color-accent); color: #fff; }

        .order-bar-actions {
            display: flex;
            align-items: stretch;
            gap: 8px;
            padding: 10px 10px 12px;
        }
        .order-bar-open-cart {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            min-width: 0;
            font-family: inherit;
            font-size: 12.5px;
            font-weight: 700;
            border-radius: var(--radius-pill);
            padding: 9px 10px;
            cursor: pointer;
            background: var(--gradient-primary);
            color: #fff;
            border: none;
            transition: filter 0.2s ease;
        }
        .order-bar-open-cart:hover { filter: brightness(1.1); }
        .order-bar-open-cart svg { width: 15px; height: 15px; flex-shrink: 0; }
        .order-bar-open-cart span {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .order-bar-icon-btn {
            flex-shrink: 0;
            width: 38px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 10px;
            background: var(--bg-medium);
            border: 1px solid rgba(255, 255, 255, 0.15);
            color: var(--text-muted);
            cursor: pointer;
            transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
        }
        .order-bar-icon-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
        .order-bar-icon-btn:hover { color: var(--text-primary); border-color: var(--color-gold); }
        .order-bar-clear:hover { color: #fff; border-color: var(--color-accent); background: rgba(226, 5, 5, 0.12); }

        @keyframes copyPulse {
            0% { transform: scale(1); }
            35% { transform: scale(0.92); }
            100% { transform: scale(1); }
        }
        .is-copied { animation: copyPulse 0.35s ease; }

        @media (min-width: 900px) {
            .tea-modal-content.is-horizontal {
                /* Width is set inline per item (photo width + fixed text
                   width, see openDetail in catalog.js) so a bigger photo
                   grows the modal instead of eating into the text column.
                   These are just the pre-JS/no-JS fallback values. */
                width: 900px;
                max-width: calc(100vw - 40px);
                height: min(620px, 88vh);
                height: min(620px, 88dvh);
                display: flex;
                flex-direction: row;
                overflow: hidden;
            }
            .tea-modal-content.is-horizontal .tea-modal-photo {
                /* Allowed to shrink (unlike the text column below) — if the
                   requested width doesn't fit the viewport, the photo gives
                   ground first, never the text. */
                flex: 0 1 380px;
                min-width: 180px;
                height: auto !important;
                border-radius: var(--radius-card) 12px 12px var(--radius-card);
            }
            .tea-modal-content.is-horizontal .tea-modal-body {
                /* Fixed, never shrinks — the text column must not shrink
                   when the photo column widens or the viewport is tight. */
                flex: 0 0 520px;
                min-width: 0;
                min-height: 0;
                display: flex;
                flex-direction: column;
                overflow-y: auto;
                padding: 56px 28px 28px;
            }
            .tea-modal-content.is-horizontal .tea-modal-footer-slot {
                margin-top: auto;
            }
        }

        @media (max-width: 744px) {
            .tea-modal { align-items: flex-end; padding: 12px; }
            .tea-modal-content {
                border-radius: var(--radius-card) 12px 12px var(--radius-card);
                max-height: 90vh;
                max-height: 90dvh;
                animation: sheetUp 0.3s ease;
                touch-action: pan-y;
            }
        }

        @media (max-width: 768px) {
            .tea-modal-footer > .qty-split { min-height: 44px; }
            .tea-modal-footer .qty-split-status,
            .tea-modal-footer .qty-split-controls { padding: 6px 12px; }
            .tea-modal-footer .qty-split .qty-btn {
                width: 28px !important;
                height: 28px !important;
                min-width: 28px !important;
                min-height: 28px !important;
            }

            .order-bar-item-stepper .qty-btn {
                width: 22px !important;
                height: 22px !important;
                min-width: 22px !important;
                min-height: 22px !important;
            }
            .order-bar-item-remove {
                width: 22px !important;
                height: 22px !important;
                min-width: 22px !important;
                min-height: 22px !important;
            }

            .catalog-search-row { max-width: 100%; }
            .catalog-city-dropdown .catalog-filter-btn,
            #filterDropdownBtn {
                width: 44px;
                max-width: none;
                padding: 0;
                justify-content: center;
            }
            #cityDropdownLabel,
            #filterDropdownLabel {
                position: absolute;
                width: 1px;
                height: 1px;
                padding: 0;
                margin: -1px;
                overflow: hidden;
                clip: rect(0, 0, 0, 0);
                white-space: nowrap;
                border: 0;
            }

            .catalog-city-dropdown .catalog-filter-chevron,
            #filterDropdownBtn .catalog-filter-chevron { display: none; }

            .catalog-city-dropdown .catalog-filter-menu {
                left: 0;
                right: auto;
            }
        }

        @media (max-width: 480px) {
            .catalog-wrap { padding: 90px 16px 50px; }
            .catalog-wrap.has-order-bar { padding-bottom: 100px; }
            .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
            .tea-card-info { padding: 10px 10px 8px; }
            .tea-card-price { font-size: 16px; }
            .tea-card-title { font-size: 12px; }
            .tea-card-meta { font-size: 10.5px; }
            .tea-card-add { font-size: 12px; padding: 10px; }
            .tea-card-badge, .tea-card-series { font-size: 9px; padding: 3px 7px; }
            .tea-card-dots { bottom: 6px; gap: 3px; }
            .tea-card-dot { width: 4px !important; height: 4px !important; min-width: 4px !important; min-height: 4px !important; }

            .tea-card > .qty-split { gap: 4px; }
            .tea-card > .qty-split .qty-split-status { flex: 0.7; padding: 3px 3px; }
            .tea-card > .qty-split .qty-split-controls { flex: 1.3; gap: 1px; padding: 1px; }

            .tea-card > .qty-split .qty-btn { width: 24px !important; height: 24px !important; min-width: 24px !important; min-height: 24px !important; font-size: 11px; }
            .tea-card > .qty-split .qty-input-wrap { gap: 1px; }
            .tea-card > .qty-split .qty-input { font-size: 11px; }

            .tea-card > .qty-split .qty-unit {
                font-size: 9px;
                flex-shrink: 1;
                min-width: 0;
                max-width: 22px;
                overflow: hidden;
                text-overflow: ellipsis;
            }
            .order-bar { width: calc(100% - 16px); bottom: 10px; }
            .order-bar-summary { font-size: 12px; padding: 12px 4px 12px 12px; }
            .order-bar-tg { font-size: 12px; padding: 0 14px; }
            .cart-modal-body { padding: 52px 16px 20px; }
            /* !important: JS sets an inline height per item (see "высота
               фото" in catalog-items.json / renderModalPhoto in catalog.js)
               so the desktop photo can be tall; on mobile that inline style
               must lose to this cap or the photo eats the whole sheet. */
            .tea-modal-photo { height: 160px !important; }
            .tea-modal-photo-icon { font-size: 56px; }
            .tea-modal-body { padding: 20px 18px 22px; }

            .tea-modal-footer { margin: 18px 0 0; }
        }
