/* Hafetop – giao diện cửa hàng. Không framework. Màu thương hiệu lấy theo logo HAFETOP. */
:root {
  --brand: #a6123c;
  --brand-600: #8a0d31;
  --brand-50: #fcf1f4;
  --brand-100: #f6d9e1;
  --ink: #16181d;
  --ink-2: #3d424b;
  --muted: #6a707b;
  --line: #e6e8ec;
  --line-2: #d2d6dd;
  --surface: #f5f6f8;
  --good: #16803c;
  --zalo: #0068ff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(22, 24, 29, .06);
  --shadow: 0 10px 30px -12px rgba(22, 24, 29, .22);
  --wrap: 1280px;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  line-height: 1.55;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; font-size: 15px; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(20px, 2.2vw, 26px); }
h3 { font-size: 16px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.row-gap { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico--fill { fill: currentColor; stroke: none; }

/* ---------- Nút, nhãn ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s, box-shadow .15s; white-space: nowrap; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-600); color: #fff; box-shadow: 0 8px 18px -8px var(--brand); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; color: #fff; }
.btn--outline { background: #fff; border-color: var(--line-2); }
.btn--outline:hover { border-color: var(--brand); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { color: var(--brand); }
.btn--zalo { background: var(--zalo); color: #fff; }
.btn--zalo:hover { background: #0056d6; color: #fff; }
.btn--brand-outline { background: #fff; border-color: var(--brand); color: var(--brand); }
.btn--brand-outline:hover { background: var(--brand); color: #fff; }
.btn--caps { text-transform: uppercase; letter-spacing: .03em; font-size: 14px; }
.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.pill { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; font-weight: 500; font-size: 14px; background: #fff; transition: border-color .15s, color .15s, background .15s; }
.pill:hover { border-color: var(--brand); background: var(--brand-50); }
.pill--dark { border-color: rgba(255, 255, 255, .35); background: transparent; color: #fff; font-weight: 600; }
.pill--dark:hover { background: #fff; color: var(--ink); border-color: #fff; }
.tag { padding: 4px 10px; border-radius: 999px; background: var(--surface); font-size: 13px; }
.badge { position: absolute; top: 10px; left: 10px; padding: 3px 8px; border-radius: 6px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; }
.badge--inline { position: static; }

/* ---------- Đầu trang ---------- */
.topbar { background: var(--ink); color: #d7d9de; font-size: 13px; }
.topbar a { color: #fff; }
.topbar a:hover { color: #ffc2d1; }
.topbar__in { display: flex; gap: 8px 24px; justify-content: space-between; align-items: center; min-height: 36px; }
.topbar__links { display: flex; gap: 20px; }
.header { position: sticky; top: 0; z-index: 40; background: #fff; box-shadow: 0 1px 0 var(--line); }
.header__in { display: flex; align-items: center; gap: 28px; padding-top: 14px; padding-bottom: 14px; }
.logo { font-size: 28px; font-weight: 800; letter-spacing: .06em; color: var(--brand); line-height: 1; }
.logo:hover { color: var(--brand-600); }
.logo--tagline small { display: block; margin-top: 5px; font-size: 11px; font-weight: 500; letter-spacing: 0; color: var(--muted); white-space: nowrap; }
.search { flex: 1 1 auto; display: flex; min-width: 0; position: relative; }
.search input { flex: 1; min-width: 0; height: 46px; padding: 0 56px 0 20px; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--surface); transition: border-color .15s, background .15s, box-shadow .15s; }
.search input::placeholder { color: #8b909a; }
.search input:focus { outline: 0; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--brand-50); }
.search button { position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--brand); color: #fff; cursor: pointer; display: grid; place-items: center; }
.search button:hover { background: var(--brand-600); }
.search--page { max-width: 560px; margin: 24px auto; }
.header__actions { display: flex; align-items: center; gap: 12px; flex: none; }
.hotline { display: flex; align-items: center; gap: 10px; line-height: 1.2; }
.hotline__ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--brand-50); color: var(--brand); }
.hotline small { display: block; font-size: 12px; color: var(--muted); }
.hotline b { font-size: 16px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 50%; background: #fff; cursor: pointer; }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.hamburger { display: none; }

/* Menu chính + bảng xổ xuống */
.navbar { background: var(--brand); color: #fff; }
.navbar__in { position: relative; display: flex; align-items: center; gap: 16px; }
.navbar__hotline { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; white-space: nowrap; color: #fff; }
.navbar__hotline:hover { color: #ffd9e2; }
.nav { flex: 1; min-width: 0; }
.nav__list { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; align-items: center; }
.nav__item--narrow { position: relative; }
.nav__link { display: flex; align-items: center; gap: 4px; padding: 12px 14px; font-weight: 600; font-size: 13.5px; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; color: #fff; }
.nav__link .ico { width: 14px; height: 14px; opacity: .8; transition: transform .15s; }
.nav__item:hover > .nav__link, .nav__item:focus-within > .nav__link, .nav__link.is-active { background: var(--brand-600); color: #fff; }
.nav__item:hover > .nav__link .ico { transform: rotate(180deg); }
.nav__item--cta .nav__link { padding: 7px 14px; margin: 5px 0 5px 8px; border-radius: 999px; background: #fff; color: var(--brand); }
.nav__item--cta:hover > .nav__link, .nav__item--cta .nav__link.is-active { background: var(--brand-50); color: var(--brand-600); }
.mega { display: none; position: absolute; top: 100%; left: 24px; right: 24px; z-index: 30; background: #fff; color: var(--ink); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow); padding: 24px 28px 20px; }
.nav__item--narrow .mega { left: 0; right: auto; min-width: 280px; padding: 16px 20px; }
.nav__item:hover > .mega, .nav__item:focus-within > .mega { display: block; }
.mega__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px 28px; }
.nav__item--narrow .mega__grid { grid-template-columns: 1fr; gap: 14px; }
.mega__head { display: block; font-weight: 700; font-size: 14px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.mega__col:not(:has(ul)) .mega__head { border: 0; margin: 0; padding: 0; }
.mega ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.mega li a { font-size: 14px; color: var(--ink-2); }
.mega li a:hover { color: var(--brand); }
.mega__all { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); width: 100%; font-weight: 600; font-size: 14px; color: var(--brand); }

/* Ngăn kéo menu trên điện thoại */
.drawer { position: fixed; inset: 0; z-index: 80; display: none; }
.drawer.is-open { display: block; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(22, 24, 29, .5); }
.drawer__panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(88vw, 360px); background: #fff; overflow-y: auto; display: flex; flex-direction: column; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.drawer nav { padding: 8px 0; flex: 1; }
.drawer__link, .acc > summary { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; font-weight: 600; cursor: pointer; list-style: none; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; margin-right: 4px; }
.acc[open] > summary::after { transform: rotate(-135deg); }
.acc[open] > summary { color: var(--brand); }
.acc__body { padding: 0 0 8px 16px; }
.acc__body a { display: block; padding: 9px 16px; font-size: 14px; color: var(--ink-2); }
.acc--sub > summary { font-weight: 500; font-size: 14px; padding: 10px 16px; }
.acc__all { font-weight: 600; color: var(--brand) !important; }
.drawer__contact { padding: 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }

/* ---------- Trang chủ ---------- */
.hero { background: linear-gradient(180deg, var(--surface), #fff); padding: 20px 0 8px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.slider { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--line); aspect-ratio: 2 / 1; }
.slider__track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slider__track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; height: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slider__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: var(--ink); cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-sm); opacity: 0; transition: opacity .15s; }
.slider:hover .slider__nav, .slider__nav:focus-visible { opacity: 1; }
.slider__nav--prev { left: 12px; }
.slider__nav--next { right: 12px; }
.slider__dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; gap: 6px; justify-content: center; }
.slider__dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .6); cursor: pointer; transition: width .2s, background .2s; }
.slider__dots button.is-active { width: 24px; background: #fff; }
.hero__side { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; }
/* Hai banner phụ chia đôi đúng chiều cao banner chính: ảnh phủ kín ô, không tự đẩy chiều cao. */
.promo { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--line); min-height: 0; }
.promo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.promo:hover img { transform: scale(1.03); }

.usps__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-top: 20px; padding-bottom: 8px; }
.usp { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.usp__ico { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--brand-50); color: var(--brand); }
.usp__ico .ico { width: 24px; height: 24px; }
.usp b, .usp div span { display: block; }
.usp b { font-size: 14.5px; }
.usp div span { font-size: 13px; color: var(--muted); }

.section { padding-top: 36px; padding-bottom: 12px; }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-bottom: 18px; }
.section__head h2 { margin: 0; padding-left: 14px; border-left: 4px solid var(--brand); }
.section__more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--brand); }
.section__more:hover { gap: 10px; }
.section__more .ico { width: 16px; height: 16px; }

.cat-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); text-align: center; background: #fff; transition: transform .18s, box-shadow .18s, border-color .18s; }
.cat:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-100); color: var(--ink); }
.cat__img { width: 88px; height: 88px; border-radius: 50%; background: var(--surface); overflow: hidden; display: grid; place-items: center; }
.cat__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; padding: 8px; }
.cat__name { font-weight: 600; font-size: 14px; line-height: 1.35; }
.cat__count { font-size: 12.5px; color: var(--muted); margin-top: -6px; }

.brands { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.brand { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 520 / 267; transition: transform .18s, box-shadow .18s; }
.brand:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.brand img { width: 100%; height: 100%; object-fit: cover; }

.band { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; padding: 32px 36px; border-radius: var(--radius); }
.band h2 { margin-bottom: 6px; }
.band p { margin: 0; max-width: 560px; }
.band--dark { background: var(--ink) radial-gradient(circle at 100% 0, rgba(166, 18, 60, .55), transparent 55%); color: #fff; }
.band--dark p { color: #cfd2d8; }
.band--brand { background: linear-gradient(120deg, var(--brand), #c5224f); color: #fff; }
.band--brand p { color: #ffe3ea; }

/* ---------- Lưới + thẻ sản phẩm ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.card { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; background: #fff; transition: transform .18s, box-shadow .18s, border-color .18s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-100); }
.card__img { position: relative; aspect-ratio: 1; background: #fff; display: block; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; transition: transform .3s; }
.card:hover .card__img img { transform: scale(1.05); }
.card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; border-top: 1px solid var(--line); }
.card__meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.card__meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__brand { flex: none; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); }
.card__name { font-size: 14.5px; font-weight: 500; margin: 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.card__name a::after { content: ''; position: absolute; inset: 0; }
.price { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.price__now { font-size: 17px; font-weight: 700; color: var(--brand); }
.price__old { font-size: 13px; color: var(--muted); }
.price__contact { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.price--lg .price__now { font-size: 32px; letter-spacing: -.02em; }
.price--lg .price__old { font-size: 16px; }

/* ---------- Trang danh mục ---------- */
.page { padding-top: 18px; padding-bottom: 56px; }
.page__title { font-size: clamp(24px, 3vw, 32px); margin: 14px 0 8px; }
.crumbs { font-size: 13px; color: var(--muted); line-height: 1.7; }
.crumbs__sep { margin: 0 7px; opacity: .6; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs span[aria-current] { color: var(--ink-2); }
.intro { color: var(--ink-2); max-width: 860px; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 22px; }
.chips--mobile { display: none; }
.listing { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 20px; }
.listing--full { grid-template-columns: minmax(0, 1fr); }
.sidebar-toggle { position: sticky; top: 132px; max-height: calc(100vh - 148px); overflow-y: auto; scrollbar-width: thin; }
.sidebar { display: grid; gap: 16px; }
.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: #fff; }
.box__title { font-weight: 700; margin-bottom: 10px; font-size: 15px; }
.catnav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.catnav a { display: block; padding: 7px 10px; margin: 0 -10px; border-radius: 8px; font-size: 14px; color: var(--ink-2); }
.catnav a:hover { background: var(--surface); color: var(--brand); }
.catnav a.is-current { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.catnav__up { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.filters fieldset { border: 0; margin: 0; padding: 0 0 14px; }
.filters fieldset + fieldset { border-top: 1px solid var(--line); padding-top: 14px; }
/* legend float để không cắt ngang đường kẻ trên của fieldset */
.filters legend { float: left; width: 100%; font-weight: 700; font-size: 14px; padding: 0; margin-bottom: 6px; }
.filters__values { clear: both; max-height: 220px; overflow-y: auto; scrollbar-width: thin; }
.check { display: flex; align-items: center; gap: 10px; min-height: 34px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.sidebar-toggle > summary { display: none; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 16px; padding: 10px 16px; background: var(--surface); border-radius: var(--radius-sm); }
.chip-active { display: inline-flex; gap: 6px; align-items: center; min-height: 30px; padding: 0 12px; background: #fff; border: 1px solid var(--brand-100); color: var(--brand-600); border-radius: 999px; font-size: 13.5px; font-weight: 500; }
.sort { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.sort select { height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; }
.empty { padding: 32px; background: var(--surface); border-radius: var(--radius); }
.pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 32px 0 8px; }
.pager a, .pager span { display: inline-flex; min-width: 42px; height: 42px; padding: 0 14px; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid var(--line-2); font-weight: 500; }
.pager a:hover { border-color: var(--brand); }
.pager .is-current { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 700; }
.seo-content { border-top: 1px solid var(--line); padding-top: 28px; margin-top: 28px; color: var(--ink-2); max-width: 860px; }
.faq { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { font-weight: 600; cursor: pointer; color: var(--ink); }

/* ---------- Trang sản phẩm ---------- */
.crumbbar { background: var(--surface); padding: 10px 0; }
.page--pdp { padding-top: 18px; }
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 28px; align-items: start; }
.pdp__gallery { position: sticky; top: 132px; min-width: 0; }
.pdp__main { position: relative; aspect-ratio: 1; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; overflow: hidden; }
.pdp__main img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.pdp__zoom { position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px; border: 0; border-radius: 10px; background: rgba(22, 24, 29, .6); color: #fff; cursor: pointer; display: grid; place-items: center; }
.pdp__zoom:hover { background: var(--ink); }
.pdp__arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .92); cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.pdp__arrow:hover { border-color: var(--brand); color: var(--brand); }
.pdp__arrow--prev { left: 10px; }
.pdp__arrow--next { right: 10px; }
.pdp__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.pdp__thumbs button { flex: 0 0 76px; padding: 0; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; overflow: hidden; transition: border-color .15s; }
.pdp__thumbs button:hover { border-color: var(--line-2); }
.pdp__thumbs button.is-active { border: 2px solid var(--brand); }
.pdp__thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pdp__share { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.pdp__share a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); }
.pdp__info { min-width: 0; }
.pdp__brand { display: inline-block; padding: 3px 14px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 600; font-size: 13px; }
.pdp__title { font-size: clamp(22px, 2.3vw, 28px); margin: 10px 0 14px; line-height: 1.3; }
.pdp__facts { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0 28px; font-size: 14.5px; }
.pdp__facts dl, .pdp__quick { margin: 0; }
.pdp__facts dl + dl { border-left: 1px solid var(--line); padding-left: 28px; }
.pdp__facts dl > div { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.pdp__facts dt { display: flex; align-items: center; gap: 8px; flex: 0 0 132px; color: var(--ink-2); }
.pdp__facts dt .ico { width: 18px; height: 18px; color: var(--muted); }
.pdp__facts dd { margin: 0; font-weight: 500; }
.pdp__quick { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin-top: 16px; padding: 10px 16px; border-radius: var(--radius-sm); background: var(--surface); font-size: 14px; }
.pdp__quick > div { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line-2); }
.pdp__quick dt { flex: 0 0 42%; font-weight: 700; }
.pdp__quick dd { margin: 0; }
.pdp__info .price--lg { margin-top: 18px; align-items: center; gap: 6px 14px; }
.pdp__info .price--lg .badge { font-size: 15px; padding: 4px 10px; }
.pdp__status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 10px; font-size: 14.5px; color: var(--ink-2); }
.pdp__status > * { display: inline-flex; align-items: center; gap: 6px; }
.pdp__status > * + * { padding-left: 14px; border-left: 1px solid var(--line-2); }
.pdp__status .ico { width: 18px; height: 18px; }
.pdp__rating b { color: var(--ink); }
.pdp__rating:hover u { color: var(--brand); }
.ico--star { color: #f5a623; }
.stock { font-weight: 600; }
.stock::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock--instock { color: var(--good); }
.stock--outofstock { color: var(--brand); }
.stock--contactforprice, .stock--preorder { color: var(--ink-2); }
.buy { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; align-items: center; }
.buy .btn { flex: 1 1 180px; min-height: 48px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: #fff; }
.stepper button { width: 42px; height: 46px; border: 0; background: none; font-size: 20px; cursor: pointer; }
.stepper button:hover { background: var(--surface); color: var(--brand); }
.stepper input { width: 52px; height: 46px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font-weight: 600; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pdp__promises { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); font-size: 14px; line-height: 1.35; }
.pdp__promises li { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 4px 12px; }
.pdp__promises li + li { border-left: 1px solid var(--line-2); }
.pdp__promises .ico { width: 30px; height: 30px; color: var(--brand); stroke-width: 1.6; }

/* Tab nội dung */
.tabs { margin-top: 36px; }
.tabs__nav { display: flex; gap: 4px; border-bottom: 2px solid var(--brand); }
.tabs__nav button { padding: 12px 26px; border: 0; background: none; font-size: 15.5px; font-weight: 500; cursor: pointer; border-radius: 10px 10px 0 0; white-space: nowrap; color: var(--ink-2); }
.tabs__nav button:hover { color: var(--brand); }
.tabs__nav button.is-active { background: var(--brand); color: #fff; font-weight: 600; }
.tabs__panel { padding-top: 20px; }
.tabs__heading { font-size: 20px; padding-left: 12px; border-left: 4px solid var(--brand); margin-bottom: 14px; }
/* Có JavaScript: chỉ hiện tab đang chọn, tiêu đề lặp trong tab ẩn đi. Không có JavaScript: các phần nối tiếp nhau. */
.tabs.is-js .tabs__panel:not(.is-active) { display: none; }
.tabs.is-js .tabs__heading { display: none; }
.tabs:not(.is-js) .tabs__nav { display: none; }
.tabs__panel > .rich { max-width: 900px; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.info-grid--related { margin-top: 20px; align-items: stretch; }
.info-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 18px; background: #fff; min-width: 0; display: flex; flex-direction: column; }
.info-card__title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; color: var(--brand); margin: 0 0 12px; padding-left: 10px; border-left: 4px solid var(--brand); }
.info-card__title .ico { width: 20px; height: 20px; }
.info-card__img { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.info-card__img img { width: 100%; height: auto; border-radius: 8px; }
.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs th { text-align: left; font-weight: 700; padding: 7px 10px; width: 42%; vertical-align: top; }
.specs td { padding: 7px 10px; }
.specs tr:nth-child(odd) { background: var(--surface); }
.docs { display: grid; gap: 10px; justify-items: start; font-size: 14.5px; }
.docs p { margin: 0; }
.docs a:not(.btn) { color: var(--brand); }
.mini-products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; flex: 1; }
.mini-product { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; font-size: 13px; line-height: 1.35; }
.mini-product__img { width: 100%; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #fff; }
.mini-product__img img { width: 100%; height: 100%; object-fit: contain; transition: transform .2s; }
.mini-product:hover .mini-product__img img { transform: scale(1.06); }
.mini-product__name { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-product__sku { color: var(--muted); }
.mini-product__price { color: var(--brand); font-weight: 700; }
.mini-products--plus .mini-product + .mini-product::before { content: '+'; position: absolute; left: -11px; top: 28%; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; z-index: 1; }

/* Đánh giá sao */
.stars { --pct: calc(var(--rating) / 5 * 100%); display: inline-block; font-size: 18px; line-height: 1; letter-spacing: 2px; background: linear-gradient(90deg, #f5a623 var(--pct), #d5d9e0 var(--pct)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.reviews { margin-top: 20px; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 20px; scroll-margin-top: 140px; }
.reviews__top { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
.reviews__summary { display: grid; gap: 6px; justify-items: start; }
.reviews__summary .stars { font-size: 24px; }
.reviews__score { font-size: 44px; font-weight: 800; line-height: 1; color: var(--brand); }
.reviews__score small { font-size: 20px; font-weight: 600; color: var(--muted); }
.reviews__bars { display: grid; gap: 6px; width: 100%; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.bar { display: grid; grid-template-columns: 44px 1fr 26px; gap: 8px; align-items: center; }
.bar__track { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar__fill { display: block; height: 100%; border-radius: 999px; background: #f5a623; }
.review-form { display: grid; gap: 10px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--surface); }
.review-form input[type=text], .review-form textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; font: inherit; resize: vertical; }
.review-form input[type=text]:focus, .review-form textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.review-form .btn { justify-self: start; }
.review-form__msg { font-size: 14px; }
.review-form__msg.is-ok { color: var(--good); }
.review-form__msg.is-err { color: var(--brand); }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; border: 0; margin: 0; padding: 0; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; color: #c9ced6; line-height: 0; }
.star-input label .ico { width: 30px; height: 30px; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: #f5a623; }
.star-input input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.reviews__list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; }
.review { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.review__avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-50); color: var(--brand); font-weight: 700; }
.review__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 14px; }
.review p { margin: 6px 0 0; color: var(--ink-2); overflow-wrap: anywhere; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(12, 13, 16, .9); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 48px); object-fit: contain; border-radius: 8px; background: #fff; }
.lightbox__close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; cursor: pointer; display: grid; place-items: center; }
.video { aspect-ratio: 16 / 9; }
.video iframe { width: 100%; height: 100%; border: 0; border-radius: var(--radius-sm); }


/* Nội dung soạn từ Haravan: bỏ cỡ chữ gắn cứng để chữ đều trên mọi trang */
.rich { color: var(--ink-2); font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.rich [style*="font-size"] { font-size: inherit !important; }
.rich h1, .rich h2 { font-size: 21px; color: var(--ink); margin: 1.4em 0 .5em; }
.rich h3, .rich h4 { font-size: 17.5px; color: var(--ink); margin: 1.2em 0 .4em; }
.rich > :first-child { margin-top: 0; }
.rich p { margin: 0 0 .9em; }
.rich ul, .rich ol { padding-left: 22px; margin: 0 0 1em; }
.rich li { margin-bottom: .35em; }
.rich li p { margin: 0; }
.rich a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.rich img { border-radius: var(--radius-sm); margin: 14px auto; height: auto !important; }
.rich hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.rich table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 14.5px; }
.rich td, .rich th { border: 1px solid var(--line); padding: 8px 10px; }
.rich iframe { max-width: 100%; border: 0; border-radius: var(--radius-sm); }
.video { aspect-ratio: 16 / 9; }
.video iframe { width: 100%; height: 100%; border: 0; border-radius: var(--radius); }

/* ---------- Blog + trang tĩnh ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.post-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.post { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s; }
.post:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post__img { display: block; aspect-ratio: 3 / 2; background: var(--surface); overflow: hidden; }
.post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post:hover .post__img img { transform: scale(1.04); }
.post__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.post__meta { font-size: 12.5px; color: var(--muted); }
.post__title { font-size: 16px; font-weight: 600; margin: 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post__title a::after { content: ''; position: absolute; inset: 0; }
.post__sum { margin: 0; font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.article { min-width: 0; max-width: 820px; }
.article__meta { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.article__cover { border-radius: var(--radius); margin-bottom: 24px; width: 100%; }
.aside-list { position: sticky; top: 132px; display: grid; gap: 14px; }
.mini-list { display: grid; gap: 14px; }
.mini { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; }
.mini__img { aspect-ratio: 3 / 2; border-radius: 8px; overflow: hidden; background: var(--surface); }
.mini__img img { width: 100%; height: 100%; object-fit: cover; }
.mini b { font-size: 14px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Trang báo giá */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 28px 0; counter-reset: step; }
.step { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); counter-increment: step; }
.step::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 12px; }
.step p { margin: 0; color: var(--ink-2); font-size: 14.5px; }

/* ---------- Chân trang ---------- */
.footer { margin-top: 48px; background: #1e2532; font-size: 14.5px; color: #c9ced8; }
.footer a:hover { color: #fff; }
.footer .logo { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr 1.35fr; gap: 36px; padding-top: 44px; padding-bottom: 36px; }
.footer__title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: #fff; margin: 0 0 14px; }
.footer__title .ico { color: #ff8fa8; width: 18px; height: 18px; }
.footer__title--gap { margin-top: 22px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer p { margin: 12px 0 0; }
.footer__about { max-width: 300px; }
.social { display: flex; gap: 10px; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #fff; transition: transform .15s; }
.social a:hover { transform: translateY(-2px); }
.footer .social__fb:hover { color: #1877f2; }
.footer .social__yt:hover { color: #ff0000; }
.footer .social__zalo:hover { color: var(--zalo); }
.social .ico { width: 22px; height: 22px; }
.social__fb { color: #1877f2; }
.social__yt { color: #ff0000; }
.social__zalo { color: var(--zalo); font-weight: 800; font-size: 11px; }
.bct { display: inline-block; margin-top: 16px; }
.bct img { height: 48px; width: auto; }
.footer__phone b { color: #fff; font-size: 16px; }
.newsletter { display: flex; gap: 8px; }
.newsletter input[type=email] { flex: 1; min-width: 0; height: 46px; padding: 0 18px; border: 1px solid transparent; border-radius: 999px; background: #fff; color: var(--ink); }
.newsletter input[type=email]:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }
.newsletter__hp { position: absolute; left: -9999px; }
.newsletter__msg { min-height: 1.4em; margin-top: 8px; font-size: 13.5px; }
.newsletter__msg.is-ok { color: #7ee2a8; }
.newsletter__msg.is-err { color: #ff9db3; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 16px 0; font-size: 13px; color: #9aa1ae; }

/* Nút liên hệ nổi (máy tính) + thanh dưới (điện thoại) */
.float-contact { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 10px; z-index: 35; }
.float-contact a { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: #fff; box-shadow: 0 6px 16px rgba(22, 24, 29, .25); transition: transform .15s; }
.float-contact a:hover { transform: scale(1.08); color: #fff; }
.float-contact .ico { width: 24px; height: 24px; }
.float-contact__zalo { background: var(--zalo); font-weight: 800; font-size: 14px; }
.float-contact__call { background: var(--brand); }
.tabbar { display: none; }

/* ---------- Màn hình vừa ---------- */
@media (max-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid--5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .post-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .logo--tagline small { display: none; }
  .nav__link { padding: 12px 9px; font-size: 12.5px; }
  .navbar__hotline { font-size: 13px; }
}

/* ---------- Điện thoại, máy tính bảng dọc ---------- */
@media (max-width: 900px) {
  .wrap { padding: 0 16px; }
  body { padding-bottom: 64px; }
  .topbar__links, .navbar, .header__zalo, .float-contact, .logo--tagline small { display: none; }
  .topbar__in { justify-content: center; text-align: center; }
  .hamburger { display: inline-grid; border: 0; width: 40px; height: 40px; margin-left: -8px; }
  .header__in { flex-wrap: wrap; gap: 10px 12px; padding-top: 10px; padding-bottom: 10px; }
  .logo { font-size: 23px; margin-right: auto; }
  .search { order: 5; flex-basis: 100%; }
  .search input { height: 42px; }
  .search button { width: 34px; height: 34px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__side { grid-template-rows: none; grid-template-columns: 1fr 1fr; gap: 12px; }
  .promo { aspect-ratio: 2 / 1; }
  .usps__grid { grid-template-columns: 1fr 1fr; }
  .brands { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid, .grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .listing { grid-template-columns: 1fr; gap: 16px; }
  .sidebar-toggle { position: static; max-height: none; overflow: visible; }
  .crumbs { white-space: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .chips--mobile { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 10px -16px 4px; padding: 0 16px 4px; }
  .chips--mobile .pill { flex: none; }
  .sidebar-toggle > summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid var(--line-2); border-radius: 999px; font-weight: 600; cursor: pointer; list-style: none; }
  .sidebar-toggle > summary::-webkit-details-marker { display: none; }
  .sidebar-toggle[open] > summary { margin-bottom: 12px; }
  .pdp, .article-layout { grid-template-columns: 1fr; gap: 20px; }
  .pdp__gallery, .aside-list { position: static; }
  .pdp__info { padding: 18px 16px; }
  .reviews__top { grid-template-columns: 1fr; }
  .tabs__nav { overflow-x: auto; scrollbar-width: none; }
  .tabs__nav button { flex: none; }
  .steps { grid-template-columns: 1fr; }
  .band { padding: 24px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 58px; border: 0; background: none; font-size: 11.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
  .tabbar .is-call { color: var(--brand); font-weight: 700; }
  .tabbar .is-zalo { color: var(--zalo); font-weight: 700; }
}

@media (max-width: 600px) {
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .cat { padding: 10px 4px; border: 0; gap: 6px; }
  .cat__img { width: 60px; height: 60px; }
  .cat__name { font-size: 12px; font-weight: 500; }
  .cat__count { display: none; }
  .grid, .grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card__body { padding: 10px; }
  .card__name { font-size: 13.5px; }
  .price__now { font-size: 15.5px; }
  .usp { padding: 10px; gap: 8px; }
  .usp__ico { width: 36px; height: 36px; }
  .usp div span { display: none; }
  .usp b { font-size: 13px; }
  .post-grid, .post-grid--4 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; }
  .pdp__promises { font-size: 12.5px; }
  .pdp__promises li { flex-direction: column; text-align: center; gap: 6px; padding: 4px 6px; }
  .pdp__promises br { display: none; }
  .pdp__facts { grid-template-columns: 1fr; gap: 0; }
  .pdp__facts dl + dl { border-left: 0; padding-left: 0; }
  .pdp__quick { grid-template-columns: 1fr; }
  .buy .btn { flex: 1 1 100%; }
  .price--lg .price__now { font-size: 26px; }
  .tabs, .reviews { padding: 14px; }
  .toolbar { padding: 10px 12px; }
  .section { padding-top: 28px; }
}

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