/* ----- СБРОС И БАЗА ----- */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: #f8f9fa;
            padding-bottom: 80px;
            color: #1a1a1a;
            touch-action: pan-y;
        }
        a {
            text-decoration: none;
            color: inherit;
        }

        /* ----- ШАПКА ----- */
        .header {
            background: #fff;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid #eee;
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 1px 4px rgba(0,0,0,0.04);
        }
        .header .logo {
            font-weight: 700;
            font-size: 18px;
            color: #000;
            letter-spacing: -0.3px;
        }
        .header .right-group {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .header .currency-toggle {
            display: flex;
            background: #f0f0f0;
            border-radius: 24px;
            padding: 4px;
            font-size: 15px;
            font-weight: 600;
        }
        .header .currency-toggle button {
            background: transparent;
            border: none;
            padding: 6px 16px;
            border-radius: 20px;
            cursor: pointer;
            font-weight: 600;
            color: #888;
            transition: 0.15s;
            font-size: 15px;
        }
        .header .currency-toggle button .flag {
            margin-right: 4px;
        }
        .header .currency-toggle button.active {
            background: #fff;
            color: #1a1a1a;
            box-shadow: 0 1px 4px rgba(0,0,0,0.1);
        }

        /* ----- ХЛЕБНЫЕ КРОШКИ ----- */
        .breadcrumb {
            padding: 10px 16px 4px;
            font-size: 13px;
            color: #999;
            background: #f8f9fa;
            transition: transform 0.3s ease, opacity 0.3s ease;
            position: sticky;
            top: 60px;
            z-index: 90;
            transform: translateY(0);
            opacity: 1;
        }
        .breadcrumb.hidden {
            transform: translateY(-100%);
            opacity: 0;
            pointer-events: none;
        }
        .breadcrumb span {
            color: #666;
        }
        .breadcrumb .current {
            color: #1a1a1a;
            font-weight: 500;
        }
        .breadcrumb .clickable {
            cursor: pointer;
            color: #6726AB;
            text-decoration: underline;
        }

        /* ----- КОНТЕЙНЕР (на всю ширину) ----- */
        .container {
            width: 100%;
            padding: 16px;
            margin: 0 auto;
        }
        @media (min-width: 768px) {
            .container {
                padding: 16px 32px;
            }
        }

        /* ----- РАЗДЕЛЫ (3 колонки на мобилке, 4 на десктопе) ----- */
        .categories-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
            margin-bottom: 20px;
        }
        @media (min-width: 768px) {
            .categories-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 24px;
            }
        }
        .category-card {
            aspect-ratio: 1 / 1;
            border-radius: 16px;
            overflow: hidden;
            position: relative;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            background: #fff;
            width: 100%;
        }
        .category-card img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .category-card .category-label {
            position: absolute;
            bottom: 12px;
            left: 12px;
            color: #fff;
            font-size: 16px;
            font-weight: 700;
            text-shadow: 0 2px 8px rgba(0,0,0,0.5);
            pointer-events: none;
            line-height: 1.2;
        }
        .category-card .category-label small {
            font-weight: 400;
            font-size: 12px;
            opacity: 0.9;
            display: block;
        }

        /* ----- СЕТКА ТОВАРОВ: всегда использует всю доступную ширину ----- */
        #productList {
            width: 100%;
            display: block;
            min-width: 0;
        }

        .product-grid {
            width: 100%;
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
            align-items: stretch;
        }

        /* Планшеты */
        @media (min-width: 768px) {
            .product-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
                gap: 20px;
            }
        }

        /* Компьютеры */
        @media (min-width: 1100px) {
            .product-grid {
                grid-template-columns: repeat(4, minmax(0, 1fr));
                gap: 24px;
            }
        }

        /* ----- КАРТОЧКА ТОВАРА (3:4) ----- */
        .product-card {
            background: #fff;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            display: flex;
            flex-direction: column;
            padding-bottom: 12px;
            position: relative;
            cursor: pointer;
            width: 100%;
            min-width: 0;
            height: 100%;
        }
        .product-card .image-wrap {
            width: 100%;
            aspect-ratio: 3 / 4;
            background: #f4f4f6;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            position: relative;
        }
        .product-card .image-wrap .slider-container {
            width: 100%;
            height: 100%;
            display: flex;
            transition: transform 0.3s ease;
        }
        .product-card .image-wrap .slider-container img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            flex-shrink: 0;
        }
        .product-card .image-wrap .slider-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255,255,255,0.8);
            border: none;
            border-radius: 50%;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            cursor: pointer;
            color: #333;
            z-index: 3;
            box-shadow: 0 1px 4px rgba(0,0,0,0.1);
            pointer-events: auto;
        }
        .product-card .image-wrap .slider-nav.prev { left: 6px; }
        .product-card .image-wrap .slider-nav.next { right: 6px; }
        .product-card .badge {
            position: absolute;
            top: 8px;
            left: 8px;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 700;
            color: #fff;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            background: #00b341;
            z-index: 2;
            pointer-events: none;
        }
        .product-card .badge.out { background: #f44336; }
        .product-card .info {
            padding: 10px 12px 0;
            flex: 1;
            display: flex;
            flex-direction: column;
        }
        .product-card .info .name {
            font-size: 16px;
            font-weight: 700;
            line-height: 1.3;
            color: #1a1a1a;
            margin-bottom: 2px;
        }
        .product-card .info .description {
            font-size: 12px;
            color: #888;
            line-height: 1.4;
            margin-bottom: 6px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .product-card .info .price-row {
            display: flex;
            align-items: baseline;
            gap: 6px;
            margin-top: 2px;
        }
        .product-card .info .price {
            font-size: 18px;
            font-weight: 700;
            color: #1a1a1a;
        }
        .product-card .info .currency-label {
            font-size: 13px;
            font-weight: 400;
            color: #888;
        }
        .product-card .cart-controls {
            margin: 10px 12px 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }
        .product-card .cart-controls .add-btn {
            flex: 1;
            padding: 12px 0;
            background: #6726AB;
            color: #fff;
            border: none;
            border-radius: 30px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.15s;
            text-align: center;
        }
        .product-card .cart-controls .add-btn:active { background: #4f1a87; }
        .product-card .cart-controls .add-btn.out {
            background: #e0e0e0;
            color: #999;
            pointer-events: none;
        }
        .product-card .cart-controls .qty-control {
            display: flex;
            align-items: center;
            gap: 6px;
            background: #f0f0f0;
            border-radius: 30px;
            padding: 4px 8px;
            flex: 1;
            justify-content: space-between;
        }
        .product-card .cart-controls .qty-control button {
            background: none;
            border: none;
            font-size: 22px;
            font-weight: 700;
            padding: 0 6px;
            cursor: pointer;
            color: #333;
            line-height: 1;
            min-width: 36px;
            min-height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .product-card .cart-controls .qty-control button:active { opacity: 0.5; }
        .product-card .cart-controls .qty-control input {
            width: 40px;
            text-align: center;
            font-size: 16px;
            font-weight: 600;
            border: none;
            background: transparent;
            color: #6726AB;
            padding: 4px 0;
            outline: none;
            -moz-appearance: textfield;
        }
        .product-card .cart-controls .qty-control input::-webkit-outer-spin-button,
        .product-card .cart-controls .qty-control input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        .loading-placeholder {
            grid-column: 1 / -1;
            text-align: center;
            padding: 40px 0;
            color: #999;
            font-size: 14px;
        }

        /* ----- НИЖНЯЯ НАВИГАЦИЯ ----- */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: #fff;
            border-top: 1px solid #e9e9e9;
            display: flex;
            align-items: center;
            justify-content: space-around;
            padding: 8px 0 env(safe-area-inset-bottom, 8px) 0;
            box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
            z-index: 200;
            height: 64px;
        }
        .bottom-nav .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            font-size: 10px;
            color: #999;
            cursor: pointer;
            background: none;
            border: none;
            padding: 4px 12px;
            position: relative;
        }
        .bottom-nav .nav-item.active { color: #6726AB; }
        .bottom-nav .nav-item .icon { font-size: 22px; line-height: 1.2; }
        .bottom-nav .nav-item .label { margin-top: 2px; font-weight: 500; }
        .bottom-nav .cart-badge { position: relative; }
        .bottom-nav .cart-badge .count {
            position: absolute;
            top: -4px;
            right: -8px;
            background: #f44336;
            color: #fff;
            font-size: 10px;
            font-weight: 700;
            min-width: 18px;
            height: 18px;
            border-radius: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 5px;
            box-shadow: 0 2px 6px rgba(244,67,54,0.3);
        }

        /* ----- КОРЗИНА (выдвижная) ----- */
        .cart-sheet {
            position: fixed;
            bottom: 64px;
            left: 0;
            right: 0;
            background: #fff;
            border-radius: 20px 20px 0 0;
            box-shadow: 0 -8px 30px rgba(0,0,0,0.12);
            padding: 20px 16px 24px;
            transform: translateY(110%);
            transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
            z-index: 150;
            max-height: 70vh;
            overflow-y: auto;
            border-top: 1px solid #eee;
        }
        .cart-sheet.open { transform: translateY(0); }
        .cart-sheet .handle {
            width: 40px;
            height: 4px;
            background: #ddd;
            border-radius: 4px;
            margin: 0 auto 16px;
            cursor: grab;
            touch-action: none;
        }
        .cart-sheet .handle:active { cursor: grabbing; }
        .cart-sheet h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
        .cart-sheet .cart-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 0;
            border-bottom: 1px solid #f0f0f0;
            font-size: 14px;
        }
        .cart-sheet .cart-item:last-child { border-bottom: none; }
        .cart-sheet .cart-item .item-name { flex: 1; font-weight: 500; }
        .cart-sheet .cart-item .item-qty {
            display: flex;
            align-items: center;
            gap: 6px;
            margin: 0 12px;
        }
        .cart-sheet .cart-item .item-qty button {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: 1px solid #ddd;
            background: #fff;
            font-size: 18px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #333;
        }
        .cart-sheet .cart-item .item-qty button:active { background: #f0f0f0; }
        .cart-sheet .cart-item .item-qty input {
            width: 40px;
            text-align: center;
            font-size: 16px;
            font-weight: 600;
            border: 1px solid #ddd;
            border-radius: 8px;
            padding: 4px 0;
            background: #fff;
            color: #6726AB;
            outline: none;
            -moz-appearance: textfield;
        }
        .cart-sheet .cart-item .item-qty input::-webkit-outer-spin-button,
        .cart-sheet .cart-item .item-qty input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        .cart-sheet .cart-item .item-price {
            font-weight: 600;
            min-width: 60px;
            text-align: right;
            font-size: 14px;
        }
        .cart-sheet .cart-total {
            display: flex;
            justify-content: space-between;
            font-size: 18px;
            font-weight: 700;
            padding: 16px 0 12px;
            border-top: 2px solid #eee;
            margin-top: 4px;
        }
        .cart-sheet .order-form input,
        .cart-sheet .order-form select {
            width: 100%;
            padding: 12px 14px;
            margin: 6px 0 10px;
            border: 1px solid #ddd;
            border-radius: 12px;
            font-size: 15px;
            background: #f8f9fa;
            transition: border 0.15s;
        }
        .cart-sheet .order-form input:focus,
        .cart-sheet .order-form select:focus {
            border-color: #6726AB;
            outline: none;
            background: #fff;
        }
        .cart-sheet .order-form .phone-row {
            display: flex;
            gap: 8px;
            align-items: center;
        }
        .cart-sheet .order-form .phone-row select {
            width: 110px;
            flex-shrink: 0;
            padding: 12px 8px;
            margin: 6px 0 10px;
            border: 1px solid #ddd;
            border-radius: 12px;
            font-size: 15px;
            background: #f8f9fa;
        }
        .cart-sheet .order-form .phone-row input { flex: 1; margin: 6px 0 10px; }
        .cart-sheet .order-form .submit-btn {
            width: 100%;
            padding: 14px;
            background: #6726AB;
            color: #fff;
            border: none;
            border-radius: 30px;
            font-size: 17px;
            font-weight: 700;
            cursor: pointer;
            transition: background 0.15s;
            margin-top: 6px;
        }
        .cart-sheet .order-form .submit-btn:active { background: #4f1a87; }
        .cart-sheet .order-form .submit-btn:disabled {
            background: #ccc;
            pointer-events: none;
        }
        .cart-sheet .empty-cart {
            text-align: center;
            padding: 30px 0;
            color: #999;
            font-size: 15px;
        }

        /* ----- ТОСТ ----- */
        .toast {
            position: fixed;
            top: 70px;
            left: 50%;
            transform: translateX(-50%);
            background: #1a1a1a;
            color: #fff;
            padding: 10px 24px;
            border-radius: 30px;
            font-size: 14px;
            font-weight: 500;
            z-index: 300;
            opacity: 0;
            transition: opacity 0.25s ease;
            pointer-events: none;
            box-shadow: 0 4px 16px rgba(0,0,0,0.15);
            max-width: 90%;
            text-align: center;
        }
        .toast.show { opacity: 1; }
        .toast.error { background: #d32f2f; }
        .toast.success { background: #2e7d32; }

        /* ----- МОДАЛКА ПОДТВЕРЖДЕНИЯ ----- */
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            justify-content: center;
            align-items: center;
            z-index: 400;
            backdrop-filter: blur(2px);
        }
        .modal-overlay.active { display: flex; }
        .modal-window {
            background: #fff;
            max-width: 400px;
            width: 90%;
            padding: 28px 24px;
            border-radius: 24px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            text-align: center;
            max-height: 90vh;
            overflow-y: auto;
        }
        .modal-window h3 {
            font-size: 22px;
            color: #2e7d32;
            margin-bottom: 12px;
        }
        .modal-window .order-details {
            text-align: left;
            background: #f8f9fa;
            padding: 16px;
            border-radius: 16px;
            margin-bottom: 16px;
            font-size: 14px;
        }
        .modal-window .order-details p { margin: 4px 0; }
        .modal-window .order-details .items-list {
            list-style: none;
            padding: 0;
            margin: 8px 0;
        }
        .modal-window .order-details .items-list li {
            padding: 4px 0;
            border-bottom: 1px solid #eee;
        }
        .modal-window .total-row {
            font-weight: 700;
            font-size: 18px;
            margin: 10px 0;
        }
        .modal-window .contact-phone {
            color: #666;
            font-size: 14px;
            margin: 12px 0 16px;
        }
        .modal-window .btn-group {
            display: flex;
            gap: 10px;
            justify-content: center;
            flex-wrap: wrap;
        }
        .modal-window .btn-confirm {
            background: #2e7d32;
            color: #fff;
            border: none;
            padding: 12px 24px;
            border-radius: 30px;
            font-size: 17px;
            font-weight: 600;
            cursor: pointer;
        }
        .modal-window .btn-confirm:active { background: #1b5e20; }
        .modal-window .btn-pdf {
            background: #1976d2;
            color: #fff;
            border: none;
            padding: 12px 24px;
            border-radius: 30px;
            font-size: 17px;
            font-weight: 600;
            cursor: pointer;
        }
        .modal-window .btn-pdf:active { background: #0d47a1; }

        /* ----- МОДАЛКА ДЕТАЛЕЙ ТОВАРА ----- */
        .product-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.6);
            justify-content: center;
            align-items: center;
            z-index: 600;
            backdrop-filter: blur(4px);
            padding: 20px;
        }
        .product-modal.active { display: flex; }
        .product-modal .modal-content {
            background: #fff;
            border-radius: 24px;
            max-width: 480px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
            padding: 24px 20px 20px;
            position: relative;
        }
        .product-modal .modal-content .close-btn {
            position: sticky;
            top: 0;
            float: right;
            font-size: 28px;
            cursor: pointer;
            color: #999;
            background: #fff;
            border: none;
            z-index: 10;
            padding: 0 8px;
            line-height: 1;
        }
        .product-modal .modal-content .close-btn:hover { color: #333; }
        .product-modal .modal-content .product-detail-image {
            width: 100%;
            aspect-ratio: 3/4;
            background: #f4f4f6;
            border-radius: 16px;
            overflow: hidden;
            margin-bottom: 16px;
        }
        .product-modal .modal-content .product-detail-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .product-modal .modal-content .detail-slider {
            display: flex;
            gap: 8px;
            overflow-x: auto;
            padding-bottom: 8px;
            margin-bottom: 16px;
        }
        .product-modal .modal-content .detail-slider img {
            width: 80px;
            height: 80px;
            object-fit: cover;
            border-radius: 12px;
            cursor: pointer;
            border: 2px solid transparent;
            flex-shrink: 0;
        }
        .product-modal .modal-content .detail-slider img.active {
            border-color: #6726AB;
        }
        .product-modal .modal-content .detail-name {
            font-size: 20px;
            font-weight: 700;
            margin-bottom: 4px;
        }
        .product-modal .modal-content .detail-description {
            font-size: 14px;
            color: #555;
            line-height: 1.6;
            margin-bottom: 12px;
            white-space: pre-wrap;
        }
        .product-modal .modal-content .detail-price {
            font-size: 22px;
            font-weight: 700;
            color: #1a1a1a;
            margin-bottom: 16px;
        }
        .product-modal .modal-content .add-to-cart-btn {
            width: 100%;
            padding: 14px;
            background: #6726AB;
            color: #fff;
            border: none;
            border-radius: 30px;
            font-size: 18px;
            font-weight: 600;
            cursor: pointer;
        }
        .product-modal .modal-content .add-to-cart-btn:active { background: #4f1a87; }
        .product-modal .modal-content .add-to-cart-btn.out {
            background: #e0e0e0;
            color: #999;
            pointer-events: none;
        }

        /* ----- БЛОК ДЛЯ PDF (скрыт) ----- */
        #pdfContent {
            position: fixed;
            left: -10000px;
            top: 0;
            width: 760px;
            background: #f4f1f7;
            padding: 0;
            font-family: Arial, Helvetica, sans-serif;
            color: #1d1725;
            z-index: 9999;
            opacity: 0;
            pointer-events: none;
            box-sizing: border-box;
        }
        #pdfContent * { box-sizing: border-box; }
        #pdfContent.show {
            left: 50%;
            transform: translateX(-50%);
            opacity: 1;
            pointer-events: auto;
        }
        .pdf-document {
            position: relative;
            width: 100%;
            min-height: 1040px;
            background: #ffffff;
            overflow: hidden;
        }
        .pdf-top-accent {
            height: 8px;
            background: linear-gradient(90deg, #582193 0%, #7d3bc4 52%, #b58adb 100%);
        }
        .pdf-inner {
            padding: 42px 46px 34px;
        }
        .pdf-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 32px;
            padding-bottom: 28px;
            border-bottom: 1px solid #ece7f1;
        }
        .pdf-brand {
            min-width: 0;
        }
        .pdf-brand-name {
            font-size: 25px;
            line-height: 1.1;
            font-weight: 800;
            letter-spacing: -0.8px;
            color: #21172b;
            margin-bottom: 7px;
        }
        .pdf-brand-subtitle {
            font-size: 12px;
            line-height: 1.45;
            font-weight: 600;
            letter-spacing: 0.7px;
            text-transform: uppercase;
            color: #8b8197;
        }
        .pdf-order-head {
            min-width: 250px;
            text-align: right;
        }
        .pdf-status {
            display: inline-block;
            margin-bottom: 11px;
            padding: 7px 11px;
            border-radius: 999px;
            background: #f1e9f8;
            color: #6523a0;
            font-size: 11px;
            line-height: 1;
            font-weight: 800;
            letter-spacing: 0.25px;
        }
        .pdf-order-number {
            font-size: 22px;
            line-height: 1.15;
            font-weight: 800;
            letter-spacing: -0.5px;
            color: #1d1725;
            margin-bottom: 6px;
        }
        .pdf-order-date {
            font-size: 12px;
            line-height: 1.4;
            color: #8a8194;
        }
        .pdf-section {
            margin-top: 27px;
        }
        .pdf-section-title {
            margin-bottom: 12px;
            font-size: 12px;
            line-height: 1.2;
            font-weight: 800;
            letter-spacing: 0.7px;
            text-transform: uppercase;
            color: #7d7289;
        }
        .pdf-client-card {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1px;
            overflow: hidden;
            border: 1px solid #ece7f1;
            border-radius: 16px;
            background: #ece7f1;
        }
        .pdf-client-item {
            min-height: 72px;
            padding: 15px 17px;
            background: #fbf9fc;
        }
        .pdf-client-item.pdf-client-wide {
            grid-column: 1 / -1;
        }
        .pdf-client-label {
            display: block;
            margin-bottom: 5px;
            font-size: 10px;
            line-height: 1.2;
            font-weight: 700;
            letter-spacing: 0.45px;
            text-transform: uppercase;
            color: #968da0;
        }
        .pdf-client-value {
            display: block;
            font-size: 15px;
            line-height: 1.35;
            font-weight: 700;
            color: #251c2e;
            overflow-wrap: anywhere;
        }
        .pdf-table {
            overflow: hidden;
            border: 1px solid #e9e3ee;
            border-radius: 16px;
            background: #fff;
        }
        .pdf-table-head,
        .pdf-item-row {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 74px 104px 112px;
            align-items: center;
            column-gap: 12px;
        }
        .pdf-table-head {
            min-height: 42px;
            padding: 0 16px;
            background: #f7f3fa;
            border-bottom: 1px solid #e9e3ee;
            font-size: 10px;
            line-height: 1.2;
            font-weight: 800;
            letter-spacing: 0.45px;
            text-transform: uppercase;
            color: #84788f;
        }
        .pdf-table-head > div:nth-child(n+2),
        .pdf-item-row > div:nth-child(n+2) {
            text-align: right;
        }
        .pdf-item-row {
            min-height: 62px;
            padding: 12px 16px;
            border-bottom: 1px solid #eee9f2;
        }
        .pdf-item-row:last-child {
            border-bottom: none;
        }
        .pdf-item-name {
            min-width: 0;
            padding-right: 8px;
            font-size: 14px;
            line-height: 1.35;
            font-weight: 750;
            color: #21182a;
            overflow-wrap: anywhere;
        }
        .pdf-item-qty,
        .pdf-item-unit {
            font-size: 12px;
            line-height: 1.3;
            font-weight: 650;
            color: #675c72;
            white-space: nowrap;
        }
        .pdf-item-sum {
            font-size: 14px;
            line-height: 1.2;
            font-weight: 800;
            color: #24192e;
            white-space: nowrap;
        }
        .pdf-total-box {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 24px;
            margin-top: 18px;
            padding: 18px 20px;
            border: 1px solid #e6daef;
            border-radius: 16px;
            background: linear-gradient(135deg, #faf7fd 0%, #f3ebf9 100%);
        }
        .pdf-total-label {
            font-size: 13px;
            line-height: 1.25;
            font-weight: 700;
            color: #6f637b;
        }
        .pdf-total-value {
            font-size: 25px;
            line-height: 1;
            font-weight: 850;
            letter-spacing: -0.6px;
            color: #5b2091;
            white-space: nowrap;
        }
        .pdf-thankyou {
            margin-top: 26px;
            padding: 18px 20px;
            border-radius: 16px;
            background: #f8f6f9;
        }
        .pdf-thankyou-title {
            margin-bottom: 5px;
            font-size: 15px;
            line-height: 1.3;
            font-weight: 800;
            color: #2a2033;
        }
        .pdf-thankyou-text {
            margin: 0;
            font-size: 12px;
            line-height: 1.55;
            color: #786f82;
        }
        .pdf-footer {
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 24px;
            margin-top: 27px;
            padding-top: 17px;
            border-top: 1px solid #ece7f1;
        }
        .pdf-footer-contact {
            font-size: 12px;
            line-height: 1.55;
            color: #6e6478;
        }
        .pdf-footer-contact strong {
            color: #33253f;
        }
        .pdf-footer-note {
            max-width: 250px;
            text-align: right;
            font-size: 10px;
            line-height: 1.5;
            color: #9b92a4;
        }

        /* ----- АДАПТИВ ДЛЯ МАЛЕНЬКИХ ЭКРАНОВ ----- */
        @media (max-width: 380px) {
            .product-card .info .price { font-size: 16px; }
            .product-card .info .name { font-size: 14px; }
            .bottom-nav .nav-item .icon { font-size: 20px; }
            .bottom-nav .nav-item .label { font-size: 9px; }
            .categories-grid { gap: 8px; }
            .category-card .category-label { font-size: 14px; }
        }

        /* ============================================================
           ДОРАБОТКИ V2
           ============================================================ */

        /* На компьютере каталог не растягивается бесконечно */
        .container {
            max-width: 1480px;
        }
        @media (min-width: 900px) {
            .container {
                padding: 20px 28px;
            }
        }

        /* Главные группы и разделы: крупнее на телефоне */
        .categories-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }
        @media (min-width: 700px) {
            .categories-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
                gap: 18px;
            }
        }
        @media (min-width: 1100px) {
            .categories-grid {
                grid-template-columns: repeat(4, minmax(0, 1fr));
                gap: 22px;
            }
        }

        /* Описание в каталоге: несколько строк, длинные слова не ломают карточку */
        .product-card .info .description {
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            white-space: normal;
            overflow-wrap: anywhere;
            word-break: break-word;
            min-height: calc(1.4em * 2);
        }

        /* Полное описание внутри товара может быть любой длины */
        .product-modal .modal-content {
            max-width: 560px;
        }
        .product-modal .modal-content .detail-description {
            white-space: pre-wrap;
            overflow-wrap: anywhere;
            word-break: break-word;
            max-width: 100%;
        }

        /* Картинки листаются свайпом/перетаскиванием */
        .product-card .image-wrap,
        .product-modal .product-detail-image {
            touch-action: pan-y;
            user-select: none;
            -webkit-user-select: none;
            cursor: grab;
        }
        .product-card .image-wrap:active,
        .product-modal .product-detail-image:active {
            cursor: grabbing;
        }
        .product-card .image-wrap img,
        .product-modal .product-detail-image img {
            user-select: none;
            -webkit-user-drag: none;
        }
        .product-card .image-wrap .slider-nav {
            display: none !important;
        }
        .slider-dots {
            position: absolute;
            left: 50%;
            bottom: 8px;
            transform: translateX(-50%);
            display: flex;
            gap: 5px;
            z-index: 3;
            pointer-events: none;
        }
        .slider-dots .dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: rgba(255,255,255,0.55);
            box-shadow: 0 1px 3px rgba(0,0,0,0.25);
        }
        .slider-dots .dot.active {
            width: 16px;
            border-radius: 8px;
            background: #fff;
        }

        .detail-image-counter {
            position: absolute;
            right: 10px;
            bottom: 10px;
            background: rgba(0,0,0,0.55);
            color: #fff;
            border-radius: 18px;
            padding: 5px 9px;
            font-size: 12px;
            font-weight: 600;
            pointer-events: none;
        }
        .product-modal .modal-content .detail-slider {
            scrollbar-width: thin;
            overscroll-behavior-x: contain;
        }

        /* Управление количеством прямо во всплывающей карточке */
        .detail-cart-controls {
            width: 100%;
            margin-top: 4px;
        }
        .detail-cart-controls .add-btn {
            width: 100%;
            padding: 14px;
            background: #6726AB;
            color: #fff;
            border: none;
            border-radius: 30px;
            font-size: 18px;
            font-weight: 600;
            cursor: pointer;
        }
        .detail-cart-controls .add-btn.out {
            background: #e0e0e0;
            color: #999;
            pointer-events: none;
        }
        .detail-cart-controls .qty-control {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            background: #f0f0f0;
            border-radius: 30px;
            padding: 5px 10px;
        }
        .detail-cart-controls .qty-control button {
            width: 46px;
            height: 46px;
            border: none;
            background: transparent;
            border-radius: 50%;
            font-size: 26px;
            font-weight: 700;
            cursor: pointer;
        }
        .detail-cart-controls .qty-control input {
            flex: 1;
            min-width: 0;
            width: 80px;
            text-align: center;
            border: none;
            background: transparent;
            color: #6726AB;
            font-size: 20px;
            font-weight: 700;
            outline: none;
            -moz-appearance: textfield;
        }
        .detail-cart-controls .qty-control input::-webkit-outer-spin-button,
        .detail-cart-controls .qty-control input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        /* Нижняя навигация: две действительно кликабельные половины */
        .bottom-nav {
            justify-content: stretch;
            padding: 0 0 env(safe-area-inset-bottom, 0px);
            height: calc(68px + env(safe-area-inset-bottom, 0px));
        }
        .bottom-nav .nav-item {
            flex: 1 1 50%;
            width: 50%;
            height: 68px;
            justify-content: center;
            padding: 6px 0;
            border-radius: 0;
        }
        .bottom-nav .nav-item + .nav-item {
            border-left: 1px solid #e5e5e5;
        }
        .bottom-nav .nav-item .icon-wrap {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 36px;
            min-height: 28px;
        }
        .bottom-nav .cart-badge .count {
            top: -5px;
            right: -9px;
        }

        /* Корзину легче ухватить и закрыть свайпом вниз */
        .cart-sheet {
            bottom: calc(68px + env(safe-area-inset-bottom, 0px));
            max-height: 76vh;
            overscroll-behavior: contain;
            will-change: transform;
        }
        .cart-drag-zone {
            margin: -12px -16px 4px;
            padding: 12px 16px 6px;
            cursor: grab;
            touch-action: none;
        }
        .cart-drag-zone:active {
            cursor: grabbing;
        }
        .cart-sheet .handle {
            width: 58px;
            height: 5px;
            margin-bottom: 10px;
        }
        .cart-sheet .cart-drag-zone h3 {
            margin-bottom: 8px;
        }

        @media (max-width: 480px) {
            .container {
                padding-left: 10px;
                padding-right: 10px;
            }
            .product-grid {
                gap: 10px;
            }
            .product-card .info {
                padding-left: 10px;
                padding-right: 10px;
            }
            .product-card .cart-controls {
                margin-left: 10px;
                margin-right: 10px;
            }
            .product-card .info .description {
                -webkit-line-clamp: 3;
                font-size: 12px;
            }
        }


        /* ============================================================
           ДОРАБОТКИ V3 — визуал главной, разделов и корзины
           ============================================================ */
        .view-header {
            display: block;
            background: linear-gradient(135deg, #ffffff 0%, #f5f1fb 100%);
            border: 1px solid rgba(103, 38, 171, 0.08);
            border-radius: 24px;
            padding: 22px 22px 18px;
            margin-bottom: 18px;
            box-shadow: 0 10px 30px rgba(38, 20, 72, 0.06);
        }
        .view-header.hidden { display: none; }
        .view-header .kicker {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 7px 12px;
            border-radius: 999px;
            background: rgba(103, 38, 171, 0.08);
            color: #6726AB;
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.3px;
            text-transform: uppercase;
            margin-bottom: 12px;
        }
        .view-header .title {
            font-size: clamp(24px, 3vw, 34px);
            font-weight: 800;
            line-height: 1.1;
            letter-spacing: -0.03em;
            margin-bottom: 8px;
            color: #171220;
        }
        .view-header .subtitle {
            max-width: 760px;
            color: #5b5566;
            font-size: 15px;
            line-height: 1.6;
        }
        .view-header .meta {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 16px;
        }
        .view-header .meta-chip {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: #fff;
            border: 1px solid rgba(103, 38, 171, 0.10);
            border-radius: 999px;
            padding: 9px 12px;
            font-size: 13px;
            color: #3b3447;
            box-shadow: 0 4px 12px rgba(0,0,0,0.03);
        }
        .category-card {
            border: 1px solid rgba(103, 38, 171, 0.10);
            box-shadow: 0 10px 26px rgba(0,0,0,0.06);
            transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
            min-height: 210px;
            display: flex;
            align-items: stretch;
        }
        .category-card::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, rgba(16,12,20,0.06) 0%, rgba(16,12,20,0.18) 28%, rgba(16,12,20,0.72) 100%);
            z-index: 1;
        }
        .category-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 16px 34px rgba(0,0,0,0.10);
            border-color: rgba(103, 38, 171, 0.22);
        }
        .category-card img {
            transform: scale(1.01);
            transition: transform 0.35s ease;
        }
        .category-card:hover img {
            transform: scale(1.05);
        }
        .category-card .category-topline {
            position: absolute;
            top: 14px;
            left: 14px;
            z-index: 2;
            display: inline-flex;
            padding: 6px 10px;
            border-radius: 999px;
            background: rgba(255,255,255,0.16);
            backdrop-filter: blur(8px);
            color: #fff;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.4px;
        }
        .category-card .category-label {
            left: 14px;
            right: 14px;
            bottom: 14px;
            z-index: 2;
            font-size: 22px;
            line-height: 1.1;
            letter-spacing: -0.02em;
        }
        .category-card .category-label small {
            margin-top: 8px;
            font-size: 13px;
            line-height: 1.4;
            opacity: 0.95;
        }
        .main-group-card { min-height: 250px; }
        .section-card { min-height: 220px; }
        .cart-sheet {
            border-radius: 24px 24px 0 0;
            box-shadow: 0 -14px 40px rgba(16, 12, 20, 0.14);
            background: linear-gradient(180deg, #ffffff 0%, #fcfbfe 100%);
        }
        .cart-sheet-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
        }
        .cart-eyebrow {
            display: inline-block;
            margin-bottom: 6px;
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.35px;
            text-transform: uppercase;
            color: #6726AB;
        }
        .cart-sheet .cart-drag-zone h3 {
            font-size: 24px;
            margin-bottom: 4px;
            line-height: 1.1;
        }
        .cart-subtitle {
            margin: 0;
            font-size: 13px;
            line-height: 1.5;
            color: #6d6779;
            max-width: 420px;
        }
        .cart-close-btn {
            width: 38px;
            height: 38px;
            border: none;
            border-radius: 50%;
            background: #f3eff8;
            color: #5c4779;
            font-size: 18px;
            cursor: pointer;
            flex-shrink: 0;
        }
        .cart-summary {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
            margin: 6px 0 16px;
        }
        .cart-summary-card {
            background: #f7f3fb;
            border: 1px solid rgba(103, 38, 171, 0.08);
            border-radius: 18px;
            padding: 12px 14px;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .cart-summary-label {
            font-size: 12px;
            color: #7a7387;
        }
        .cart-summary-card strong {
            font-size: 22px;
            line-height: 1;
            color: #1c1526;
        }
        .cart-sheet .cart-item {
            padding: 14px 0;
            align-items: flex-start;
            gap: 12px;
        }
        .cart-sheet .cart-item .item-name {
            line-height: 1.45;
            color: #1d1826;
        }
        .cart-sheet .cart-item .item-name small {
            display: inline-block;
            margin-top: 4px;
            color: #7a7387;
            font-size: 12px;
            font-weight: 500;
        }
        .cart-sheet .cart-item .item-price {
            min-width: 84px;
            font-size: 15px;
            color: #22192f;
            white-space: nowrap;
        }
        .cart-sheet .cart-item .item-qty {
            background: #f6f2fb;
            padding: 4px 6px;
            border-radius: 999px;
            margin: 0;
        }
        .cart-sheet .cart-item .item-qty button {
            border: none;
            background: #fff;
            box-shadow: 0 2px 6px rgba(0,0,0,0.04);
        }
        .cart-total {
            margin-top: 14px;
            padding: 18px 0 14px;
            border-top: 1px solid #ece7f3;
            border-bottom: 1px solid #ece7f3;
        }
        .cart-total span:first-child {
            color: #655d73;
            font-size: 14px;
            font-weight: 600;
        }
        .cart-total span:last-child {
            font-size: 24px;
            color: #1c1526;
        }
        .order-form {
            margin-top: 18px;
            background: #fff;
            border: 1px solid #efebf5;
            border-radius: 22px;
            padding: 18px 16px 16px;
            box-shadow: 0 8px 22px rgba(0,0,0,0.04);
        }
        .order-form-head {
            margin-bottom: 14px;
        }
        .order-form-kicker {
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.35px;
            text-transform: uppercase;
            color: #6726AB;
            margin-bottom: 4px;
        }
        .order-form-head h4 {
            font-size: 20px;
            margin: 0 0 6px;
            color: #1c1526;
        }
        .order-form-head p {
            margin: 0;
            color: #6d6779;
            font-size: 13px;
            line-height: 1.5;
        }
        .form-group {
            margin-bottom: 12px;
        }
        .form-group label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: #433a52;
            margin-bottom: 6px;
        }
        .order-form-note {
            margin: 10px 2px 0;
            font-size: 12px;
            line-height: 1.45;
            color: #80788d;
            text-align: center;
        }
        .empty-cart {
            background: linear-gradient(180deg, #faf7fd 0%, #f5effb 100%);
            border: 1px dashed rgba(103, 38, 171, 0.18);
            border-radius: 22px;
            padding: 24px 18px;
        }
        .empty-cart-icon {
            font-size: 28px;
            margin-bottom: 10px;
        }
        .empty-cart-title {
            font-size: 18px;
            font-weight: 700;
            color: #1d1826;
            margin-bottom: 6px;
        }
        .empty-cart-text {
            color: #6d6779;
            font-size: 14px;
            line-height: 1.5;
        }
        @media (max-width: 720px) {
            .view-header {
                padding: 18px 16px 16px;
                border-radius: 20px;
            }
            .view-header .subtitle {
                font-size: 14px;
            }
            .category-card,
            .main-group-card,
            .section-card {
                min-height: 170px;
            }
            .category-card .category-label {
                font-size: 18px;
            }
            .cart-sheet .cart-item {
                flex-wrap: wrap;
            }
            .cart-sheet .cart-item .item-name {
                width: 100%;
            }
            .cart-sheet .cart-item .item-price {
                margin-left: auto;
            }
            .cart-summary-card strong {
                font-size: 20px;
            }
        }


        /* ============================================================
           ДОРАБОТКИ V4 — упрощение визуала и фиксированные зоны
           ============================================================ */
        .view-header {
            padding: 12px 16px 11px;
            border-radius: 18px;
            margin-bottom: 14px;
        }
        .view-header .kicker {
            padding: 5px 10px;
            font-size: 10px;
            margin-bottom: 8px;
        }
        .view-header .title {
            font-size: clamp(18px, 2.2vw, 24px);
            margin-bottom: 4px;
            line-height: 1.12;
        }
        .view-header .subtitle {
            font-size: 13px;
            line-height: 1.45;
            max-width: 720px;
        }
        .view-header .meta {
            margin-top: 10px;
            gap: 8px;
        }
        .view-header .meta-chip {
            padding: 6px 10px;
            font-size: 12px;
        }

        .category-card {
            min-height: 190px;
            border-radius: 18px;
            overflow: hidden;
        }
        .main-group-card { min-height: 220px; }
        .section-card { min-height: 195px; }
        .category-card .category-label {
            left: 12px;
            right: 12px;
            bottom: 12px;
            font-size: 20px;
        }
        .category-card .category-label small {
            margin-top: 6px;
            font-size: 12px;
        }

        /* Убираем лишнюю надпись сверху слева */
        .category-card .category-topline {
            display: none !important;
        }

        /* Корзина: зона перетаскивания закреплена */
        .cart-sheet {
            padding-top: 0;
            overflow-y: auto;
        }
        .cart-drag-zone {
            position: sticky;
            top: 0;
            z-index: 10;
            background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.96) 100%);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid #efeaf5;
            padding-top: 10px;
            padding-bottom: 10px;
            margin-bottom: 10px;
        }
        .cart-sheet-header {
            align-items: center;
        }
        .cart-sheet .cart-drag-zone h3 {
            font-size: 20px;
            margin-bottom: 2px;
        }
        .cart-subtitle {
            font-size: 12px;
            line-height: 1.4;
        }
        .cart-close-btn {
            width: 34px;
            height: 34px;
            font-size: 16px;
        }
        .cart-summary {
            margin-top: 0;
            margin-bottom: 14px;
        }
        .cart-summary-card {
            padding: 10px 12px;
            border-radius: 16px;
        }
        .cart-summary-card strong {
            font-size: 18px;
        }
        .order-form {
            border-radius: 18px;
        }

        /* Модалка товара — более аккуратный дизайн */
        .product-modal .modal-content {
            max-width: 600px;
            border-radius: 26px;
            padding: 18px 18px 0;
            box-shadow: 0 26px 70px rgba(0,0,0,0.24);
            background: linear-gradient(180deg, #ffffff 0%, #fcfbfe 100%);
            scrollbar-gutter: stable;
        }
        .product-modal .modal-content .close-btn {
            position: sticky;
            top: 0;
            right: 0;
            float: right;
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background: rgba(255,255,255,0.96);
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        }
        .product-modal .modal-content .product-detail-image {
            border-radius: 20px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.08);
            margin-bottom: 14px;
        }
        .product-modal .modal-content .detail-slider {
            gap: 10px;
            margin-bottom: 14px;
        }
        .product-modal .modal-content .detail-slider img {
            width: 72px;
            height: 72px;
            border-radius: 14px;
            border: 2px solid #ece7f2;
            background: #fff;
        }
        .product-modal .modal-content .detail-slider img.active {
            border-color: #6726AB;
            box-shadow: 0 6px 16px rgba(103, 38, 171, 0.20);
        }
        .product-modal .modal-content .detail-name {
            font-size: 24px;
            line-height: 1.15;
            letter-spacing: -0.02em;
            margin-bottom: 8px;
            color: #191421;
            padding-right: 44px;
        }
        .product-modal .modal-content .detail-description {
            font-size: 14px;
            line-height: 1.6;
            color: #564f62;
            margin-bottom: 14px;
            padding-bottom: 10px;
        }
        .detail-footer-bar {
            position: sticky;
            bottom: 0;
            z-index: 12;
            margin: 0 -18px;
            padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px));
            background: rgba(255,255,255,0.98);
            backdrop-filter: blur(12px);
            border-top: 1px solid #efeaf5;
            box-shadow: 0 -8px 24px rgba(0,0,0,0.06);
        }
        .product-modal .modal-content .detail-price {
            font-size: 24px;
            margin-bottom: 10px;
            color: #1b1424;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .product-modal .modal-content .detail-price::before {
            content: 'Цена';
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.35px;
            color: #7a7387;
        }
        .detail-cart-controls {
            margin-top: 0;
        }
        .detail-cart-controls .add-btn {
            padding: 15px;
            border-radius: 16px;
            font-size: 17px;
            box-shadow: 0 10px 24px rgba(103, 38, 171, 0.18);
        }
        .detail-cart-controls .qty-control {
            border-radius: 18px;
            background: #f5f1fa;
            border: 1px solid #ece7f2;
            padding: 6px 8px;
        }
        .detail-cart-controls .qty-control button {
            width: 44px;
            height: 44px;
            background: #fff;
            box-shadow: 0 3px 10px rgba(0,0,0,0.05);
            font-size: 24px;
        }
        .detail-cart-controls .qty-control input {
            font-size: 18px;
        }
        .detail-image-counter {
            bottom: 12px;
            right: 12px;
            background: rgba(23,19,31,0.65);
            padding: 6px 10px;
        }

        @media (max-width: 720px) {
            .view-header {
                padding: 10px 12px;
                border-radius: 16px;
            }
            .view-header .title {
                font-size: 18px;
            }
            .view-header .subtitle {
                font-size: 12px;
            }
            .main-group-card { min-height: 180px; }
            .section-card, .category-card { min-height: 165px; }
            .category-card .category-label {
                font-size: 17px;
            }
            .product-modal .modal-content {
                padding: 16px 14px 0;
                border-radius: 22px 22px 0 0;
                max-height: 92vh;
            }
            .product-modal {
                align-items: flex-end;
                padding: 0;
            }
            .detail-footer-bar {
                margin: 0 -14px;
                padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
            }
            .product-modal .modal-content .detail-name {
                font-size: 21px;
            }
            .product-modal .modal-content .detail-price {
                font-size: 22px;
            }
        }


        /* ============================================================
           ДОРАБОТКИ V5 — корзина, типографика товаров, сумма позиции
           ============================================================ */

        /* В корзине закреплена ТОЛЬКО полоска для свайпа */
        .cart-sheet {
            overflow-y: auto;
        }
        .cart-drag-zone {
            position: sticky;
            top: 0;
            z-index: 30;
            height: 30px;
            min-height: 30px;
            margin: 0 -16px 4px;
            padding: 8px 16px 7px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255,255,255,0.96);
            backdrop-filter: blur(10px);
            border-bottom: 0;
            cursor: grab;
            touch-action: none;
        }
        .cart-drag-zone:active { cursor: grabbing; }
        .cart-sheet .cart-drag-zone .handle {
            width: 58px;
            height: 5px;
            margin: 0;
            background: #d4cedc;
            border-radius: 999px;
        }
        .cart-sheet-header {
            position: static;
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 10px;
        }
        .cart-close-btn {
            position: relative;
            z-index: 2;
            flex-shrink: 0;
            touch-action: manipulation;
        }
        .cart-close-btn:hover { background: #ebe4f3; color: #342347; }
        .cart-close-btn:active { transform: scale(0.94); }

        /* Более аккуратная типографика карточек товара */
        .product-card {
            border: 1px solid rgba(30, 22, 40, 0.06);
            box-shadow: 0 7px 22px rgba(31, 22, 43, 0.055);
            transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
        }
        @media (hover: hover) {
            .product-card:hover {
                transform: translateY(-3px);
                box-shadow: 0 13px 30px rgba(31, 22, 43, 0.09);
                border-color: rgba(103, 38, 171, 0.12);
            }
        }
        .product-card .info {
            padding-top: 12px;
        }
        .product-card .info .name {
            font-size: 17px;
            font-weight: 750;
            line-height: 1.28;
            letter-spacing: -0.018em;
            color: #1b1622;
            margin-bottom: 6px;
            overflow-wrap: anywhere;
        }
        .product-card .info .description {
            font-size: 13px;
            font-weight: 400;
            line-height: 1.52;
            color: #716a7c;
            margin-bottom: 9px;
            min-height: calc(1.52em * 2);
        }
        .product-card .info .price-row {
            margin-top: auto;
            padding-top: 2px;
            gap: 5px;
            align-items: baseline;
        }
        .product-card .info .price {
            font-size: 21px;
            font-weight: 800;
            letter-spacing: -0.025em;
            color: #17121e;
        }
        .product-card .info .currency-label {
            font-size: 12px;
            font-weight: 650;
            color: #8b8495;
            letter-spacing: 0.02em;
        }
        .product-card .badge {
            font-size: 10px;
            font-weight: 750;
            letter-spacing: 0.25px;
            padding: 5px 9px;
            background: rgba(33, 164, 87, 0.92);
            backdrop-filter: blur(8px);
        }
        .product-card .badge.out { background: rgba(225, 68, 68, 0.92); }

        /* Сумма именно по текущему товару */
        .product-line-total {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            margin: 0 0 8px;
            padding: 8px 10px;
            border-radius: 12px;
            background: #f7f3fb;
            border: 1px solid rgba(103, 38, 171, 0.08);
            color: #746c80;
            font-size: 11px;
            line-height: 1.25;
        }
        .product-line-total strong {
            color: #6726AB;
            font-size: 13px;
            font-weight: 800;
            white-space: nowrap;
        }
        .product-card .cart-controls .qty-control {
            background: #f5f2f8;
            border: 1px solid #ece7f1;
            padding: 4px 6px;
        }
        .product-card .cart-controls .qty-control button {
            width: 34px;
            min-width: 34px;
            height: 34px;
            min-height: 34px;
            border-radius: 50%;
            background: #fff;
            box-shadow: 0 2px 7px rgba(0,0,0,0.045);
            font-size: 20px;
        }
        .product-card .cart-controls .qty-control input {
            color: #55208c;
            font-size: 15px;
            font-weight: 750;
        }
        .product-card .cart-controls .add-btn {
            border-radius: 14px;
            font-size: 14px;
            font-weight: 700;
            box-shadow: 0 7px 18px rgba(103, 38, 171, 0.13);
        }

        /* В открытой карточке сумма позиции более заметна */
        .detail-footer-bar .product-line-total {
            margin-bottom: 9px;
            padding: 9px 12px;
            border-radius: 14px;
            font-size: 12px;
        }
        .detail-footer-bar .product-line-total strong {
            font-size: 15px;
        }

        /* Небольшая визуальная доработка изображения товара */
        .product-card .image-wrap {
            background: linear-gradient(180deg, #f7f6f8 0%, #f1eff4 100%);
        }
        .product-card .image-wrap::after {
            content: '';
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: 34px;
            background: linear-gradient(180deg, transparent, rgba(20,15,26,0.06));
            pointer-events: none;
            z-index: 1;
        }
        .product-card .slider-dots { z-index: 4; }

        @media (max-width: 600px) {
            .product-card .info .name {
                font-size: 15px;
                line-height: 1.3;
                margin-bottom: 5px;
            }
            .product-card .info .description {
                font-size: 12px;
                line-height: 1.48;
                margin-bottom: 7px;
            }
            .product-card .info .price {
                font-size: 18px;
            }
            .product-line-total {
                padding: 7px 8px;
                font-size: 10px;
            }
            .product-line-total strong {
                font-size: 12px;
            }
        }


        /* ============================================================
           ДОРАБОТКИ V6 — peek-карусели, компактный header, валютный слайдер
           ============================================================ */

        /* Шапка остаётся доступной даже при открытой корзине */
        .header {
            z-index: 260;
        }

        /* Плавный переключатель валюты */
        .header .currency-toggle {
            position: relative;
            isolation: isolate;
            display: grid;
            grid-template-columns: 1fr 1fr;
            min-width: 184px;
            padding: 4px;
            overflow: hidden;
            background: #eeeaf3;
            border: 1px solid rgba(103, 38, 171, 0.08);
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
        }
        .header .currency-toggle::before {
            content: '';
            position: absolute;
            z-index: 0;
            top: 4px;
            bottom: 4px;
            left: 4px;
            width: calc(50% - 4px);
            border-radius: 20px;
            background: #fff;
            box-shadow: 0 4px 14px rgba(37, 22, 54, 0.12);
            transition: transform 0.34s cubic-bezier(0.22, 0.8, 0.2, 1), box-shadow 0.25s ease;
        }
        .header .currency-toggle.rub-active::before {
            transform: translateX(100%);
        }
        .header .currency-toggle button {
            position: relative;
            z-index: 1;
            width: 100%;
            padding: 7px 10px;
            background: transparent !important;
            box-shadow: none !important;
            color: #8a8392;
            transition: color 0.28s ease, transform 0.28s ease;
        }
        .header .currency-toggle button.active {
            color: #241a30;
            transform: scale(1.025);
        }
        .header .currency-toggle button .flag {
            display: inline-block;
            transition: transform 0.28s ease;
        }
        .header .currency-toggle button.active .flag {
            transform: scale(1.12);
        }

        /* Верхний информационный блок ещё компактнее */
        .view-header {
            padding: 8px 12px 8px;
            margin-bottom: 10px;
            border-radius: 14px;
            box-shadow: 0 5px 16px rgba(38, 20, 72, 0.035);
        }
        .view-header .kicker {
            padding: 3px 8px;
            margin-bottom: 5px;
            font-size: 9px;
        }
        .view-header .title {
            margin-bottom: 2px;
            font-size: clamp(16px, 1.8vw, 20px);
            line-height: 1.12;
        }
        .view-header .subtitle {
            font-size: 11px;
            line-height: 1.35;
        }
        .view-header .meta {
            margin-top: 6px;
            gap: 6px;
        }
        .view-header .meta-chip {
            padding: 4px 8px;
            font-size: 10px;
            min-height: 25px;
        }
        .view-header button.meta-chip {
            appearance: none;
            font-family: inherit;
            cursor: pointer;
            color: #6726AB;
            background: #fff;
            transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
        }
        .view-header button.meta-chip:hover {
            background: #f8f3fc;
            box-shadow: 0 5px 12px rgba(103,38,171,0.09);
            transform: translateY(-1px);
        }
        .view-header button.meta-chip:active {
            transform: scale(0.97);
        }

        /* Каталог: карусель с видимыми соседними изображениями */
        .product-card .image-wrap {
            background: #ece9ef;
            overflow: hidden;
        }
        .product-card .image-wrap .slider-container {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: stretch;
            gap: 8px;
            padding: 0 8%;
            overflow-x: auto;
            overflow-y: hidden;
            scroll-snap-type: x mandatory;
            scroll-padding-inline: 8%;
            scroll-behavior: smooth;
            scrollbar-width: none;
            overscroll-behavior-x: contain;
            transform: none !important;
            transition: none;
            cursor: grab;
        }
        .product-card .image-wrap .slider-container::-webkit-scrollbar {
            display: none;
        }
        .product-card .image-wrap .slider-container:active {
            cursor: grabbing;
        }
        .product-card .image-wrap .slider-container img {
            flex: 0 0 84%;
            width: 84%;
            height: 100%;
            scroll-snap-align: center;
            scroll-snap-stop: always;
            object-fit: cover;
            border-radius: 12px;
            opacity: 0.72;
            transform: scale(0.94);
            transition: transform 0.24s ease, opacity 0.24s ease, filter 0.24s ease;
            filter: saturate(0.88);
        }
        .product-card .image-wrap .slider-container img.carousel-active {
            opacity: 1;
            transform: scale(1);
            filter: saturate(1);
        }
        .product-card .image-wrap .slider-dots {
            bottom: 9px;
            padding: 4px 7px;
            border-radius: 999px;
            background: rgba(20, 15, 27, 0.25);
            backdrop-filter: blur(7px);
        }

        /* Открытая карточка: аналогичная карусель */
        .product-modal .modal-content .product-detail-image {
            aspect-ratio: 3 / 4;
            background: #ece9ef;
            overflow: hidden;
            padding: 0;
        }
        .detail-swipe-track {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: stretch;
            gap: 12px;
            padding: 0 7%;
            overflow-x: auto;
            overflow-y: hidden;
            scroll-snap-type: x mandatory;
            scroll-padding-inline: 7%;
            scroll-behavior: smooth;
            scrollbar-width: none;
            overscroll-behavior-x: contain;
            cursor: grab;
        }
        .detail-swipe-track::-webkit-scrollbar { display: none; }
        .detail-swipe-track:active { cursor: grabbing; }
        .detail-swipe-track img {
            flex: 0 0 86%;
            width: 86%;
            height: 100%;
            object-fit: cover;
            scroll-snap-align: center;
            scroll-snap-stop: always;
            border-radius: 17px;
            opacity: 0.72;
            transform: scale(0.95);
            transition: transform 0.25s ease, opacity 0.25s ease, filter 0.25s ease;
            filter: saturate(0.9);
            user-select: none;
            -webkit-user-drag: none;
        }
        .detail-swipe-track img.carousel-active {
            opacity: 1;
            transform: scale(1);
            filter: saturate(1);
        }
        .detail-image-meta {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            min-height: 28px;
            margin: -4px 2px 10px;
        }
        .detail-image-counter {
            position: static !important;
            right: auto !important;
            bottom: auto !important;
            transform: none !important;
            display: inline-flex;
            align-items: center;
            min-height: 25px;
            padding: 4px 9px;
            border-radius: 999px;
            background: #f3eff7;
            color: #5e536c;
            font-size: 11px;
            font-weight: 700;
            box-shadow: none;
        }
        .detail-swipe-hint {
            font-size: 11px;
            color: #8a8392;
        }

        /* В модалке при добавленном товаре показываем только итоговую сумму */
        .product-modal .modal-content .detail-price {
            margin-bottom: 9px;
        }
        .product-modal .modal-content .detail-price::before {
            content: attr(data-label);
        }
        .detail-cart-controls .product-line-total {
            display: none !important;
        }

        @media (max-width: 720px) {
            .header .currency-toggle {
                min-width: 166px;
            }
            .header .currency-toggle button {
                padding-left: 7px;
                padding-right: 7px;
                font-size: 13px;
            }
            .view-header {
                padding: 7px 10px;
            }
            .view-header .subtitle {
                display: none;
            }
            .view-header .meta {
                margin-top: 5px;
            }
            .product-card .image-wrap .slider-container {
                gap: 6px;
                padding-inline: 7%;
                scroll-padding-inline: 7%;
            }
            .product-card .image-wrap .slider-container img {
                flex-basis: 86%;
                width: 86%;
                border-radius: 10px;
            }
            .detail-swipe-track {
                gap: 9px;
                padding-inline: 6%;
                scroll-padding-inline: 6%;
            }
            .detail-swipe-track img {
                flex-basis: 88%;
                width: 88%;
                border-radius: 15px;
            }
        }


        /* ============================================================
           V7 — единая типографика, чистая корзина, новая карусель
           ============================================================ */
        :root {
            --ui-text: #1b1720;
            --ui-muted: #746e7b;
            --ui-soft: #f6f3f8;
            --ui-border: #ece7f0;
            --ui-purple: #6726AB;
            --ui-radius: 16px;
            --fs-xs: 11px;
            --fs-sm: 12px;
            --fs-body: 14px;
            --fs-md: 15px;
            --fs-lg: 18px;
            --fs-xl: 22px;
        }

        body { color: var(--ui-text); }

        /* Единая типографика */
        .header .logo { font-size: 17px; line-height: 1.2; }
        .breadcrumb { font-size: var(--fs-sm); }
        .view-header .kicker { font-size: 9px; }
        .view-header .title { font-size: 18px; line-height: 1.2; }
        .view-header .subtitle { font-size: var(--fs-xs); line-height: 1.35; }
        .view-header .meta-chip { font-size: var(--fs-xs); line-height: 1; }

        .category-card .category-label { font-size: 19px; line-height: 1.15; }
        .category-card .category-label small { font-size: var(--fs-sm); line-height: 1.35; }

        .product-card .info .name {
            font-size: 16px;
            line-height: 1.3;
            font-weight: 750;
            letter-spacing: -0.01em;
        }
        .product-card .info .description {
            font-size: var(--fs-sm);
            line-height: 1.5;
            color: var(--ui-muted);
        }
        .product-card .info .price-row {
            display: flex;
            align-items: baseline;
            justify-content: flex-start;
            gap: 5px;
        }
        .product-card .info .price { font-size: 19px; line-height: 1; font-weight: 800; }
        .product-card .info .currency-label { font-size: var(--fs-xs); line-height: 1; }
        .product-card .badge { font-size: 9px; line-height: 1; }
        .product-card .cart-controls .add-btn { font-size: 14px; line-height: 1.2; }
        .product-line-total { font-size: var(--fs-xs); }
        .product-line-total strong { font-size: var(--fs-sm); }

        .product-modal .modal-content .detail-name {
            font-size: 22px;
            line-height: 1.22;
            font-weight: 800;
            letter-spacing: -0.018em;
        }
        .product-modal .modal-content .detail-description {
            font-size: var(--fs-body);
            line-height: 1.6;
        }
        .product-modal .modal-content .detail-price {
            font-size: 22px;
            line-height: 1.1;
        }
        .product-modal .modal-content .detail-price::before {
            font-size: var(--fs-xs);
            line-height: 1;
        }

        /* Новая карусель каталога: полноразмерный слайд, соседний виден только во время движения */
        .product-card .image-wrap {
            overflow: hidden;
            background: #f2f0f4;
        }
        .product-card .image-wrap::after { display: none; }
        .product-card .image-wrap .slider-container {
            width: 100%;
            height: 100%;
            display: flex;
            gap: 0;
            padding: 0;
            overflow-x: auto;
            overflow-y: hidden;
            scroll-snap-type: x mandatory;
            scroll-padding: 0;
            scrollbar-width: none;
            overscroll-behavior-x: contain;
            scroll-behavior: smooth;
            transform: none !important;
            cursor: grab;
        }
        .product-card .image-wrap .slider-container::-webkit-scrollbar { display: none; }
        .product-card .image-wrap .slider-container:active { cursor: grabbing; }
        .product-card .image-wrap .slider-container img {
            flex: 0 0 100%;
            width: 100%;
            height: 100%;
            border-radius: 0;
            opacity: 1;
            transform: none;
            filter: none;
            object-fit: cover;
            scroll-snap-align: start;
            scroll-snap-stop: always;
            transition: none;
        }
        .product-card .image-wrap .slider-container img.carousel-active {
            opacity: 1;
            transform: none;
            filter: none;
        }
        .slider-dots { display: none !important; }
        .catalog-image-count {
            position: absolute;
            right: 9px;
            bottom: 9px;
            z-index: 5;
            display: inline-flex;
            align-items: center;
            gap: 3px;
            min-height: 24px;
            padding: 0 8px;
            border-radius: 999px;
            background: rgba(20, 16, 25, 0.54);
            backdrop-filter: blur(7px);
            color: #fff;
            font-size: 10px;
            font-weight: 700;
            line-height: 1;
            pointer-events: none;
        }
        .catalog-image-count .sep { opacity: .55; }

        /* Новая карусель открытого товара */
        .product-modal .modal-content .product-detail-image {
            background: #f3f1f5;
            border-radius: 18px;
            box-shadow: none;
            overflow: hidden;
        }
        .detail-swipe-track {
            width: 100%;
            height: 100%;
            display: flex;
            gap: 0;
            padding: 0;
            overflow-x: auto;
            overflow-y: hidden;
            scroll-snap-type: x mandatory;
            scroll-padding: 0;
            scrollbar-width: none;
            overscroll-behavior-x: contain;
            scroll-behavior: smooth;
            cursor: grab;
        }
        .detail-swipe-track::-webkit-scrollbar { display: none; }
        .detail-swipe-track img,
        .detail-swipe-track img.carousel-active {
            flex: 0 0 100%;
            width: 100%;
            height: 100%;
            object-fit: contain;
            border-radius: 0;
            opacity: 1;
            transform: none;
            filter: none;
            scroll-snap-align: start;
            scroll-snap-stop: always;
            background: #f3f1f5;
        }
        .detail-image-meta {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            min-height: 30px;
            margin: 8px 2px 12px;
        }
        .detail-image-counter {
            position: static !important;
            display: inline-flex;
            align-items: center;
            min-width: 38px;
            min-height: 24px;
            padding: 0 8px;
            border-radius: 999px;
            background: var(--ui-soft);
            color: #655e6e;
            font-size: var(--fs-xs);
            font-weight: 700;
            line-height: 1;
        }
        .product-modal .modal-content .detail-slider {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 6px;
            margin: 0;
            padding: 0;
            overflow: visible;
        }
        .detail-dot {
            width: 7px;
            height: 7px;
            padding: 0;
            border: 0;
            border-radius: 999px;
            background: #d7d1dc;
            cursor: pointer;
            transition: width .2s ease, background .2s ease, transform .2s ease;
        }
        .detail-dot.active {
            width: 18px;
            background: var(--ui-purple);
        }
        .detail-swipe-hint { display: none !important; }

        /* Корзина: только нужная информация */
        .cart-sheet {
            padding-left: 16px;
            padding-right: 16px;
            background: #fff;
        }
        .cart-drag-zone {
            position: sticky;
            top: 0;
            z-index: 30;
            height: 28px;
            min-height: 28px;
            margin: 0 -16px 2px;
            padding: 8px 16px 6px;
            background: rgba(255,255,255,.98);
            backdrop-filter: blur(10px);
        }
        .cart-sheet .cart-drag-zone .handle {
            width: 48px;
            height: 4px;
            background: #d5cfda;
        }
        .cart-sheet-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin: 2px 0 10px;
        }
        .cart-sheet-header h3 {
            margin: 0;
            font-size: 20px;
            line-height: 1.2;
            font-weight: 800;
            letter-spacing: -0.01em;
        }
        .cart-close-btn {
            width: 34px;
            height: 34px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 0;
            border-radius: 50%;
            background: var(--ui-soft);
            color: #51495a;
            font-size: 15px;
            line-height: 1;
        }
        .cart-summary, .cart-eyebrow, .cart-subtitle,
        .order-form-head, .order-form-kicker, .order-form-note { display: none !important; }

        .cart-sheet .cart-item {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 9px;
            padding: 12px 0;
            border-bottom: 1px solid var(--ui-border);
        }
        .cart-item-top {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 14px;
        }
        .cart-sheet .cart-item .item-name {
            flex: 1;
            min-width: 0;
            font-size: var(--fs-body);
            line-height: 1.35;
            font-weight: 650;
            color: var(--ui-text);
            overflow-wrap: anywhere;
        }
        .cart-sheet .cart-item .item-price {
            flex-shrink: 0;
            min-width: auto;
            font-size: var(--fs-body);
            line-height: 1;
            font-weight: 800;
            color: var(--ui-text);
            white-space: nowrap;
        }
        .cart-sheet .cart-item .item-qty {
            width: fit-content;
            display: flex;
            align-items: center;
            gap: 3px;
            margin: 0;
            padding: 3px;
            border-radius: 999px;
            background: var(--ui-soft);
        }
        .cart-sheet .cart-item .item-qty button {
            width: 30px;
            height: 30px;
            border: 0;
            border-radius: 50%;
            background: #fff;
            font-size: 18px;
            line-height: 1;
            box-shadow: 0 1px 4px rgba(0,0,0,.04);
        }
        .cart-sheet .cart-item .item-qty input {
            width: 38px;
            padding: 0;
            border: 0;
            background: transparent;
            font-size: 14px;
            line-height: 30px;
            font-weight: 750;
        }
        .cart-total {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 16px;
            margin-top: 8px;
            padding: 14px 0;
            border-top: 0;
            border-bottom: 1px solid var(--ui-border);
        }
        .cart-total span:first-child {
            font-size: var(--fs-body);
            line-height: 1.2;
            font-weight: 650;
            color: #5f5867;
        }
        .cart-total span:last-child {
            font-size: 20px;
            line-height: 1;
            font-weight: 850;
            color: var(--ui-text);
            white-space: nowrap;
        }
        .order-form {
            margin-top: 14px;
            padding: 0 0 4px;
            border: 0;
            border-radius: 0;
            box-shadow: none;
            background: transparent;
        }
        .order-form h4 {
            margin: 0 0 10px;
            font-size: 16px;
            line-height: 1.2;
            font-weight: 800;
        }
        .form-group { margin-bottom: 10px; }
        .form-group label {
            margin-bottom: 5px;
            font-size: var(--fs-sm);
            line-height: 1.2;
            font-weight: 650;
        }
        .cart-sheet .order-form input,
        .cart-sheet .order-form select {
            height: 44px;
            margin: 0;
            padding: 0 12px;
            border: 1px solid var(--ui-border);
            border-radius: 12px;
            background: #faf9fb;
            font-size: var(--fs-body);
            line-height: 1;
        }
        .cart-sheet .order-form .phone-row {
            gap: 7px;
            align-items: stretch;
        }
        .cart-sheet .order-form .phone-row select {
            width: 105px;
            height: 44px;
            margin: 0;
            padding: 0 8px;
            font-size: var(--fs-body);
        }
        .cart-sheet .order-form .phone-row input { margin: 0; }
        .cart-sheet .order-form .submit-btn {
            width: 100%;
            min-height: 46px;
            margin-top: 2px;
            padding: 0 16px;
            border-radius: 14px;
            font-size: var(--fs-md);
            line-height: 1;
            font-weight: 750;
        }
        .empty-cart {
            padding: 20px 14px;
            border-radius: 16px;
        }
        .empty-cart-icon { font-size: 24px; margin-bottom: 7px; }
        .empty-cart-title { font-size: 16px; line-height: 1.2; margin-bottom: 4px; }
        .empty-cart-text { font-size: var(--fs-sm); line-height: 1.4; }

        /* Нижняя навигация — одинаковая геометрия текста */
        .bottom-nav .nav-item .icon { font-size: 21px; line-height: 1; }
        .bottom-nav .nav-item .label {
            margin-top: 5px;
            font-size: var(--fs-xs);
            line-height: 1;
            font-weight: 650;
        }

        @media (max-width: 600px) {
            .header .logo { font-size: 16px; }
            .product-card .info .name { font-size: 14px; }
            .product-card .info .description { font-size: 11px; }
            .product-card .info .price { font-size: 17px; }
            .product-modal .modal-content .detail-name { font-size: 20px; }
            .product-modal .modal-content .detail-description { font-size: 13px; }
            .product-modal .modal-content .detail-price { font-size: 20px; }
            .category-card .category-label { font-size: 17px; }
            .cart-sheet-header h3 { font-size: 18px; }
            .cart-total span:last-child { font-size: 19px; }
        }

    
        /* ============================================================
           ДОРАБОТКИ V8 — удобство каталога, корзины и единый визуал
           ============================================================ */
        body {
            background: #f7f5f9;
            color: #1f1728;
        }
        .container { max-width: 1440px; }

        /* Верхний блок делаем спокойным и минимальным */
        .view-header {
            background: transparent;
            border: none;
            box-shadow: none;
            padding: 2px 0 8px;
            margin-bottom: 8px;
        }
        .view-header .title {
            font-size: clamp(20px, 2vw, 26px);
            font-weight: 800;
            line-height: 1.15;
            letter-spacing: -0.03em;
            color: #1d1725;
            margin: 0;
        }
        .view-header .meta {
            margin-top: 8px;
            gap: 8px;
        }
        .view-header .kicker,
        .view-header .subtitle { display: none !important; }
        .view-header .meta-chip {
            padding: 7px 11px;
            min-height: 32px;
            font-size: 12px;
            border-radius: 999px;
            background: #ffffff;
            border: 1px solid rgba(103,38,171,0.10);
            color: #5e526c;
            box-shadow: 0 4px 12px rgba(27, 16, 42, 0.04);
        }
        .view-header .meta-chip-back {
            color: #6726AB;
            font-weight: 700;
        }

        /* Главные карточки каталога */
        .product-grid {
            gap: 18px;
        }
        .product-card {
            background: #fff;
            border-radius: 18px;
            border: 1px solid rgba(34, 24, 46, 0.08);
            box-shadow: 0 10px 28px rgba(29, 18, 41, 0.05);
            overflow: hidden;
        }
        .product-card .image-wrap {
            position: relative;
            background: linear-gradient(180deg, #f4f2f6 0%, #efedf3 100%);
        }
        .product-card .image-wrap::after {
            background: linear-gradient(180deg, transparent 0%, rgba(17, 12, 22, 0.08) 100%);
        }
        .slider-container,
        .detail-swipe-track {
            position: relative;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }
        .slider-container img,
        .detail-swipe-track img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            transform: scale(1.02);
            transition: opacity 0.24s ease, transform 0.24s ease;
            pointer-events: none;
        }
        .slider-container img.carousel-active,
        .detail-swipe-track img.carousel-active {
            opacity: 1;
            transform: scale(1);
            pointer-events: auto;
        }
        .product-card .image-wrap .slider-container img { object-fit: cover; }
        .detail-swipe-track img { object-fit: contain; }
        .image-nav,
        .detail-image-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            z-index: 5;
            width: 34px;
            height: 34px;
            border: none;
            border-radius: 50%;
            background: rgba(255,255,255,0.92);
            color: #352843;
            font-size: 20px;
            line-height: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 6px 16px rgba(18, 12, 25, 0.12);
            cursor: pointer;
            transition: transform 0.15s ease, background 0.15s ease, opacity 0.2s ease;
        }
        .image-nav:hover,
        .detail-image-nav:hover { background: #fff; transform: translateY(-50%) scale(1.04); }
        .image-nav.prev,
        .detail-image-nav.prev { left: 10px; }
        .image-nav.next,
        .detail-image-nav.next { right: 10px; }
        .slider-dots {
            position: absolute;
            left: 50%;
            bottom: 10px;
            transform: translateX(-50%);
            display: flex;
            gap: 6px;
            z-index: 5;
        }
        .slider-dots .dot,
        .detail-slider .detail-dot {
            width: 7px;
            height: 7px;
            padding: 0;
            border: none;
            border-radius: 999px;
            background: rgba(255,255,255,0.56);
            cursor: pointer;
            transition: all 0.18s ease;
        }
        .slider-dots .dot.active,
        .detail-slider .detail-dot.active {
            width: 18px;
            background: #ffffff;
        }
        .catalog-image-count { display: none !important; }

        .product-card .badge {
            top: 10px;
            left: 10px;
            border-radius: 999px;
            padding: 5px 10px;
            font-size: 10px;
            font-weight: 800;
            letter-spacing: 0.03em;
        }
        .product-card .info {
            padding: 14px 14px 10px;
            gap: 0;
        }
        .product-card .info .name {
            font-size: 16px;
            font-weight: 750;
            line-height: 1.3;
            letter-spacing: -0.02em;
            margin-bottom: 6px;
            min-height: calc(1.3em * 2);
            color: #1d1626;
        }
        .product-card .info .description {
            font-size: 13px;
            line-height: 1.48;
            color: #756d82;
            margin-bottom: 10px;
            min-height: calc(1.48em * 2);
        }
        .product-card .info .price-row {
            display: flex;
            align-items: baseline;
            justify-content: flex-start;
            gap: 6px;
        }
        .product-card .info .price {
            font-size: 22px;
            font-weight: 800;
            line-height: 1;
            letter-spacing: -0.03em;
            color: #16111d;
        }
        .product-card .info .currency-label {
            font-size: 12px;
            font-weight: 700;
            color: #8c8298;
        }
        .product-card .cart-controls {
            padding: 0 14px 14px;
        }
        .product-card .cart-controls .add-btn {
            width: 100%;
            min-height: 46px;
            border-radius: 15px;
            background: linear-gradient(180deg, #7a35c7 0%, #6726AB 100%);
            color: #fff;
            font-size: 15px;
            font-weight: 750;
            box-shadow: 0 10px 22px rgba(103, 38, 171, 0.16);
        }
        .product-card .cart-controls .add-btn:hover {
            filter: brightness(1.02);
        }
        .catalog-cart-state {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .product-card .cart-controls .qty-control.qty-control--catalog {
            width: 100%;
            display: grid;
            grid-template-columns: 46px minmax(0, 1fr) 46px;
            align-items: center;
            gap: 10px;
            padding: 6px;
            border-radius: 16px;
            background: #f6f2fb;
            border: 1px solid #ece5f5;
        }
        .product-card .cart-controls .qty-control.qty-control--catalog button {
            width: 46px;
            min-width: 46px;
            height: 46px;
            min-height: 46px;
            border-radius: 14px;
            background: #fff;
            color: #3d3050;
            font-size: 24px;
            font-weight: 700;
        }
        .product-card .cart-controls .qty-control.qty-control--catalog input {
            width: 100%;
            min-width: 0;
            text-align: center;
            font-size: 18px;
            font-weight: 800;
            color: #5b2294;
        }
        .catalog-line-total {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 4px;
            font-size: 12px;
            line-height: 1.3;
            color: #7a7188;
        }
        .catalog-line-total strong {
            color: #1c1526;
            font-size: 15px;
            font-weight: 800;
        }

        /* Корзина — построчно и понятнее */
        .cart-sheet {
            background: linear-gradient(180deg, #ffffff 0%, #fbf9fd 100%);
            border-radius: 24px 24px 0 0;
        }
        .cart-drag-zone {
            background: #fff;
        }
        .cart-sheet-header h3 {
            font-size: 20px;
            line-height: 1.15;
            margin: 0;
        }
        .cart-subtitle {
            font-size: 12px;
            color: #7b7188;
        }
        .cart-item {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 14px 0;
            border-bottom: 1px solid #eee8f4;
        }
        .cart-item-top,
        .cart-item-bottom {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
        }
        .cart-item-top .item-main {
            min-width: 0;
            flex: 1 1 auto;
        }
        .cart-item .item-name {
            display: block;
            font-size: 15px;
            font-weight: 700;
            line-height: 1.35;
            color: #1d1626;
            margin: 0;
        }
        .cart-item .item-meta,
        .cart-item .item-unit {
            font-size: 12px;
            line-height: 1.4;
            color: #867c93;
        }
        .cart-item .item-price {
            flex-shrink: 0;
            font-size: 16px;
            font-weight: 800;
            line-height: 1.2;
            color: #17111f;
            white-space: nowrap;
            text-align: right;
        }
        .cart-item .item-qty {
            margin-left: auto;
            display: grid;
            grid-template-columns: 36px 48px 36px;
            gap: 6px;
            align-items: center;
            padding: 4px;
            border-radius: 14px;
            background: #f7f3fb;
            border: 1px solid #ece5f5;
        }
        .cart-item .item-qty button {
            width: 36px;
            min-width: 36px;
            height: 36px;
            min-height: 36px;
            border: none;
            border-radius: 12px;
            background: #fff;
            font-size: 20px;
            color: #3c3150;
            box-shadow: 0 2px 8px rgba(15, 11, 22, 0.05);
        }
        .cart-item .item-qty input {
            width: 48px;
            min-width: 48px;
            text-align: center;
            border: none;
            background: transparent;
            font-size: 16px;
            font-weight: 800;
            color: #5b2294;
        }
        .cart-total {
            padding: 16px 0 14px;
            border-top: 1px solid #eee8f4;
            border-bottom: 1px solid #eee8f4;
        }
        .cart-total span:first-child {
            font-size: 14px;
            font-weight: 650;
            color: #695f76;
        }
        .cart-total span:last-child {
            font-size: 22px;
            font-weight: 800;
            color: #17111f;
        }
        .order-form {
            background: #fff;
            border-radius: 18px;
            border: 1px solid #efe9f5;
            box-shadow: 0 8px 20px rgba(24, 18, 36, 0.04);
        }
        .order-form-head h4,
        .detail-name {
            color: #1c1526;
        }
        .form-group label,
        .order-form-note {
            color: #736a80;
        }

        /* Карточка товара — аккуратнее и современнее */
        .product-modal .modal-content {
            background: linear-gradient(180deg, #ffffff 0%, #fcfbfd 100%);
            border-radius: 26px;
            box-shadow: 0 30px 80px rgba(18, 12, 26, 0.24);
        }
        .product-modal .modal-content .product-detail-image {
            position: relative;
            background: linear-gradient(180deg, #f6f4f8 0%, #efedf3 100%);
            border-radius: 22px;
            overflow: hidden;
        }
        .detail-image-meta {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin: 10px 0 14px;
        }
        .detail-image-counter {
            position: static;
            background: transparent;
            color: #81768f;
            padding: 0;
            font-size: 12px;
            font-weight: 650;
        }
        .detail-slider {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            margin: 0;
        }
        .detail-image-nav {
            width: 40px;
            height: 40px;
            font-size: 22px;
        }
        .product-modal .modal-content .detail-name {
            font-size: 24px;
            font-weight: 800;
            line-height: 1.18;
            letter-spacing: -0.03em;
            margin-bottom: 8px;
        }
        .product-modal .modal-content .detail-description {
            font-size: 14px;
            line-height: 1.6;
            color: #62596f;
        }
        .detail-footer-bar {
            background: rgba(255,255,255,0.98);
            border-top: 1px solid #eee8f4;
        }
        .product-modal .modal-content .detail-price {
            font-size: 24px;
            font-weight: 800;
            color: #17111f;
        }
        .product-modal .modal-content .detail-price::before {
            color: #867c93;
        }
        .detail-cart-controls .qty-control {
            background: #f6f2fb;
            border: 1px solid #ece5f5;
            border-radius: 18px;
        }
        .detail-cart-controls .qty-control button {
            border-radius: 14px;
        }
        .detail-cart-controls .add-btn {
            border-radius: 16px;
            background: linear-gradient(180deg, #7a35c7 0%, #6726AB 100%);
        }

        @media (max-width: 720px) {
            .product-grid { gap: 12px; }
            .product-card .info { padding: 12px 12px 9px; }
            .product-card .cart-controls { padding: 0 12px 12px; }
            .product-card .info .name { font-size: 14px; }
            .product-card .info .description { font-size: 12px; }
            .product-card .info .price { font-size: 19px; }
            .product-card .cart-controls .qty-control.qty-control--catalog {
                grid-template-columns: 42px minmax(0, 1fr) 42px;
            }
            .product-card .cart-controls .qty-control.qty-control--catalog button {
                width: 42px; min-width: 42px; height: 42px; min-height: 42px;
            }
            .catalog-line-total strong { font-size: 14px; }
            .cart-item-top, .cart-item-bottom { gap: 8px; }
            .cart-item .item-name { font-size: 14px; }
            .cart-item .item-price { font-size: 15px; }
            .cart-item .item-qty { grid-template-columns: 34px 44px 34px; }
            .cart-item .item-qty button { width: 34px; min-width: 34px; height: 34px; min-height: 34px; }
            .cart-item .item-qty input { width: 44px; min-width: 44px; font-size: 15px; }
            .view-header .title { font-size: 18px; }
            .detail-image-nav { width: 36px; height: 36px; }
        }


        /* ============================================================
           ДОРАБОТКИ V9 — лаконичный каталог, drag-карусели и типографика
           ============================================================ */
        :root {
            --bg-page: #f6f4f8;
            --bg-card: #ffffff;
            --bg-soft: #f3f0f6;
            --stroke-soft: rgba(34, 24, 46, 0.08);
            --text-main: #1d1725;
            --text-muted: #776f84;
            --text-soft: #91889d;
            --accent: #6d2bb6;
            --accent-dark: #582193;
            --shadow-card: 0 10px 30px rgba(22, 16, 31, 0.05);
        }
        body { background: var(--bg-page); color: var(--text-main); }
        .container { padding-top: 10px; }

        /* Главный информационный блок ещё спокойнее */
        .view-header { margin-bottom: 6px; }
        .view-header .title {
            font-size: clamp(18px, 1.8vw, 24px);
            font-weight: 800;
            letter-spacing: -0.03em;
            line-height: 1.12;
        }
        .view-header .meta { margin-top: 6px; }
        .view-header .meta-chip {
            background: #fff;
            border: 1px solid rgba(109,43,182,0.10);
            color: var(--text-muted);
            box-shadow: none;
            font-size: 11px;
            padding: 6px 10px;
        }
        .view-header .meta-chip-back { color: var(--accent); }

        /* Разделы */
        .category-card {
            border-radius: 18px;
            border: 1px solid rgba(34,24,46,0.08);
            box-shadow: var(--shadow-card);
        }
        .category-card .category-label {
            font-size: 20px;
            font-weight: 800;
            letter-spacing: -0.025em;
        }
        .category-card .category-label small {
            font-size: 12px;
            line-height: 1.35;
        }

        /* Каталог как в аккуратном маркетплейсе */
        .product-grid { gap: 16px; }
        .product-card {
            border-radius: 18px;
            background: var(--bg-card);
            border: 1px solid var(--stroke-soft);
            box-shadow: var(--shadow-card);
            overflow: hidden;
        }
        .product-card .image-wrap {
            aspect-ratio: 1 / 1.16;
            background: linear-gradient(180deg, #f5f3f7 0%, #efecf2 100%);
        }
        .product-card .image-wrap::after { height: 26px; }
        .slider-container,
        .detail-swipe-track {
            position: relative;
            width: 100%;
            height: 100%;
            touch-action: pan-y;
            cursor: grab;
            user-select: none;
            -webkit-user-select: none;
        }
        .slider-container:active,
        .detail-swipe-track:active { cursor: grabbing; }
        .slider-container img,
        .detail-swipe-track img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            transform: translateX(18px) scale(0.985);
            transition: opacity 0.22s ease, transform 0.22s ease;
            pointer-events: none;
        }
        .slider-container img.carousel-active,
        .detail-swipe-track img.carousel-active {
            opacity: 1;
            transform: translateX(0) scale(1);
            pointer-events: auto;
        }
        .product-card .image-wrap .slider-container img { object-fit: cover; }
        .detail-swipe-track img { object-fit: contain; }
        .image-nav,
        .detail-image-nav,
        .catalog-image-count { display: none !important; }
        .slider-dots {
            left: 50%;
            bottom: 9px;
            transform: translateX(-50%);
            display: flex;
            gap: 6px;
            z-index: 5;
        }
        .slider-dots .dot,
        .detail-slider .detail-dot {
            width: 6px;
            height: 6px;
            min-width: 6px;
            padding: 0;
            border: none;
            border-radius: 999px;
            background: rgba(255,255,255,0.58);
            transition: width 0.18s ease, background 0.18s ease;
        }
        .slider-dots .dot.active,
        .detail-slider .detail-dot.active { width: 16px; background: #fff; }

        .product-card .badge {
            top: 10px;
            left: 10px;
            padding: 5px 10px;
            border-radius: 999px;
            font-size: 10px;
            font-weight: 800;
            letter-spacing: 0.02em;
        }
        .product-card .info {
            padding: 10px 12px 8px;
            gap: 0;
        }
        .product-card .info .name {
            min-height: 0;
            margin-bottom: 4px;
            font-size: 15px;
            line-height: 1.3;
            font-weight: 750;
            letter-spacing: -0.02em;
            color: var(--text-main);
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .product-card .info .description {
            min-height: 0;
            margin-bottom: 8px;
            font-size: 12px;
            line-height: 1.42;
            color: var(--text-muted);
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .product-card .info .price-row {
            margin-top: 0;
            gap: 5px;
        }
        .product-card .info .price {
            font-size: 20px;
            font-weight: 800;
            letter-spacing: -0.03em;
            line-height: 1;
        }
        .product-card .info .currency-label {
            font-size: 11px;
            font-weight: 700;
            color: var(--text-soft);
        }
        .product-card .cart-controls {
            padding: 0 12px 12px;
        }
        .product-card .cart-controls .add-btn {
            width: 100%;
            min-height: 42px;
            border-radius: 14px;
            background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
            font-size: 14px;
            font-weight: 750;
            box-shadow: 0 8px 18px rgba(109,43,182,0.16);
        }
        .catalog-cart-state {
            display: grid;
            gap: 7px;
        }
        .product-card .cart-controls .qty-control.qty-control--catalog {
            width: 100%;
            display: grid;
            grid-template-columns: 42px minmax(0, 1fr) 42px;
            align-items: center;
            gap: 8px;
            padding: 5px;
            border-radius: 14px;
            background: #f6f2fb;
            border: 1px solid #ece5f5;
        }
        .product-card .cart-controls .qty-control.qty-control--catalog button {
            width: 42px;
            min-width: 42px;
            height: 42px;
            min-height: 42px;
            border-radius: 12px;
            background: #fff;
            color: #403351;
            font-size: 22px;
            box-shadow: 0 2px 8px rgba(22,16,31,0.05);
        }
        .product-card .cart-controls .qty-control.qty-control--catalog input {
            width: 100%;
            min-width: 0;
            text-align: center;
            font-size: 17px;
            font-weight: 800;
            color: var(--accent-dark);
        }
        .catalog-line-total {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 0 2px;
            font-size: 11px;
            line-height: 1.3;
            color: var(--text-muted);
        }
        .catalog-line-total strong {
            font-size: 14px;
            font-weight: 800;
            color: var(--text-main);
            white-space: nowrap;
        }

        /* Корзина */
        .cart-sheet {
            background: linear-gradient(180deg, #ffffff 0%, #fcfbfd 100%);
            border-radius: 22px 22px 0 0;
        }
        .cart-drag-zone {
            background: rgba(255,255,255,0.98);
            backdrop-filter: blur(10px);
        }
        .cart-sheet-header {
            margin-bottom: 8px;
            align-items: center;
        }
        .cart-sheet .cart-drag-zone h3 {
            font-size: 19px;
            font-weight: 800;
            line-height: 1.15;
        }
        .cart-subtitle {
            font-size: 12px;
            line-height: 1.35;
            color: var(--text-muted);
        }
        .cart-close-btn {
            width: 34px;
            height: 34px;
            background: #f3eff7;
            color: #4a3a5e;
        }
        .cart-item {
            display: flex;
            flex-direction: column;
            gap: 7px;
            padding: 13px 0;
            border-bottom: 1px solid #eee8f4;
        }
        .cart-item-top,
        .cart-item-bottom {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 10px;
        }
        .cart-item .item-main { min-width: 0; flex: 1; }
        .cart-item .item-name {
            display: block;
            font-size: 14px;
            font-weight: 750;
            line-height: 1.32;
            color: var(--text-main);
            margin: 0 0 2px;
        }
        .cart-item .item-meta,
        .cart-item .item-unit {
            font-size: 11px;
            line-height: 1.35;
            color: var(--text-soft);
        }
        .cart-item .item-price {
            flex-shrink: 0;
            font-size: 15px;
            font-weight: 800;
            line-height: 1.2;
            color: var(--text-main);
            white-space: nowrap;
            text-align: right;
        }
        .cart-item .item-qty {
            margin-left: auto;
            display: grid;
            grid-template-columns: 34px 44px 34px;
            gap: 6px;
            align-items: center;
            padding: 4px;
            border-radius: 13px;
            background: #f7f3fb;
            border: 1px solid #ece5f5;
        }
        .cart-item .item-qty button {
            width: 34px;
            min-width: 34px;
            height: 34px;
            min-height: 34px;
            border: none;
            border-radius: 11px;
            background: #fff;
            color: #403351;
            font-size: 19px;
            box-shadow: 0 2px 7px rgba(22,16,31,0.05);
        }
        .cart-item .item-qty input {
            width: 44px;
            min-width: 44px;
            border: none;
            background: transparent;
            text-align: center;
            font-size: 15px;
            font-weight: 800;
            color: var(--accent-dark);
        }
        .cart-total {
            padding: 14px 0 12px;
            margin-top: 2px;
        }
        .cart-total span:first-child {
            font-size: 13px;
            font-weight: 650;
            color: var(--text-muted);
        }
        .cart-total span:last-child {
            font-size: 21px;
            font-weight: 800;
            color: var(--text-main);
        }

        /* Контактные данные в корзине */
        .order-form {
            margin-top: 14px;
            padding: 14px;
            background: #fff;
            border: 1px solid #eee8f4;
            border-radius: 18px;
            box-shadow: 0 8px 18px rgba(22,16,31,0.035);
        }
        .order-form-head,
        .order-form-kicker,
        .order-form-note { display: none !important; }
        .form-group {
            margin-bottom: 10px;
            display: flex;
            flex-direction: column;
            gap: 5px;
        }
        .form-group label {
            font-size: 12px;
            font-weight: 700;
            line-height: 1.2;
            color: #5c516a;
        }
        .cart-sheet .order-form input,
        .cart-sheet .order-form select {
            width: 100%;
            height: 42px;
            margin: 0;
            padding: 0 12px;
            border-radius: 12px;
            border: 1px solid #e7dfef;
            background: #fbfafe;
            font-size: 14px;
            color: var(--text-main);
            box-sizing: border-box;
        }
        .cart-sheet .order-form .phone-row {
            display: grid;
            grid-template-columns: 104px 1fr;
            gap: 8px;
            align-items: center;
        }
        .cart-sheet .order-form .phone-row input,
        .cart-sheet .order-form .phone-row select { margin: 0; }
        .cart-sheet .order-form .submit-btn {
            width: 100%;
            margin-top: 4px;
            min-height: 44px;
            border-radius: 14px;
            background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
            font-size: 14px;
            font-weight: 750;
        }

        /* Модалка товара */
        .product-modal .modal-content {
            background: linear-gradient(180deg, #ffffff 0%, #fcfbfd 100%);
            border-radius: 24px;
        }
        .product-modal .modal-content .close-btn {
            width: 36px;
            height: 36px;
            background: rgba(255,255,255,0.96);
        }
        .product-modal .modal-content .product-detail-image {
            border-radius: 20px;
            background: linear-gradient(180deg, #f5f3f7 0%, #efecf2 100%);
        }
        .detail-image-meta {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin: 9px 0 12px;
        }
        .detail-image-counter {
            position: static;
            background: transparent;
            color: var(--text-soft);
            padding: 0;
            font-size: 12px;
            font-weight: 650;
        }
        .product-modal .modal-content .detail-name {
            font-size: 22px;
            font-weight: 800;
            letter-spacing: -0.03em;
            line-height: 1.16;
            margin-bottom: 8px;
            color: var(--text-main);
        }
        .product-modal .modal-content .detail-description {
            font-size: 14px;
            line-height: 1.56;
            color: #62596f;
            margin-bottom: 12px;
        }
        .detail-footer-bar {
            background: rgba(255,255,255,0.98);
            border-top: 1px solid #eee8f4;
            box-shadow: 0 -8px 24px rgba(0,0,0,0.05);
        }
        .product-modal .modal-content .detail-price {
            font-size: 23px;
            font-weight: 800;
            color: var(--text-main);
        }
        .product-modal .modal-content .detail-price::before {
            color: var(--text-soft);
            font-size: 11px;
        }
        .detail-cart-controls .qty-control {
            background: #f6f2fb;
            border: 1px solid #ece5f5;
            border-radius: 16px;
        }
        .detail-cart-controls .qty-control button {
            border-radius: 12px;
        }
        .detail-cart-controls .add-btn {
            border-radius: 14px;
            background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
        }

        @media (max-width: 720px) {
            .product-grid { gap: 12px; }
            .product-card .image-wrap { aspect-ratio: 1 / 1.12; }
            .product-card .info { padding: 9px 10px 7px; }
            .product-card .cart-controls { padding: 0 10px 10px; }
            .product-card .info .name { font-size: 14px; }
            .product-card .info .description { font-size: 11px; margin-bottom: 7px; }
            .product-card .info .price { font-size: 18px; }
            .product-card .cart-controls .qty-control.qty-control--catalog {
                grid-template-columns: 40px minmax(0, 1fr) 40px;
            }
            .product-card .cart-controls .qty-control.qty-control--catalog button {
                width: 40px; min-width: 40px; height: 40px; min-height: 40px;
            }
            .cart-sheet .order-form .phone-row { grid-template-columns: 96px 1fr; }
            .product-modal .modal-content { border-radius: 22px 22px 0 0; }
            .product-modal .modal-content .detail-name { font-size: 20px; }
            .product-modal .modal-content .detail-price { font-size: 21px; }
        }


        /* ============================================================
           ДОРАБОТКИ V10 — 3:4 фото и компактное количество
           ============================================================ */
        .product-card .image-wrap {
            aspect-ratio: 3 / 4 !important;
            width: 100%;
            height: auto;
            overflow: hidden;
        }
        .product-card .image-wrap .slider-container {
            width: 100%;
            height: 100%;
            overflow: hidden;
            touch-action: pan-y;
        }
        .product-card .image-wrap .slider-container img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            max-width: none;
            max-height: none;
            -webkit-user-drag: none;
            user-select: none;
        }
        .product-card .image-wrap.dragging,
        .product-card .image-wrap:active {
            cursor: grabbing;
        }
        .product-card .slider-dots {
            bottom: 8px;
        }

        /* После добавления в корзину блок количества ниже и компактнее */
        .catalog-cart-state {
            gap: 4px;
        }
        .product-card .cart-controls .qty-control.qty-control--catalog {
            grid-template-columns: 34px minmax(0, 1fr) 34px;
            gap: 5px;
            min-height: 38px;
            padding: 3px 4px;
            border-radius: 12px;
        }
        .product-card .cart-controls .qty-control.qty-control--catalog button {
            width: 34px;
            min-width: 34px;
            height: 34px;
            min-height: 34px;
            border-radius: 10px;
            font-size: 19px;
            padding: 0;
        }
        .product-card .cart-controls .qty-control.qty-control--catalog input {
            height: 34px;
            padding: 0;
            font-size: 15px;
            line-height: 34px;
        }
        .catalog-line-total {
            min-height: 14px;
            padding: 0 2px;
            font-size: 10px;
            line-height: 1.2;
        }
        .catalog-line-total strong {
            font-size: 12px;
        }

        @media (max-width: 720px) {
            .product-card .image-wrap {
                aspect-ratio: 3 / 4 !important;
            }
            .product-card .cart-controls .qty-control.qty-control--catalog {
                grid-template-columns: 32px minmax(0, 1fr) 32px;
                min-height: 36px;
            }
            .product-card .cart-controls .qty-control.qty-control--catalog button {
                width: 32px;
                min-width: 32px;
                height: 32px;
                min-height: 32px;
                font-size: 18px;
            }
            .product-card .cart-controls .qty-control.qty-control--catalog input {
                height: 32px;
                line-height: 32px;
                font-size: 14px;
            }
        }


        /* ============================================================
           ДОРАБОТКИ V12 — desktop arrows / mobile swipe
           ============================================================ */
        .product-card .image-wrap {
            aspect-ratio: 3 / 4 !important;
            overflow: hidden;
        }
        .product-card .image-wrap .slider-container img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
        }
        .product-modal .product-detail-image {
            position: relative;
            overflow: hidden;
        }

        .carousel-arrow {
            position: absolute;
            top: 50%;
            z-index: 12;
            width: 38px;
            height: 38px;
            padding: 0;
            border: 1px solid rgba(32, 23, 43, 0.08);
            border-radius: 50%;
            background: rgba(255,255,255,0.92);
            color: #33253f;
            box-shadow: 0 7px 20px rgba(19, 13, 27, 0.13);
            backdrop-filter: blur(8px);
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: inherit;
            font-size: 25px;
            font-weight: 400;
            line-height: 1;
            cursor: pointer;
            opacity: 0;
            transform: translateY(-50%) scale(0.94);
            transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
        }
        .carousel-arrow.prev { left: 10px; }
        .carousel-arrow.next { right: 10px; }
        .image-wrap:hover .carousel-arrow,
        .product-detail-image:hover .carousel-arrow,
        .carousel-arrow:focus-visible {
            opacity: 1;
            transform: translateY(-50%) scale(1);
        }
        .carousel-arrow:hover {
            background: #fff;
            transform: translateY(-50%) scale(1.06);
        }
        .carousel-arrow:active {
            transform: translateY(-50%) scale(0.96);
        }

        /* На компьютере изображения меняются стрелками — drag отключён логикой JS. */
        @media (min-width: 768px) {
            .product-card .image-wrap,
            .product-modal .product-detail-image {
                touch-action: auto;
                cursor: default;
            }
        }

        /* На мобильном стрелок нет вообще — только свайп пальцем. */
        @media (max-width: 767px) {
            .carousel-arrow {
                display: none !important;
            }
            .product-card .image-wrap,
            .product-modal .product-detail-image {
                touch-action: pan-y;
                cursor: grab;
            }
            .product-card .image-wrap:active,
            .product-modal .product-detail-image:active {
                cursor: grabbing;
            }
        }


        /* ============================================================
           ДОРАБОТКИ V13 — исправление стрелок и слоёв при мобильном свайпе
           ============================================================ */
        .product-card .image-wrap {
            position: relative;
            isolation: isolate;
        }
        .product-card .image-wrap .slider-container {
            position: relative;
            z-index: 1;
        }
        .product-card .image-wrap .slider-container img {
            z-index: 1;
        }
        .product-card .image-wrap .slider-container img.carousel-active {
            z-index: 2;
        }
        .product-card .badge {
            position: absolute;
            z-index: 30 !important;
            pointer-events: none;
            transform: translateZ(0);
        }
        .product-card .slider-dots {
            z-index: 24 !important;
            pointer-events: auto;
        }
        .product-card .carousel-arrow {
            z-index: 26 !important;
            pointer-events: auto !important;
        }

        @media (min-width: 768px) {
            .product-card .carousel-arrow,
            .product-modal .carousel-arrow {
                display: flex !important;
            }
            .product-card .image-wrap:hover .carousel-arrow,
            .product-modal .product-detail-image:hover .carousel-arrow,
            .carousel-arrow:focus-visible {
                opacity: 1;
                visibility: visible;
            }
        }

        @media (max-width: 767px) {
            .product-card .carousel-arrow,
            .product-modal .carousel-arrow {
                display: none !important;
            }
            .product-card .badge {
                z-index: 40 !important;
            }
        }


        /* ============================================================
           ДОРАБОТКИ V14 — стабильное перелистывание в карточке товара
           ============================================================ */
        .product-modal .product-detail-image {
            position: relative;
            isolation: isolate;
        }
        .product-modal .detail-swipe-track {
            position: relative;
            z-index: 1;
            overflow: hidden;
        }
        .product-modal .detail-swipe-track img {
            z-index: 1;
            object-fit: contain;
            object-position: center;
        }
        .product-modal .detail-swipe-track img.carousel-active {
            z-index: 2;
        }
        .product-modal .carousel-arrow {
            z-index: 30 !important;
            pointer-events: auto !important;
        }
        .product-modal .carousel-arrow[hidden] {
            display: none !important;
        }
        .product-modal .detail-slider {
            position: relative;
            z-index: 5;
        }
        @media (min-width: 768px) {
            .product-modal .detail-arrow:not([hidden]) {
                display: flex !important;
            }
        }
        @media (max-width: 767px) {
            .product-modal .detail-arrow {
                display: none !important;
            }
            .product-modal .product-detail-image {
                touch-action: pan-y;
            }
        }


        /* ============================================================
           ДОРАБОТКИ V16 — убрать подрезание соседнего фото в модалке
           ============================================================ */
        .product-modal .modal-content {
            overflow: hidden;
        }
        .product-modal .product-detail-image {
            width: 100%;
            overflow: hidden !important;
            isolation: isolate;
        }
        .product-modal .detail-swipe-track {
            position: relative;
            width: 100%;
            height: 100%;
            overflow: hidden !important;
            contain: layout paint;
        }
        .product-modal .detail-swipe-track img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            transform: translateX(0) scale(0.985);
            backface-visibility: hidden;
            will-change: transform, opacity;
        }
        .product-modal .detail-swipe-track img.carousel-active {
            opacity: 1;
            transform: translateX(0) scale(1);
        }
        @media (min-width: 768px) {
            .product-modal .detail-swipe-track img {
                transform: translateX(0) scale(0.985);
            }
            .product-modal .detail-swipe-track img.carousel-active {
                transform: translateX(0) scale(1);
            }
        }


        /* ============================================================
           ДОРАБОТКИ V17 — вернуть вертикальный скролл карточки товара
           ============================================================ */
        .product-modal .modal-content {
            overflow-x: hidden !important;
            overflow-y: auto !important;
            overscroll-behavior: contain;
            -webkit-overflow-scrolling: touch;
        }

        /* Обрезаем соседние слайды только внутри фотогалереи */
        .product-modal .product-detail-image,
        .product-modal .detail-swipe-track {
            overflow: hidden !important;
        }


        /* ============================================================
           ДОРАБОТКИ V18 — нижняя зона корзины в карточке каталога
           ============================================================ */

        /* Нижняя зона становится частью карточки и подходит почти к краям */
        .product-card .cart-controls {
            width: auto !important;
            margin: auto 7px 7px !important;
            padding: 0 !important;
        }

        /* Кнопка "В корзину" и блок количества — одной ширины */
        .product-card .cart-controls .add-btn {
            width: 100% !important;
            min-height: 44px !important;
            margin: 0 !important;
            border-radius: 13px !important;
        }

        .product-card .catalog-cart-state {
            width: 100%;
            display: flex;
            flex-direction: column;
            gap: 7px !important;
            margin: 0;
            padding: 0;
        }

        /* Как в карточке товара: сначала сумма */
        .product-card .catalog-line-total {
            width: 100%;
            box-sizing: border-box;
            min-height: 24px;
            padding: 0 4px !important;
            margin: 0 !important;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            background: transparent !important;
            border: none !important;
            font-size: 11px !important;
            line-height: 1.25;
            color: #81778d;
        }

        .product-card .catalog-line-total strong {
            font-size: 15px !important;
            line-height: 1.15;
            font-weight: 800;
            letter-spacing: -0.015em;
            color: #1d1725;
            white-space: nowrap;
        }

        /* Потом широкий цельный контрол количества */
        .product-card .cart-controls .qty-control.qty-control--catalog {
            width: 100% !important;
            box-sizing: border-box;
            display: grid !important;
            grid-template-columns: 42px minmax(0, 1fr) 42px !important;
            gap: 6px !important;
            min-height: 46px !important;
            margin: 0 !important;
            padding: 3px !important;
            border-radius: 14px !important;
            background: #f4eff9 !important;
            border: 1px solid rgba(109, 43, 182, 0.10) !important;
        }

        .product-card .cart-controls .qty-control.qty-control--catalog button {
            width: 40px !important;
            min-width: 40px !important;
            height: 40px !important;
            min-height: 40px !important;
            padding: 0 !important;
            border-radius: 11px !important;
            background: #fff !important;
            color: #403250 !important;
            font-size: 21px !important;
            font-weight: 700 !important;
            box-shadow: 0 2px 7px rgba(27, 18, 39, 0.05) !important;
        }

        .product-card .cart-controls .qty-control.qty-control--catalog input {
            width: 100% !important;
            min-width: 0 !important;
            height: 40px !important;
            padding: 0 !important;
            border: none !important;
            background: transparent !important;
            text-align: center !important;
            font-size: 17px !important;
            line-height: 40px !important;
            font-weight: 800 !important;
            color: #6425a3 !important;
        }

        /* Чуть меньше пустоты между ценой и нижней зоной */
        .product-card .info {
            padding-bottom: 7px !important;
        }

        @media (max-width: 720px) {
            .product-card .cart-controls {
                margin: auto 5px 5px !important;
            }

            .product-card .catalog-cart-state {
                gap: 5px !important;
            }

            .product-card .catalog-line-total {
                min-height: 20px;
                padding: 0 3px !important;
                font-size: 10px !important;
            }

            .product-card .catalog-line-total strong {
                font-size: 13px !important;
            }

            .product-card .cart-controls .qty-control.qty-control--catalog {
                grid-template-columns: 38px minmax(0, 1fr) 38px !important;
                min-height: 42px !important;
                padding: 2px !important;
            }

            .product-card .cart-controls .qty-control.qty-control--catalog button {
                width: 36px !important;
                min-width: 36px !important;
                height: 36px !important;
                min-height: 36px !important;
                font-size: 19px !important;
            }

            .product-card .cart-controls .qty-control.qty-control--catalog input {
                height: 36px !important;
                line-height: 36px !important;
                font-size: 15px !important;
            }

            .product-card .cart-controls .add-btn {
                min-height: 42px !important;
            }
        }


        /* ============================================================
           ДОРАБОТКИ V19 — компактная нижняя часть карточки каталога
           ============================================================ */

        /* Отдельная строка суммы больше не используется */
        .product-card .catalog-line-total {
            display: none !important;
        }

        /* Итог по выбранному количеству показывается вместо обычной цены */
        .product-card .info .price.cart-total-price {
            color: #5e2399;
        }

        /* Чуть плотнее содержимое карточки */
        .product-card .info {
            padding-bottom: 5px !important;
        }

        .product-card .cart-controls {
            margin: auto 6px 6px !important;
        }

        .product-card .catalog-cart-state {
            gap: 0 !important;
        }

        .product-card .cart-controls .add-btn {
            min-height: 40px !important;
            height: 40px !important;
            border-radius: 12px !important;
            font-size: 13px !important;
        }

        .product-card .cart-controls .qty-control.qty-control--catalog {
            grid-template-columns: 36px minmax(0, 1fr) 36px !important;
            min-height: 40px !important;
            height: 40px !important;
            padding: 2px !important;
            gap: 5px !important;
            border-radius: 12px !important;
        }

        .product-card .cart-controls .qty-control.qty-control--catalog button {
            width: 34px !important;
            min-width: 34px !important;
            height: 34px !important;
            min-height: 34px !important;
            border-radius: 10px !important;
            font-size: 19px !important;
        }

        .product-card .cart-controls .qty-control.qty-control--catalog input {
            height: 34px !important;
            line-height: 34px !important;
            font-size: 15px !important;
        }

        @media (max-width: 720px) {
            .product-card .cart-controls {
                margin: auto 4px 4px !important;
            }

            .product-card .cart-controls .add-btn {
                min-height: 38px !important;
                height: 38px !important;
                font-size: 12px !important;
            }

            .product-card .cart-controls .qty-control.qty-control--catalog {
                grid-template-columns: 34px minmax(0, 1fr) 34px !important;
                min-height: 38px !important;
                height: 38px !important;
            }

            .product-card .cart-controls .qty-control.qty-control--catalog button {
                width: 32px !important;
                min-width: 32px !important;
                height: 32px !important;
                min-height: 32px !important;
                font-size: 18px !important;
            }

            .product-card .cart-controls .qty-control.qty-control--catalog input {
                height: 32px !important;
                line-height: 32px !important;
                font-size: 14px !important;
            }
        }


        /* ============================================================
           ДОРАБОТКИ V20 — новая компоновка товаров в корзине
           Контактные данные не изменяются.
           ============================================================ */

        /* Одна строка: товар | количество | сумма позиции */
        .cart-sheet #cartItemsList .cart-item {
            display: grid !important;
            grid-template-columns: minmax(0, 1fr) auto minmax(92px, auto) !important;
            align-items: center !important;
            column-gap: 18px !important;
            row-gap: 0 !important;
            padding: 15px 0 !important;
            border-bottom: 1px solid #eee8f4 !important;
        }

        .cart-sheet #cartItemsList .cart-item:last-child {
            border-bottom: none !important;
        }

        /* Слева: название и цена за штуку */
        .cart-sheet #cartItemsList .item-main {
            min-width: 0 !important;
            display: flex !important;
            flex-direction: column !important;
            justify-content: center !important;
            gap: 4px !important;
        }

        .cart-sheet #cartItemsList .item-name {
            display: block !important;
            margin: 0 !important;
            font-size: 16px !important;
            line-height: 1.25 !important;
            font-weight: 800 !important;
            letter-spacing: -0.015em !important;
            color: #1d1725 !important;
            overflow-wrap: anywhere;
        }

        .cart-sheet #cartItemsList .item-unit {
            display: block !important;
            margin: 0 !important;
            font-size: 12px !important;
            line-height: 1.25 !important;
            font-weight: 600 !important;
            color: #8c8397 !important;
            white-space: nowrap;
        }

        /* Артикул больше нигде не показываем */
        .cart-sheet #cartItemsList .item-meta {
            display: none !important;
        }

        /* По центру: управление количеством */
        .cart-sheet #cartItemsList .item-qty {
            margin: 0 !important;
            display: grid !important;
            grid-template-columns: 34px 42px 34px !important;
            gap: 5px !important;
            align-items: center !important;
            padding: 3px !important;
            border-radius: 13px !important;
            background: #f6f2fa !important;
            border: 1px solid #ebe4f3 !important;
        }

        .cart-sheet #cartItemsList .item-qty button {
            width: 34px !important;
            min-width: 34px !important;
            height: 34px !important;
            min-height: 34px !important;
            padding: 0 !important;
            border: none !important;
            border-radius: 10px !important;
            background: #fff !important;
            color: #403250 !important;
            font-size: 19px !important;
            line-height: 1 !important;
            font-weight: 700 !important;
            box-shadow: 0 2px 7px rgba(27, 18, 39, 0.05) !important;
        }

        .cart-sheet #cartItemsList .item-qty input {
            width: 42px !important;
            min-width: 42px !important;
            height: 34px !important;
            padding: 0 !important;
            border: none !important;
            background: transparent !important;
            text-align: center !important;
            font-size: 15px !important;
            line-height: 34px !important;
            font-weight: 800 !important;
            color: #6425a3 !important;
            outline: none !important;
        }

        /* Справа: сумма именно этой позиции */
        .cart-sheet #cartItemsList .item-price {
            min-width: 92px !important;
            margin: 0 !important;
            text-align: right !important;
            white-space: nowrap !important;
            font-size: 18px !important;
            line-height: 1.1 !important;
            font-weight: 850 !important;
            letter-spacing: -0.025em !important;
            color: #1b1423 !important;
        }

        /* Общий итог — отдельной строкой под всеми товарами */
        .cart-sheet .cart-total {
            display: flex !important;
            align-items: center !important;
            justify-content: space-between !important;
            gap: 16px !important;
            margin: 4px 0 0 !important;
            padding: 17px 2px 14px !important;
            border-top: 1px solid #e7dfef !important;
            border-bottom: 1px solid #eee8f4 !important;
        }

        .cart-sheet .cart-total span:first-child {
            font-size: 15px !important;
            line-height: 1.2 !important;
            font-weight: 750 !important;
            color: #54495f !important;
        }

        .cart-sheet .cart-total span:last-child {
            font-size: 24px !important;
            line-height: 1 !important;
            font-weight: 850 !important;
            letter-spacing: -0.03em !important;
            color: #1b1423 !important;
            white-space: nowrap !important;
        }

        /* На узком телефоне сохраняем ту же логику,
           но немного ужимаем центр и правую колонку */
        @media (max-width: 560px) {
            .cart-sheet #cartItemsList .cart-item {
                grid-template-columns: minmax(0, 1fr) auto minmax(74px, auto) !important;
                column-gap: 8px !important;
                padding: 13px 0 !important;
            }

            .cart-sheet #cartItemsList .item-name {
                font-size: 14px !important;
                line-height: 1.25 !important;
            }

            .cart-sheet #cartItemsList .item-unit {
                font-size: 10.5px !important;
            }

            .cart-sheet #cartItemsList .item-qty {
                grid-template-columns: 30px 34px 30px !important;
                gap: 3px !important;
                padding: 2px !important;
                border-radius: 11px !important;
            }

            .cart-sheet #cartItemsList .item-qty button {
                width: 30px !important;
                min-width: 30px !important;
                height: 30px !important;
                min-height: 30px !important;
                border-radius: 9px !important;
                font-size: 17px !important;
            }

            .cart-sheet #cartItemsList .item-qty input {
                width: 34px !important;
                min-width: 34px !important;
                height: 30px !important;
                line-height: 30px !important;
                font-size: 13px !important;
            }

            .cart-sheet #cartItemsList .item-price {
                min-width: 74px !important;
                font-size: 15px !important;
            }

            .cart-sheet .cart-total span:first-child {
                font-size: 14px !important;
            }

            .cart-sheet .cart-total span:last-child {
                font-size: 21px !important;
            }
        }


        /* ============================================================
           ДОРАБОТКИ V21 — шире количество + акцент на общем итоге
           ============================================================ */

        /* Чуть шире область "− количество +" */
        .cart-sheet #cartItemsList .item-qty {
            grid-template-columns: 38px 52px 38px !important;
            gap: 6px !important;
            padding: 4px !important;
        }

        .cart-sheet #cartItemsList .item-qty button {
            width: 38px !important;
            min-width: 38px !important;
            height: 36px !important;
            min-height: 36px !important;
        }

        .cart-sheet #cartItemsList .item-qty input {
            width: 52px !important;
            min-width: 52px !important;
            height: 36px !important;
            line-height: 36px !important;
        }

        /* Общий итог визуально отделён как самостоятельный блок */
        .cart-sheet .cart-total {
            margin: 10px 0 2px !important;
            padding: 14px 16px !important;
            border: 1px solid rgba(109, 43, 182, 0.10) !important;
            border-radius: 16px !important;
            background: linear-gradient(180deg, #faf7fd 0%, #f6f1fb 100%) !important;
            box-shadow: 0 7px 18px rgba(42, 25, 61, 0.045) !important;
        }

        .cart-sheet .cart-total span:first-child {
            color: #6b6077 !important;
            font-size: 14px !important;
            font-weight: 700 !important;
        }

        .cart-sheet .cart-total span:last-child {
            color: #4f1f82 !important;
            font-size: 23px !important;
            font-weight: 850 !important;
        }

        @media (max-width: 560px) {
            .cart-sheet #cartItemsList .item-qty {
                grid-template-columns: 32px 40px 32px !important;
                gap: 4px !important;
                padding: 3px !important;
            }

            .cart-sheet #cartItemsList .item-qty button {
                width: 32px !important;
                min-width: 32px !important;
                height: 31px !important;
                min-height: 31px !important;
            }

            .cart-sheet #cartItemsList .item-qty input {
                width: 40px !important;
                min-width: 40px !important;
                height: 31px !important;
                line-height: 31px !important;
            }

            .cart-sheet .cart-total {
                margin-top: 8px !important;
                padding: 13px 14px !important;
                border-radius: 14px !important;
            }

            .cart-sheet .cart-total span:last-child {
                font-size: 21px !important;
            }
        }


        /* ============================================================
           ДОРАБОТКИ V22 — длиннее, но не толще + крупнее текст корзины
           ============================================================ */

        /* Контрол количества: длиннее по горизонтали, высота снова компактная */
        .cart-sheet #cartItemsList .item-qty {
            grid-template-columns: 34px 66px 34px !important;
            gap: 8px !important;
            padding: 3px !important;
            min-height: 40px !important;
        }

        .cart-sheet #cartItemsList .item-qty button {
            width: 34px !important;
            min-width: 34px !important;
            height: 34px !important;
            min-height: 34px !important;
            font-size: 19px !important;
        }

        .cart-sheet #cartItemsList .item-qty input {
            width: 66px !important;
            min-width: 66px !important;
            height: 34px !important;
            line-height: 34px !important;
            font-size: 16px !important;
        }

        /* Название товара заметнее */
        .cart-sheet #cartItemsList .item-name {
            font-size: 17px !important;
            line-height: 1.25 !important;
            font-weight: 800 !important;
        }

        /* Цена за штуку остаётся вторичной */
        .cart-sheet #cartItemsList .item-unit {
            font-size: 12px !important;
            line-height: 1.3 !important;
        }

        /* Сумма позиции справа крупнее и визуально сильнее */
        .cart-sheet #cartItemsList .item-price {
            min-width: 108px !important;
            font-size: 20px !important;
            line-height: 1.05 !important;
            font-weight: 850 !important;
            letter-spacing: -0.03em !important;
        }

        /* Чуть больше места между тремя смысловыми колонками */
        .cart-sheet #cartItemsList .cart-item {
            grid-template-columns: minmax(0, 1fr) auto minmax(108px, auto) !important;
            column-gap: 20px !important;
        }

        @media (max-width: 560px) {
            .cart-sheet #cartItemsList .cart-item {
                grid-template-columns: minmax(0, 1fr) auto minmax(78px, auto) !important;
                column-gap: 7px !important;
            }

            .cart-sheet #cartItemsList .item-name {
                font-size: 14.5px !important;
            }

            .cart-sheet #cartItemsList .item-unit {
                font-size: 10.5px !important;
            }

            .cart-sheet #cartItemsList .item-qty {
                grid-template-columns: 30px 44px 30px !important;
                gap: 4px !important;
                padding: 2px !important;
                min-height: 34px !important;
            }

            .cart-sheet #cartItemsList .item-qty button {
                width: 30px !important;
                min-width: 30px !important;
                height: 30px !important;
                min-height: 30px !important;
                font-size: 17px !important;
            }

            .cart-sheet #cartItemsList .item-qty input {
                width: 44px !important;
                min-width: 44px !important;
                height: 30px !important;
                line-height: 30px !important;
                font-size: 14px !important;
            }

            .cart-sheet #cartItemsList .item-price {
                min-width: 78px !important;
                font-size: 16px !important;
            }
        }


        /* ============================================================
           ДОРАБОТКИ V23 — код страны и поле телефона
           ============================================================ */

        .cart-sheet .order-form .phone-row {
            display: grid !important;
            grid-template-columns: 102px minmax(0, 1fr) !important;
            gap: 8px !important;
            align-items: center !important;
            width: 100% !important;
        }

        /* Важное: обе колонки могут реально ужиматься и не налезают друг на друга */
        .cart-sheet .order-form .phone-row > * {
            min-width: 0 !important;
        }

        .cart-sheet .order-form .phone-code-wrap {
            position: relative;
            width: 100%;
            min-width: 0;
        }

        .cart-sheet .order-form .phone-code-wrap select {
            width: 100% !important;
            min-width: 0 !important;
            height: 42px !important;
            margin: 0 !important;
            padding: 0 29px 0 10px !important;
            box-sizing: border-box !important;
            appearance: none !important;
            -webkit-appearance: none !important;
            -moz-appearance: none !important;
            background-image: none !important;
            cursor: pointer;
            font-size: 13px !important;
            font-weight: 650 !important;
        }

        /* Собственная стрелка — ближе к содержимому и не у самого края */
        .cart-sheet .order-form .phone-code-arrow {
            position: absolute;
            top: 50%;
            right: 10px;
            transform: translateY(-56%);
            z-index: 2;
            pointer-events: none;
            color: #756a82;
            font-size: 16px;
            line-height: 1;
            font-weight: 700;
        }

        .cart-sheet .order-form .phone-row #userPhone {
            width: 100% !important;
            min-width: 0 !important;
            margin: 0 !important;
            box-sizing: border-box !important;
        }

        @media (max-width: 560px) {
            .cart-sheet .order-form .phone-row {
                grid-template-columns: 94px minmax(0, 1fr) !important;
                gap: 7px !important;
            }

            .cart-sheet .order-form .phone-code-wrap select {
                padding-left: 8px !important;
                padding-right: 25px !important;
                font-size: 12px !important;
            }

            .cart-sheet .order-form .phone-code-arrow {
                right: 8px;
                font-size: 15px;
            }

            .cart-sheet .order-form .phone-row #userPhone {
                padding-left: 10px !important;
                padding-right: 10px !important;
            }
        }

        @media (max-width: 380px) {
            .cart-sheet .order-form .phone-row {
                grid-template-columns: 90px minmax(0, 1fr) !important;
                gap: 6px !important;
            }
        }


        /* ============================================================
           ДОРАБОТКИ V24 — флаг, код страны и стрелка
           ============================================================ */

        .cart-sheet .order-form .phone-row {
            grid-template-columns: 112px minmax(0, 1fr) !important;
        }

        .cart-sheet .order-form .phone-code-wrap select {
            font-size: 15px !important;
            font-weight: 700 !important;
            padding-left: 11px !important;
            padding-right: 34px !important;
            letter-spacing: -0.01em;
        }

        .cart-sheet .order-form .phone-code-arrow {
            right: 12px !important;
            font-size: 16px !important;
            color: #685d75 !important;
            transform: translateY(-54%) !important;
        }

        @media (max-width: 560px) {
            .cart-sheet .order-form .phone-row {
                grid-template-columns: 104px minmax(0, 1fr) !important;
                gap: 7px !important;
            }

            .cart-sheet .order-form .phone-code-wrap select {
                font-size: 14px !important;
                padding-left: 9px !important;
                padding-right: 30px !important;
            }

            .cart-sheet .order-form .phone-code-arrow {
                right: 10px !important;
                font-size: 15px !important;
            }
        }

        @media (max-width: 380px) {
            .cart-sheet .order-form .phone-row {
                grid-template-columns: 100px minmax(0, 1fr) !important;
            }
        }


        /* ============================================================
           ДОРАБОТКИ V25 — точное вертикальное выравнивание стрелки
           ============================================================ */

        .cart-sheet .order-form .phone-code-arrow {
            top: 50% !important;
            transform: translateY(-50%) !important;
            line-height: 1 !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
        }


        /* ============================================================
           ДОРАБОТКИ V26 — оптическое выравнивание стрелки кода страны
           ============================================================ */

        .cart-sheet .order-form .phone-code-arrow {
            top: 46% !important;
            right: 12px !important;
            width: 8px !important;
            height: 8px !important;
            font-size: 0 !important;
            line-height: 0 !important;
            display: block !important;
            border-right: 2px solid #685d75 !important;
            border-bottom: 2px solid #685d75 !important;
            transform: translateY(-50%) rotate(45deg) !important;
            transform-origin: center !important;
        }

        @media (max-width: 560px) {
            .cart-sheet .order-form .phone-code-arrow {
                top: 46% !important;
                right: 10px !important;
                width: 7px !important;
                height: 7px !important;
                border-right-width: 1.8px !important;
                border-bottom-width: 1.8px !important;
            }
        }


        /* ============================================================
           ДОРАБОТКИ V28 — выравнивание товаров по блоку контактов
           ============================================================ */

        /* Список товаров получает такой же внутренний горизонтальный ритм,
           как карточка "Контактные данные" */
        .cart-sheet #cartItemsList {
            box-sizing: border-box;
            padding-left: 14px !important;
            padding-right: 14px !important;
        }

        /* Общий итог выравниваем по тем же краям */
        .cart-sheet .cart-total {
            margin-left: 14px !important;
            margin-right: 14px !important;
            width: auto !important;
            box-sizing: border-box !important;
        }

        /* Заголовок корзины также чуть подравниваем визуально */
        .cart-sheet .cart-sheet-header {
            padding-left: 14px;
            padding-right: 14px;
            box-sizing: border-box;
        }

        @media (max-width: 560px) {
            .cart-sheet #cartItemsList {
                padding-left: 12px !important;
                padding-right: 12px !important;
            }

            .cart-sheet .cart-total {
                margin-left: 12px !important;
                margin-right: 12px !important;
            }

            .cart-sheet .cart-sheet-header {
                padding-left: 12px;
                padding-right: 12px;
            }
        }


        /* ============================================================
           ДОРАБОТКИ V29 — единая ширина всех блоков корзины
           ============================================================ */

        /*
           Внешние края:
           товары = Итого = Контактные данные.
           Внутренние отступы делаем уже внутри каждого блока.
        */

        .cart-sheet #cartItemsList {
            width: 100% !important;
            padding-left: 0 !important;
            padding-right: 0 !important;
            margin-left: 0 !important;
            margin-right: 0 !important;
            box-sizing: border-box !important;
        }

        .cart-sheet #cartItemsList .cart-item {
            width: 100% !important;
            box-sizing: border-box !important;
            padding-left: 14px !important;
            padding-right: 14px !important;
        }

        /* Итого снова на полную ширину — как Контактные данные */
        .cart-sheet .cart-total {
            width: 100% !important;
            margin-left: 0 !important;
            margin-right: 0 !important;
            box-sizing: border-box !important;
            padding-left: 14px !important;
            padding-right: 14px !important;
        }

        /* Форма контактов — та же внешняя ширина */
        .cart-sheet .order-form {
            width: 100% !important;
            margin-left: 0 !important;
            margin-right: 0 !important;
            box-sizing: border-box !important;
        }

        /* Заголовок не сужаем дополнительно */
        .cart-sheet .cart-sheet-header {
            padding-left: 0 !important;
            padding-right: 0 !important;
        }

        @media (max-width: 560px) {
            .cart-sheet #cartItemsList {
                padding-left: 0 !important;
                padding-right: 0 !important;
            }

            .cart-sheet #cartItemsList .cart-item {
                padding-left: 12px !important;
                padding-right: 12px !important;
            }

            .cart-sheet .cart-total {
                margin-left: 0 !important;
                margin-right: 0 !important;
                padding-left: 12px !important;
                padding-right: 12px !important;
            }

            .cart-sheet .cart-sheet-header {
                padding-left: 0 !important;
                padding-right: 0 !important;
            }
        }


        /* ============================================================
           ДОРАБОТКИ V32 — favicon / nav / mobile gallery / modal UX
           ============================================================ */

        /* Логотип теперь кликабельный, но выглядит как раньше */
        .header .logo-home-btn {
            appearance: none;
            -webkit-appearance: none;
            border: 0;
            background: transparent;
            padding: 4px 0;
            margin: 0;
            font-family: inherit;
            font-weight: 800;
            font-size: 17px;
            line-height: 1.15;
            letter-spacing: -0.02em;
            color: #17121e;
            cursor: pointer;
            text-align: left;
        }
        .header .logo-home-btn:hover {
            color: #6726AB;
        }

        /* Крошки чуть крупнее, свободнее и современнее */
        .breadcrumb {
            padding: 10px 20px 8px !important;
            font-size: 14px !important;
            line-height: 1.35 !important;
            letter-spacing: -0.005em;
        }
        .breadcrumb span {
            display: inline-block;
            padding: 2px 1px;
        }
        .breadcrumb .current {
            font-weight: 650 !important;
        }
        .breadcrumb .clickable {
            font-weight: 600;
            text-decoration-thickness: 1px;
            text-underline-offset: 3px;
        }
        @media (min-width: 900px) {
            .breadcrumb {
                padding-left: 28px !important;
                padding-right: 28px !important;
                font-size: 15px !important;
            }
        }

        /* Фон за открытым товаром — светлый, а не чёрный */
        .product-modal {
            background: rgba(250, 249, 252, 0.90) !important;
            backdrop-filter: blur(8px) saturate(0.85) !important;
            -webkit-backdrop-filter: blur(8px) saturate(0.85) !important;
        }

        /* Свайп вниз: визуальная подсказка на телефоне */
        @media (max-width: 767px) {
            .product-modal .modal-content {
                position: relative;
                padding-top: 22px !important;
                will-change: transform;
            }
            .product-modal .modal-content::before {
                content: '';
                position: absolute;
                top: 7px;
                left: 50%;
                transform: translateX(-50%);
                width: 48px;
                height: 5px;
                border-radius: 999px;
                background: #d9d2df;
                z-index: 30;
                pointer-events: none;
            }
        }

        /*
           Мобильные изображения: настоящий нативный scroll-snap.
           Никаких вычислений направления свайпа — браузер сам одинаково
           корректно листает вправо и влево.
        */
        @media (max-width: 767px) {
            .product-card .image-wrap .slider-container,
            .product-modal .detail-swipe-track {
                display: flex !important;
                flex-direction: row !important;
                flex-wrap: nowrap !important;
                width: 100% !important;
                height: 100% !important;
                gap: 0 !important;
                padding: 0 !important;
                overflow-x: auto !important;
                overflow-y: hidden !important;
                scroll-snap-type: x mandatory !important;
                scroll-behavior: smooth;
                scroll-padding: 0 !important;
                overscroll-behavior-x: contain;
                -webkit-overflow-scrolling: touch;
                touch-action: pan-x pan-y !important;
                scrollbar-width: none;
            }

            .product-card .image-wrap .slider-container::-webkit-scrollbar,
            .product-modal .detail-swipe-track::-webkit-scrollbar {
                display: none;
            }

            .product-card .image-wrap .slider-container img,
            .product-modal .detail-swipe-track img,
            .product-card .image-wrap .slider-container img.carousel-active,
            .product-modal .detail-swipe-track img.carousel-active {
                position: relative !important;
                inset: auto !important;
                flex: 0 0 100% !important;
                width: 100% !important;
                min-width: 100% !important;
                max-width: 100% !important;
                height: 100% !important;
                opacity: 1 !important;
                transform: none !important;
                transition: none !important;
                scroll-snap-align: start !important;
                scroll-snap-stop: always;
                pointer-events: auto !important;
                border-radius: 0 !important;
                margin: 0 !important;
            }

            .product-card .image-wrap .slider-container img {
                object-fit: cover !important;
                object-position: center !important;
            }

            .product-modal .detail-swipe-track img {
                object-fit: contain !important;
                object-position: center !important;
            }

            .product-card .carousel-arrow,
            .product-modal .carousel-arrow {
                display: none !important;
            }
        }
/* ============================================================
   V33 — ЛИЧНЫЙ КАБИНЕТ / SUPABASE AUTH
   ============================================================ */

body.account-open {
    overflow: hidden;
}

.bottom-nav .account-nav-icon {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
}

.bottom-nav .account-nav-icon svg {
    display: block;
}

.account-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(28, 20, 34, .20);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
    z-index: 1180;
}

.account-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.account-sheet {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(520px, 100%);
    background: #fff;
    z-index: 1190;
    transform: translateX(105%);
    transition: transform .28s cubic-bezier(.2,.8,.2,1);
    box-shadow: -18px 0 60px rgba(39, 22, 50, .14);
    display: flex;
    flex-direction: column;
}

.account-sheet.open {
    transform: translateX(0);
}

.account-sheet-header {
    min-height: 72px;
    padding: 16px 18px;
    border-bottom: 1px solid #eee9f1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(255,255,255,.96);
}

.account-sheet-header h3 {
    margin: 2px 0 0;
    font-size: 21px;
    line-height: 1.15;
    color: #1c1522;
}

.account-kicker {
    color: #6726AB;
    font-weight: 800;
    font-size: 10px;
    letter-spacing: .12em;
}

.account-close-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #e8e1ec;
    background: #faf8fb;
    color: #332a39;
    font-size: 17px;
    cursor: pointer;
}

.account-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: #f5f1f7;
    margin-bottom: 16px;
}

.auth-tab {
    min-height: 42px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #716778;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.auth-tab.active {
    background: #fff;
    color: #6726AB;
    box-shadow: 0 2px 12px rgba(58, 32, 68, .08);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.account-intro {
    margin-bottom: 18px;
}

.account-intro-title {
    font-size: 20px;
    line-height: 1.2;
    font-weight: 800;
    color: #1d1722;
}

.account-intro-text {
    margin-top: 6px;
    color: #766d7b;
    font-size: 13px;
    line-height: 1.45;
}

.account-sheet .form-group {
    margin-bottom: 12px;
}

.account-sheet .form-group label {
    display: block;
    margin-bottom: 6px;
    color: #574e5d;
    font-size: 12px;
    font-weight: 700;
}

.account-sheet .form-group input {
    width: 100%;
    min-height: 46px;
    border: 1px solid #ded6e2;
    border-radius: 12px;
    background: #fff;
    padding: 0 13px;
    box-sizing: border-box;
    font: inherit;
    color: #211a26;
    outline: none;
}

.account-sheet .form-group input:focus {
    border-color: #8a55bd;
    box-shadow: 0 0 0 3px rgba(103, 38, 171, .10);
}

.account-primary-btn,
.account-secondary-btn,
.account-logout-btn {
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.account-primary-btn {
    border: 0;
    background: #6726AB;
    color: #fff;
    box-shadow: 0 8px 22px rgba(103, 38, 171, .18);
}

.account-primary-btn:disabled,
.account-secondary-btn:disabled {
    opacity: .58;
    cursor: wait;
}

.account-secondary-btn {
    border: 1px solid #d9cbe5;
    background: #f8f4fb;
    color: #6726AB;
}

.auth-helper {
    margin-top: 10px;
    text-align: center;
    color: #8a818f;
    font-size: 11px;
    line-height: 1.4;
}

.account-user-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 14px;
    border: 1px solid #ece5f0;
    border-radius: 16px;
    background: linear-gradient(135deg, #fbf8fd 0%, #fff 70%);
    margin-bottom: 14px;
}

.account-avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #6726AB;
    color: #fff;
    font-size: 20px;
    font-weight: 850;
}

.account-user-main {
    min-width: 0;
}

.account-user-name {
    color: #211a26;
    font-size: 15px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-user-email {
    margin-top: 3px;
    color: #817786;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-approved-badge {
    padding: 6px 8px;
    border-radius: 999px;
    background: #fff4de;
    color: #9a6514;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.account-approved-badge.approved {
    background: #eaf8ef;
    color: #267744;
}

.account-section {
    margin-top: 12px;
    border: 1px solid #ece6ef;
    border-radius: 16px;
    padding: 14px;
    background: #fff;
}

.account-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 13px;
}

.account-section-title {
    font-size: 15px;
    font-weight: 850;
    color: #241c29;
}

.account-section-subtitle {
    margin-top: 3px;
    color: #8a808e;
    font-size: 10px;
}

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

.term-card {
    min-height: 75px;
    padding: 11px;
    border-radius: 12px;
    background: #f8f5fa;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.term-card span {
    color: #8a808f;
    font-size: 10px;
    line-height: 1.2;
}

.term-card strong {
    color: #2b2130;
    font-size: 14px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.account-mini-btn {
    border: 1px solid #ded4e5;
    background: #faf7fb;
    color: #6726AB;
    border-radius: 9px;
    min-height: 30px;
    padding: 0 10px;
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.account-orders-list {
    display: grid;
    gap: 8px;
}

.account-order-card {
    padding: 12px;
    border: 1px solid #e8e1ec;
    border-radius: 13px;
    background: #fff;
}

.account-order-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.account-order-number {
    font-size: 13px;
    font-weight: 850;
    color: #2b2130;
}

.account-order-date {
    margin-top: 3px;
    color: #918795;
    font-size: 10px;
}

.account-order-status {
    padding: 5px 7px;
    border-radius: 999px;
    background: #f1edf4;
    color: #62586a;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.account-order-status.status-completed,
.account-order-status.status-ready {
    background: #eaf8ef;
    color: #267744;
}

.account-order-status.status-cancelled {
    background: #fdecec;
    color: #a33e3e;
}

.account-order-total {
    margin-top: 10px;
    font-size: 17px;
    font-weight: 850;
    color: #6726AB;
}

.account-empty,
.account-loading {
    padding: 18px 12px;
    text-align: center;
    border-radius: 12px;
    background: #f9f7fa;
    color: #817787;
    font-size: 11px;
    line-height: 1.45;
}

.account-empty-title {
    color: #33273a;
    font-size: 13px;
    font-weight: 850;
}

.account-empty-text {
    margin-top: 5px;
}

.account-error {
    color: #9e4141;
    background: #fff3f3;
}

.account-logout-btn {
    margin-top: 16px;
    border: 1px solid #eadfe7;
    background: #fff;
    color: #9b4059;
}

@media (max-width: 600px) {
    .account-sheet {
        top: 6vh;
        width: 100%;
        border-radius: 20px 20px 0 0;
        transform: translateY(105%);
        box-shadow: 0 -18px 50px rgba(39, 22, 50, .16);
    }

    .account-sheet.open {
        transform: translateY(0);
    }

    .account-sheet-header {
        min-height: 62px;
        padding: 12px 14px;
    }

    .account-scroll {
        padding: 14px;
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }

    .account-user-card {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .account-avatar {
        width: 42px;
        height: 42px;
    }

    .account-approved-badge {
        grid-column: 1 / -1;
        justify-self: start;
    }
}


/* ============================================================
   V35 — СОСТАВ ЗАКАЗА В ЛИЧНОМ КАБИНЕТЕ
   ============================================================ */

.account-order-card {
    overflow: hidden;
}

.account-order-toggle {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.account-order-bottom {
    margin-top: 10px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.account-order-open-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #776c7e;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.account-order-chevron {
    display: inline-block;
    font-size: 14px;
    line-height: 1;
    transition: transform .18s ease;
}

.account-order-card.open .account-order-chevron {
    transform: rotate(180deg);
}

.account-order-details {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee8f1;
}

.account-order-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 9px 0;
}

.account-order-item + .account-order-item {
    border-top: 1px solid #f1edf3;
}

.account-order-item-name {
    color: #2b2130;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
}

.account-order-item-meta {
    margin-top: 3px;
    color: #928897;
    font-size: 10px;
}

.account-order-item-total {
    color: #382d3e;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.account-order-no-items {
    padding: 8px 0 2px;
    color: #948a99;
    font-size: 10px;
}


/* ============================================================
   V36 — ЦЕНТР ЗАКАЗОВ
   ============================================================ */

.account-order-summary {
    width: 100%;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

body.orders-center-open {
    overflow: hidden;
}

.orders-center {
    position: fixed;
    inset: 0;
    z-index: 1600;
    background: #f7f4f8;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.orders-center.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.orders-center-shell,
.orders-center-view {
    width: 100%;
    height: 100%;
}

.orders-center-view {
    display: flex;
    flex-direction: column;
}

.orders-center-header {
    min-height: 82px;
    padding: 16px 24px;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid #e9e2ec;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex: 0 0 auto;
}

.orders-center-header h2 {
    margin: 2px 0 0;
    font-size: 24px;
    line-height: 1.1;
    color: #211825;
}

.orders-center-kicker,
.order-detail-kicker {
    color: #6726AB;
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .14em;
}

.orders-center-subtitle {
    margin-top: 5px;
    color: #817787;
    font-size: 11px;
}

.orders-center-close {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #e4dce8;
    background: #fff;
    color: #34283a;
    cursor: pointer;
    font-size: 17px;
}

.orders-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 220px;
    gap: 10px;
    padding: 14px 24px;
    background: #fff;
    border-bottom: 1px solid #ede7ef;
    flex: 0 0 auto;
}

.orders-search-wrap {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid #ded6e2;
    border-radius: 12px;
    background: #fff;
}

.orders-search-icon {
    color: #8a7f90;
    font-size: 18px;
}

.orders-search-wrap input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    color: #241c29;
}

.orders-status-filter {
    min-height: 44px;
    border: 1px solid #ded6e2;
    border-radius: 12px;
    background: #fff;
    padding: 0 12px;
    font: inherit;
    color: #302536;
    outline: none;
}

.orders-list-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 18px 24px;
}

.orders-center-list {
    width: min(1100px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 8px;
}

.orders-row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(120px, 1.2fr) minmax(130px, .8fr) minmax(120px, .6fr) 22px;
    align-items: center;
    gap: 14px;
    padding: 15px 16px;
    border: 1px solid #e7e0ea;
    border-radius: 14px;
    background: #fff;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.orders-row:hover {
    border-color: #cdb7db;
    box-shadow: 0 7px 22px rgba(52, 31, 62, .06);
    transform: translateY(-1px);
}

.orders-row-main {
    min-width: 0;
}

.orders-row-number {
    font-size: 14px;
    font-weight: 900;
    color: #2b2030;
}

.orders-row-date {
    margin-top: 4px;
    color: #928799;
    font-size: 10px;
}

.orders-row-status-wrap {
    display: flex;
    align-items: center;
}

.orders-row-total {
    text-align: right;
    color: #6726AB;
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
}

.orders-row-arrow {
    color: #9c91a2;
    font-size: 24px;
    text-align: right;
}

.orders-pagination {
    min-height: 68px;
    padding: 12px 24px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid #e8e1eb;
    background: #fff;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) 120px;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.orders-pagination button {
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid #ddd3e3;
    background: #faf7fb;
    color: #6726AB;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
}

.orders-pagination button:disabled {
    opacity: .35;
    cursor: default;
}

.orders-page-info {
    text-align: center;
    color: #766c7c;
    font-size: 11px;
    font-weight: 700;
}

.orders-center-loading,
.orders-center-empty {
    padding: 50px 18px;
    border: 1px dashed #ddd4e1;
    border-radius: 16px;
    background: #fff;
    color: #817687;
    text-align: center;
    font-size: 12px;
}

.orders-empty-icon {
    font-size: 30px;
    color: #a99caf;
}

.orders-empty-title {
    margin-top: 8px;
    color: #34293a;
    font-size: 16px;
    font-weight: 900;
}

.orders-empty-text {
    margin-top: 5px;
}

.orders-center-error {
    color: #9a4242;
    background: #fff7f7;
}

/* ORDER DETAIL */

.order-detail-header {
    justify-content: space-between;
}

.order-detail-back {
    min-height: 40px;
    border: 0;
    background: transparent;
    color: #6726AB;
    font: inherit;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.order-detail-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    width: 100%;
    padding: 24px;
}

.order-detail-scroll > * {
    width: min(900px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.order-detail-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}

.order-detail-hero h2 {
    margin: 3px 0 0;
    font-size: 30px;
    color: #241b29;
}

.order-detail-date {
    margin-top: 5px;
    color: #8e8493;
    font-size: 11px;
}

.order-detail-status {
    margin-top: 5px;
}

.order-detail-card {
    margin-bottom: 12px;
    padding: 16px;
    border: 1px solid #e8e1eb;
    border-radius: 16px;
    background: #fff;
}

.order-detail-card-title {
    margin-bottom: 13px;
    color: #302536;
    font-size: 13px;
    font-weight: 900;
}

.order-progress {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    position: relative;
}

.order-progress-step {
    position: relative;
    text-align: center;
    color: #aaa0af;
    font-size: 9px;
    font-weight: 750;
}

.order-progress-step::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e8e1eb;
    z-index: 0;
}

.order-progress-step:first-child::before {
    left: 50%;
}

.order-progress-step:last-child::before {
    right: 50%;
}

.order-progress-step.done::before {
    background: #8f5bc0;
}

.order-progress-dot {
    position: relative;
    z-index: 1;
    width: 14px;
    height: 14px;
    margin: 0 auto 7px;
    border: 3px solid #e8e1eb;
    border-radius: 50%;
    background: #fff;
}

.order-progress-step.done .order-progress-dot {
    border-color: #6726AB;
    background: #6726AB;
    box-shadow: 0 0 0 3px #f1e8f8;
}

.order-progress-step.done {
    color: #5f456f;
}

.order-cancelled-note {
    padding: 12px;
    border-radius: 11px;
    background: #fff0f0;
    color: #a44343;
    font-size: 12px;
    font-weight: 850;
}

.order-detail-items {
    display: grid;
}

.order-detail-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 15px;
    padding: 11px 0;
}

.order-detail-item + .order-detail-item {
    border-top: 1px solid #f0ebf2;
}

.order-detail-item-name {
    color: #2c2131;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.35;
}

.order-detail-item-meta {
    margin-top: 3px;
    color: #958a9b;
    font-size: 10px;
}

.order-detail-item-sum {
    color: #382d3e;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.order-detail-total {
    margin-top: 10px;
    padding-top: 13px;
    border-top: 1px solid #ded5e3;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 15px;
}

.order-detail-total span {
    color: #766d7c;
    font-size: 11px;
    font-weight: 750;
}

.order-detail-total strong {
    color: #6726AB;
    font-size: 22px;
}

.order-detail-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.order-detail-info-grid > div {
    min-height: 60px;
    padding: 11px 12px;
    border-radius: 12px;
    background: #f8f5fa;
}

.order-detail-info-grid span {
    display: block;
    color: #918697;
    font-size: 9px;
}

.order-detail-info-grid strong {
    display: block;
    margin-top: 5px;
    color: #2c2331;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.order-detail-comment {
    color: #514657;
    font-size: 12px;
    line-height: 1.5;
}

.order-detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
    margin-bottom: 25px;
}

.order-detail-actions button {
    min-height: 50px;
    border-radius: 13px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.order-repeat-btn {
    border: 0;
    background: #6726AB;
    color: #fff;
}

.order-pdf-btn {
    border: 1px solid #d9cce2;
    background: #fff;
    color: #6726AB;
}

@media (max-width: 720px) {
    .orders-center-header {
        min-height: 66px;
        padding: 12px 14px;
    }

    .orders-center-header h2 {
        font-size: 20px;
    }

    .orders-toolbar {
        grid-template-columns: 1fr;
        padding: 10px 14px;
    }

    .orders-list-body {
        padding: 12px 14px;
    }

    .orders-row {
        grid-template-columns: minmax(0, 1fr) auto 18px;
        gap: 8px;
        padding: 13px;
    }

    .orders-row-status-wrap {
        grid-column: 1 / 2;
        grid-row: 2;
    }

    .orders-row-total {
        grid-column: 2 / 3;
        grid-row: 1 / span 2;
        align-self: center;
    }

    .orders-row-arrow {
        grid-column: 3;
        grid-row: 1 / span 2;
        align-self: center;
    }

    .orders-pagination {
        grid-template-columns: 92px minmax(0, 1fr) 92px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .orders-pagination button {
        font-size: 10px;
    }

    .orders-page-info {
        font-size: 9px;
    }

    .order-detail-scroll {
        padding: 14px;
    }

    .order-detail-hero h2 {
        font-size: 25px;
    }

    .order-progress {
        grid-template-columns: repeat(3, 1fr);
        row-gap: 16px;
    }

    .order-progress-step::before {
        display: none;
    }

    .order-detail-info-grid {
        grid-template-columns: 1fr;
    }

    .order-detail-actions {
        grid-template-columns: 1fr;
        position: sticky;
        bottom: 0;
        padding: 9px 0 calc(9px + env(safe-area-inset-bottom));
        background: linear-gradient(to bottom, rgba(247,244,248,0), #f7f4f8 18%);
    }
}


/* ============================================================
   V37 — ИСПРАВЛЕНИЕ ЦЕНТРА ЗАКАЗОВ
   ============================================================ */

.orders-row-card {
    border: 1px solid #e7e0ea;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.orders-row-card:hover {
    border-color: #cdb7db;
    box-shadow: 0 7px 22px rgba(52, 31, 62, .06);
}

.orders-row-open {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(120px, 1.2fr) minmax(130px, .8fr) minmax(120px, .6fr) 22px;
    align-items: center;
    gap: 14px;
    padding: 15px 16px;
    border: 0;
    background: transparent;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.orders-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    padding: 9px 12px;
    border-top: 1px solid #f0ebf2;
    background: #fbf9fc;
}

.orders-row-action {
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid #ddd2e4;
    border-radius: 9px;
    background: #fff;
    color: #6726AB;
    font: inherit;
    font-size: 10px;
    font-weight: 850;
    cursor: pointer;
}

.orders-row-repeat {
    background: #6726AB;
    color: #fff;
    border-color: #6726AB;
}

.orders-row-action:disabled {
    opacity: .55;
    cursor: wait;
}

.order-progress.order-progress-4 {
    grid-template-columns: repeat(4, 1fr);
}

.order-detail-items-warning {
    padding: 13px;
    border-radius: 11px;
    background: #fff8e9;
    color: #806329;
    font-size: 11px;
    line-height: 1.5;
}

.order-detail-actions button:disabled {
    opacity: .42;
    cursor: not-allowed;
}

.account-order-status.status-processing {
    background: #eef2ff;
    color: #455aa0;
}

.account-order-status.status-ready {
    background: #eef8ec;
    color: #34733b;
}

.account-order-status.status-completed {
    background: #e8f6ef;
    color: #25734c;
}

@media (max-width: 720px) {
    .orders-row-open {
        grid-template-columns: minmax(0, 1fr) auto 18px;
        gap: 8px;
        padding: 13px;
    }

    .orders-row-actions {
        justify-content: stretch;
    }

    .orders-row-action {
        flex: 1;
    }

    .order-progress.order-progress-4 {
        grid-template-columns: repeat(4, 1fr);
        row-gap: 0;
    }
}


/* ============================================================
   V38 — МОИ ЗАКАЗЫ: UI + FIX ОТКРЫТИЯ
   ============================================================ */

/* Важно: авторские display:flex не должны перебивать HTML hidden */
.orders-center-view[hidden],
.order-detail-view[hidden] {
    display: none !important;
}

.orders-center-list {
    gap: 10px;
}

.orders-row-card {
    display: block;
    border: 1px solid #e7e0ea;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    outline: none;
    transition:
        transform .16s ease,
        box-shadow .16s ease,
        border-color .16s ease,
        background .16s ease;
}

.orders-row-card:hover {
    transform: translateY(-1px);
    border-color: #ccb8da;
    box-shadow: 0 10px 28px rgba(52, 31, 62, .07);
}

.orders-row-card:active {
    transform: translateY(0);
    background: #fdfbfe;
}

.orders-row-card:focus-visible {
    box-shadow: 0 0 0 3px rgba(103, 38, 171, .13);
    border-color: #9f79bf;
}

.orders-row-main-block {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 15px 12px;
}

.orders-row-left {
    min-width: 0;
}

.orders-row-number-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.orders-row-number {
    font-size: 17px;
    line-height: 1.1;
    font-weight: 900;
    color: #251b2b;
    letter-spacing: -.01em;
}

.orders-row-date {
    margin-top: 7px;
    color: #978c9d;
    font-size: 10px;
    font-weight: 650;
}

.orders-row-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.orders-row-total {
    text-align: right;
    color: #6726AB;
    font-size: 16px;
    line-height: 1.1;
    font-weight: 900;
    white-space: nowrap;
}

.orders-row-chevron-btn {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid #e0d6e5;
    border-radius: 50%;
    background: #faf7fb;
    color: #6726AB;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.orders-row-chevron-btn:hover {
    transform: translateX(2px);
    background: #f4ecf9;
    border-color: #cbb6d9;
}

.orders-row-footer {
    min-height: 39px;
    padding: 7px 12px;
    border-top: 1px solid #f0ebf2;
    background: #fbf9fc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.orders-row-repeat-link {
    min-height: 28px;
    padding: 0 9px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #6726AB;
    font: inherit;
    font-size: 10px;
    font-weight: 850;
    cursor: pointer;
}

.orders-row-repeat-link:hover {
    background: #f0e7f6;
}

.orders-row-repeat-link:disabled {
    opacity: .5;
    cursor: wait;
}

.orders-row-hint {
    color: #aaa0ae;
    font-size: 9px;
    line-height: 1.2;
}

/* Чуть более "воздушный" тулбар */
.orders-toolbar {
    background: rgba(255,255,255,.98);
}

.orders-search-wrap:focus-within,
.orders-status-filter:focus {
    border-color: #a47cc4;
    box-shadow: 0 0 0 3px rgba(103, 38, 171, .08);
}

/* Детали заказа */
.order-detail-view {
    background: #f7f4f8;
}

.order-detail-scroll {
    scroll-behavior: smooth;
}

.order-detail-card {
    box-shadow: 0 2px 12px rgba(47, 27, 57, .025);
}

.order-detail-hero {
    padding: 4px 2px;
}

.order-detail-actions {
    z-index: 2;
}

/* Мобильный вид */
@media (max-width: 720px) {
    .orders-row-main-block {
        min-height: 70px;
        padding: 12px 12px 10px;
        gap: 10px;
    }

    .orders-row-number {
        font-size: 16px;
    }

    .orders-row-total {
        font-size: 14px;
    }

    .orders-row-chevron-btn {
        width: 34px;
        height: 34px;
        font-size: 23px;
    }

    .orders-row-footer {
        min-height: 36px;
        padding: 6px 9px;
    }

    .orders-row-hint {
        display: none;
    }

    .orders-row-repeat-link {
        min-height: 27px;
        padding-left: 7px;
        padding-right: 7px;
    }

    .orders-center-list {
        gap: 8px;
    }
}


/* ============================================================
   V39 — МОИ ЗАКАЗЫ PRO
   ============================================================ */

.orders-pro-top {
    flex: 0 0 auto;
    background: #fff;
    border-bottom: 1px solid #ede7ef;
}

.orders-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 24px 4px;
}

.orders-stat-card {
    min-height: 66px;
    padding: 10px 12px;
    border: 1px solid #e8e1eb;
    border-radius: 14px;
    background: #fbf9fc;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.orders-stat-card:hover {
    border-color: #ceb9db;
    transform: translateY(-1px);
}

.orders-stat-card.active {
    border-color: #9f74bf;
    background: #f5eef9;
    box-shadow: inset 0 0 0 1px rgba(103,38,171,.04);
}

.orders-stat-card span {
    display: block;
    color: #8d8293;
    font-size: 9px;
    font-weight: 750;
}

.orders-stat-card strong {
    display: block;
    margin-top: 5px;
    color: #2d2232;
    font-size: 20px;
    line-height: 1;
    font-weight: 900;
}

.orders-stat-card.active strong {
    color: #6726AB;
}

.orders-toolbar {
    grid-template-columns: minmax(260px, 1fr) 230px;
    border-bottom: 0;
    padding-bottom: 10px;
}

.orders-search-wrap {
    position: relative;
}

.orders-search-clear {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: #f2edf4;
    color: #7d7283;
    cursor: pointer;
    flex: 0 0 auto;
}

.orders-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 24px 13px;
}

.orders-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.orders-filter-chip {
    min-height: 31px;
    padding: 0 11px;
    border: 1px solid #e2dae6;
    border-radius: 999px;
    background: #fff;
    color: #6d6273;
    font: inherit;
    font-size: 9px;
    font-weight: 850;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.orders-filter-chip:hover {
    border-color: #cbb8d8;
    background: #faf6fc;
}

.orders-filter-chip.active {
    border-color: #6726AB;
    background: #6726AB;
    color: #fff;
}

.orders-reset-btn {
    min-height: 31px;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: #9a7188;
    font: inherit;
    font-size: 9px;
    font-weight: 850;
    cursor: pointer;
    white-space: nowrap;
}

.orders-reset-btn:hover {
    color: #6726AB;
}

.orders-sort-select {
    cursor: pointer;
}

@media (max-width: 720px) {
    .orders-stats {
        grid-template-columns: repeat(4, minmax(72px, 1fr));
        gap: 6px;
        padding: 10px 10px 3px;
        overflow-x: auto;
    }

    .orders-stat-card {
        min-width: 72px;
        min-height: 58px;
        padding: 8px 9px;
    }

    .orders-stat-card strong {
        font-size: 17px;
    }

    .orders-toolbar {
        grid-template-columns: 1fr;
        padding: 8px 10px;
    }

    .orders-filter-row {
        align-items: flex-start;
        padding: 0 10px 10px;
    }

    .orders-filter-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .orders-filter-chips::-webkit-scrollbar {
        display: none;
    }

    .orders-filter-chip {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .orders-reset-btn {
        flex: 0 0 auto;
    }
}


/* ============================================================
   V40 — ADMIN PANEL
   ============================================================ */

.account-admin-access[hidden],
.admin-view[hidden],
.admin-detail-view[hidden] {
    display: none !important;
}

.account-admin-access {
    background: linear-gradient(135deg, #2f1f3b 0%, #482a5f 100%);
    border-color: transparent;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.account-admin-access .account-section-title {
    color: #fff;
}

.account-admin-access .account-section-subtitle {
    color: rgba(255,255,255,.62);
}

.admin-access-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.admin-access-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(255,255,255,.13);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    flex: 0 0 auto;
}

.admin-access-btn {
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 10px;
    background: rgba(255,255,255,.1);
    color: #fff;
    font: inherit;
    font-size: 10px;
    font-weight: 850;
    cursor: pointer;
    white-space: nowrap;
}

body.admin-panel-open {
    overflow: hidden;
}

.admin-panel {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: #f5f3f6;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.admin-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.admin-panel-shell,
.admin-view {
    width: 100%;
    height: 100%;
}

.admin-view {
    display: flex;
    flex-direction: column;
}

.admin-header {
    min-height: 78px;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #24192c;
    color: #fff;
    flex: 0 0 auto;
}

.admin-header-main {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.admin-brand-mark {
    width: 43px;
    height: 43px;
    border-radius: 13px;
    background: #6726AB;
    display: grid;
    place-items: center;
    font-size: 19px;
    font-weight: 900;
    flex: 0 0 auto;
}

.admin-kicker {
    color: #cdaee6;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .14em;
}

.admin-header h2,
.admin-detail-hero h2 {
    margin: 3px 0 0;
}

.admin-header h2 {
    color: #fff;
    font-size: 21px;
}

.admin-subtitle {
    margin-top: 4px;
    color: rgba(255,255,255,.58);
    font-size: 10px;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.admin-refresh-btn,
.admin-close-btn,
.admin-back-btn {
    min-height: 38px;
    border-radius: 10px;
    font: inherit;
    cursor: pointer;
}

.admin-refresh-btn {
    padding: 0 12px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}

.admin-close-btn {
    width: 38px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 16px;
}

.admin-back-btn {
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 11px;
    font-weight: 850;
}

.admin-dashboard {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 22px 5px;
    background: #fff;
}

.admin-stat {
    min-height: 62px;
    padding: 9px 11px;
    border: 1px solid #e7e0ea;
    border-radius: 13px;
    background: #faf8fb;
    text-align: left;
    cursor: pointer;
}

.admin-stat.active {
    border-color: #6726AB;
    background: #f3ecf8;
}

.admin-stat span {
    display: block;
    color: #8d8293;
    font-size: 9px;
    font-weight: 750;
}

.admin-stat strong {
    display: block;
    margin-top: 5px;
    color: #2e2333;
    font-size: 19px;
    font-weight: 900;
}

.admin-stat.active strong {
    color: #6726AB;
}

.admin-toolbar {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 230px;
    gap: 8px;
    padding: 10px 22px 8px;
    background: #fff;
}

.admin-search-wrap {
    min-height: 42px;
    padding: 0 11px;
    border: 1px solid #ded6e2;
    border-radius: 11px;
    display: flex;
    align-items: center;
    gap: 7px;
    background: #fff;
}

.admin-search-wrap input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    color: #29202e;
}

.admin-search-wrap button {
    width: 27px;
    height: 27px;
    border: 0;
    border-radius: 50%;
    background: #f1edf3;
    color: #7c7182;
    cursor: pointer;
}

.admin-select {
    min-height: 42px;
    border: 1px solid #ded6e2;
    border-radius: 11px;
    background: #fff;
    padding: 0 10px;
    font: inherit;
    color: #302536;
}

.admin-filter-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 22px 11px;
    background: #fff;
    border-bottom: 1px solid #e8e2ea;
}

.admin-chip {
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid #e2dae6;
    border-radius: 999px;
    background: #fff;
    color: #6d6273;
    font: inherit;
    font-size: 9px;
    font-weight: 850;
    cursor: pointer;
}

.admin-chip.active {
    background: #2d2035;
    color: #fff;
    border-color: #2d2035;
}

.admin-reset-btn {
    min-height: 30px;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #8f6680;
    font: inherit;
    font-size: 9px;
    font-weight: 850;
    cursor: pointer;
}

.admin-list-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 13px 22px;
}

.admin-orders-list {
    display: grid;
    gap: 7px;
}

.admin-order-row {
    display: grid;
    grid-template-columns: 100px minmax(160px, 1.15fr) minmax(150px, 1fr) 125px 150px 34px;
    gap: 12px;
    align-items: center;
    min-height: 67px;
    padding: 9px 11px;
    border: 1px solid #e5dee8;
    border-radius: 13px;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.admin-order-row:hover {
    border-color: #cab7d6;
    box-shadow: 0 6px 18px rgba(43,25,52,.05);
    transform: translateY(-1px);
}

.admin-order-number {
    color: #281e2d;
    font-size: 14px;
    font-weight: 900;
}

.admin-order-date {
    margin-top: 4px;
    color: #958a9b;
    font-size: 9px;
}

.admin-order-customer,
.admin-order-contact {
    min-width: 0;
}

.admin-order-customer strong,
.admin-order-customer span,
.admin-order-contact span,
.admin-order-contact small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-order-customer strong {
    color: #302536;
    font-size: 11px;
    font-weight: 850;
}

.admin-order-customer span,
.admin-order-contact small {
    margin-top: 3px;
    color: #978c9d;
    font-size: 9px;
}

.admin-order-contact span {
    color: #554a5b;
    font-size: 10px;
    font-weight: 750;
}

.admin-order-total {
    text-align: right;
    color: #6726AB;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.admin-status-select {
    width: 100%;
    min-height: 34px;
    border: 1px solid #ddd4e2;
    border-radius: 9px;
    padding: 0 7px;
    background: #faf8fb;
    font: inherit;
    font-size: 9px;
    font-weight: 850;
    cursor: pointer;
}

.admin-status-select.status-new {
    color: #8a5e22;
    background: #fff8e8;
}

.admin-status-select.status-processing {
    color: #455aa0;
    background: #f0f3ff;
}

.admin-status-select.status-ready {
    color: #34733b;
    background: #eff8ed;
}

.admin-status-select.status-completed {
    color: #26714c;
    background: #eaf6ef;
}

.admin-status-select.status-cancelled {
    color: #a04343;
    background: #fff0f0;
}

.admin-order-arrow {
    width: 32px;
    height: 32px;
    border: 1px solid #e0d7e4;
    border-radius: 50%;
    background: #faf8fb;
    color: #6726AB;
    font-size: 22px;
    cursor: pointer;
}

.admin-pagination {
    min-height: 61px;
    padding: 10px 22px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid #e5dfe7;
    background: #fff;
    display: grid;
    grid-template-columns: 110px minmax(0,1fr) 110px;
    align-items: center;
    gap: 10px;
}

.admin-pagination button {
    min-height: 38px;
    border: 1px solid #ddd4e2;
    border-radius: 10px;
    background: #faf8fb;
    color: #6726AB;
    font: inherit;
    font-size: 10px;
    font-weight: 850;
    cursor: pointer;
}

.admin-pagination button:disabled {
    opacity: .35;
    cursor: default;
}

.admin-pagination div {
    text-align: center;
    color: #786d7e;
    font-size: 10px;
}

.admin-loading,
.admin-empty {
    padding: 45px 15px;
    border: 1px dashed #ddd4e1;
    border-radius: 14px;
    background: #fff;
    color: #857a8b;
    text-align: center;
    font-size: 11px;
}

.admin-empty strong,
.admin-empty span {
    display: block;
}

.admin-empty span {
    margin-top: 5px;
}

.admin-error {
    color: #9b4141;
    background: #fff7f7;
}

/* DETAIL */

.admin-detail-view {
    background: #f5f3f6;
}

.admin-detail-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px;
}

.admin-detail-scroll > * {
    width: min(980px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.admin-detail-hero {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.admin-detail-hero h2 {
    color: #251b2a;
    font-size: 28px;
}

.admin-detail-date {
    margin-top: 5px;
    color: #8f8495;
    font-size: 10px;
}

.admin-detail-card {
    margin-bottom: 11px;
    padding: 15px;
    border: 1px solid #e4dde7;
    border-radius: 15px;
    background: #fff;
}

.admin-detail-title {
    margin-bottom: 12px;
    color: #302536;
    font-size: 12px;
    font-weight: 900;
}

.admin-status-buttons {
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    gap: 6px;
}

.admin-status-button {
    min-height: 40px;
    border: 1px solid #e1d9e5;
    border-radius: 10px;
    background: #faf8fb;
    color: #706576;
    font: inherit;
    font-size: 9px;
    font-weight: 850;
    cursor: pointer;
}

.admin-status-button.active {
    border-color: #6726AB;
    background: #6726AB;
    color: #fff;
}

.admin-detail-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 11px;
}

.admin-customer-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.admin-customer-info > div,
.admin-order-summary-card > div {
    padding: 10px;
    border-radius: 10px;
    background: #f8f5fa;
}

.admin-customer-info span,
.admin-order-summary-card span {
    display: block;
    color: #918697;
    font-size: 8px;
}

.admin-customer-info strong,
.admin-customer-info a,
.admin-order-summary-card strong {
    display: block;
    margin-top: 4px;
    color: #2d2332;
    font-size: 11px;
    font-weight: 850;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.admin-order-summary-card {
    display: grid;
    gap: 8px;
}

.admin-order-summary-total strong {
    color: #6726AB;
    font-size: 18px;
}

.admin-detail-items {
    display: grid;
}

.admin-detail-item {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 12px;
    padding: 10px 0;
}

.admin-detail-item + .admin-detail-item {
    border-top: 1px solid #f0ebf2;
}

.admin-detail-item strong,
.admin-detail-item span {
    display: block;
}

.admin-detail-item strong {
    color: #2e2433;
    font-size: 11px;
}

.admin-detail-item span {
    margin-top: 3px;
    color: #94899a;
    font-size: 9px;
}

.admin-detail-item b {
    color: #382d3e;
    font-size: 11px;
    white-space: nowrap;
}

.admin-detail-total {
    margin-top: 9px;
    padding-top: 12px;
    border-top: 1px solid #ddd5e1;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.admin-detail-total span {
    color: #776d7d;
    font-size: 10px;
}

.admin-detail-total strong {
    color: #6726AB;
    font-size: 20px;
}

.admin-comment {
    color: #534858;
    font-size: 11px;
    line-height: 1.5;
}

.admin-detail-empty {
    color: #8f8495;
    font-size: 10px;
}

@media (max-width: 800px) {
    .account-admin-access {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-access-btn {
        width: 100%;
    }

    .admin-header {
        min-height: 72px;
        padding: 12px 12px;
    }

    .admin-header-main {
        align-items: flex-start;
    }

    .admin-header h2 {
        font-size: 18px;
        line-height: 1.08;
    }

    .admin-subtitle {
        font-size: 12px;
        line-height: 1.2;
    }

    .admin-brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .admin-refresh-btn {
        display: none;
    }

    .admin-close-btn,
    .admin-detail-close-btn {
        width: 42px;
        min-height: 42px;
        border-radius: 14px;
        font-size: 18px;
    }

    .admin-dashboard {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 10px 10px 6px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .admin-dashboard::-webkit-scrollbar,
    .admin-filter-row::-webkit-scrollbar {
        display: none;
    }

    .admin-stat {
        flex: 0 0 104px;
        min-width: 104px;
        min-height: 70px;
        padding: 11px 12px;
    }

    .admin-stat span {
        font-size: 12px;
    }

    .admin-stat strong {
        margin-top: 7px;
        font-size: 24px;
        line-height: 1;
    }

    .admin-toolbar {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 8px 10px 10px;
    }

    .admin-search-wrap,
    .admin-select {
        min-height: 48px;
        border-radius: 14px;
    }

    .admin-search-wrap {
        gap: 10px;
        padding: 0 13px;
    }

    .admin-search-wrap input,
    .admin-select {
        font-size: 15px;
    }

    .admin-search-wrap button {
        width: 30px;
        height: 30px;
    }

    .admin-filter-row {
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        padding: 0 10px 12px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .admin-chip {
        flex: 0 0 auto;
        min-height: 38px;
        padding: 0 14px;
        white-space: nowrap;
        font-size: 14px;
    }

    .admin-reset-btn {
        flex: 0 0 auto;
        font-size: 13px;
    }

    .admin-list-scroll {
        padding: 10px 10px 16px;
        overscroll-behavior: contain;
    }

    .admin-orders-list {
        gap: 12px;
    }

    .admin-order-row {
        grid-template-columns: minmax(0,1fr) auto;
        grid-template-areas:
            "number total"
            "customer customer"
            "status arrow";
        align-items: start;
        gap: 10px 12px;
        min-height: auto;
        padding: 14px;
        border-radius: 18px;
    }

    .admin-order-number-block {
        grid-area: number;
        min-width: 0;
    }

    .admin-order-number {
        font-size: 18px;
        line-height: 1;
    }

    .admin-order-date {
        margin-top: 6px;
        font-size: 13px;
        line-height: 1.2;
    }

    .admin-order-customer {
        grid-area: customer;
    }

    .admin-order-customer strong,
    .admin-order-customer span {
        white-space: normal;
        overflow: visible;
        text-overflow: initial;
    }

    .admin-order-customer strong {
        font-size: 17px;
        line-height: 1.18;
    }

    .admin-order-customer span {
        margin-top: 5px;
        font-size: 14px;
        line-height: 1.35;
    }

    .admin-order-contact {
        display: none;
    }

    .admin-order-total {
        grid-area: total;
        align-self: center;
        text-align: right;
        font-size: 18px;
        line-height: 1.1;
    }

    .admin-order-status-cell {
        grid-area: status;
        min-width: 0;
    }

    .admin-status-select {
        min-height: 46px;
        border-radius: 14px;
        padding: 0 14px;
        font-size: 15px;
    }

    .admin-order-arrow {
        grid-area: arrow;
        width: 46px;
        height: 46px;
        font-size: 30px;
        justify-self: end;
        align-self: end;
    }

    .admin-pagination {
        grid-template-columns: 1fr auto 1fr;
        gap: 12px;
        min-height: 70px;
        padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    }

    .admin-pagination button {
        min-height: 44px;
        border-radius: 14px;
        font-size: 14px;
    }

    .admin-pagination div {
        font-size: 14px;
        white-space: nowrap;
    }

    .admin-detail-scroll {
        padding: 11px;
    }

    .admin-status-buttons {
        grid-template-columns: 1fr 1fr;
    }

    .admin-status-button:last-child {
        grid-column: 1 / -1;
    }

    .admin-detail-grid {
        grid-template-columns: 1fr;
    }

    .admin-customer-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .admin-kicker {
        font-size: 10px;
        letter-spacing: .12em;
    }

    .admin-header h2 {
        font-size: 16px;
    }

    .admin-subtitle {
        margin-top: 5px;
        font-size: 11px;
    }

    .admin-stat {
        flex-basis: 98px;
        min-width: 98px;
    }

    .admin-search-wrap input::placeholder {
        font-size: 13px;
    }

    .admin-order-row {
        padding: 13px;
    }

    .admin-order-number {
        font-size: 17px;
    }

    .admin-order-customer strong {
        font-size: 16px;
    }

    .admin-order-customer span {
        font-size: 13px;
    }

    .admin-order-total {
        font-size: 16px;
    }

    .admin-status-select {
        font-size: 14px;
    }
}


/* ============================================================
   V42 — FINAL ADMIN / CLIENTS / RECEIVABLES
   ============================================================ */

.account-discount-section .account-section-head {
    align-items: center;
    margin-bottom: 0;
}

.account-discount-value {
    flex: 0 0 auto;
    min-width: 72px;
    padding: 9px 12px;
    border-radius: 12px;
    background: #f3ecf8;
    color: #6726AB;
    text-align: center;
    font-size: 18px;
    font-weight: 900;
}

/* admin shell */
.admin-panel-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.admin-header {
    min-height: 66px;
    padding: 10px 18px;
}

.admin-header h2 {
    font-size: 19px;
}

.admin-main-tabs {
    min-height: 48px;
    display: flex;
    align-items: stretch;
    gap: 3px;
    padding: 5px 10px;
    border-bottom: 1px solid #e7e0ea;
    background: #fff;
    flex: 0 0 auto;
}

.admin-main-tabs[hidden] {
    display: none !important;
}

.admin-main-tab {
    position: relative;
    min-height: 38px;
    padding: 0 15px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #756b7b;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
}

.admin-main-tab.active {
    background: #2d2035;
    color: #fff;
}

.admin-tab-badge {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 999px;
    background: #c84949;
    color: #fff;
    font-size: 8px;
}

.admin-content {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
}

.admin-content > .admin-view {
    height: 100%;
}

.admin-view[hidden],
.admin-detail-view[hidden] {
    display: none !important;
}

/* compact order controls */
.admin-compact-stats {
    display: flex;
    gap: 7px;
    padding: 8px 14px 4px;
    overflow-x: auto;
    background: #fff;
    scrollbar-width: none;
}

.admin-compact-stats::-webkit-scrollbar {
    display: none;
}

.admin-mini-stat {
    flex: 0 0 100px;
    min-height: 50px;
    padding: 7px 10px;
    border: 1px solid #e6dfe9;
    border-radius: 11px;
    background: #faf8fb;
    text-align: left;
    cursor: pointer;
}

.admin-mini-stat.active {
    border-color: #8e5eb4;
    background: #f3ecf8;
}

.admin-mini-stat span {
    display: block;
    color: #8b808f;
    font-size: 9px;
}

.admin-mini-stat strong {
    display: block;
    margin-top: 3px;
    color: #2d2232;
    font-size: 17px;
    line-height: 1;
}

.admin-compact-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px;
    gap: 7px;
    padding: 7px 14px;
    background: #fff;
}

.admin-search-wrap,
.admin-select {
    min-height: 38px;
    border-radius: 10px;
}

.admin-search-wrap {
    padding: 0 10px;
}

.admin-search-wrap input,
.admin-select {
    font-size: 12px;
}

.admin-filter-row {
    min-height: 39px;
    padding: 0 14px 7px;
    gap: 5px;
}

.admin-chip {
    min-height: 28px;
    padding: 0 9px;
    font-size: 9px;
}

.admin-list-scroll {
    padding-top: 9px;
}

/* order rows */
.admin-order-row {
    grid-template-columns: 90px minmax(180px, 1fr) 150px 145px 32px;
}

.admin-order-finance {
    text-align: right;
}

.admin-order-finance strong,
.admin-order-finance span {
    display: block;
}

.admin-order-finance strong {
    color: #6726AB;
    font-size: 11px;
}

.admin-order-finance span {
    margin-top: 3px;
    font-size: 8px;
}

.admin-debt-label,
.debt-text {
    color: #b04444 !important;
}

.admin-paid-label,
.no-debt strong {
    color: #2d7a4e !important;
}

/* clients */
.admin-section-title-row {
    min-height: 49px;
    padding: 9px 14px 5px;
    background: #fff;
}

.admin-section-title-row strong,
.admin-section-title-row span {
    display: block;
}

.admin-section-title-row strong {
    color: #302536;
    font-size: 13px;
}

.admin-section-title-row span {
    margin-top: 2px;
    color: #8f8495;
    font-size: 9px;
}

.admin-clients-list {
    display: grid;
    gap: 7px;
}

.admin-client-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) 85px 70px minmax(140px, .9fr) 32px;
    gap: 11px;
    align-items: center;
    min-height: 66px;
    padding: 9px 11px;
    border: 1px solid #e5dee8;
    border-radius: 13px;
    background: #fff;
    cursor: pointer;
}

.admin-client-main,
.admin-client-discount,
.admin-client-orders,
.admin-client-debts {
    min-width: 0;
}

.admin-client-main strong,
.admin-client-main span,
.admin-client-main small,
.admin-client-discount span,
.admin-client-discount strong,
.admin-client-orders span,
.admin-client-orders strong {
    display: block;
}

.admin-client-main strong {
    color: #302536;
    font-size: 11px;
    font-weight: 850;
}

.admin-client-main span {
    margin-top: 2px;
    color: #6d6273;
    font-size: 9px;
}

.admin-client-main small {
    margin-top: 3px;
    color: #9a8f9f;
    font-size: 8px;
}

.admin-client-discount span,
.admin-client-orders span {
    color: #958a9b;
    font-size: 8px;
}

.admin-client-discount strong,
.admin-client-orders strong {
    margin-top: 3px;
    color: #33283a;
    font-size: 12px;
}

.admin-client-debts {
    text-align: right;
}

.admin-client-debts span {
    display: block;
    font-size: 9px;
    font-weight: 850;
}

.debt-byn,
.debt-rub {
    color: #b04444;
}

/* client detail */
.admin-discount-form {
    display: grid;
    grid-template-columns: minmax(110px, 180px) 1fr;
    gap: 8px;
}

.admin-discount-input-wrap {
    display: flex;
    align-items: center;
    min-height: 43px;
    padding: 0 10px;
    border: 1px solid #ded6e2;
    border-radius: 10px;
    background: #faf8fb;
}

.admin-discount-input-wrap input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
}

.admin-discount-form button {
    min-height: 43px;
    border: 0;
    border-radius: 10px;
    background: #6726AB;
    color: #fff;
    font: inherit;
    font-size: 10px;
    font-weight: 850;
    cursor: pointer;
}

.admin-client-finance-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.admin-client-finance-grid > div {
    padding: 10px;
    border-radius: 10px;
    background: #f8f5fa;
}

.admin-client-finance-grid span,
.admin-client-finance-grid strong {
    display: block;
}

.admin-client-finance-grid span {
    color: #918697;
    font-size: 8px;
}

.admin-client-finance-grid strong {
    margin-top: 4px;
    color: #2e2433;
    font-size: 12px;
}

.admin-client-orders-list {
    display: grid;
    gap: 5px;
}

.admin-client-order-btn {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 4px 12px;
    width: 100%;
    padding: 10px;
    border: 1px solid #eee8f0;
    border-radius: 10px;
    background: #faf9fb;
    text-align: left;
    cursor: pointer;
}

.admin-client-order-btn span,
.admin-client-order-btn strong,
.admin-client-order-btn small {
    display: block;
}

.admin-client-order-btn small {
    grid-column: 1 / -1;
    color: #b04444;
    font-size: 8px;
}

.admin-client-order-btn small.paid {
    color: #2d7a4e;
}

/* debt */
.admin-debt-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    padding: 9px 14px 4px;
    background: #fff;
}

.admin-debt-card {
    min-height: 57px;
    padding: 8px 10px;
    border: 1px solid #eadfe5;
    border-radius: 11px;
    background: #fff8f8;
}

.admin-debt-card span,
.admin-debt-card strong {
    display: block;
}

.admin-debt-card span {
    color: #957b83;
    font-size: 8px;
}

.admin-debt-card strong {
    margin-top: 5px;
    color: #a63f3f;
    font-size: 15px;
}

.admin-currency-filter {
    display: flex;
    gap: 4px;
    padding: 3px;
    border-radius: 10px;
    background: #f1edf3;
}

.admin-currency-filter button {
    min-width: 48px;
    min-height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #766b7c;
    font: inherit;
    font-size: 9px;
    font-weight: 850;
    cursor: pointer;
}

.admin-currency-filter button.active {
    background: #fff;
    color: #6726AB;
    box-shadow: 0 2px 8px rgba(50,30,60,.06);
}

.admin-debt-list {
    display: grid;
    gap: 7px;
}

.admin-debt-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 8px;
    padding: 9px;
    border: 1px solid #eadfe5;
    border-radius: 13px;
    background: #fff;
}

.admin-debt-main {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(180px, .8fr) 26px;
    gap: 10px;
    align-items: center;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.admin-debt-main strong,
.admin-debt-main span,
.admin-debt-main small,
.admin-debt-values span,
.admin-debt-values strong {
    display: block;
}

.admin-debt-main > div:first-child > strong {
    color: #2d2232;
    font-size: 12px;
}

.admin-debt-main > div:first-child > span {
    margin-top: 2px;
    color: #625768;
    font-size: 9px;
}

.admin-debt-main small {
    margin-top: 3px;
    color: #9a8f9f;
    font-size: 8px;
}

.admin-debt-values {
    text-align: right;
}

.admin-debt-values span {
    color: #8d8293;
    font-size: 8px;
}

.admin-debt-values strong {
    margin-top: 3px;
    color: #b04444;
    font-size: 11px;
}

.admin-debt-arrow {
    color: #6726AB;
    font-size: 22px;
}

.admin-debt-pay-btn,
.admin-add-payment-btn {
    min-height: 36px;
    padding: 0 11px;
    border: 0;
    border-radius: 9px;
    background: #6726AB;
    color: #fff;
    font: inherit;
    font-size: 9px;
    font-weight: 850;
    cursor: pointer;
}

/* order finance */
.admin-detail-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.admin-detail-title-row .admin-detail-title {
    margin-bottom: 0;
}

.admin-finance-grid,
.order-finance-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 7px;
}

.admin-finance-grid > div,
.order-finance-grid > div {
    padding: 10px;
    border-radius: 10px;
    background: #f8f5fa;
}

.admin-finance-grid span,
.admin-finance-grid strong,
.order-finance-grid span,
.order-finance-grid strong {
    display: block;
}

.admin-finance-grid span,
.order-finance-grid span {
    color: #918697;
    font-size: 8px;
}

.admin-finance-grid strong,
.order-finance-grid strong {
    margin-top: 4px;
    color: #2d2332;
    font-size: 12px;
}

.admin-finance-grid .has-debt,
.order-finance-grid .has-debt {
    background: #fff1f1;
}

.admin-finance-grid .has-debt strong,
.order-finance-grid .has-debt strong {
    color: #b04444;
}

.admin-payments-history,
.order-payment-history {
    margin-top: 10px;
    display: grid;
    gap: 5px;
}

.admin-payment-row,
.order-payment-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #eee8f0;
    border-radius: 9px;
    background: #faf9fb;
}

.admin-payment-row strong,
.admin-payment-row span,
.admin-payment-row small,
.order-payment-row strong,
.order-payment-row span {
    display: block;
}

.admin-payment-row strong,
.order-payment-row strong {
    color: #2d7a4e;
    font-size: 11px;
}

.admin-payment-row span,
.order-payment-row span {
    margin-top: 2px;
    color: #8f8495;
    font-size: 8px;
}

.admin-payment-row small {
    margin-top: 2px;
    color: #6f6575;
    font-size: 8px;
}

.admin-payment-delete {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: #fff0f0;
    color: #a54141;
    cursor: pointer;
}

.admin-big-total {
    color: #6726AB;
    font-size: 24px;
    font-weight: 900;
}

.admin-detail-muted {
    margin-top: 4px;
    color: #918697;
    font-size: 9px;
}

/* payment modal */
.payment-modal {
    position: fixed;
    inset: 0;
    z-index: 2300;
    display: none;
    place-items: center;
    padding: 16px;
}

.payment-modal.open {
    display: grid;
}

.payment-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28,20,34,.28);
    backdrop-filter: blur(4px);
}

.payment-modal-card {
    position: relative;
    width: min(430px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 22px 80px rgba(31,18,39,.22);
}

.payment-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.payment-modal-head h3 {
    margin: 3px 0 0;
    color: #2d2232;
    font-size: 18px;
}

.payment-modal-debt {
    margin-top: 4px;
    color: #b04444;
    font-size: 10px;
    font-weight: 750;
}

.payment-close-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e4dce8;
    border-radius: 50%;
    background: #faf8fb;
    color: #4d4253;
    cursor: pointer;
}

.payment-field {
    display: block;
    margin-bottom: 10px;
}

.payment-field > span {
    display: block;
    margin-bottom: 5px;
    color: #6c6172;
    font-size: 9px;
    font-weight: 800;
}

.payment-field input,
.payment-field select {
    width: 100%;
    min-height: 43px;
    padding: 0 11px;
    border: 1px solid #ded6e2;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    box-sizing: border-box;
}

.payment-submit-btn {
    width: 100%;
    min-height: 46px;
    margin-top: 3px;
    border: 0;
    border-radius: 11px;
    background: #6726AB;
    color: #fff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

/* ============================================================
   MOBILE ADMIN V42 — compact, no "top wall"
   ============================================================ */

@media (max-width: 800px) {
    .admin-header {
        min-height: 56px;
        padding: 7px 9px;
    }

    .admin-brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 16px;
    }

    .admin-kicker {
        font-size: 8px;
    }

    .admin-header h2 {
        font-size: 14px;
        line-height: 1.05;
    }

    .admin-close-btn {
        width: 36px;
        min-height: 36px;
        border-radius: 11px;
        font-size: 15px;
    }

    .admin-main-tabs {
        min-height: 42px;
        padding: 4px 7px;
    }

    .admin-main-tab {
        flex: 1;
        min-height: 34px;
        padding: 0 8px;
        font-size: 10px;
    }

    .admin-compact-stats {
        gap: 5px;
        padding: 5px 7px 2px;
    }

    .admin-mini-stat {
        flex-basis: 72px;
        min-height: 42px;
        padding: 5px 7px;
        border-radius: 9px;
    }

    .admin-mini-stat span {
        font-size: 7px;
    }

    .admin-mini-stat strong {
        margin-top: 2px;
        font-size: 14px;
    }

    .admin-compact-toolbar {
        grid-template-columns: minmax(0, 1fr) 112px;
        gap: 5px;
        padding: 5px 7px;
    }

    .admin-search-wrap,
    .admin-select {
        min-height: 34px;
        border-radius: 9px;
    }

    .admin-search-wrap {
        padding: 0 8px;
        gap: 5px;
    }

    .admin-search-wrap input,
    .admin-select {
        font-size: 11px;
    }

    .admin-search-wrap input::placeholder {
        font-size: 10px;
    }

    .admin-search-wrap button {
        width: 24px;
        height: 24px;
    }

    .admin-filter-row {
        min-height: 33px;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 5px;
        padding: 0 7px 5px;
        scrollbar-width: none;
    }

    .admin-filter-row::-webkit-scrollbar {
        display: none;
    }

    .admin-chip {
        flex: 0 0 auto;
        min-height: 25px;
        padding: 0 8px;
        font-size: 8px;
    }

    .admin-list-scroll {
        padding: 6px 7px 10px;
    }

    .admin-orders-list,
    .admin-clients-list,
    .admin-debt-list {
        gap: 7px;
    }

    .admin-order-row {
        grid-template-columns: minmax(0, 1fr) auto 36px;
        grid-template-areas:
            "number finance arrow"
            "customer customer customer"
            "status status status";
        gap: 7px;
        padding: 9px;
        border-radius: 13px;
    }

    .admin-order-number-block {
        grid-area: number;
    }

    .admin-order-number {
        font-size: 14px;
    }

    .admin-order-date {
        margin-top: 3px;
        font-size: 9px;
    }

    .admin-order-customer {
        grid-area: customer;
    }

    .admin-order-customer strong {
        font-size: 12px;
    }

    .admin-order-customer span {
        margin-top: 2px;
        font-size: 9px;
    }

    .admin-order-finance {
        grid-area: finance;
        align-self: start;
    }

    .admin-order-finance strong {
        font-size: 12px;
    }

    .admin-order-finance span {
        font-size: 8px;
    }

    .admin-order-status-cell {
        grid-area: status;
    }

    .admin-status-select {
        min-height: 34px;
        border-radius: 9px;
        font-size: 10px;
    }

    .admin-order-arrow {
        grid-area: arrow;
        width: 34px;
        height: 34px;
        font-size: 23px;
        align-self: start;
    }

    .admin-pagination {
        min-height: 48px;
        grid-template-columns: 52px 1fr 52px;
        padding: 5px 7px calc(5px + env(safe-area-inset-bottom));
    }

    .admin-pagination button {
        min-height: 34px;
        border-radius: 9px;
        font-size: 14px;
    }

    .admin-pagination div {
        font-size: 10px;
    }

    /* clients */
    .admin-section-title-row {
        min-height: 39px;
        padding: 6px 8px 3px;
    }

    .admin-client-toolbar {
        grid-template-columns: minmax(0,1fr) 112px;
    }

    .admin-client-row {
        grid-template-columns: minmax(0,1fr) auto 34px;
        grid-template-areas:
            "main debt arrow"
            "discount orders arrow";
        gap: 7px;
        padding: 9px;
        border-radius: 13px;
    }

    .admin-client-main {
        grid-area: main;
    }

    .admin-client-main strong {
        font-size: 12px;
    }

    .admin-client-main span {
        font-size: 9px;
    }

    .admin-client-main small {
        font-size: 8px;
    }

    .admin-client-discount {
        grid-area: discount;
    }

    .admin-client-orders {
        grid-area: orders;
        justify-self: end;
        text-align: right;
    }

    .admin-client-debts {
        grid-area: debt;
        align-self: start;
        font-size: 8px;
    }

    .admin-client-row .admin-order-arrow {
        grid-area: arrow;
        align-self: center;
    }

    /* receivables */
    .admin-debt-summary {
        display: flex;
        gap: 5px;
        overflow-x: auto;
        padding: 5px 7px 2px;
        scrollbar-width: none;
    }

    .admin-debt-summary::-webkit-scrollbar {
        display: none;
    }

    .admin-debt-card {
        flex: 0 0 112px;
        min-height: 43px;
        padding: 6px 8px;
        border-radius: 9px;
    }

    .admin-debt-card span {
        font-size: 7px;
    }

    .admin-debt-card strong {
        margin-top: 3px;
        font-size: 12px;
    }

    .admin-debt-toolbar {
        grid-template-columns: minmax(0,1fr) auto;
    }

    .admin-currency-filter button {
        min-width: 38px;
        min-height: 28px;
        font-size: 8px;
    }

    .admin-debt-row {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 8px;
    }

    .admin-debt-main {
        grid-template-columns: minmax(0,1fr) auto 20px;
        gap: 6px;
    }

    .admin-debt-values span {
        font-size: 7px;
    }

    .admin-debt-values strong {
        font-size: 10px;
    }

    .admin-debt-pay-btn {
        width: 100%;
        min-height: 31px;
    }

    /* details */
    .admin-detail-topbar {
        min-height: 38px;
        padding: 4px 8px;
        background: #fff;
        border-bottom: 1px solid #e8e1eb;
    }

    .admin-back-btn {
        min-height: 30px;
        color: #6726AB;
    }

    .admin-detail-scroll {
        padding: 8px;
    }

    .admin-status-buttons {
        grid-template-columns: 1fr 1fr;
    }

    .admin-status-button:last-child {
        grid-column: 1 / -1;
    }

    .admin-detail-grid {
        grid-template-columns: 1fr;
    }

    .admin-customer-info {
        grid-template-columns: 1fr;
    }

    .admin-client-finance-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-discount-form {
        grid-template-columns: 1fr;
    }

    .admin-finance-grid,
    .order-finance-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .admin-add-payment-btn {
        min-height: 32px;
        padding: 0 8px;
    }

    .payment-modal {
        align-items: end;
        padding: 0;
    }

    .payment-modal-card {
        width: 100%;
        max-height: 92vh;
        border-radius: 18px 18px 0 0;
        padding: 14px;
    }
}

@media (max-width: 420px) {
    .admin-compact-toolbar {
        grid-template-columns: minmax(0,1fr) 98px;
    }

    .admin-client-toolbar {
        grid-template-columns: minmax(0,1fr) 98px;
    }

    .admin-search-wrap input::placeholder {
        color: transparent;
    }

    .admin-search-wrap input:focus::placeholder {
        color: #aaa0ae;
    }

    .admin-main-tab {
        font-size: 9px;
    }

    .admin-finance-grid,
    .order-finance-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   V43 — BACK BUTTON / AUTH CHECKOUT / COMPACT ADMIN CONTROLS
   ============================================================ */

/* Desktop: кнопка Назад теперь видимая и в стиле интерфейса */
.admin-detail-topbar {
    min-height: 54px;
    padding: 7px 14px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e8e1eb;
    background: #fff;
}

.admin-back-btn {
    min-height: 40px !important;
    padding: 0 15px !important;
    border: 1px solid #d7c7e2 !important;
    border-radius: 11px !important;
    background: #f4edf9 !important;
    color: #6726AB !important;
    font-size: 12px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    box-shadow: 0 2px 8px rgba(63, 35, 79, .05);
}

.admin-back-btn:hover {
    border-color: #a77bc4 !important;
    background: #ede1f5 !important;
    transform: translateX(-1px);
}

/* Убираем возможное наложение старых sticky-правил */
.admin-compact-toolbar,
.admin-filter-row,
.admin-compact-stats {
    position: static !important;
    top: auto !important;
    bottom: auto !important;
    z-index: auto !important;
    margin: 0 !important;
}

/* Статус-фильтры теперь стоят перед поиском и компактнее */
.admin-filter-row {
    min-height: 32px;
    padding: 4px 14px 3px;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    scrollbar-width: none;
}

.admin-filter-row::-webkit-scrollbar {
    display: none;
}

.admin-chip {
    flex: 0 0 auto;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 8px;
    line-height: 1;
}

.admin-compact-toolbar {
    padding-top: 4px;
}

/* ---------------- MOBILE ---------------- */
@media (max-width: 800px) {
    .admin-header {
        min-height: 50px !important;
        padding: 5px 7px !important;
    }

    .admin-header-main {
        gap: 7px !important;
    }

    .admin-brand-mark {
        width: 30px !important;
        height: 30px !important;
        border-radius: 8px !important;
        font-size: 14px !important;
    }

    .admin-kicker {
        font-size: 7px !important;
        line-height: 1 !important;
    }

    .admin-header h2 {
        margin-top: 2px !important;
        font-size: 12px !important;
        line-height: 1 !important;
    }

    .admin-close-btn {
        width: 32px !important;
        min-height: 32px !important;
        border-radius: 9px !important;
        font-size: 14px !important;
    }

    .admin-main-tabs {
        min-height: 37px !important;
        padding: 3px 5px !important;
    }

    .admin-main-tab {
        min-height: 30px !important;
        padding: 0 6px !important;
        font-size: 8.5px !important;
    }

    .admin-compact-stats {
        gap: 4px !important;
        padding: 4px 5px 2px !important;
    }

    .admin-mini-stat {
        flex: 0 0 62px !important;
        min-height: 35px !important;
        padding: 4px 6px !important;
        border-radius: 8px !important;
    }

    .admin-mini-stat span {
        font-size: 6.5px !important;
    }

    .admin-mini-stat strong {
        margin-top: 2px !important;
        font-size: 12px !important;
    }

    /* фильтры: одна тонкая горизонтальная строка */
    .admin-filter-row {
        min-height: 27px !important;
        gap: 3px !important;
        padding: 2px 5px 3px !important;
    }

    .admin-chip {
        min-height: 21px !important;
        padding: 0 6px !important;
        font-size: 7px !important;
    }

    /* поиск ниже фильтров */
    .admin-compact-toolbar {
        grid-template-columns: minmax(0, 1fr) 94px !important;
        gap: 4px !important;
        padding: 3px 5px 4px !important;
    }

    .admin-search-wrap,
    .admin-select {
        min-height: 30px !important;
        border-radius: 8px !important;
    }

    .admin-search-wrap {
        padding: 0 7px !important;
        gap: 4px !important;
    }

    .admin-search-wrap input,
    .admin-select {
        font-size: 9px !important;
    }

    .admin-search-wrap input::placeholder {
        font-size: 8px !important;
    }

    .admin-search-wrap button {
        width: 21px !important;
        height: 21px !important;
        font-size: 9px !important;
    }

    .admin-detail-topbar {
        min-height: 40px !important;
        padding: 4px 6px !important;
    }

    .admin-back-btn {
        min-height: 31px !important;
        padding: 0 10px !important;
        border-radius: 9px !important;
        font-size: 9px !important;
    }

    .admin-list-scroll {
        padding-top: 5px !important;
    }
}

@media (max-width: 420px) {
    .admin-compact-toolbar {
        grid-template-columns: minmax(0, 1fr) 84px !important;
    }

    .admin-chip {
        padding-left: 5px !important;
        padding-right: 5px !important;
        font-size: 6.8px !important;
    }
}


/* ============================================================
   V44 PRODUCTION — ONE STATUS FILTER SYSTEM
   ============================================================ */

/* Старые вторичные фильтры окончательно скрыты */
.orders-filter-row,
.orders-filter-chips,
#ordersFilterChips,
#ordersResetBtn,
#adminFilterRow,
#adminSortSelect,
#ordersSortSelect {
    display: none !important;
}

/* -------- Personal orders: square cards + search -------- */

.orders-stats {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
    padding: 12px 20px 8px !important;
}

.orders-stat-card {
    min-width: 0 !important;
    min-height: 64px !important;
    padding: 10px 12px !important;
    border-radius: 14px !important;
}

.orders-stat-card span {
    font-size: 10px !important;
}

.orders-stat-card strong {
    margin-top: 6px !important;
    font-size: 21px !important;
}

.orders-toolbar-search-only {
    display: block !important;
    padding: 4px 20px 12px !important;
}

.orders-toolbar-search-only .orders-search-wrap {
    width: 100%;
}

/* -------- Admin: restored comfortable status cards -------- */

.admin-compact-stats {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
    padding: 11px 16px 7px !important;
}

.admin-mini-stat {
    min-width: 0 !important;
    min-height: 62px !important;
    padding: 10px 11px !important;
    border-radius: 13px !important;
}

.admin-mini-stat span {
    font-size: 9px !important;
}

.admin-mini-stat strong {
    margin-top: 6px !important;
    font-size: 20px !important;
}

.admin-search-only-toolbar {
    display: block !important;
    padding: 3px 16px 11px !important;
}

.admin-search-only-toolbar .admin-search-wrap {
    width: 100%;
    min-height: 42px !important;
    box-sizing: border-box;
}

.admin-search-only-toolbar .admin-search-wrap input {
    font-size: 12px !important;
}

/* status logic visual note:
   "Готовы" card = ready + shipped + completed.
   Badge on each order still displays exact status. */

/* Swipe-capable headers feel draggable on mobile */
@media (max-width: 800px) {
    .account-sheet-header,
    .orders-center-header,
    .admin-header,
    .payment-modal-head {
        touch-action: pan-x;
    }

    /* Customer orders */
    .orders-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 5px !important;
        padding: 7px 7px 5px !important;
    }

    .orders-stat-card {
        min-height: 54px !important;
        padding: 7px 7px !important;
        border-radius: 11px !important;
    }

    .orders-stat-card span {
        font-size: 8px !important;
        white-space: nowrap;
    }

    .orders-stat-card strong {
        margin-top: 4px !important;
        font-size: 17px !important;
    }

    .orders-toolbar-search-only {
        padding: 3px 7px 7px !important;
    }

    .orders-toolbar-search-only .orders-search-wrap {
        min-height: 38px !important;
        border-radius: 11px !important;
    }

    .orders-toolbar-search-only input {
        font-size: 12px !important;
    }

    /* Admin: comfortable, but only ONE filter row */
    .admin-header {
        min-height: 60px !important;
        padding: 8px 9px !important;
    }

    .admin-brand-mark {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }

    .admin-kicker {
        font-size: 8px !important;
    }

    .admin-header h2 {
        font-size: 15px !important;
        line-height: 1.05 !important;
    }

    .admin-close-btn {
        width: 38px !important;
        min-height: 38px !important;
    }

    .admin-main-tabs {
        min-height: 44px !important;
        padding: 4px 6px !important;
    }

    .admin-main-tab {
        min-height: 35px !important;
        font-size: 10px !important;
    }

    .admin-compact-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 5px !important;
        padding: 7px 7px 5px !important;
    }

    .admin-mini-stat {
        min-height: 56px !important;
        padding: 7px 7px !important;
        border-radius: 11px !important;
    }

    .admin-mini-stat span {
        font-size: 8px !important;
        white-space: nowrap;
    }

    .admin-mini-stat strong {
        margin-top: 4px !important;
        font-size: 18px !important;
    }

    .admin-search-only-toolbar {
        display: block !important;
        padding: 3px 7px 7px !important;
    }

    .admin-search-only-toolbar .admin-search-wrap {
        min-height: 38px !important;
        border-radius: 11px !important;
    }

    .admin-search-only-toolbar .admin-search-wrap input {
        font-size: 12px !important;
    }

    .admin-search-only-toolbar .admin-search-wrap input::placeholder {
        font-size: 11px !important;
        color: #a69dab !important;
    }

    /* keep content immediately below search */
    .admin-list-scroll {
        padding-top: 7px !important;
    }
}

@media (max-width: 380px) {
    .orders-stat-card span,
    .admin-mini-stat span {
        font-size: 7px !important;
    }

    .orders-stat-card strong,
    .admin-mini-stat strong {
        font-size: 16px !important;
    }
}
