/* theme-home-v3.css: nền chung trang chủ v3 (Claude-A).
   Nguồn: design/homepage/round2/codex/SPEC.md (Anker: Sạch và rõ) + CRITIQUE-VISUAL V1–V9 + IMPLEMENT.md.
   Hợp đồng class dùng chung (Codex, Antigravity chỉ dùng, không ghi đè):
     .hv2 (bọc thân trang), .hv2-sec (section), .hv2-wrap (container),
     .hv2-head, .hv2-head__title, .hv2-head__sub, .hv2-head__link, .hv2-rail (hàng cuộn ngang ≤768px).
   Biến dùng chung: --hv2-gutter (lề ngoài container), --hv2-gap (khoảng cách section), --hp-* (màu).
   Dark chỉ ở ≤768px qua html[data-mobile-theme="dark"]; desktop luôn sáng. Không sửa :root của theme. */

.hv2 {
  /* Khung: lề trùng header/hero của theme (12px ≤1100, 18px >1100; 1440 → 85px). */
  --hv2-max: 1270px;
  --hv2-gutter: 18px;
  --hv2-gap: 64px;
  --hv2-radius: 16px;
  /* Màu (SPEC, mục Token) */
  --hp-ink: #0b1118;
  --hp-muted: #66727d;
  --hp-blue: #00a7e1;
  --hp-blue-deep: #007fae;
  --hp-red: #e32636;
  --hp-surface: #f4f7f9;
  --hp-surface-strong: #eaf0f3;
  --hp-border: #dce4e8;
  --hp-bg: #fff;
  --hp-card: #fff;
  --hp-link: #007fae;
  --hp-sale: #c41f2e;
  --hp-sale-bg: #fff2f4;
  --hp-focus: #007fae;
  /* Tên cũ v2, giữ cho file khác đang dùng */
  --hv2-ink: var(--hp-ink);
  --hv2-muted: var(--hp-muted);
  --hv2-action: var(--hp-link);
  --hv2-surface: var(--hp-surface);
  --hv2-surface-strong: var(--hp-surface-strong);
  --hv2-border: var(--hp-border);
  color: var(--hp-ink);
  background: var(--hp-bg);
  overflow-x: clip;
}
@media (max-width: 1100px) { .hv2 { --hv2-gutter: 12px; } }
@media (max-width: 768px) { .hv2 { --hv2-gap: 40px; } }

/* Bản xem trước ?view=v3: theme bọc template khác index trong main.wrapper (1200px). Trên index thật không có
   .wrapper nên rule này không khớp; ở đây nó trả thân trang về full width để đo đúng như khi cài. */
.main-content.wrapper:has(> .hv2) { max-width: none; width: auto; padding-left: 0; padding-right: 0; }

/* ---------- Reset rule timber cũ trong thân v3 ---------- */
.hv2 .hv2-sec ul { margin: 0; padding: 0; list-style: none; }
.hv2 .hv2-sec li { margin: 0; }
.hv2 .hv2-sec h2,
.hv2 .hv2-sec h3 { text-transform: none; }
.hv2 .hv2-sec p { margin: 0; }
.hv2 .hv2-sec img { max-width: 100%; }

.hv2-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Container và nhịp dọc ---------- */
.hv2-wrap { box-sizing: border-box; width: 100%; max-width: calc(var(--hv2-max) + 2 * var(--hv2-gutter)); margin: 0 auto; padding: 0 var(--hv2-gutter); }
.hv2-sec { margin-top: var(--hv2-gap); }
.hv2 > .hv2-hero + .hv2-sec { margin-top: 32px; }               /* dưới chấm hero → khối sale */
.hv2 > .hv2-sec:last-of-type { margin-bottom: var(--hv2-gap); } /* V9: khoảng thở trước footer */

/* ---------- Đầu khối: tiêu đề trái, một link phải, cùng chân chữ (V3) ---------- */
.hv2 .hv2-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin: 0 0 24px; }
.hv2 .hv2-head > div { min-width: 0; }
.hv2 .hv2-head__title { margin: 0; padding: 0; color: var(--hp-ink); font-family: inherit; font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -0.025em; text-align: left; text-transform: none; }
.hv2 .hv2-head__sub { margin: 8px 0 0; color: var(--hp-muted); font-size: 14px; line-height: 21px; font-weight: 400; }
.hv2 .hv2-head__link { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; margin-block: -12px; padding: 0; color: var(--hp-link); font-size: 14px; line-height: 20px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.hv2 .hv2-head__link:hover { color: var(--hp-link); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Focus chung ---------- */
.hv2 a:focus-visible,
.hv2 button:focus-visible,
.hv2 [tabindex]:focus-visible { outline: 3px solid var(--hp-focus); outline-offset: 4px; }
.hv2 .hv2-rail:focus-visible { border-radius: 8px; }

/* ---------- Lưới sản phẩm (Đang giảm giá 5 cột, Sản phẩm mới 4×2) ---------- */
.hv2 .hv2-grid { display: grid; gap: 20px; }
.hv2 .hv2-grid--deals { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.hv2 .hv2-grid--new { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hv2 .hv2-grid__item { display: flex; min-width: 0; }

/* ---------- Card product-item (lượt 7) trong .hv2: chỉ trình bày, giữ nguyên markup và logic mua ---------- */
.hv2 .hv2-grid .hv2-grid__item .product-container { display: flex; flex-direction: column; box-sizing: border-box; width: 100%; height: auto; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--hp-border); border-radius: var(--hv2-radius); background: var(--hp-card); box-shadow: none; transform: none; transition: border-color .15s ease; }
.hv2 .hv2-grid .hv2-grid__item .product-container:hover { border-color: var(--hp-link); box-shadow: none; transform: none; }
.hv2 .hv2-grid .hv2-grid__item .product-container:focus-within { border-color: var(--hp-focus); }

/* Ảnh: khung vuông nền trắng, contain */
.hv2 .hv2-grid .hv2-grid__item .product-image { position: relative; flex: 0 0 auto; margin: 0; padding: 0; border: 0; border-radius: 0; background: #fff; aspect-ratio: 1 / 1; overflow: hidden; }
.hv2 .hv2-grid .hv2-grid__item .product-thumbnail { position: static; width: 100%; height: 100%; margin: 0; padding: 0; background: #fff; }
.hv2 .hv2-grid .hv2-grid__item .product-thumbnail > a { position: relative; display: block; box-sizing: border-box; width: 100%; height: 100%; padding: 20px; background: #fff; }
.hv2 .hv2-grid .hv2-grid__item .product-thumbnail img { display: block; width: 100%; height: 100%; max-width: 100%; margin: 0; object-fit: contain; background: #fff; filter: none; mix-blend-mode: normal; transform: none; }
.hv2 .hv2-grid .hv2-grid__item .product-container:hover .product-thumbnail img { transform: none; filter: none; }
.hv2 .hv2-grid .hv2-grid__item .product-thumbnail img.back-img { position: absolute; inset: 20px; width: calc(100% - 40px); height: calc(100% - 40px); }

/* Nhãn: % góc trái; một nhãn góc phải (New ưu tiên, nếu không thì ĐỀ CỬ). Màu New giữ theo cài đặt theme. */
.hv2 .hv2-grid .hv2-grid__item .product-image .label.on-sale { position: absolute; z-index: 7; top: 12px; left: 12px; right: auto; bottom: auto; width: auto; height: auto; min-width: 0; margin: 0; padding: 4px 8px; border: 0; border-radius: 20px; background: var(--hp-red); color: #fff; font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: 0; transform: none; }
.hv2 .hv2-grid .hv2-grid__item .product-image .product-badge-pick,
.hv2 .hv2-grid .hv2-grid__item .product-image .product-promo-tag--1 { position: absolute; z-index: 7; top: 12px; right: 12px; left: auto; bottom: auto; width: auto; height: auto; margin: 0; padding: 4px 8px; border-radius: 6px; font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .02em; transform: none; }
.hv2 .hv2-grid .hv2-grid__item .product-image .label.sold-out { position: absolute; z-index: 7; bottom: 12px; left: 12px; top: auto; margin: 0; padding: 4px 8px; border-radius: 6px; font-size: 11px; line-height: 16px; }

/* Thông tin */
.hv2 .hv2-grid .hv2-grid__item .product-meta { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; margin: 0; padding: 16px; border: 0; background: transparent; text-align: left; }
.hv2 .hv2-grid .hv2-grid__item .name-price { display: block; height: auto; min-height: 0; margin: 0; padding: 0; }
.hv2 .hv2-grid .hv2-grid__item .name-price::before,
.hv2 .hv2-grid .hv2-grid__item .name-price::after { content: none; }
.hv2 .hv2-grid .hv2-grid__item .product-name { min-height: 63px; margin: 0 0 12px; padding: 0; color: var(--hp-ink); font-size: 14px; line-height: 21px; font-weight: 600; letter-spacing: -0.015em; text-align: left; text-transform: none; white-space: normal; overflow: visible; display: block; -webkit-line-clamp: unset; overflow-wrap: anywhere; height: auto; max-height: none; }
.hv2 .hv2-grid .hv2-grid__item .product-name > a,
.hv2 .hv2-grid .hv2-grid__item .product-name > a:first-child { display: inline; height: auto; overflow: visible; color: inherit; font: inherit; text-decoration: none; white-space: normal; -webkit-line-clamp: unset; }
.hv2 .hv2-grid .hv2-grid__item .product-name > a:hover { color: var(--hp-link); text-decoration: underline; text-underline-offset: 3px; }

.hv2 .hv2-grid .hv2-grid__item .product-price { margin: 0; padding: 0; text-align: left; }
.hv2 .hv2-grid .hv2-grid__item .product-price .amout { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-height: 28px; font-variant-numeric: tabular-nums; }
.hv2 .hv2-grid .hv2-grid__item .product-price .amout > span { order: 0; color: var(--hp-ink); font-size: 18px; line-height: 26px; font-weight: 700; letter-spacing: -0.01em; }
.hv2 .hv2-grid .hv2-grid__item .product-price .amout > del { order: 1; margin: 0; padding: 0; color: var(--hp-muted); font-size: 12px; line-height: 18px; font-weight: 400; white-space: nowrap; text-decoration: line-through; }

/* Chip: tối đa hai, nền phụ, wrap đủ chữ; luôn giữ 24px để nút thẳng hàng */
.hv2 .hv2-grid .hv2-grid__item .product-tags { display: flex; flex-wrap: wrap; gap: 5px; width: auto; height: auto; min-height: 24px; margin: 8px 0 0; padding: 0; overflow: visible; }
.hv2 .hv2-grid .hv2-grid__item .product-tags .product-promo-tag { display: inline-block; position: static; max-width: 100%; margin: 0; padding: 3px 6px; height: auto; border: 0 !important; border-radius: 4px; background: var(--hp-surface) !important; color: var(--hp-ink) !important; box-shadow: none !important; font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0; text-transform: none; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.hv2 .hv2-grid .hv2-grid__item .product-tags > * { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.hv2 .hv2-grid .hv2-grid__item .product-tags > :nth-child(n+3) { display: none !important; }
.hv2 .hv2-grid .hv2-grid__item .haravan-product-reviews-badge:empty { display: none; }

/* Chân card: bộ đếm + nút, neo đáy */
.hv2 .hv2-grid .hv2-grid__item .product-card-foot { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 18px; }
.hv2 .hv2-grid .hv2-grid__item .sale-cycle-countdown { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: 4px; row-gap: 0; margin: 0; padding: 7px 4px; border: 0; border-radius: 6px; background: var(--hp-sale-bg); color: var(--hp-muted); font-size: 11px; line-height: 16px; font-weight: 400; font-variant-numeric: tabular-nums; text-align: center; }
.hv2 .hv2-grid .hv2-grid__item .sale-cycle-countdown__label { color: var(--hp-sale); }
.hv2 .hv2-grid .hv2-grid__item .sale-cycle-countdown__timer { display: inline-flex; align-items: baseline; gap: 2px; color: var(--hp-sale); white-space: nowrap; }
.hv2 .hv2-grid .hv2-grid__item .sale-cycle-countdown strong { color: var(--hp-sale); font-weight: 600; }
.hv2 .hv2-grid .hv2-grid__item .sale-cycle-countdown__timer > span { color: var(--hp-sale); }

.hv2 .hv2-grid .hv2-grid__item .product-card-foot .product-actions .product-action { min-height: 44px; padding: 10px 8px; border-width: 1px; border-radius: 10px; font-size: 13px; line-height: 22px; font-weight: 700; }
.hv2 .hv2-grid .hv2-grid__item .product-card-foot .product-actions .product-action--ghost { color: var(--hp-link); background: transparent; border-color: var(--hp-link); }
.hv2 .hv2-grid .hv2-grid__item .product-card-foot .product-actions .product-action--ghost:hover,
.hv2 .hv2-grid .hv2-grid__item .product-card-foot .product-actions .product-action--ghost:focus-visible { color: var(--hp-link); background: var(--hp-surface); border-color: var(--hp-link); }
.hv2 .hv2-grid .hv2-grid__item .product-card-foot .product-actions .product-action--off,
.hv2 .hv2-grid .hv2-grid__item .product-card-foot .product-actions .product-action--off:hover { color: var(--hp-muted); background: var(--hp-surface-strong); border-color: var(--hp-surface-strong); }
.hv2 .hv2-grid .hv2-grid__item .product-card-foot .product-actions .product-action:focus-visible { outline: 3px solid var(--hp-focus); outline-offset: 2px; }

/* ---------- Tablet 769–1100 ---------- */
@media (min-width: 769px) and (max-width: 1100px) {
  .hv2 .hv2-head__title { font-size: 28px; line-height: 35px; }
  .hv2 .hv2-grid { gap: 12px; }
  .hv2 .hv2-grid .hv2-grid__item .product-thumbnail > a { padding: 16px; }
  .hv2 .hv2-grid .hv2-grid__item .product-thumbnail img.back-img { inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px); }
  .hv2 .hv2-grid .hv2-grid__item .product-meta { padding: 12px; }
  .hv2 .hv2-grid .hv2-grid__item .product-name { min-height: 80px; font-size: 13px; line-height: 20px; }
  .hv2 .hv2-grid--deals .hv2-grid__item .product-price .amout > span { font-size: 16px; line-height: 24px; }
  .hv2 .hv2-grid--deals .hv2-grid__item .sale-cycle-countdown { padding: 6px 2px; font-size: 10px; }
  .hv2 .hv2-grid--deals .hv2-grid__item .product-card-foot .product-actions .product-action { font-size: 11px; padding-inline: 4px; }
  .hv2 .hv2-grid--deals .hv2-grid__item .product-card-foot .product-action__icon { display: none; }
  .hv2 .hv2-grid .hv2-grid__item .product-image .label.on-sale { left: 8px; }
  .hv2 .hv2-grid--deals .hv2-grid__item .product-image .product-badge-pick,
  .hv2 .hv2-grid--deals .hv2-grid__item .product-image .product-promo-tag--1 { right: 8px; padding: 3px 5px; font-size: 10px; }
}

/* ---------- Mobile ≤768 ---------- */
@media (max-width: 768px) {
  .hv2 > .hv2-hero + .hv2-sec { margin-top: 20px; }
  .hv2 .hv2-head { flex-direction: column; align-items: flex-start; gap: 0; margin-bottom: 16px; }
  .hv2 .hv2-head__title { font-size: 24px; line-height: 31px; }
  .hv2 .hv2-head__sub { margin-top: 6px; font-size: 13px; line-height: 19.5px; }
  .hv2 .hv2-head__link { margin: -4px 0 -10px; font-size: 13px; }

  /* Rail ngang dùng chung: tràn tới mép màn, lộ card kế. Selector có ul để thắng reset ul phía trên (V2). */
  .hv2 .hv2-rail,
  .hv2 .hv2-sec ul.hv2-rail { display: grid; grid-auto-flow: column; grid-template-columns: none; margin: 0 calc(-1 * var(--hv2-gutter)); padding: 4px var(--hv2-gutter) 12px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--hv2-gutter); scrollbar-width: thin; scrollbar-color: var(--hp-border) transparent; -webkit-overflow-scrolling: touch; }
  .hv2 .hv2-rail > li { scroll-snap-align: start; }
  .hv2 .hv2-rail:focus-visible { outline-offset: -3px; }

  .hv2 .hv2-grid { gap: 12px; }
  .hv2 .hv2-sec ul.hv2-grid--deals { grid-auto-columns: 232px; gap: 12px; }
  .hv2 .hv2-grid--new { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }

  .hv2 .hv2-grid .hv2-grid__item .product-thumbnail > a { padding: 16px; }
  .hv2 .hv2-grid .hv2-grid__item .product-thumbnail img.back-img { display: none; }
  .hv2 .hv2-grid--new .hv2-grid__item .product-thumbnail > a { padding: 12px; }
  .hv2 .hv2-grid .hv2-grid__item .product-meta { padding: 12px; }
  .hv2 .hv2-grid .hv2-grid__item .product-name { min-height: 80px; margin-bottom: 10px; font-size: 13px; line-height: 20px; }
  .hv2 .hv2-grid .hv2-grid__item .product-price .amout { flex-direction: column; align-items: flex-start; gap: 0; min-height: 46px; }
  .hv2 .hv2-grid .hv2-grid__item .product-price .amout > span { font-size: 16px; line-height: 24px; }
  .hv2 .hv2-grid .hv2-grid__item .product-price .amout > del { font-size: 11px; line-height: 16px; }
  .hv2 .hv2-grid .hv2-grid__item .product-tags { gap: 4px; }
  .hv2 .hv2-grid .hv2-grid__item .product-tags .product-promo-tag { padding: 3px 5px; font-size: 10px; line-height: 15px; }
  .hv2 .hv2-grid .hv2-grid__item .product-image .label.on-sale,
  .hv2 .hv2-grid .hv2-grid__item .product-image .product-badge-pick,
  .hv2 .hv2-grid .hv2-grid__item .product-image .product-promo-tag--1 { top: 10px; padding: 3px 6px; font-size: 10px; line-height: 14px; }
  .hv2 .hv2-grid .hv2-grid__item .product-image .label.on-sale { left: 10px; }
  .hv2 .hv2-grid .hv2-grid__item .product-image .product-badge-pick,
  .hv2 .hv2-grid .hv2-grid__item .product-image .product-promo-tag--1 { right: 10px; }
  .hv2 .hv2-grid .hv2-grid__item .product-card-foot { gap: 8px; padding-top: 14px; }
  .hv2 .hv2-grid .hv2-grid__item .sale-cycle-countdown { padding: 6px 2px; font-size: 10px; line-height: 16px; }
  .hv2 .hv2-grid .hv2-grid__item .product-card-foot .product-actions .product-action { min-height: 44px; padding: 10px 5px; font-size: 12px; line-height: 22px; }

  /* Dark mobile: nền trang/card tối, ảnh sản phẩm vẫn trắng */
  html[data-mobile-theme="dark"] .hv2 {
    --hp-ink: #f1f6f8; --hp-muted: #9baab4; --hp-surface: #121c25; --hp-surface-strong: #1a2731; --hp-border: #2c3a45;
    --hp-bg: #070d13; --hp-card: #121c25; --hp-link: #7dd3f5; --hp-focus: #7dd3f5; --hp-sale: #ff7a84; --hp-sale-bg: #291d25;
    color-scheme: dark;
  }
  html[data-mobile-theme="dark"] .hv2 .hv2-grid .hv2-grid__item .product-tags .product-promo-tag { background: #1a2731 !important; color: #f1f6f8 !important; }
}

/* 600–768: lưới mới 4 cột để card không phình 360px+ (cùng cỡ card mobile) */
@media (min-width: 600px) and (max-width: 768px) {
  .hv2 .hv2-grid--new { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 359px) {
  .hv2 .hv2-grid .hv2-grid__item .sale-cycle-countdown { padding-inline: 1px; column-gap: 2px; }
  .hv2 .hv2-grid .hv2-grid__item .product-card-foot .product-actions .product-action { padding-inline: 3px; font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .hv2 .hv2-grid .hv2-grid__item .product-container { transition: none; }
}

/* Khoảng trống trước dải "Mua sắm theo danh mục" (footer): Tùng báo 16/10. Nội dung cuối → tiêu đề dải ≈ 80px desktop / 56px mobile. */
.template-index .site-footer { margin-top: 0 !important; }
.template-index .hv2 .hv3-blog-sec { margin-bottom: 0 !important; padding-bottom: 40px !important; }
.template-index .site-footer__top .space-padding-tb-40 { padding-top: 40px !important; }
@media (max-width: 768px) {
  .template-index .hv2 .hv3-blog-sec { padding-bottom: 28px !important; }
  .template-index .site-footer__top .space-padding-tb-40 { padding-top: 28px !important; }
}

/* Đang giảm giá: tiêu đề mạnh hơn (Tùng 16/10): nhãn "Giảm đến X%" (max của 5 SP đang hiện, làm tròn lên) + bộ đếm chu kỳ 6 ngày. */
.hv2 .hv2-deal__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.hv2 .hv2-deal__badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; background: #e32636; color: #fff; font-size: 0.5em; font-weight: 700; letter-spacing: 0.01em; line-height: 1.4; white-space: nowrap; }
.hv2 .hv2-deal__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; color: var(--anker-ink, #0b1118); font-weight: 500; }
.hv2 .sale-cycle-countdown.hv2-deal__timer { display: inline-flex; margin: 0; padding: 4px 10px; min-height: 0; border: 0; border-radius: 8px; background: #fff2f4; width: auto; }
.hv2 .hv2-deal__timer .sale-cycle-countdown__timer { display: inline-flex; align-items: baseline; gap: 3px; color: #c41f2e; font-variant-numeric: tabular-nums; font-size: 14px; }
.hv2 .hv2-deal__timer strong { font-weight: 700; color: #c41f2e; }
.hv2 .hv2-deal__timer span { color: #c41f2e; }
@media (max-width: 768px) {
  .hv2 .hv2-deal__badge { font-size: 13px; padding: 3px 10px; }
  .hv2 .hv2-deal__timer .sale-cycle-countdown__timer { font-size: 13px; }
  html[data-mobile-theme="dark"] .hv2 .hv2-deal__sub { color: #f1f6f8; }
  html[data-mobile-theme="dark"] .hv2 .sale-cycle-countdown.hv2-deal__timer { background: #291d25; }
  html[data-mobile-theme="dark"] .hv2 .hv2-deal__timer .sale-cycle-countdown__timer,
  html[data-mobile-theme="dark"] .hv2 .hv2-deal__timer strong,
  html[data-mobile-theme="dark"] .hv2 .hv2-deal__timer span { color: #ff9ba8; }
}
/* Bộ đếm đầu khối: giữ bề rộng cố định để số chạy không làm dòng nhảy (CLS 320px). */
.hv2 .sale-cycle-countdown.hv2-deal__timer { white-space: nowrap; min-width: 13.5em; justify-content: center; }
.hv2 .hv2-deal__timer strong { display: inline-block; min-width: 2ch; text-align: center; }
/* Đang giảm giá: đã có bộ đếm chung ở đầu khối → ẩn bộ đếm dưới chân từng card trong khối này (Tùng 16/10, LP-14). Card ở trang khác giữ nguyên. */
.hv2 .hv2-grid--deals .product-container .sale-cycle-countdown,
.hv2 .hv2-grid--deals .product-container .mega-live-countdown { display: none !important; }


/* Trang chủ: Đang giảm giá + Sản phẩm mới là 1 hàng trượt, bỏ link "Xem tất cả" (Tùng 18/10).
   Nút ‹ › tròn hai bên, giữa ảnh card, ẩn khi tới đầu/cuối; thanh tiến độ dưới hàng báo còn bao nhiêu để trượt. */
.hv2 .hv2-railbox { position: relative; }
.hv2 .hv2-railbox ul.hv2-rail {
  display: grid; grid-auto-flow: column; grid-template-columns: none !important;
  grid-auto-columns: calc((100% - 4 * 20px) / 4.5); gap: 20px;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 0; margin: 0;
}
.hv2 .hv2-railbox ul.hv2-rail::-webkit-scrollbar { display: none; }
.hv2 .hv2-railbox ul.hv2-rail > li { scroll-snap-align: start; }
.hv2 .hv2-railbox__btn {
  position: absolute; top: var(--hv2-railimg, 140px); z-index: 3; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; padding: 0;
  border: 1px solid var(--hp-border); border-radius: 999px; background: #fff; color: #0b1118;
  box-shadow: 0 6px 20px rgba(11, 17, 24, .18); cursor: pointer; transition: opacity .2s, background-color .15s;
}
.hv2 .hv2-railbox__btn--prev { left: -26px; }
.hv2 .hv2-railbox__btn--next { right: -26px; }
.hv2 .hv2-railbox__btn:hover { background: var(--hp-surface); }
.hv2 .hv2-railbox__btn:disabled, .hv2 .is-static > .hv2-railbox__btn { opacity: 0; pointer-events: none; }
.hv2 .hv2-railbox__btn:focus-visible { outline: 3px solid var(--hp-focus, #007fae); outline-offset: 2px; }
.hv2 .hv2-railbar { position: relative; width: 240px; max-width: 50%; height: 4px; margin: 20px auto 0; border-radius: 999px; background: var(--hp-border); overflow: hidden; }
.hv2 .hv2-railbar__thumb { position: absolute; inset: 0 auto 0 0; width: 25%; border-radius: inherit; background: var(--hp-ink); transition: transform .1s linear; }
.hv2 .is-static > .hv2-railbar { display: none; }
@media (max-width: 1340px) {
  .hv2 .hv2-railbox__btn--prev { left: 8px; }
  .hv2 .hv2-railbox__btn--next { right: 8px; }
}
@media (max-width: 1100px) {
  .hv2 .hv2-railbox ul.hv2-rail { grid-auto-columns: calc((100% - 3 * 16px) / 3.5); gap: 16px; }
}
@media (max-width: 768px) {
  .hv2 .hv2-railbox ul.hv2-rail { grid-auto-columns: 232px; gap: 12px; margin: 0 calc(-1 * var(--hv2-gutter)); padding: 4px var(--hv2-gutter); scroll-padding-inline: var(--hv2-gutter); }
  .hv2 .hv2-railbox__btn { width: 44px; height: 44px; }
  .hv2 .hv2-railbox__btn--prev { left: calc(4px - var(--hv2-gutter)); }
  .hv2 .hv2-railbox__btn--next { right: calc(4px - var(--hv2-gutter)); }
  .hv2 .hv2-railbar { width: 160px; margin-top: 16px; }
}
