html {
            -webkit-text-size-adjust: 100%;
            text-size-adjust: 100%;
            touch-action: pan-x pan-y;
            overscroll-behavior-x: none;
        }
        body {
            touch-action: pan-x pan-y;
            overscroll-behavior-x: none;
        }
        a, button, input, select, textarea, label, [role="button"] {
            touch-action: manipulation;
        }
        /* iPhone tự phóng trang khi ô nhập nhỏ hơn 16px; giữ 16px để bàn phím mở mà trang không zoom. */
        @media (max-width: 767px) {
            input[type="text"],
            input[type="search"],
            input[type="tel"],
            input[type="email"],
            input[type="number"],
            input[type="datetime-local"],
            input:not([type]),
            textarea {
                font-size: 16px;
            }
        }


    
        /* === 2026-06-28 MENU REBALANCE PATCH === */
        @media (min-width:1280px) {
            .catalog-layout { grid-template-columns:272px minmax(0,1fr) !important; gap:24px !important; }
            #products-grid { grid-template-columns:repeat(5,minmax(0,1fr)) !important; }
            .sort-control { min-width:220px !important; }
        }
        @media (min-width:1700px) {
            #products-grid { grid-template-columns:repeat(6,minmax(0,1fr)) !important; }
        }
        .product-meta-chip {
            display:inline-flex; align-items:center; gap:5px; max-width:100%;
            padding:4px 8px; border-radius:999px; border:1px solid var(--border);
            background:#fff; color:#64748b; font-size:9px; font-weight:800; line-height:1.15;
        }
        .product-meta-chip i { font-size:9px; color:var(--accent); }
        .product-card .product-copy { padding:11px; }
        .product-card .product-code { font-size:8.5px; line-height:1.05; }
        .product-card .product-name { font-size:14px; line-height:1.22; min-height:36px; }
        .product-card .product-card-footer { display:block !important; margin-top:auto; padding-top:10px; }
        .product-card .price-stack { display:flex; flex-direction:column; gap:8px; min-width:0; }
        .product-card .single-price-block { gap:4px; align-items:flex-end; }
        .product-card .product-price {
            font-size:21px; letter-spacing:-0.03em; line-height:1;
            text-decoration:none;
        }
        .product-card .product-unit { font-size:9px; color:#94a3b8; font-weight:800; line-height:1.1; }
        .product-card .sap-price-grid { gap:8px; }
        .product-card .sap-price-chip { background:#fff; border-color:#f2bfd0; padding:7px 8px; border-radius:11px; }
        .product-card .sap-price-label, .product-card .sap-price-unit { font-size:8px; color:#64748b; }
        .product-card .sap-price-chip .price-value {
            font-size:19px; line-height:1; letter-spacing:-0.025em;
            text-decoration:none;
        }
        .currency-symbol {
            display:inline-block; font-size:.74em; line-height:1; white-space:nowrap; margin-left:.07em;
            text-decoration:underline; text-decoration-thickness:1.2px; text-underline-offset:2px;
            vertical-align:baseline; transform:translateY(-0.02em);
        }
        .card-image-action {
            position:absolute; right:10px; bottom:10px; width:32px; height:32px; border-radius:10px;
            background:rgba(219,39,119,.92); color:#fff; border:1.5px solid rgba(255,255,255,.92);
            display:flex; align-items:center; justify-content:center;
            box-shadow:0 5px 12px rgba(15,23,42,.14); opacity:.92;
        }
        .card-image-action[disabled] { background:#e2e8f0; color:#94a3b8; box-shadow:none; border-color:#fff; }
        .card-image-action i { font-size:12px; }
        @media (max-width:1279px) {
            .product-card .product-copy { padding:9px !important; }
            .product-card .product-code { font-size:8px !important; }
            .product-card .product-name { font-size:11.2px !important; line-height:1.2 !important; min-height:28px !important; }
            .product-meta-chip { font-size:8px; padding:3px 7px; }
            .product-card .product-price { font-size:12.8px !important; }
            .product-card .product-unit { font-size:8px !important; }
            .product-card .sap-price-chip { padding:5px 6px !important; }
            .product-card .sap-price-label, .product-card .sap-price-unit { font-size:7px !important; }
            .product-card .sap-price-chip .price-value { font-size:12.2px !important; }
            .card-image-action { width:28px; height:28px; right:8px; bottom:8px; border-radius:9px; }
            .card-image-action i { font-size:11px; }
        }

    

        /* ===== Desktop card layout updated to follow the mobile card visual rhythm ===== */
        @media (min-width:1280px) {
            main {
                max-width:min(1920px, calc(100vw - 28px)) !important;
                padding-left:16px !important;
                padding-right:16px !important;
            }
            .catalog-layout {
                grid-template-columns:236px minmax(0,1fr) !important;
                gap:16px !important;
                align-items:start !important;
            }
            .desktop-filter-sidebar {
                width:236px !important;
            }
            .hero-section { border-radius:28px !important; }
            #products-grid {
                grid-template-columns:repeat(5, minmax(0,1fr)) !important;
                gap:14px !important;
            }
            .product-card {
                border-radius:20px !important;
            }
            .product-card .product-copy {
                padding:10px 10px 9px !important;
                min-height:0 !important;
            }
            .product-card .product-code-name-wrap {
                padding-right:0 !important;
            }
            .product-card .product-code {
                font-size:8px !important;
                line-height:1.05 !important;
                margin-bottom:3px !important;
                letter-spacing:.01em !important;
            }
            .product-card .product-name {
                font-size:13px !important;
                line-height:1.18 !important;
                min-height:0 !important;
                margin-top:0 !important;
                display:-webkit-box !important;
                -webkit-line-clamp:2 !important;
                -webkit-box-orient:vertical !important;
                overflow:hidden !important;
                text-wrap:balance;
            }
            .product-card .product-detail {
                display:none !important;
            }
            .product-card .product-meta-wrap {
                margin-top:6px !important;
                display:flex !important;
                flex-wrap:wrap !important;
                gap:5px !important;
            }
            .product-card .product-meta-chip {
                font-size:8px !important;
                line-height:1 !important;
                padding:4px 7px !important;
                gap:4px !important;
                border-radius:999px !important;
            }
            .product-card .product-meta-chip i {
                font-size:7.5px !important;
            }
            .product-card-footer {
                padding-top:9px !important;
                margin-top:auto !important;
            }
            .product-card .single-price-block {
                gap:3px !important;
                align-items:flex-start !important;
            }
            .product-card .product-price {
                font-size:clamp(14px, 1.05vw, 18px) !important;
                line-height:1.02 !important;
                letter-spacing:-0.02em !important;
            }
            .product-card .product-unit,
            .product-card .sap-price-label,
            .product-card .sap-price-unit {
                color:#94a3b8 !important;
            }
            .product-card .product-unit {
                font-size:8px !important;
                line-height:1.1 !important;
            }
            .product-card .sap-price-grid {
                gap:6px !important;
            }
            .product-card .sap-price-chip {
                min-width:0 !important;
                padding:6px 7px !important;
                border-radius:10px !important;
                background:#fff !important;
                border:1px solid #f2bfd0 !important;
            }
            .product-card .sap-price-label,
            .product-card .sap-price-unit {
                font-size:7.5px !important;
                line-height:1.08 !important;
            }
            .product-card .sap-price-chip .price-value {
                font-size:clamp(12.5px, 0.95vw, 16px) !important;
                line-height:1.02 !important;
                margin-top:3px !important;
                letter-spacing:-0.02em !important;
            }
            .card-image-action {
                width:34px !important;
                height:34px !important;
                right:8px !important;
                bottom:8px !important;
                border-radius:11px !important;
            }
        }
        @media (min-width:1440px) {
            #products-grid {
                grid-template-columns:repeat(6, minmax(0,1fr)) !important;
            }
        }
        @media (min-width:1800px) {
            main {
                max-width:min(2080px, calc(100vw - 32px)) !important;
            }
            #products-grid {
                grid-template-columns:repeat(6, minmax(0,1fr)) !important;
            }
        }

    

        /* ===== Fine-tune per latest feedback: smaller code/chip, better currency symbol, less eager name wrapping ===== */
        .currency-symbol {
            position: relative !important;
            top: -0.10em !important;
            font-size: .68em !important;
            line-height: 1 !important;
            text-decoration-thickness: 1px !important;
            text-underline-offset: 1px !important;
        }
        .product-card .product-name {
            overflow-wrap: normal !important;
            word-break: normal !important;
            hyphens: none !important;
            text-wrap: pretty !important;
        }
        @media (max-width:767px) {
            .product-card .product-code {
                font-size: 6.8px !important;
                letter-spacing: .015em !important;
            }
            .product-card .product-name {
                font-size: 11.3px !important;
                line-height: 1.17 !important;
            }
            .product-card .product-meta-chip {
                font-size: 6.9px !important;
                padding: 2.5px 6px !important;
                gap: 3px !important;
            }
            .product-card .product-meta-chip i {
                font-size: 6.7px !important;
            }
        }
        @media (min-width:1280px) {
            .product-card .product-code {
                font-size: 7px !important;
                line-height: 1.02 !important;
                letter-spacing: .01em !important;
                margin-bottom: 2px !important;
            }
            .product-card .product-name {
                font-size: 12.4px !important;
                line-height: 1.16 !important;
                text-wrap: pretty !important;
                -webkit-line-clamp: 2 !important;
            }
            .product-card .product-meta-wrap {
                margin-top: 5px !important;
                gap: 4px !important;
            }
            .product-card .product-meta-chip {
                font-size: 7px !important;
                line-height: 1 !important;
                padding: 3px 6px !important;
                gap: 3px !important;
            }
            .product-card .product-meta-chip i {
                font-size: 6.8px !important;
            }
            .product-card .product-price {
                font-size: clamp(14.8px, 1.05vw, 18px) !important;
            }
            .product-card .sap-price-chip .price-value {
                font-size: clamp(13.2px, 0.96vw, 16.2px) !important;
            }
        }

    

        /* ===== v3 fixes: keep /đơn vị under price and slightly enlarge attribute chip ===== */
        .product-card .single-price-block {
            display: flex !important;
            flex-direction: column !important;
            align-items: flex-start !important;
            justify-content: flex-start !important;
            gap: 1px !important;
            min-width: 0 !important;
        }
        .product-card .product-price {
            display: block !important;
            line-height: .96 !important;
        }
        .product-card .product-unit {
            display: block !important;
            width: 100% !important;
            margin-top: 2px !important;
            line-height: 1.08 !important;
            white-space: nowrap !important;
        }
        .product-card .product-meta-chip {
            font-size: 7.6px !important;
            padding: 3.5px 8px !important;
            border-radius: 999px !important;
            gap: 4px !important;
        }
        .product-card .product-meta-chip i {
            font-size: 7.3px !important;
        }
        .currency-symbol {
            top: -0.16em !important;
        }
        @media (max-width: 767px) {
            .product-card .product-meta-chip {
                font-size: 7.6px !important;
                padding: 3px 8px !important;
            }
            .product-card .product-meta-chip i {
                font-size: 7.2px !important;
            }
            .product-card .product-unit {
                font-size: 7.8px !important;
            }
        }
        @media (min-width: 1024px) {
            .product-card .product-meta-chip {
                font-size: 8.1px !important;
                padding: 4px 9px !important;
            }
            .product-card .product-meta-chip i {
                font-size: 7.8px !important;
            }
            .product-card .product-code {
                font-size: 6.6px !important;
            }
            .product-card .product-unit {
                font-size: 8.2px !important;
            }
        }

    

        /* ===== V4: single-price unit stays on same baseline; product code slightly larger ===== */
        .product-card .single-price-block {
            display:flex !important;
            flex-direction:row !important;
            align-items:baseline !important;
            justify-content:flex-start !important;
            gap:5px !important;
            min-width:0 !important;
        }
        .product-card .product-price {
            display:inline-block !important;
            flex:0 0 auto !important;
            line-height:1 !important;
        }
        .product-card .product-unit {
            display:inline-block !important;
            width:auto !important;
            margin:0 !important;
            padding:0 !important;
            line-height:1 !important;
            white-space:nowrap !important;
            vertical-align:baseline !important;
            transform:none !important;
        }
        .product-card .product-code {
            font-size:7.3px !important;
            line-height:1.05 !important;
            letter-spacing:.015em !important;
        }
        @media (max-width:767px) {
            .product-card .product-code {
                font-size:7.1px !important;
            }
            .product-card .single-price-block {
                gap:4px !important;
            }
            .product-card .product-unit {
                font-size:8px !important;
            }
        }
        @media (min-width:1280px) {
            .product-card .product-code {
                font-size:7.4px !important;
            }
            .product-card .product-unit {
                font-size:8.4px !important;
            }
        }

    

        /* ===== V5: smooth scroll-linked mobile filter in portrait + phone landscape ===== */
        html.zoey-filter-motion {
            --zoey-filter-sticky-top: 68px;
        }
        html.zoey-filter-motion #mobile-filter-anchor {
            display:block !important;
            position:sticky !important;
            top:var(--zoey-filter-sticky-top) !important;
            overflow:hidden !important;
            min-height:55px !important;
            padding:6px !important;
            margin-bottom:10px !important;
            background:#fff !important;
            border:1px solid var(--border) !important;
            border-radius:16px !important;
            box-shadow:0 4px 14px rgba(15,23,42,.08) !important;
            contain:none !important;
            isolation:isolate !important;
            z-index:35 !important;
            will-change:height !important;
            overflow-anchor:none !important;
            transform:translateZ(0) !important;
        }
        html.zoey-filter-motion #mobile-filter-anchor .mobile-filter-expanded,
        html.zoey-filter-motion #mobile-filter-anchor .mobile-filter-compact {
            position:absolute !important;
            left:6px !important;
            right:6px !important;
            top:6px !important;
            width:auto !important;
            margin:0 !important;
            max-height:none !important;
            display:flex !important;
            backface-visibility:hidden !important;
            transform-origin:top center !important;
            will-change:opacity,transform !important;
        }
        html.zoey-filter-motion #mobile-filter-anchor .mobile-filter-expanded {
            display:block !important;
            z-index:1 !important;
        }
        html.zoey-filter-motion #mobile-filter-anchor .mobile-filter-compact {
            z-index:2 !important;
            align-items:center !important;
        }
        html.zoey-filter-motion #mobile-filter-anchor input,
        html.zoey-filter-motion #mobile-filter-anchor select {
            min-height:40px;
        }
        html.zoey-filter-motion body,
        html.zoey-filter-motion main,
        html.zoey-filter-motion .catalog-layout,
        html.zoey-filter-motion #products-grid {
            overflow-anchor:none;
        }
        @media (orientation:landscape) and (pointer:coarse) and (max-height:620px) and (max-width:1279px) {
            html.zoey-filter-motion #mobile-filter-anchor {
                border-radius:14px !important;
                margin-bottom:8px !important;
            }
            html.zoey-filter-motion #mobile-filter-anchor .mobile-filter-expanded,
            html.zoey-filter-motion #mobile-filter-anchor .mobile-filter-compact {
                top:5px !important;
                left:5px !important;
                right:5px !important;
            }
            html.zoey-filter-motion #mobile-filter-anchor .mobile-filter-expanded {
                transform-origin:top center !important;
            }
        }

    

        /* === ZOEY BANNER + PROMO POPUP PATCH === */
        .zoey-banner-carousel { position:relative; border-radius:30px; overflow:hidden; min-height:0; background:var(--light); border:1px solid var(--border); box-shadow:0 18px 45px rgba(15,23,42,.10); }
        .zoey-banner-slide { display:none; position:relative; min-height:0; animation:zoeyBannerFade .55s ease both; }
        .zoey-banner-slide.active { display:block; }
        /* Tỉ lệ banner ĐỒNG BỘ mọi thiết bị (chuẩn theo khung PC ~5:1) — ảnh crop giống hệt nhau trên PC/tablet/ĐT */
        .zoey-banner-slide img { width:100%; height:auto; aspect-ratio:5/1; object-fit:cover; display:block; }
        .zoey-banner-dots { position:absolute; left:0; right:0; bottom:12px; display:flex; justify-content:center; gap:7px; z-index:3; }
        .zoey-banner-dot { width:8px; height:8px; border-radius:999px; background:rgba(255,255,255,.60); border:1px solid rgba(255,255,255,.8); }
        .zoey-banner-dot.active { width:22px; background:#fff; }
        @keyframes zoeyBannerFade { from { opacity:.25; transform:translateX(12px); } to { opacity:1; transform:translateX(0); } }
        @media (max-width:767px) {
            .zoey-banner-carousel { border-radius:18px; min-height:0; }
            .zoey-banner-slide, .zoey-banner-slide img { min-height:0; height:auto; aspect-ratio:5/1; }
        }
        .promo-popup-card { max-width:480px; width:min(92vw,480px); background:#fff; border-radius:22px; box-shadow:0 24px 80px rgba(15,23,42,.24); border:1px solid var(--border); overflow:hidden; }
        .promo-popup-title { color:var(--primary); font-size:22px; line-height:1.22; font-weight:900; letter-spacing:.02em; }
        .promo-popup-input { width:100%; border:1px solid var(--border); border-radius:14px; padding:13px 14px; font-size:13px; font-weight:800; outline:none; }
        .promo-popup-input:focus { border-color:var(--accent); box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
        .promo-popup-btn { border-radius:14px; padding:13px 14px; font-size:12px; font-weight:900; }

        .zoey-menu-color-row{display:grid;grid-template-columns:46px minmax(96px,1fr);align-items:center;gap:5px;margin-top:.30rem;max-width:176px;}
        .zoey-menu-color-label{height:24px;display:flex;align-items:center;justify-content:center;border-radius:999px;background:#fff;border:1px solid var(--border);color:#64748b;font-size:7px;font-weight:900;text-transform:uppercase;white-space:nowrap;padding:0 6px;}
        .zoey-menu-color-row select{min-width:0;width:100%;height:24px!important;padding:0 20px 0 8px!important;appearance:auto;-webkit-appearance:auto;font-size:8px!important;border-radius:999px!important;}
        .zoey-detail-color-row{display:grid;grid-template-columns:58px minmax(140px,220px);align-items:center;gap:7px;max-width:292px;}
        .zoey-detail-color-label{height:32px;display:flex;align-items:center;justify-content:center;border-radius:999px;background:#fff7fb;border:1px solid var(--border);color:#64748b;font-size:9px;font-weight:900;text-transform:uppercase;white-space:nowrap;padding:0 8px;}
        .zoey-detail-color-row select{max-width:220px;height:32px!important;padding:0 26px 0 10px!important;appearance:auto;-webkit-appearance:auto;border-radius:999px!important;}
        @media(max-width:767px){.zoey-menu-color-row{grid-template-columns:44px minmax(92px,1fr);max-width:168px;} .zoey-detail-color-row{grid-template-columns:56px minmax(128px,1fr);max-width:260px;} .zoey-detail-color-row select{max-width:none;}}


/* Sửa kích thước chữ và khoảng cách trong Popup để to, rõ, sáng sủa và chuẩn lề */
html body #detail-product-name {
  font-size: 24px !important;
  font-weight: 900 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.02em !important;
}
html body #detail-product-description {
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: #475569 !important;
}
html body #detail-product-tags > span {
  font-size: 12px !important;
  padding: 8px 12px !important;
}
html body #detail-product-tags > span i {
  font-size: 12px !important;
}

/* Nút Mua lẻ / Nguyên hộp */
html body .sap-mode-button {
  padding: 12px 8px !important;
  border-radius: 14px !important;
}
html body .sap-mode-button span {
  font-size: 14px !important;
  font-weight: 900 !important;
}

/* Khu vực Giá & Đơn vị */
html body .detail-price-summary {
  padding: 20px !important;
  gap: 8px !important;
  margin-top: 24px !important;
}
html body .detail-summary-label {
  font-size: 12px !important;
  margin-bottom: 4px !important;
}
html body #detail-product-price {
  font-size: 28px !important;
}
html body #detail-product-unit {
  font-size: 14px !important;
  margin-left: 2px !important;
}
html body #detail-product-available {
  font-size: 13px !important;
  padding: 4px 10px !important;
}
html body .detail-quantity-title {
  font-size: 14px !important;
}
html body #detail-product-qty {
  font-size: 16px !important;
  width: 48px !important;
}
html body .detail-qty-button {
  width: 44px !important;
  height: 44px !important;
}
html body .detail-qty-button i {
  font-size: 14px !important;
}
html body #detail-add-cart-btn {
  font-size: 15px !important;
  height: 56px !important;
  border-radius: 18px !important;
}

@media (max-width: 767px) {
  html body #detail-product-name {
    font-size: 22px !important;
  }
  html body #detail-product-description {
    font-size: 13px !important;
  }
  html body .sap-mode-button span {
    font-size: 13px !important;
  }
  html body #detail-product-price {
    font-size: 26px !important;
  }
  html body #detail-product-unit {
    font-size: 13px !important;
  }
  html body #detail-add-cart-btn {
    font-size: 14px !important;
    height: 52px !important;
  }
}

/* Đảm bảo khung Popup sáng và rõ */
html body .product-detail-panel {
  box-shadow: 0 24px 80px rgba(15,23,42,0.15) !important;
}

/* Thẻ sản phẩm ôm sát nội dung: thẻ 1 dòng ngắn gọn tự nhiên, thẻ 2 dòng cao tương ứng */
html body #products-grid {
  grid-auto-rows: auto !important;
  align-items: start !important;
}
html body .zoey-card-v28 {
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
}
