/* Halloween Sale 2026 — chỉ nạp trên templates/page.halloween.liquid. Mọi selector nằm dưới .akr-hw / #akr-hw.
   Landing luôn tông đêm (Tùng chốt): không đổi theo html[data-mobile-theme]; header/footer của theme không bị đụng tới.
   Thiết kế: design/SPEC.md (hướng 03 Midnight Gallery, Codex). Card sản phẩm là product-item gốc của theme;
   ở đây chỉ có lưới bao quanh và vài chỉnh nhỏ về độ tương phản. */

/* ---------- Tràn hết chiều ngang ----------
   .akr-hw dùng 100vw để thoát khỏi main.wrapper của theme. Phần chênh do thanh cuộn được chặn bởi
   body { overflow-x: hidden } sẵn có của theme (lan ra viewport). KHÔNG đặt overflow cho <html>:
   làm vậy chặn sự lan đó, biến <body> thành khung cuộn và làm hỏng thanh nhóm position: sticky. */

/* Trên mobile theme đặt #PageContainer { overflow: hidden }, khiến sticky không chạy. Chỉ trên trang có
   .akr-hw, đổi sang clip: cắt y hệt (drawer vẫn đúng) nhưng không tạo khung cuộn. Trình duyệt cũ không
   hỗ trợ clip sẽ giữ hidden và thanh nhóm đơn giản là không dính. */
#PageContainer:has(.akr-hw) { overflow: clip; }

/* ---------- Token ---------- */
.akr-hw {
  --hw-bg: #fff;
  --hw-band: #f4f7f9;
  --hw-nav: #fff;
  --hw-ink: #0b1118;
  --hw-muted: #66727d;
  --hw-border: #dce4e8;
  --hw-amber: #ffb347;
  --hw-amber-hover: #ffc873;
  --hw-amber-ink: #8a4b00;
  --hw-amber-soft: #fff5e6;
  --hw-link: #006d96;
  --hw-focus: #007fae;
  --hw-night: #070d13;
  --hw-night-2: #0b141c;
  --hw-night-ink: #f1f6f8;
  --hw-night-line: #2c3a45;
  --hw-timer: #ca1c2d;
  --akr-header-offset: 0px;
  --akr-nav-h: 78px;

  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  color: var(--hw-ink);
  background: var(--hw-bg);
  font-family: "Be Vietnam Pro", "Helvetica Neue", Arial, sans-serif;
  isolation: isolate;
}
.akr-hw *, .akr-hw *::before, .akr-hw *::after { box-sizing: border-box; }
.akr-hw-container { width: min(1200px, calc(100% - 64px)); margin-left: auto; margin-right: auto; }
.akr-hw-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.akr-hw-icon { flex: 0 0 auto; display: block; }
.akr-hw a:focus-visible, .akr-hw button:focus-visible { outline: 3px solid var(--hw-focus); outline-offset: 4px; }

/* ---------- Hero + dải CTA ---------- */
.akr-hw-hero { background: var(--hw-night); }
.akr-hw-hero picture, .akr-hw-hero__img { display: block; width: 100%; height: auto; margin: 0; }
.akr-hw-hero__img { aspect-ratio: 1920 / 600; }
.akr-hw-band { background: var(--hw-night); color: var(--hw-night-ink); border-top: 1px solid var(--hw-night-line); }
.akr-hw-band__inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.akr-hw .akr-hw-band__lead { margin: 0; color: var(--hw-night-ink); font-size: 21px; font-weight: 500; line-height: 1.4; letter-spacing: -.025em; }

.akr-hw .akr-hw-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 20px;
  min-height: 48px; min-width: 208px; padding: 13px 24px;
  background: var(--hw-amber); color: #0b1118; border: 0; border-radius: 16px;
  font-size: 14px; font-weight: 700; line-height: 22px; letter-spacing: .025em; text-decoration: none;
  transition: background-color .18s ease;
}
.akr-hw .akr-hw-cta:hover, .akr-hw .akr-hw-cta:focus-visible { background: var(--hw-amber-hover); color: #0b1118; }

/* ---------- Thanh điều hướng nhóm ---------- */
.akr-hw-nav {
  position: sticky; top: var(--akr-header-offset); z-index: 20;
  background: var(--hw-nav); border-bottom: 1px solid var(--hw-border);
}
.akr-hw .akr-hw-nav__list {
  display: grid; grid-template-columns: repeat(var(--akr-cols, 4), minmax(0, 1fr)); gap: 8px;
  margin: 0 auto; padding: 12px 0; list-style: none;
}
.akr-hw-nav__list[data-count="2"] { --akr-cols: 2; }
.akr-hw-nav__list[data-count="3"] { --akr-cols: 3; }
.akr-hw-nav__item { margin: 0; min-width: 0; }
.akr-hw .akr-hw-nav__link {
  display: flex; align-items: center; justify-content: center; height: 100%; min-height: 52px; padding: 10px 16px;
  border: 1px solid transparent; border-radius: 12px;
  color: var(--hw-muted); font-size: 14px; font-weight: 600; line-height: 20px; text-align: center;
  overflow-wrap: anywhere; text-decoration: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.akr-hw .akr-hw-nav__link:hover { color: var(--hw-ink); background: var(--hw-band); }
.akr-hw .akr-hw-nav__link[aria-current="location"] {
  color: var(--hw-ink); background: var(--hw-amber-soft); border-color: var(--hw-amber);
  box-shadow: inset 0 -3px 0 var(--hw-amber-ink);
}

/* ---------- Section nhóm ---------- */
.akr-hw-section { padding: 64px 0; scroll-margin-top: calc(var(--akr-header-offset) + var(--akr-nav-h) + 16px); }
.akr-hw-section:nth-of-type(even) { background: var(--hw-band); }
.akr-hw-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 28px; }
.akr-hw-head__text { max-width: 760px; min-width: 0; }
.akr-hw .akr-hw-eyebrow {
  margin: 0 0 12px; color: var(--hw-amber-ink);
  font-size: 12px; font-weight: 700; line-height: 20px; letter-spacing: .075em; text-transform: uppercase; overflow-wrap: anywhere;
}
.akr-hw .akr-hw-h2 {
  margin: 0 0 12px; color: var(--hw-ink); font-family: inherit;
  font-size: 32px; font-weight: 700; line-height: 1.3; letter-spacing: -.035em; text-transform: none; overflow-wrap: anywhere;
}
.akr-hw .akr-hw-desc { max-width: 650px; margin: 0; color: var(--hw-muted); font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.akr-hw .akr-hw-all {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; flex: 0 0 auto;
  color: var(--hw-link); font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none;
}
.akr-hw .akr-hw-all:hover { color: var(--hw-ink); }

/* Lưới chứa card gốc (product-item). Hàng cao theo card cao nhất, hàng cuối canh trái. */
.akr-hw-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.akr-hw-grid__item { display: flex; min-width: 0; margin: 0; padding: 0; }
.akr-hw .akr-hw-grid__item > .product-container { width: 100%; height: 100%; margin: 0; min-width: 0; }

/* Chỉnh nhỏ cho card gốc: tương phản AA và truy cập bàn phím; không đổi cấu trúc. */
.akr-hw .product-container .sale-price { color: var(--hw-muted); }
.akr-hw .product-container .label.sold-out { background: #18212b; color: #fff; }
.akr-hw .product-container .product-actions .btn { background: #007fae; }
.akr-hw .product-container:focus-within .product-actions { opacity: 1; transform: translateY(0); }
.akr-hw .sale-cycle-countdown__timer { color: var(--hw-timer); }

/* ---------- Kết trang ---------- */
.akr-hw-closing { padding: 64px 0; background: var(--hw-night-2); color: var(--hw-night-ink); text-align: center; }
.akr-hw .akr-hw-closing .akr-hw-eyebrow { color: var(--hw-amber); }
.akr-hw .akr-hw-closing .akr-hw-h2 { color: var(--hw-night-ink); margin-bottom: 24px; }

/* ---------- Tablet 769–1199px ---------- */
@media (min-width: 769px) and (max-width: 1199px) {
  .akr-hw-container { width: calc(100% - 48px); }
  .akr-hw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}

/* ---------- Mobile ≤768px ---------- */
@media (max-width: 768px) {
  .akr-hw { --akr-nav-h: 112px; }
  .akr-hw-container { width: calc(100% - 32px); }
  .akr-hw-hero__img { aspect-ratio: 1000 / 650; }
  .akr-hw-band__inner { display: block; min-height: 80px; padding: 16px 0; }
  .akr-hw .akr-hw-band__lead { display: none; }
  .akr-hw-band .akr-hw-cta { width: 100%; }

  .akr-hw .akr-hw-nav__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 10px 0; }
  .akr-hw .akr-hw-nav__link { min-height: 44px; padding: 8px 10px; font-size: 12px; line-height: 18px; }

  .akr-hw-section { padding: 36px 0; }
  .akr-hw-head { display: block; margin-bottom: 20px; }
  .akr-hw-head__text { max-width: none; }
  .akr-hw .akr-hw-eyebrow { margin-bottom: 8px; line-height: 18px; letter-spacing: .045em; }
  .akr-hw .akr-hw-h2 { margin-bottom: 10px; font-size: 24px; line-height: 1.35; letter-spacing: -.03em; }
  .akr-hw .akr-hw-desc { font-size: 14px; line-height: 1.6; }
  .akr-hw .akr-hw-all { margin-top: 8px; font-size: 13px; }

  .akr-hw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .akr-hw-grid[data-count="1"] { grid-template-columns: minmax(0, 1fr); max-width: 280px; }

  /* Bộ đếm gốc tràn ~11px trong card 2 cột (lỗi có sẵn của theme, xem THEME_BACKLOG.md):
     xếp "Còn" lên trên các số để đủ chỗ ở 360px. Không đổi DOM hay script đếm. */
  .akr-hw .product-container .sale-cycle-countdown { flex-direction: column; align-items: center; gap: 2px; padding: 5px 4px; min-height: 40px; }
  .akr-hw .product-container .sale-cycle-countdown__timer { gap: 2px; }
  .akr-hw .product-container .sale-cycle-countdown__separator { margin: 0; }

  .akr-hw-closing { padding: 40px 0; }
  .akr-hw .akr-hw-closing .akr-hw-h2 { margin-bottom: 10px; }


}

@media (prefers-reduced-motion: reduce) {
  .akr-hw *, .akr-hw *::before, .akr-hw *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ================= Vòng 2 — Amber Horizon (design/SPEC-2.md, Codex) =================
   Đặt SAU phần trên để ghi đè phần bao quanh; card gốc khóa bảng màu sáng bên trong #akr-hw. */
.akr-hw {
  --hw2-base: #080f16;
  --hw2-stage: #0b141e;
  --hw2-nav: #101b25;
  --hw2-ink: #fff4df;
  --hw2-muted: #b6c2cc;
  --hw2-amber: #ffb347;
  --hw2-link: #8bd5ed;
  --hw2-line: #30414e;
  --hw2-focus: #7dddff;
  background: var(--hw2-base);
}

/* The seam lives inside the campaign; the theme header is untouched. */
.akr-hw .akr-hw-hero { border-top: 2px solid #30414e; }
.akr-hw .akr-hw-band { border-top-color: #30414e; }

.akr-hw .akr-hw-nav {
  background: var(--hw2-nav);
  border-top: 1px solid #30414e;
  border-bottom: 1px solid #30414e;
  box-shadow: 0 6px 18px rgb(0 0 0 / 16%);
}
.akr-hw .akr-hw-nav__list { gap: 8px; }
.akr-hw .akr-hw-nav__link {
  color: #cbd5dd;
  border-color: transparent;
  border-radius: 8px;
  font-size: 14px;
  line-height: 20px;
  min-height: 52px;
  padding: 10px 16px;
}
.akr-hw .akr-hw-nav__link:hover {
  color: #fff4df;
  background: #21313d;
  border-color: #64818f;
}
.akr-hw .akr-hw-nav__link[aria-current="location"] {
  color: #ffd49a;
  background: #30251b;
  border-color: #b78244;
  box-shadow: inset 0 -3px 0 #ffb347;
}
.akr-hw .akr-hw-nav__link:focus-visible,
.akr-hw .akr-hw-all:focus-visible,
.akr-hw .akr-hw-cta:focus-visible {
  outline: 3px solid var(--hw2-focus);
  outline-offset: 4px;
}

/* Light is static, low contrast and behind content, never painted on cards.
   Gradients are intentional surface treatments, not image substitutes. */
.akr-hw .akr-hw-section {
  position: relative;
  isolation: isolate;
  padding: 64px 0;
  background-color: var(--hw2-base);
  background-image:
    radial-gradient(ellipse 800px 310px at 100% 0%, rgb(190 107 28 / 16%), transparent 76%),
    linear-gradient(90deg, rgb(115 155 180 / 4%) 1px, transparent 1px);
  background-size: auto, 80px 100%;
}
.akr-hw .akr-hw-section:nth-of-type(even) {
  background-color: var(--hw2-stage);
}
.akr-hw .akr-hw-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: max(32px, calc((100% - 1200px) / 2));
  right: max(32px, calc((100% - 1200px) / 2));
  height: 1px;
  background: linear-gradient(90deg, #ffb347 0%, #9f6b32 22%, #30414e 65%, transparent);
  pointer-events: none;
}
.akr-hw .akr-hw-head { margin-bottom: 28px; }
.akr-hw .akr-hw-head__text { max-width: 820px; }
.akr-hw .akr-hw-eyebrow {
  color: var(--hw2-amber);
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 12px;
  line-height: 20px;
  letter-spacing: .075em;
  font-weight: 700;
  margin: 0 0 12px;
}
.akr-hw .akr-hw-head .akr-hw-eyebrow::before {
  content: "";
  display: block;
  flex: 0 0 28px;
  height: 3px;
  align-self: center;
  background: var(--hw2-amber);
}
.akr-hw .akr-hw-h2 {
  color: var(--hw2-ink);
  font-size: 36px;
  line-height: 1.3;
  letter-spacing: -.035em;
  margin-bottom: 12px;
}
.akr-hw .akr-hw-desc {
  color: var(--hw2-muted);
  font-size: 15px;
  line-height: 1.65;
}
.akr-hw .akr-hw-all { color: var(--hw2-link); }
.akr-hw .akr-hw-all:hover {
  color: #fff4df;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* The last light line belongs to the landing, not to the theme footer. */
.akr-hw .akr-hw-closing {
  position: relative;
  padding: 64px 0 72px;
  background-color: #080f16;
  background-image: radial-gradient(ellipse 760px 260px at 50% 100%, rgb(190 107 28 / 20%), transparent 76%);
  border-top: 1px solid #30414e;
  border-bottom: 2px solid #805c32;
}
.akr-hw .akr-hw-closing .akr-hw-eyebrow { display: block; color: #ffb347; }
.akr-hw .akr-hw-closing .akr-hw-h2 { color: #fff4df; margin-bottom: 24px; }
.akr-hw .akr-hw-empty .akr-hw-cta { margin-top: 24px; }

/* Approved follow-up: keep the native card's LIGHT palette at every time.
   Local variables prevent the theme's mobile-dark text from turning white
   on a white card. ID scope wins existing explicit dark surface selectors.
   No new markup, typography, spacing, truncation or product logic. */
#akr-hw .product-container {
  --anker-ink: #0b1118;
  --anker-ink-soft: #18212b;
  --anker-muted: #66727d;
  --anker-white: #fff;
  --anker-surface: #f4f7f9;
  --anker-surface-strong: #eaf0f3;
  --anker-border: #dce4e8;
  --hw-muted: #66727d;
  --hw-timer: #ca1c2d;
  color-scheme: light;
  color: #0b1118;
  background: #fff;
  border-color: #dce4e8;
  box-shadow: none;
}
#akr-hw .product-container:hover {
  border-color: rgb(0 167 225 / 62%);
  box-shadow: inset 0 0 0 1px rgb(0 167 225 / 22%), 0 18px 38px rgb(11 17 24 / 12%);
}
#akr-hw .product-container .product-image { background: linear-gradient(145deg, #f7f9fa, #edf2f4); }
#akr-hw .product-container .product-thumbnail { background: transparent; }
#akr-hw .product-container .sale-price { color: #66727d; }
#akr-hw .product-container .sale-cycle-countdown {
  color: #66727d;
  background: #fff5f6;
  border-color: #ffcfd5;
}
#akr-hw .product-container .product-promo-tag--text-1 {
  color: var(--color, #fff) !important;
  background: var(--background, #18212b) !important;
  border-color: var(--border-color, transparent) !important;
}
#akr-hw .product-container .product-tags > .product-promo-tag--text-2 {
  color: #18212b !important;
  background: #eaf1f4 !important;
  border-color: #d5e0e5 !important;
}
#akr-hw .product-container .product-gift { color: #18212b; background: #eaf1f4; border-color: #d5e0e5; }

@media (min-width: 769px) and (max-width: 1199px) {
  .akr-hw .akr-hw-section::before { left: 24px; right: 24px; }
}
@media (max-width: 768px) {
  .akr-hw .akr-hw-nav__list { gap: 6px; }
  .akr-hw .akr-hw-nav__link {
    font-size: 12px;
    line-height: 18px;
    min-height: 44px;
    padding: 8px 10px;
  }
  .akr-hw .akr-hw-section {
    padding: 36px 0;
    background-image:
      radial-gradient(ellipse 360px 240px at 100% 0%, rgb(190 107 28 / 16%), transparent 76%),
      linear-gradient(90deg, rgb(115 155 180 / 4%) 1px, transparent 1px);
    background-size: auto, 60px 100%;
  }
  .akr-hw .akr-hw-section::before { left: 16px; right: 16px; }
  .akr-hw .akr-hw-head { margin-bottom: 20px; }
  .akr-hw .akr-hw-eyebrow { gap: 10px; line-height: 18px; margin-bottom: 8px; letter-spacing: .045em; }
  .akr-hw .akr-hw-head .akr-hw-eyebrow::before { flex-basis: 20px; height: 2px; }
  .akr-hw .akr-hw-h2 { font-size: 26px; line-height: 1.35; margin-bottom: 10px; letter-spacing: -.03em; }
  .akr-hw .akr-hw-desc { font-size: 14px; line-height: 1.6; }
  .akr-hw .akr-hw-closing { padding: 40px 0 48px; }
  .akr-hw .akr-hw-closing .akr-hw-h2 { margin-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .akr-hw .akr-hw-nav__link,
  .akr-hw .akr-hw-all,
  .akr-hw .akr-hw-cta { transition: none; }
}

/* ================= Nút hành động ở đáy card (thay nút "MUA NHANH" hiện khi rê chuột) =================
   Card gốc giữ nguyên; nút gốc chỉ bị ẩn bằng CSS trong landing. Khối .akr-hw-buy nối liền đáy card.
   Bấm vào bất kỳ đâu trên card → trang sản phẩm (link tên sản phẩm được kéo phủ cả card). */
#akr-hw .product-container .product-actions { display: none !important; }
#akr-hw .product-container .product-name > a:first-child::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}
#akr-hw .product-container:has(.product-name > a:focus-visible) { outline: 3px solid var(--hw2-focus); outline-offset: 3px; }

.akr-hw .akr-hw-grid__item { flex-direction: column; border-radius: 16px; transition: box-shadow .18s ease; }
#akr-hw .akr-hw-grid__item > .product-container {
  flex: 1 1 auto;
  height: auto;
  border-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
#akr-hw .akr-hw-grid__item > .product-container:hover { box-shadow: none; }
.akr-hw-buy {
  padding: 0 16px 16px;
  background: #fff;
  border: 1px solid #dce4e8;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  transition: border-color .18s ease;
}
.akr-hw .akr-hw-grid__item:hover { box-shadow: 0 18px 38px rgb(0 0 0 / 28%); }
.akr-hw .akr-hw-grid__item:hover > .akr-hw-buy { border-color: rgb(0 167 225 / 62%); }
.akr-hw-buy__form { margin: 0; }
.akr-hw .akr-hw-buy__btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 44px; padding: 10px 12px; margin: 0;
  border: 1.5px solid transparent; border-radius: 12px;
  background: var(--hw2-amber, #ffb347); color: #0b1118;
  font-family: inherit; font-size: 14px; font-weight: 700; line-height: 20px; text-align: center; text-decoration: none;
  cursor: pointer; transition: background-color .18s ease, border-color .18s ease;
}
.akr-hw .akr-hw-buy__btn:hover, .akr-hw .akr-hw-buy__btn:focus-visible { background: #ffc873; color: #0b1118; }
.akr-hw .akr-hw-buy__btn--ghost { background: #fff; color: #0b1118; border-color: #0b1118; }
.akr-hw .akr-hw-buy__btn--ghost:hover, .akr-hw .akr-hw-buy__btn--ghost:focus-visible { background: #fff5e6; color: #0b1118; border-color: #8a4b00; }
.akr-hw .akr-hw-buy__btn--off,
.akr-hw .akr-hw-buy__btn--off:hover { background: #eef2f4; color: #4f5b65; border-color: transparent; cursor: not-allowed; }
.akr-hw .akr-hw-buy__btn:focus-visible { outline: 3px solid var(--hw2-focus, #7dddff); outline-offset: 3px; }

@media (max-width: 768px) {
  .akr-hw-buy { padding: 0 12px 12px; }
  .akr-hw .akr-hw-buy__btn { min-height: 40px; padding: 8px 6px; gap: 6px; font-size: 13px; border-radius: 10px; }
}
@media (hover: none) {
  .akr-hw .akr-hw-grid__item:hover { box-shadow: none; }
}

/* Halloween Sale 2026 — khung ảnh sản phẩm "Đèn lồng hổ phách" (lantern window), bản 2: thêm bí ngô, tím hơn.
   Chỉ áp trong landing: mọi selector bắt đầu bằng #akr-hw .akr-hw-grid .akr-hw-grid__item → không đụng card ở trang khác.
   Nạp SAU assets/akr-hw.css. Không thêm DOM, không JS, không ảnh ngoài: họa tiết là SVG inline (data URI).

   Ý tưởng: vùng ảnh là một ô cửa sổ đêm Halloween được thắp đèn — tâm sáng như trăng (gần trắng, để sản phẩm
   trắng/đen/xanh giữ màu), mép ấm dần sang hổ phách. Ảnh sản phẩm nền trắng dùng mix-blend-mode: multiply nên
   phần trắng "tan" vào nền khung, sản phẩm giữ nguyên màu. Mạng nhện nét mảnh ở góc dưới phải, đôi dơi nhỏ
   phía trên (giữa 2 nhãn), viền khung 2 lớp màu hổ phách với ánh tím rất nhẹ ở đáy.
   Họa tiết nằm DƯỚI ảnh (nền), nên không bao giờ che sản phẩm; nhãn % / New / Đề cử giữ nguyên màu và vị trí. */

#akr-hw .akr-hw-grid .akr-hw-grid__item .product-image {
  --hwf-moon: #fffaf1;
  --hwf-glow: #ffefd6;
  --hwf-amber: #ffd59c;
  --hwf-edge: #e6a77a;
  --hwf-plum: #b48ad6;
  --hwf-line: rgb(108 58 176 / 70%);
  --hwf-violet: rgb(92 46 160 / 50%);
  isolation: isolate; /* nhóm hòa trộn: multiply chỉ tác động trong ô ảnh */
  background-color: var(--hwf-glow);
  background-image:
    /* Mạng nhện góc dưới phải */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%236a3fa8' stroke-opacity='.55' stroke-width='.8' stroke-linecap='round'%3E%3Cpath d='M100 100L2.0 100.0M100 100L6.8 69.7M100 100L20.7 42.4M100 100L42.4 20.7M100 100L69.7 6.8M100 100L100.0 2.0M78.0 100.0Q81.3 97.0 79.1 93.2Q83.1 91.4 82.2 87.1Q86.6 86.6 87.1 82.2Q91.4 83.1 93.2 79.1Q97.0 81.3 100.0 78.0M60.0 100.0Q66.0 94.6 62.0 87.6Q69.3 84.4 67.6 76.5Q75.7 75.7 76.5 67.6Q84.4 69.3 87.6 62.0Q94.6 66.0 100.0 60.0M40.0 100.0Q49.0 91.9 42.9 81.5Q54.0 76.6 51.5 64.7Q63.5 63.5 64.7 51.5Q76.6 54.0 81.5 42.9Q91.9 49.0 100.0 40.0M18.0 100.0Q30.3 89.0 22.0 74.7Q37.2 68.0 33.7 51.8Q50.1 50.1 51.8 33.7Q68.0 37.2 74.7 22.0Q89.0 30.3 100.0 18.0'/%3E%3Cpath d='M57.6 57.6V73.6' stroke-width='.6'/%3E%3C/g%3E%3Ccircle cx='57.6' cy='75.6' r='2' fill='%233b1d6e' fill-opacity='.75'/%3E%3C/svg%3E"),
    /* Đôi dơi nhỏ */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 26'%3E%3Cg fill='%23432178'%3E%3Cpath fill-opacity='.72' d='M14 9c-.4-1-.2-1.9.2-2.4.1.6.4 1 .7 1.1.3-.1.6-.5.7-1.1.4.5.6 1.4.2 2.4 1.1-1.2 3.2-1.7 6.8-1.2-1.2.6-1.9 1.6-2 2.8-.9-.6-2.1-.6-2.9.2-.7-.6-1.7-.8-2.5-.1-.4.2-.7.6-.9 1.2-.1-.5-.4-.9-.8-1.2-.8-.7-1.8-.5-2.5.1-.8-.8-2-.8-2.9-.2-.1-1.2-.8-2.2-2-2.8 3.6-.5 5.7 0 6.8 1.2z'/%3E%3Cpath fill-opacity='.5' transform='translate(32 6) scale(.72)' d='M14 9c-.4-1-.2-1.9.2-2.4.1.6.4 1 .7 1.1.3-.1.6-.5.7-1.1.4.5.6 1.4.2 2.4 1.1-1.2 3.2-1.7 6.8-1.2-1.2.6-1.9 1.6-2 2.8-.9-.6-2.1-.6-2.9.2-.7-.6-1.7-.8-2.5-.1-.4.2-.7.6-.9 1.2-.1-.5-.4-.9-.8-1.2-.8-.7-1.8-.5-2.5.1-.8-.8-2-.8-2.9-.2-.1-1.2-.8-2.2-2-2.8 3.6-.5 5.7 0 6.8 1.2z'/%3E%3C/g%3E%3C/svg%3E"),
    /* Chân trời tím ở đáy ô + tím ở bốn góc; tâm vẫn sáng */
    linear-gradient(to top, var(--hwf-violet), rgb(92 46 160 / 18%) 16%, transparent 34%),
    radial-gradient(ellipse 110% 105% at 50% 46%, transparent 58%, rgb(120 70 190 / 38%) 100%),
    /* Trăng/đèn: tâm gần trắng → mép hổ phách */
    radial-gradient(ellipse 72% 66% at 50% 44%, var(--hwf-moon) 0%, var(--hwf-moon) 38%, var(--hwf-glow) 62%, var(--hwf-amber) 82%, var(--hwf-edge) 94%, var(--hwf-plum) 112%);
  background-repeat: no-repeat;
  background-position: right 8px bottom 8px, 57% 6%, 0 0, 0 0, 0 0;
  background-size: 34% auto, 30% auto, 100% 100%, 100% 100%, 100% 100%;
}

/* Nền theme đặt trên .product-thumbnail phải trong suốt để thấy khung. */
#akr-hw .akr-hw-grid .akr-hw-grid__item .product-thumbnail,
#akr-hw .akr-hw-grid .akr-hw-grid__item .product-thumbnail > a { background: transparent; }

/* Ảnh nền trắng tan vào khung; sản phẩm giữ màu. */
#akr-hw .akr-hw-grid .akr-hw-grid__item .product-thumbnail img {
  mix-blend-mode: multiply;
}

/* Khi rê chuột, ảnh phụ hiện lên: ẩn ảnh chính để hai ảnh multiply không chồng bóng lên nhau. */
#akr-hw .akr-hw-grid .akr-hw-grid__item .product-container:hover .product-thumbnail:has(.back-img) .product-featured-image { opacity: 0; }

/* Viền khung 2 lớp: nét hổ phách mảnh lùi vào 8px + quầng sáng trong. ::before không z-index nên vẽ DƯỚI ảnh:
   sản phẩm (đã được theme phóng 1.28) "bước ra khỏi khung" thay vì bị nét khung cắt ngang. Không bắt chuột. */
#akr-hw .akr-hw-grid .akr-hw-grid__item .product-image::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--hwf-line);
  border-radius: 10px;
  box-shadow:
    0 0 0 3px rgb(255 250 241 / 50%),
    0 0 0 4px rgb(108 58 176 / 35%),
    0 0 10px 4px rgb(140 80 210 / 30%),
    inset 0 0 20px rgb(150 90 220 / 30%);
  pointer-events: none;
}

/* Hai bí ngô jack-o'-lantern nhỏ ngồi trên bậu khung, góc dưới trái. Nằm TRÊN ảnh (nếu nằm dưới, sản phẩm tối
   màu multiply lên bí ngô thành vệt đục), nhưng chỉ chiếm ~26% x 15% góc dưới, nơi thường là khoảng trống;
   z-index 1 < nhãn (3/7) ở góc trên. Không bắt chuột: bấm vẫn mở sản phẩm. */
#akr-hw .akr-hw-grid .akr-hw-grid__item .product-image::after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: 4px;
  z-index: 1;
  width: 27%;
  aspect-ratio: 120 / 64;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 64'%3E%3Cg transform='translate(2 6)'%3E%3Cpath d='M30 9c1-4 3-7 7-8' fill='none' stroke='%234b5d2a' stroke-width='3.2' stroke-linecap='round'/%3E%3Cellipse cx='18' cy='33' rx='15' ry='22' fill='%23e3761c'/%3E%3Cellipse cx='42' cy='33' rx='15' ry='22' fill='%23e3761c'/%3E%3Cellipse cx='30' cy='33' rx='14' ry='23' fill='%23f08a26'/%3E%3Cpath d='M30 11v44M19 12q-6 21 0 42M41 12q6 21 0 42' fill='none' stroke='%23b9561a' stroke-opacity='.55' stroke-width='1.3'/%3E%3Cpath d='M16 26l7 6h-8zM44 26l-7 6h8zM27 37l3-4 3 4zM14 41q16 12 32 0l-3 2-3-2-3 3-3-3-3 3-3-3-3 3-3-3-3 2z' fill='%23ffd75e'/%3E%3C/g%3E%3Cg transform='translate(66 26) scale(.6)'%3E%3Cpath d='M30 9c1-4 3-7 7-8' fill='none' stroke='%234b5d2a' stroke-width='3.4' stroke-linecap='round'/%3E%3Cellipse cx='18' cy='33' rx='15' ry='22' fill='%23d9691a'/%3E%3Cellipse cx='42' cy='33' rx='15' ry='22' fill='%23d9691a'/%3E%3Cellipse cx='30' cy='33' rx='14' ry='23' fill='%23e97f22'/%3E%3Cpath d='M30 11v44M19 12q-6 21 0 42M41 12q6 21 0 42' fill='none' stroke='%23a84c16' stroke-opacity='.55' stroke-width='1.4'/%3E%3Cpath d='M17 27q4-4 8 0zM35 27q4-4 8 0zM18 41q12 9 24 0q-12 4-24 0z' fill='%23ffd75e'/%3E%3C/g%3E%3C/svg%3E") no-repeat left bottom / contain;
  filter: drop-shadow(0 1px 3px rgb(60 20 110 / 35%));
  pointer-events: none;
}

/* Mobile 2 cột: card hẹp, thu viền và họa tiết. */
@media (max-width: 768px) {
  #akr-hw .akr-hw-grid .akr-hw-grid__item .product-image {
    background-position: right 5px bottom 5px, 56% 6%, 0 0, 0 0, 0 0;
    background-size: 38% auto, 32% auto, 100% 100%, 100% 100%, 100% 100%;
  }
  #akr-hw .akr-hw-grid .akr-hw-grid__item .product-image::after { left: 3px; bottom: 2px; width: 31%; }
  #akr-hw .akr-hw-grid .akr-hw-grid__item .product-image::before {
    inset: 5px;
    border-radius: 8px;
    box-shadow:
      0 0 0 2px rgb(255 250 241 / 50%),
      0 0 0 3px rgb(108 58 176 / 32%),
      0 0 6px 3px rgb(140 80 210 / 28%),
      inset 0 0 12px rgb(150 90 220 / 28%);
  }
}

/* Khung tĩnh, không có hiệu ứng chuyển động riêng. Nếu khách tắt chuyển động: bỏ phóng/mờ khi rê chuột. */
@media (prefers-reduced-motion: reduce) {
  #akr-hw .akr-hw-grid .akr-hw-grid__item .product-thumbnail img { transition: none; }
}

/* Máy in / chế độ tương phản cưỡng bức: trả về nền trắng gốc. */
@media (forced-colors: active) {
  #akr-hw .akr-hw-grid .akr-hw-grid__item .product-image { background: Canvas; }
  #akr-hw .akr-hw-grid .akr-hw-grid__item .product-thumbnail img { mix-blend-mode: normal; }
  #akr-hw .akr-hw-grid .akr-hw-grid__item .product-image::before,
  #akr-hw .akr-hw-grid .akr-hw-grid__item .product-image::after { display: none; }
}
