/* Văn Khén Mobile — cửa hàng. Bố cục kiểu chuỗi bán lẻ điện thoại, tông đỏ rượu. Ưu tiên điện thoại. */
:root {
  color-scheme: light;
  --ink: #170f11;
  --ink-2: #463b3e;
  --muted: #7b6e71;
  --line: #ebe4e5;
  --line-2: #f4efef;
  --bg: #f2efef;
  --surface: #fff;
  --wine: #8e1b2b;
  --wine-2: #a8203a;
  --wine-dark: #6c1220;
  --wine-ink: #5a0f1b;
  --wine-soft: #f9ebed;
  --night: #0b0708;
  --blush: #f6c2ca;
  --new: #0f7a52;
  --new-soft: #e1f4ea;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(23, 15, 17, .08);
  --shadow: 0 16px 36px -22px rgba(70, 10, 22, .45);
  --font: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  --display: "Montserrat", "Be Vietnam Pro", system-ui, sans-serif;
  font: 15px/1.5 var(--font);
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
/* Logo Văn Khén Mobile chìm dưới nền trang */
body::before {
  content: ""; position: fixed; z-index: -1; inset: 0; pointer-events: none;
  background: url("/logo-watermark.png") center 58% / min(62vw, 560px) auto no-repeat;
  opacity: .08;
}
/* Ô trắng hơi trong để logo chìm hiện xuyên qua */
body .card, body .side-card, body .device-menu, body .toolbar, body .price-panel, body .mini:not(.mini-finance) { background-color: rgba(255, 255, 255, .84); }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); }
button, select, input { font: inherit; color: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(179, 36, 58, .45); outline-offset: 2px; }
[hidden] { display: none !important; }
.wrap { width: min(1240px, calc(100% - 32px)); margin-inline: auto; }
.ico { width: 18px; height: 18px; flex: none; }
.ico-sm { width: 14px; height: 14px; }

/* ---------- Thanh thông báo ---------- */
.topstrip { background: var(--night); color: #e9dcdf; font-size: 12.5px; }
.topstrip-inner { display: flex; justify-content: space-between; gap: 18px; min-height: 34px; align-items: center; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.topstrip-inner::-webkit-scrollbar { display: none; }
.topstrip a { display: inline-flex; align-items: center; gap: 6px; }
.topstrip .ico { color: var(--blush); }
.topstrip a:hover { color: #fff; }
.store-location { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Đầu trang (nền đỏ rượu) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20; isolation: isolate; overflow: visible; color: #fff;
  background:
    radial-gradient(520px 160px at 8% -40%, rgba(255, 178, 190, .38), transparent 70%),
    radial-gradient(420px 140px at 92% 140%, rgba(0, 0, 0, .38), transparent 70%),
    linear-gradient(100deg, #5e0f1c 0%, var(--wine) 38%, #a3223a 62%, #6c1220 100%);
  box-shadow: 0 14px 30px -18px rgba(40, 4, 10, .85);
}
/* Vệt sáng mảnh dưới đáy thanh đầu trang */
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255, 214, 160, .9) 22%, #fff 50%, rgba(255, 214, 160, .9) 78%, transparent);
  opacity: .75;
}
.bar { display: flex; align-items: center; gap: 12px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 13px; margin-right: 10px; white-space: nowrap; }
.brand-mark {
  position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .16), 0 0 26px rgba(255, 190, 200, .45), 0 10px 20px -8px rgba(0, 0, 0, .55);
  transition: transform .25s;
}
.brand:hover .brand-mark { transform: rotate(-4deg) scale(1.04); }
.brand-mark img { width: 47px; height: 47px; object-fit: contain; }
.brand-name {
  font-family: var(--display); font-weight: 900; font-size: 25px; line-height: 1; letter-spacing: -.015em;
  background: linear-gradient(180deg, #fff 40%, #ffd9df); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .18);
}
.brand-name small {
  display: flex; align-items: center; gap: 7px; margin-top: 6px; font-size: 11px; font-weight: 800; letter-spacing: .42em; text-transform: uppercase;
  color: var(--blush); -webkit-text-fill-color: var(--blush);
}
.brand-name small::before { content: ""; width: 16px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(255, 214, 160, .2), rgba(255, 214, 160, .95)); }
.head-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 16px 0 7px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); color: #fff; font-size: 14px; font-weight: 700; line-height: 1.1; white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), inset 0 1px 0 rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background .2s, transform .2s, box-shadow .2s;
}
.head-btn:hover { background: rgba(255, 255, 255, .2); transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35), 0 8px 18px -10px rgba(0, 0, 0, .6); }
.head-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.head-btn .ico { width: 19px; height: 19px; }
.head-label { display: flex; flex-direction: column; font-family: var(--display); font-size: 14px; font-weight: 800; }
.head-label small { margin-bottom: 2px; font-family: var(--font); font-size: 10.5px; font-weight: 600; letter-spacing: .02em; color: rgba(255, 228, 232, .82); }
.main-nav { display: flex; gap: 8px; }
.main-nav [aria-current="page"] { background: #fff; color: var(--wine); }
.main-nav [aria-current="page"] .head-ico { background: var(--wine-soft); }
.main-nav [aria-current="page"] .head-label small { color: var(--muted); }
.head-search {
  position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 5px 0 18px; border-radius: 999px;
  background: #fff; color: var(--ink);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .12), 0 12px 26px -14px rgba(0, 0, 0, .7);
  transition: box-shadow .2s;
}
.head-search .ico { color: var(--wine); }
.head-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 15px; }
.head-search input::placeholder { color: #9a8d90; }
.head-search input::-webkit-search-cancel-button { display: none; }
.head-search:focus-within { box-shadow: 0 0 0 4px rgba(255, 214, 160, .55), 0 14px 30px -14px rgba(0, 0, 0, .75); }
.head-search-go {
  flex: none; height: 40px; padding: 0 22px; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, var(--wine-2), var(--wine-dark)); color: #fff;
  font-family: var(--display); font-size: 14px; font-weight: 800; letter-spacing: .02em;
  box-shadow: 0 6px 14px -6px rgba(108, 18, 32, .8); transition: filter .15s, transform .15s;
}
.head-search-go:hover { filter: brightness(1.12); transform: translateY(-1px); }
.search-suggestions {
  position: absolute;
  z-index: 2;
  inset: calc(100% + 6px) 0 auto;
  max-height: min(300px, 45vh);
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 25px rgba(34, 13, 20, .22);
}
.search-suggestions li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}
.search-suggestions li:hover, .search-suggestions [aria-selected="true"] { background: var(--wine-soft); color: var(--wine); }
.search-suggestions small { margin-left: 10px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.hotline { background: linear-gradient(180deg, #fff, #fff3f5); color: var(--wine); box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .7), inset 0 -2px 0 rgba(142, 27, 43, .08); }
.hotline:hover { background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .22), 0 12px 24px -12px rgba(0, 0, 0, .75); }
.hotline .head-label { font-size: 16.5px; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.hotline .head-label small { font-size: 10px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.hotline-ico { position: relative; background: linear-gradient(135deg, var(--wine-2), var(--wine-dark)); color: #fff; }
.hotline-ico::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 rgba(168, 32, 58, .55); animation: hotline-ring 2.2s ease-out infinite; }
@keyframes hotline-ring { 0% { box-shadow: 0 0 0 0 rgba(168, 32, 58, .55); } 70%, 100% { box-shadow: 0 0 0 10px rgba(168, 32, 58, 0); } }
@media (prefers-reduced-motion: reduce) { .hotline-ico::after { animation: none; } }

/* ---------- Nút ---------- */
.cta, .secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 0;
  font-size: 14px; font-weight: 700; white-space: nowrap; transition: background .15s, transform .05s;
}
.cta:active, .secondary:active { transform: translateY(1px); }
.cta { background: var(--wine); color: #fff; }
.cta:hover { background: var(--wine-2); }
.secondary { background: var(--wine-soft); color: var(--wine); }
.secondary:hover { background: #f3d9de; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--wine); }

/* ---------- Khối đầu trang: banner + cột ưu đãi ---------- */
.home-top { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 12px; margin-top: 14px; align-items: stretch; }
.side-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

.home-center { display: grid; gap: 12px; min-width: 0; align-content: start; }
.hero {
  position: relative; overflow: hidden; min-height: 330px; display: flex; align-items: center;
  border-radius: var(--radius); background: #f6f6f8; box-shadow: var(--shadow-sm);
}
.hero::before {
  content: ""; position: absolute; pointer-events: none; border-radius: 50%; width: 420px; aspect-ratio: 1; left: -230px; bottom: -280px;
  border: 2px solid rgba(179, 36, 58, .3); box-shadow: 0 0 50px 4px rgba(179, 36, 58, .12);
}
.hero-copy { position: relative; z-index: 2; width: 42%; padding: 28px 0 28px 30px; }
.hero h1 { margin-top: 8px; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.04; font-weight: 800; letter-spacing: -.03em; }
.hero-rule { display: block; width: 52px; height: 3px; margin: 14px 0 10px; border-radius: 3px; background: linear-gradient(90deg, var(--wine), rgba(142, 27, 43, 0)); }
.hero-tagline { font-size: 16px; font-weight: 600; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero-photo { position: absolute; z-index: 1; right: -6px; top: 50%; width: 62%; transform: translateY(-50%); }
.hero-photo img { display: block; width: 100%; height: auto; }

.mini-banners { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mini {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; min-height: 104px; padding: 10px 14px 10px 8px;
  border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s;
}
.mini:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mini img { width: 76px; height: 88px; object-fit: contain; flex: none; }
.mini-hand { background: #fbfbfb; }
.mini b { display: block; font-family: var(--display); font-size: 14px; font-weight: 800; line-height: 1.25; }
.mini small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.mini-finance { background: radial-gradient(circle at 90% 10%, #4a0d18, var(--night) 65%); color: #fff; padding-left: 14px; }
.mini-finance small { color: #d6c6c9; }
.mini-big { font-family: var(--display); font-size: 40px; font-weight: 900; line-height: 1; color: var(--blush); flex: none; }
.mini-icon { flex: none; width: 34px; height: 34px; color: var(--blush); }
.mini-finance b { font-size: 17px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: #fff; }
.mini-finance small { margin-top: 4px; font-size: 12.5px; font-weight: 500; line-height: 1.45; }
.mini-finance small strong { font-weight: 800; letter-spacing: .03em; color: #fff; }

/* 3 ô dưới ảnh lớn: cùng khung nền tối, chữ trái, ảnh máy lớn tràn góc phải; mỗi ô một ánh màu riêng */
body .mini.mini-tile {
  --tile-glow: rgba(255, 110, 140, .5);
  position: relative; overflow: hidden; display: flex; align-items: stretch; min-height: 160px; padding: 18px; color: #fff;
  background:
    radial-gradient(240px 190px at 100% 100%, var(--tile-glow), transparent 70%),
    linear-gradient(150deg, #4a0b17 0%, #22060c 55%, #0d0507 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 14px 28px -18px rgba(40, 4, 10, .95);
  transition: transform .25s, box-shadow .25s;
}
body .mini.tile-used { --tile-glow: rgba(214, 214, 232, .34); }
body .mini.tile-finance { --tile-glow: rgba(255, 190, 100, .38); }
.mini-tile:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), 0 22px 36px -18px rgba(60, 6, 16, .95); }
.mini-text { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; max-width: 60%; }
.mini-tile em {
  margin-bottom: 10px; padding: 3px 10px; border-radius: 99px; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blush); background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.mini-tile b { font-family: var(--display); font-size: 19px; font-weight: 900; line-height: 1.08; letter-spacing: .01em; text-transform: uppercase; color: #fff; }
.mini-tile small { margin-top: 6px; font-size: 12.5px; font-weight: 500; line-height: 1.4; color: #dcc9cd; }
.tile-go { display: inline-flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 12px; font-size: 12.5px; font-weight: 800; color: #fff; transition: gap .2s; }
.tile-go .ico { width: 14px; height: 14px; color: var(--blush); }
.mini-tile:hover .tile-go { gap: 8px; }
.mini-tile .tile-photo {
  position: absolute; z-index: 1; right: -24px; bottom: -12px; width: 60%; max-width: 210px; height: auto;
  transform: rotate(-9deg); filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .6)); transition: transform .35s ease;
}
.mini-tile:hover .tile-photo { transform: rotate(-5deg) translateY(-6px) scale(1.04); }
.tile-finance .mini-text { max-width: 100%; }
.tile-pills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.tile-pills i {
  padding: 3px 8px; border-radius: 7px; font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .04em;
  color: #ffe2b3; background: rgba(255, 214, 150, .12); box-shadow: inset 0 0 0 1px rgba(255, 214, 150, .3);
}
.tile-bg-ico { position: absolute; z-index: 1; right: -22px; top: -18px; width: 128px; height: 128px; color: rgba(255, 214, 150, .1); transform: rotate(-14deg); transition: transform .35s; }
.mini-tile:hover .tile-bg-ico { transform: rotate(-8deg) scale(1.05); }

.home-side { display: grid; gap: 12px; align-content: start; }
.side-card { padding: 16px; }
.side-hello { display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: center; }
.side-hello b { display: block; font-family: var(--display); font-size: 14.5px; font-weight: 800; line-height: 1.3; }
.hero-stat { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.hero-stat b { display: inline; font-family: var(--font); font-size: inherit; color: var(--wine); }
.side-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr; gap: 8px; }
.side-actions .cta, .side-actions .secondary { min-height: 40px; padding: 0 10px; font-size: 13.5px; }
.side-directions { grid-column: 1 / -1; }
.side-perks h3 { margin-bottom: 8px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--wine); }
.side-perks ul { list-style: none; margin: 0; padding: 0; display: grid; }
.side-perks li, .side-perks li a { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.side-perks li { padding: 9px 0; border-top: 1px solid var(--line-2); }
.side-perks li:first-child { border-top: 0; padding-top: 2px; }
.side-perks li a:hover { color: var(--wine); }
.side-perks .ico { margin-top: 1px; color: var(--wine); }
.side-perks b { color: var(--ink); }

/* ---------- Danh sách máy ---------- */
.catalog { margin: 26px 0 40px; scroll-margin-top: 100px; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 12px; border-bottom: 2px solid var(--line); }
.section-title h2 { position: relative; padding: 0 2px 10px; font-size: 20px; font-weight: 900; letter-spacing: .02em; text-transform: uppercase; color: var(--wine); }
.section-title h2::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; border-radius: 3px; background: var(--wine); }
#updated { display: none; padding-bottom: 10px; color: var(--muted); font-size: 12.5px; }

.price-panel { background: var(--surface); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.price-label { margin-bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.price-presets, .price-fields { display: flex; flex-wrap: wrap; gap: 8px; }
.price-presets button { border: 1px solid var(--line); background: #fff; color: var(--ink-2); padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.price-presets button:hover { border-color: var(--wine); color: var(--wine); }
.price-presets button[aria-pressed="true"] { border-color: var(--wine); background: var(--wine); color: #fff; }
.price-fields { align-items: flex-end; margin-top: 14px; }
.price-fields label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.price-fields input { width: 160px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-variant-numeric: tabular-nums; }
.price-fields input:focus { outline: 0; border-color: var(--wine); box-shadow: 0 0 0 4px var(--wine-soft); }
#price-error { margin-top: 10px; font-size: 13px; color: var(--wine-2); font-weight: 600; }

.catalog-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px; align-items: start; }
.device-menu { position: sticky; top: 96px; background: var(--surface); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow-sm); max-height: calc(100vh - 100px); overflow: auto; }
.device-menu h3 { margin: 6px 8px 8px; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tabs { display: grid; gap: 2px; }
.tabs button {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  border: 0; background: transparent; padding: 9px 10px; border-radius: 10px; text-align: left;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.tabs button small { min-width: 24px; padding: 1px 7px; border-radius: 999px; background: var(--line-2); color: var(--muted); font-size: 11.5px; font-weight: 700; text-align: center; }
.tabs button:hover { background: var(--wine-soft); color: var(--wine); }
.tabs button[aria-pressed="true"] { background: var(--wine); color: #fff; }
.tabs button[aria-pressed="true"] small { background: rgba(255, 255, 255, .2); color: #fff; }

.toolbar { display: flex; gap: 8px; padding: 8px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
/* Ô lọc giá nổi bật hơn hai ô còn lại */
.filters #price-range { border-color: rgba(142, 27, 43, .35); color: var(--wine); background-color: var(--wine-soft); }
.filters select { min-height: 44px; padding: 0 32px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%237b6e71' stroke-width='3' d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; appearance: none; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.catalog-meta { display: flex; justify-content: space-between; gap: 12px; margin: 10px 2px 10px; color: var(--muted); font-size: 12.5px; }
#count { color: var(--ink-2); font-weight: 600; }

.device-section + .device-section { margin-top: 22px; }
.device-section > h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; font-size: 17px; font-weight: 800; }
.device-section > h3 small { font-family: var(--font); font-size: 12.5px; font-weight: 600; color: var(--muted); }

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.card {
  position: relative; display: flex; flex-direction: column; width: 100%; padding: 10px; overflow: hidden;
  background: var(--surface); border: 0; border-radius: var(--radius); text-align: left; box-shadow: var(--shadow-sm);
  transition: box-shadow .18s, transform .18s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px -14px rgba(70, 10, 22, .5); }
.card-photo {
  position: relative; display: grid; place-items: center; flex: 0 0 180px;
  width: 100%; height: 180px; padding-top: 24px; overflow: hidden;
}
.card-photo > img {
  position: absolute; inset: 28px 0 6px; margin-inline: auto;
  width: 84%; height: calc(100% - 34px); object-fit: contain; transition: transform .25s;
}
.card:hover .card-photo > img { transform: scale(1.04); }
.color-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 6px; }
.color-preview > img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.card-photo > .color-preview { position: absolute; inset: 28px 8px 4px; }
.card-badges { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; gap: 6px; pointer-events: none; }
.condition-tag, .finance-tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 8px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.condition-tag { background: var(--wine); color: #fff; }
.condition-tag[data-condition="new"] { background: var(--new); color: #fff; }
.finance-tag { background: #fff; color: var(--wine); border: 1px solid var(--wine); padding: 2px 8px; }
.card-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 8px 2px 0; }
.card h3 { font-family: var(--font); font-size: 14.5px; font-weight: 700; line-height: 1.3; min-height: 2.6em; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chips span { padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.price { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 4px; }
.price strong { font-family: var(--display); font-size: 18px; font-weight: 800; color: var(--wine-2); font-variant-numeric: tabular-nums; }
.price .go { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--wine-soft); color: var(--wine); flex: none; transition: background .15s, color .15s; }
.card:hover .price .go { background: var(--wine); color: #fff; }
.card-note { display: flex; justify-content: space-between; gap: 8px; padding: 6px 9px; border-radius: 8px; background: var(--wine-soft); font-size: 12px; color: var(--wine-ink); }
.card-note > span { flex: none; }
.card-note b { min-width: 0; text-align: right; }
.origin-value, .origin-flags { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.origin-value { gap: 3px 6px; }
.origin-flags { gap: 3px; }
.origin-flags img { width: 16px; height: 11px; border-radius: 2px; object-fit: contain; }
.photo-fallback { padding: 8px; text-align: center; font-size: 12px; font-weight: 650; color: #785864; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--radius); }

/* ---------- Trả góp ---------- */
.installments {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: center;
  margin-bottom: 40px; padding: clamp(24px, 4vw, 44px); border-radius: 20px;
  background: radial-gradient(circle at 85% 20%, #4a0d18 0%, var(--night) 60%); color: #fff; box-shadow: var(--shadow);
  scroll-margin-top: 80px;
}
.installments::before {
  content: ""; position: absolute; z-index: -1; right: -220px; top: -300px; width: 560px; aspect-ratio: 1; border-radius: 50%;
  border: 2px solid rgba(255, 120, 136, .6); box-shadow: 0 0 22px rgba(255, 74, 99, .5), 0 0 100px 20px rgba(255, 50, 80, .18);
}
.installments .eyebrow { color: var(--blush); }
.installments h2 { margin: 10px 0; font-size: clamp(24px, 3.2vw, 36px); font-weight: 800; letter-spacing: -.02em; }
.installments-copy p:last-child { max-width: 520px; color: #ddcfd2; }
.installment-estimate { padding: 16px; margin-bottom: 14px; border-radius: 12px; background: var(--surface); color: var(--ink); }
.installment-estimate h3 { margin-bottom: 12px; font-size: 18px; }
.estimate-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.estimate-fields label { display: grid; align-content: start; gap: 4px; font-size: 13px; font-weight: 650; }
.estimate-fields input, .estimate-fields select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding-inline: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  font-size: 16px;
}
.estimate-results { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 13px; }
.estimate-results th, .estimate-results td { border-bottom: 1px solid var(--line); padding: 6px 2px; text-align: left; }
.estimate-results :is(th, td):last-child { text-align: right; }
.estimate-results td { font-weight: 750; color: var(--wine); }
.estimate-status { margin: 9px 0 0; color: var(--muted); font-size: 12.5px; }
.estimate-results td[id="loan-6"] { font-size: 12px; }
/* ---------- Ảnh khách hàng ---------- */
.customer-gallery { margin: 0 0 40px; scroll-margin-top: 100px; }
.customer-gallery .section-title > span { padding-bottom: 10px; color: var(--muted); font-size: 12.5px; }
.customer-gallery-frame {
  position: relative; isolation: isolate; overflow: hidden;
  height: clamp(320px, 42vw, 520px); border-radius: var(--radius);
  background: var(--night); box-shadow: var(--shadow-sm);
}
.customer-gallery-frame::before {
  content: ""; position: absolute; z-index: -1; inset: -40px;
  background: var(--photo, none) center / cover no-repeat; filter: blur(28px) brightness(.55) saturate(1.1);
}
.customer-gallery-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.customer-gallery-controls {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 999px;
  background: rgba(11, 7, 8, .62); backdrop-filter: blur(8px); color: #fff;
}
.customer-gallery-controls[hidden] { display: none; }
.customer-gallery-controls button {
  display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff; transition: background .15s;
}
.customer-gallery-controls button:hover { background: var(--wine); }
.customer-gallery-controls span { min-width: 64px; text-align: center; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.installments-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-light { background: #fff; color: var(--wine); }
.cta-light:hover { background: var(--blush); }
.cta-ghost { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .25); }
.cta-ghost:hover { background: rgba(255, 255, 255, .16); }

/* ---------- Chân trang ---------- */
.site-footer { background: var(--night); color: #efe6e8; }
.footer-content { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 28px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand strong { font-family: var(--display); font-size: 18px; font-weight: 800; }
.footer-brand .store-location { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13.5px; color: #c9b8bb; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-links a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .16); font-size: 14px; font-weight: 600; }
.footer-links a:hover { background: rgba(255, 255, 255, .08); }

.action-bar { display: none; }

/* ---------- Chi tiết máy ---------- */
dialog {
  width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 20px;
  color: var(--ink); background: var(--surface); overflow: auto; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5);
}
dialog::backdrop { background: rgba(11, 7, 8, .65); backdrop-filter: blur(3px); }
#close { position: absolute; z-index: 2; top: 12px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-sm); font-size: 24px; line-height: 1; color: var(--ink-2); }
.detail-photo {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 240px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #fff 0%, #efeaeb 72%);
}
.detail-photo > img {
  position: absolute;
  inset: 12px 0;
  margin-inline: auto;
  width: calc(100% - 32px);
  max-width: 320px;
  height: calc(100% - 24px);
  object-fit: contain;
  mix-blend-mode: multiply;
}
.detail-photo > .color-preview { width: calc(100% - 56px); max-width: 324px; height: calc(100% - 28px); }
.detail-body { padding: 18px 22px 22px; }
.detail-tags { display: flex; gap: 6px; }
dialog h2 { margin: 10px 0 12px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.detail-variant { display: grid; gap: 4px; margin-bottom: 12px; }
.detail-variant label { color: var(--ink-2); font-size: 13px; font-weight: 700; }
.detail-variant select { width: 100%; min-height: 42px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 16px; }
.product-specs { margin: 0; display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.product-specs div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 14px; }
.product-specs div + div { border-top: 1px solid var(--line-2); }
.product-specs dt { color: var(--muted); flex: none; }
.product-specs dd { margin: 0; font-weight: 700; text-align: right; }
.detail-description { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--line-2); }
.detail-description h3 { margin-bottom: 4px; font: 700 13px/1.5 var(--font); }
.detail-description p { color: var(--ink-2); font-size: 13.5px; white-space: pre-line; overflow-wrap: anywhere; }
.detail-price { display: flex; align-items: baseline; justify-content: space-between; margin-top: 16px; }
.detail-price small { color: var(--muted); font-size: 13px; font-weight: 600; }
#dprice { font-family: var(--display); font-size: 28px; font-weight: 800; color: var(--wine-2); font-variant-numeric: tabular-nums; }
.detail-help { margin: 6px 0 14px; color: var(--muted); font-size: 13.5px; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.finance-link { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; font-size: 13.5px; font-weight: 600; color: var(--wine); }
.finance-link:hover { text-decoration: underline; }

/* ---------- Màn hình vừa ---------- */
@media (max-width: 1180px) {
  .home-top { grid-template-columns: minmax(0, 1fr); }
  .home-side { grid-column: 1 / -1; grid-template-columns: 1fr 1.4fr; }
  .side-perks ul { grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .side-perks li:nth-child(2) { border-top: 0; padding-top: 2px; }
  .hotline .head-label { display: none; }
  .hotline { padding: 0 7px; }
  .head-search-go { padding: 0 16px; }
}
@media (max-width: 980px) {
  .main-nav .head-label { display: none; }
  .main-nav .head-btn { padding: 0 7px; }
  .brand-name { font-size: 22px; }
  .home-top { grid-template-columns: minmax(0, 1fr); }
  .catalog-layout { grid-template-columns: 170px minmax(0, 1fr); }
}

/* ---------- Điện thoại ---------- */
@media (max-width: 700px) {
  :root { font-size: 14.5px; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  body::before { background-size: 84vw auto; background-position: center 55%; opacity: .11; }
  .wrap { width: calc(100% - 20px); }
  .topstrip { font-size: 11.5px; }
  .topstrip-inner { justify-content: flex-start; min-height: 30px; }

  /* Đầu trang: logo + nút; ô tìm xuống hàng riêng */
  .bar { flex-wrap: wrap; gap: 8px; min-height: 0; padding: 8px 0 10px; }
  .brand { margin-right: auto; }
  .brand-mark { width: 50px; height: 50px; border-radius: 14px; }
  .brand-mark img { width: 42px; height: 42px; }
  .brand-name { font-size: 21px; }
  .brand-name small { font-size: 10.5px; margin-top: 4px; }
  .head-btn { min-height: 44px; padding: 0 5px; }
  .head-ico { width: 34px; height: 34px; }
  .main-nav .nav-warranty { display: none; }
  .head-search { order: 5; flex-basis: 100%; height: 44px; padding: 0 4px 0 14px; }
  .head-search input { font-size: 16px; }
  .head-search-go { height: 36px; padding: 0 16px; font-size: 13px; }
  .site-header::after { opacity: .55; }

  .home-top { margin-top: 10px; gap: 8px; }
  .home-center { gap: 8px; }
  .hero { flex-direction: column-reverse; align-items: stretch; min-height: 0; }
  .hero::before { width: 360px; left: -220px; bottom: -250px; }
  .hero-photo { position: relative; right: auto; top: auto; transform: none; width: auto; margin: 4px -8px 0; }
  .hero-copy { width: 100%; padding: 0 16px 18px; margin-top: -6px; }
  .hero h1 { font-size: clamp(30px, 9vw, 40px); }
  .hero-rule { margin: 10px 0 8px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; margin-top: 14px; }
  .hero-actions .cta, .hero-actions .secondary { min-width: 0; padding: 0 10px; font-size: 13.5px; }

  .mini-banners { display: flex; gap: 8px; margin: 0 -10px; padding: 0 10px 2px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .mini-banners::-webkit-scrollbar { display: none; }
  .mini { flex: 0 0 72%; scroll-snap-align: start; min-height: 88px; }
  .mini img { width: 60px; height: 72px; }
  .mini-big { font-size: 34px; }
  .mini.mini-tile { flex-basis: 78%; min-height: 150px; padding: 16px; }
  .mini-tile b { font-size: 17px; }
  .mini-tile .tile-photo { width: 56%; max-width: 180px; }

  .home-side { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .side-hello { display: none; }
  .side-card { padding: 14px; }
  .side-perks ul { grid-template-columns: minmax(0, 1fr); }
  .side-perks li:nth-child(2) { border-top: 1px solid var(--line-2); padding-top: 9px; }

  .catalog { margin: 20px 0 28px; scroll-margin-top: 128px; }
  .section-title h2 { font-size: 17px; }
  #updated { display: block; font-size: 11px; text-align: right; }
  .bar .hotline { display: none; }
  .price-panel { padding: 12px; }
  .price-presets { flex-wrap: nowrap; overflow-x: auto; margin: 0 -12px; padding: 0 12px 2px; scrollbar-width: none; }
  .price-presets::-webkit-scrollbar { display: none; }
  .price-presets button { flex: none; padding: 8px 14px; font-size: 13px; }
  .price-fields { display: grid; grid-template-columns: 1fr 1fr; }
  .price-fields input { width: 100%; }

  /* Cột dòng máy bên trái + máy dạng hàng ngang */
  .catalog-layout { grid-template-columns: 82px minmax(0, 1fr); gap: 8px; }
  .device-menu { top: 128px; padding: 4px; border-radius: 12px; max-height: calc(100vh - 190px); }
  .device-menu h3 { margin: 6px 2px; font-size: 9.5px; letter-spacing: .08em; text-align: center; }
  .tabs button { flex-direction: column; justify-content: center; gap: 3px; padding: 9px 3px; font-size: 12px; line-height: 1.2; text-align: center; }
  .tabs button small { min-width: 0; padding: 0 6px; font-size: 10px; }
  .toolbar { flex-direction: column; gap: 6px; padding: 6px; border-radius: 12px; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .filters #price-range { grid-column: 1 / -1; }
  .filters select { min-height: 38px; padding: 0 24px 0 9px; background-position: right 8px center; font-size: 12.5px; min-width: 0; }
  .catalog-meta { margin: 8px 2px; font-size: 11.5px; }
  .catalog-meta p:last-child { display: none; }
  .device-section > h3 { font-size: 15px; margin-bottom: 8px; }

  .products { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .card { flex-direction: row; align-items: stretch; gap: 8px; padding: 8px; border-radius: 12px; }
  .card:hover { transform: none; }
  .card-photo { flex: 0 0 86px; width: 86px; height: auto; min-height: 104px; padding-top: 0; border-radius: 10px; background: #f7f5f5; }
  .card-photo > img { inset: 10% 0; width: 92%; height: 80%; }
  .card-color-grid { flex-direction: column; }
  .card-color-grid .card-photo { flex: none; width: 100%; height: 152px; }
  .card-photo > .color-preview { inset: 6px 8px; }
  .card-photo .card-badges { display: none; }
  .card-body { padding: 0; gap: 4px; min-width: 0; }
  .card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
  .condition-tag, .finance-tag { padding: 1px 7px; font-size: 10.5px; border-radius: 6px; }
  .card h3 { font-size: 14px; min-height: 0; }
  .chips span { padding: 1px 6px; font-size: 11px; }
  .price strong { font-size: 16.5px; white-space: nowrap; }
  .price .group-price { white-space: normal; }
  .price .go { display: none; }
  .card-note { padding: 4px 8px; font-size: 11px; }

  .installments { grid-template-columns: 1fr; gap: 18px; border-radius: 16px; margin-bottom: 26px; padding: 22px 18px; scroll-margin-top: 128px; }
  .installments-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .installments-actions .cta { min-width: 0; padding: 0 10px; font-size: 13.5px; }
  .estimate-fields { grid-template-columns: minmax(0, 1fr); }

  .customer-gallery { margin-bottom: 28px; scroll-margin-top: 128px; }
  .customer-gallery .section-title > span { display: none; }
  .customer-gallery-frame { height: 112vw; max-height: 520px; border-radius: 14px; }

  /* Gọi / fanpage / bảo hành đã có ở thanh dưới cùng */
  .footer-content { padding-block: 20px; }
  .footer-links { display: none; }

  .action-bar {
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 6px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -16px rgba(23, 15, 17, .35);
  }
  .action-bar a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; border-radius: 12px; background: var(--wine-soft); color: var(--wine); font-weight: 700; font-size: 13.5px; }
  .action-bar .act-call { background: var(--wine); color: #fff; }

  dialog { width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  dialog[open] { animation: sheet .22s ease-out; }
  .detail-photo { height: 200px; }
  .detail-body { padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); }
  dialog h2 { font-size: 21px; }
  #dprice { font-size: 25px; }
  .detail-actions .cta, .detail-actions .secondary { min-width: 0; padding: 0 10px; font-size: 13.5px; }
}
@media (min-width: 701px) { .card-body .card-tags { display: none; } }
@keyframes sheet { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .card, .card-photo img, .mini { transition: none; } dialog[open] { animation: none; } }
