/* ==========================================================================
   VETPRO — style website thú y. Viết tay, không page builder.
   Khung: navy + xám nhạt (design system website mặc định).
   Nhấn chính xanh lá y tế, nhấn phụ vàng hổ phách.
   Tương phản đã đo: navy/trắng 9,5:1 · xanh/trắng 5,0:1 · vàng/chữ tối 9,2:1.
   ========================================================================== */

:root {
  --navy: 205 60% 26%;
  --navy-dark: 205 62% 18%;
  --navy-light: 202 48% 40%;
  --accent: 152 66% 30%;        /* nhấn chính — nền nút, chữ trắng đọc được */
  --accent-dark: 152 70% 24%;
  --accent-soft: 152 45% 95%;
  --accent-2: 40 95% 52%;       /* nhấn phụ — LUÔN đi với chữ tối, không bao giờ chữ trắng */
  --accent-2-dark: 36 92% 44%;
  --ink: 200 24% 12%;
  --ink-soft: 200 10% 40%;
  --bg: 0 0% 100%;
  --bg-soft: 200 20% 97%;
  --border: 200 16% 88%;
  --danger: 4 72% 45%;
  --radius: 0.75rem;
  --shadow-sm: 0 1px 2px hsl(var(--navy) / 0.08);
  --shadow: 0 6px 24px -8px hsl(var(--navy) / 0.18);
  --shadow-lg: 0 20px 50px -20px hsl(var(--navy) / 0.35);
  --wrap: 84rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: hsl(var(--bg));
  color: hsl(var(--ink));
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }
a { color: hsl(var(--accent)); text-decoration: none; }
a:hover { color: hsl(var(--accent-dark)); }

/* Icon SVG: BẮT BUỘC có kích thước mặc định. Thiếu dòng này thì mọi chỗ chưa khai
   riêng sẽ vẽ icon ở kích thước nội tại của SVG (phình kín màn hình) — mà trang vẫn
   trả 200 nên chỉ nhìn bằng mắt mới thấy. */
.ic { width: 1.1em; height: 1.1em; flex: none; display: inline-block; vertical-align: -0.15em; }

/* Mọi thứ bấm được phải có con trỏ bàn tay — <button> không tự có. */
button, [role="button"], summary, label[for], .btn, .clickable { cursor: pointer; }

h1, h2, h3, h4, h5, .font-display {
  font-family: 'Barlow Condensed', 'Be Vietnam Pro', sans-serif;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0 0 .6rem;
  color: hsl(var(--navy-dark));
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: hsl(var(--navy) / .3); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: hsl(var(--navy) / .5); }

:focus-visible { outline: 3px solid hsl(var(--accent-2)); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 1rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: hsl(var(--accent)); color: #fff; padding: .7rem 1.2rem;
}
.skip-link:focus { left: 0; }

/* -------------------------------------------------------------- Nút */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase;
  font-weight: 700; font-size: 1.05rem; letter-spacing: .03em;
  padding: .7rem 1.4rem; border-radius: .5rem; border: 2px solid transparent;
  background: hsl(var(--accent)); color: #fff; transition: .2s ease;
  line-height: 1.2;
}
.btn:hover { background: hsl(var(--accent-dark)); color: #fff; transform: translateY(-1px); }
.btn--amber { background: hsl(var(--accent-2)); color: hsl(var(--ink)); }
.btn--amber:hover { background: hsl(var(--accent-2-dark)); color: hsl(var(--ink)); }
.btn--navy { background: hsl(var(--navy)); }
.btn--navy:hover { background: hsl(var(--navy-dark)); }
.btn--ghost { background: transparent; border-color: hsl(var(--border)); color: hsl(var(--navy-dark)); }
.btn--ghost:hover { background: hsl(var(--bg-soft)); border-color: hsl(var(--navy)); color: hsl(var(--navy-dark)); }
.btn--white { background: #fff; color: hsl(var(--navy-dark)); }
.btn--white:hover { background: hsl(var(--bg-soft)); color: hsl(var(--navy-dark)); }
.btn--outline-white { background: transparent; border-color: #fff; color: #fff; }
.btn--outline-white:hover { background: #fff; color: hsl(var(--navy-dark)); }
.btn--round { border-radius: 999px; }
.btn--sm { font-size: .92rem; padding: .45rem 1rem; }
.btn--block { width: 100%; }
.btn .ic { width: 1.05em; height: 1.05em; }

/* -------------------------------------------------------------- Header */
.topbar {
  background: hsl(var(--navy-dark)); color: #fff;
  font-size: 12px; letter-spacing: .02em;
}
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 38px; }
.topbar a { color: #fff; }
.topbar a:hover { color: hsl(var(--accent-2)); }
.topbar__links { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.topbar__links span { display: inline-flex; align-items: center; gap: .35rem; }
.topbar .ic { width: 14px; height: 14px; opacity: .85; }
@media (max-width: 860px) { .topbar { display: none; } }

.masthead { background: hsl(var(--navy)); color: #fff; position: sticky; top: 0; z-index: 60; }
.masthead__in { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .65rem; color: #fff; flex-shrink: 0; }
.brand:hover { color: #fff; }
.brand__mark {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: hsl(var(--accent-2)); color: hsl(var(--navy-dark));
  display: grid; place-items: center;
}
.brand__mark .ic { width: 26px; height: 26px; }
.brand__name { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 1.6rem; line-height: 1; text-transform: uppercase; }
.brand__sub { font-size: 10.5px; opacity: .8; text-transform: uppercase; letter-spacing: .12em; }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.nav__sub { list-style: none; }
.nav a {
  color: #fff; font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase;
  font-weight: 600; font-size: 1.02rem; letter-spacing: .03em;
  padding: .55rem .72rem; border-radius: .4rem; display: inline-flex; align-items: center; gap: .3rem;
}
.nav a:hover, .nav .current-menu-item > a, .nav .is-active > a { background: hsl(var(--navy-dark)); color: hsl(var(--accent-2)); }
.nav__item { position: relative; }
.nav__sub {
  position: absolute; left: 0; top: 100%; min-width: 290px; max-height: 70vh;
  overflow-y: auto; overflow-x: hidden;   /* khai tường minh: overflow-y cuộn làm overflow-x tự thành auto */
  background: #fff; border-radius: .6rem; box-shadow: var(--shadow-lg);
  padding: .4rem; display: none; z-index: 70; border: 1px solid hsl(var(--border));
}
.nav__item:hover > .nav__sub, .nav__item:focus-within > .nav__sub { display: block; }
.nav__sub a {
  color: hsl(var(--navy-dark)); display: block; font-size: .96rem; padding: .45rem .7rem;
  text-transform: none; font-family: 'Be Vietnam Pro', sans-serif; font-weight: 500; letter-spacing: 0;
}
.nav__sub a:hover { background: hsl(var(--accent-soft)); color: hsl(var(--accent-dark)); }

.head-search { position: relative; flex: none; }
.head-search input {
  border: 0; border-radius: 999px; padding: .5rem 2.4rem .5rem 1rem; width: 210px;
  font: inherit; font-size: .9rem; background: #fff; color: hsl(var(--ink));
}
.head-search button {
  position: absolute; right: 3px; top: 3px; width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: hsl(var(--accent)); color: #fff; display: grid; place-items: center;
}
.head-search .ic { width: 15px; height: 15px; }
@media (max-width: 1180px) { .head-search { display: none; } }

.burger {
  margin-left: auto; background: hsl(var(--navy-dark)); color: #fff; border: 0;
  width: 44px; height: 44px; border-radius: .5rem; display: none; place-items: center;
}
.burger .ic { width: 22px; height: 22px; }
@media (max-width: 1080px) { .nav { display: none; } .burger { display: grid; } }

/* Ngăn kéo menu mobile — danh sách DỌC, mỗi mục cao ≥ 44px */
.drawer-overlay {
  position: fixed; inset: 0; background: hsl(var(--navy-dark) / .55);
  z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.drawer-overlay.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(85%, 24rem);
  background: #fff; z-index: 95; transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.drawer.is-open { transform: translateX(0); }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem 1rem; background: hsl(var(--navy)); color: #fff;
}
.drawer__close { background: hsl(var(--navy-dark)); border: 0; color: #fff; width: 38px; height: 38px; border-radius: .4rem; display: grid; place-items: center; }
.drawer__body { overflow-y: auto; overflow-x: hidden; padding: .5rem 0 2rem; }
.drawer__body a {
  display: block; min-height: 46px; padding: .7rem 1.1rem; color: hsl(var(--navy-dark));
  font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; font-weight: 600; font-size: 1.05rem;
  border-bottom: 1px solid hsl(var(--border));
}
.drawer__body a:hover { background: hsl(var(--accent-soft)); }
.drawer__body .sub a {
  padding-left: 2rem; font-family: 'Be Vietnam Pro', sans-serif; text-transform: none;
  font-weight: 400; font-size: .92rem; color: hsl(var(--ink-soft)); min-height: 44px;
}
.drawer__search { padding: .9rem 1rem; border-bottom: 1px solid hsl(var(--border)); }
.drawer__search form { display: flex; gap: .4rem; }
.drawer__search input { flex: 1; min-width: 0; border: 1px solid hsl(var(--border)); border-radius: .4rem; padding: .55rem .7rem; font: inherit; color: hsl(var(--ink)); }

/* -------------------------------------------------------------- Hero */
.hero { position: relative; background: hsl(var(--navy-dark)); color: #fff; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; opacity: .3; object-fit: cover; width: 100%; height: 100%; }
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, hsl(var(--navy-dark) / .94) 0%, hsl(var(--navy-dark) / .82) 45%, hsl(var(--navy) / .55) 100%);
}
.hero__in { position: relative; z-index: 2; padding-block: 4.5rem 4rem; max-width: 46rem; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; letter-spacing: 0; }
.hero h1 em { font-style: normal; color: hsl(var(--accent-2)); }
.hero p { font-size: 1.05rem; color: #fff; opacity: .92; max-width: 40rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.hero__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2.5rem; max-width: 42rem; }
.hero__stats b { display: block; font-family: 'Barlow Condensed', sans-serif; font-size: 2.2rem; color: hsl(var(--accent-2)); line-height: 1; }
.hero__stats span { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
@media (max-width: 640px) { .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 1.2rem .8rem; } .hero__in { padding-block: 3rem 2.5rem; } }

/* -------------------------------------------------------------- Marquee */
.marquee { background: hsl(var(--navy-dark)); overflow: hidden; padding: .7rem 0; }
.marquee__track { display: flex; gap: 2.5rem; width: max-content; animation: marquee 28s linear infinite; }
.marquee a {
  font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; font-weight: 600;
  font-size: 1.15rem; letter-spacing: .14em; color: #fff; opacity: .55; white-space: nowrap;
}
.marquee a:hover { opacity: 1; color: hsl(var(--accent-2)); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* -------------------------------------------------------------- Khối chung */
.section { padding-block: 3.5rem; }
.section--soft { background: hsl(var(--bg-soft)); }
.section--navy { background: hsl(var(--navy)); color: #fff; }
.section--navy h1, .section--navy h2, .section--navy h3 { color: #fff; }
.section__head { margin-bottom: 1.8rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section__head h1, .section__head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 0; }
.section__head p { margin: .4rem 0 0; color: hsl(var(--ink-soft)); max-width: 48rem; }
.section--navy .section__head p { color: hsl(0 0% 100% / .8); }
.section__line { width: 62px; height: 4px; background: hsl(var(--accent-2)); border-radius: 2px; margin-bottom: .8rem; }

/* -------------------------------------------------------------- Lưới & thẻ */
.grid { display: grid; gap: 1.1rem; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1080px) { .grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px)  { .grid--4, .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid--2 { grid-template-columns: 1fr; } }
@media (max-width: 460px)  { .grid--4, .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; } }

.card {
  background: #fff; border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: .2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: hsl(var(--accent) / .4); }

/* Thẻ sản phẩm — bấm được CẢ THẺ, nút bên trong vẫn bấm riêng */
.p-card { position: relative; cursor: pointer; }
.p-card__media { position: relative; aspect-ratio: 1 / 1; background: hsl(var(--bg-soft)); overflow: hidden; }
.p-card__media img { width: 100%; height: 100%; object-fit: contain; padding: .6rem; transition: transform .35s ease; }
.p-card:hover .p-card__media img { transform: scale(1.06); }
.p-card__body { padding: .8rem .85rem 1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.p-card__cat { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: hsl(var(--accent)); font-weight: 600; }
.p-card__title {
  font-family: 'Be Vietnam Pro', sans-serif; text-transform: none; font-weight: 600; font-size: .95rem;
  line-height: 1.4; margin: 0; color: hsl(var(--ink));
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.p-card:hover .p-card__title { color: hsl(var(--accent-dark)); }
.p-card__price { margin-top: auto; padding-top: .4rem; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.p-card__price b { font-family: 'Barlow Condensed', sans-serif; font-size: 1.35rem; color: hsl(var(--danger)); }
.p-card__price s { color: hsl(var(--ink-soft)); font-size: .85rem; }
.p-card__price .contact { font-family: 'Barlow Condensed', sans-serif; font-size: 1.2rem; color: hsl(var(--navy)); text-transform: uppercase; }
.p-card__link { position: absolute; inset: 0; z-index: 1; }
.p-card__actions { position: relative; z-index: 2; display: flex; gap: .4rem; margin-top: .55rem; }
.p-card__actions .btn { flex: 1; }
.badge {
  position: absolute; top: .55rem; left: .55rem; z-index: 2;
  background: hsl(var(--danger)); color: #fff; font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase; font-weight: 700; font-size: .8rem; padding: .18rem .5rem; border-radius: .3rem;
}
.badge--amber { background: hsl(var(--accent-2)); color: hsl(var(--ink)); left: auto; right: .55rem; }

/* Thẻ danh mục */
.cat-card { display: flex; align-items: center; gap: .7rem; padding: .85rem .9rem; background: #fff; border: 1px solid hsl(var(--border)); border-radius: var(--radius); color: hsl(var(--navy-dark)); font-weight: 600; font-size: .92rem; transition: .2s; }
.cat-card:hover { border-color: hsl(var(--accent)); background: hsl(var(--accent-soft)); color: hsl(var(--accent-dark)); transform: translateY(-2px); }
.cat-card__ic { width: 40px; height: 40px; flex: none; border-radius: .6rem; background: hsl(var(--accent-soft)); color: hsl(var(--accent-dark)); display: grid; place-items: center; }
.cat-card__ic .ic { width: 22px; height: 22px; }
.cat-card span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Màn hẹp: cho tên danh mục 3 dòng, không thì tên dài nào cũng bị cắt cụt bằng "…". */
@media (max-width: 640px) { .cat-card span { -webkit-line-clamp: 3; } .cat-card { font-size: .88rem; } }

/* Thẻ dịch vụ */
.svc-card { padding: 1.4rem; }
.svc-card__ic { width: 56px; height: 56px; border-radius: 1rem; background: hsl(var(--accent-soft)); color: hsl(var(--accent-dark)); display: grid; place-items: center; margin-bottom: .9rem; }
.svc-card__ic .ic { width: 30px; height: 30px; }
.svc-card h3 { font-size: 1.28rem; margin-bottom: .45rem; }
.svc-card p { margin: 0; color: hsl(var(--ink-soft)); font-size: .92rem; }
.svc-card .more { margin-top: .8rem; display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; font-size: .9rem; }

/* Thẻ bài viết */
.post-card__media { aspect-ratio: 16 / 10; background: hsl(var(--bg-soft)); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.post-card__meta { font-size: 12px; color: hsl(var(--ink-soft)); display: flex; gap: .8rem; flex-wrap: wrap; }
.post-card h3 { font-family: 'Be Vietnam Pro', sans-serif; text-transform: none; font-size: 1rem; line-height: 1.45; font-weight: 600; margin: 0; }
.post-card h3 a { color: hsl(var(--navy-dark)); }
.post-card h3 a:hover { color: hsl(var(--accent-dark)); }
.post-card p { margin: 0; font-size: .88rem; color: hsl(var(--ink-soft)); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* -------------------------------------------------------------- Vì sao chọn */
.why { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.why__item { text-align: center; }
.why__ic { width: 64px; height: 64px; margin: 0 auto .8rem; border-radius: 1.1rem; background: hsl(0 0% 100% / .12); color: hsl(var(--accent-2)); display: grid; place-items: center; }
.why__ic .ic { width: 32px; height: 32px; }
.why h3 { font-size: 1.2rem; margin-bottom: .3rem; }
.why p { margin: 0; font-size: .9rem; color: hsl(0 0% 100% / .78); }
@media (max-width: 860px) { .why { grid-template-columns: repeat(2, 1fr); } }

/* -------------------------------------------------------------- Breadcrumb */
.crumbs { background: hsl(var(--bg-soft)); border-bottom: 1px solid hsl(var(--border)); font-size: .85rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: .7rem 0; color: hsl(var(--ink-soft)); }
.crumbs li::after { content: '/'; margin-left: .4rem; opacity: .5; }
.crumbs li:last-child::after { content: ''; }

/* -------------------------------------------------------------- Bố cục có sidebar */
/* Bố cục 2 cột: cột hẹp LUÔN là <aside>, bất kể nó đứng trước hay sau trong HTML.
   Khai cứng `270px minmax(0,1fr)` là sai ngay khi template nào đó đặt <aside>
   xuống cuối — cột 270px rơi vào NỘI DUNG, chữ xuống dòng từng từ một, mà trang
   vẫn trả 200. Đã dính ở trang tin tức. */
.layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.layout--aside-right { grid-template-columns: minmax(0, 1fr) 270px; }
.layout:has( > aside:last-child ) { grid-template-columns: minmax(0, 1fr) 270px; }
.layout > * { min-width: 0; }   /* grid item mặc định không co nhỏ hơn nội dung */
@media (max-width: 1020px) {
  .layout, .layout--aside-right, .layout:has( > aside:last-child ) { grid-template-columns: 1fr; }
}

.side-box { background: #fff; border: 1px solid hsl(var(--border)); border-radius: var(--radius); margin-bottom: 1.1rem; overflow: hidden; }
.side-box__head { background: hsl(var(--navy)); color: #fff; padding: .7rem 1rem; font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; font-weight: 700; font-size: 1.1rem; }
.side-box__body { padding: .6rem; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list a { display: block; padding: .5rem .6rem; border-radius: .4rem; color: hsl(var(--navy-dark)); font-size: .9rem; }
.side-list a:hover, .side-list .is-active > a { background: hsl(var(--accent-soft)); color: hsl(var(--accent-dark)); font-weight: 600; }
.side-list .sub { list-style: none; padding-left: .8rem; margin: 0; }
.side-list .sub a { font-size: .85rem; color: hsl(var(--ink-soft)); }

/* -------------------------------------------------------------- Trang sản phẩm */
.pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
@media (max-width: 900px) { .pd { grid-template-columns: 1fr; gap: 1.2rem; } }
.pd__main { border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: #fff; aspect-ratio: 1/1; overflow: hidden; }
.pd__main img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }
.pd__thumbs { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.pd__thumbs button { width: 68px; height: 68px; border: 2px solid hsl(var(--border)); border-radius: .5rem; background: #fff; padding: 2px; overflow: hidden; }
.pd__thumbs button.is-active { border-color: hsl(var(--accent)); }
.pd__thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pd h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.pd__meta { list-style: none; margin: .8rem 0; padding: 0; font-size: .92rem; display: grid; gap: .3rem; }
.pd__meta b { color: hsl(var(--navy-dark)); }
.pd__price { background: hsl(var(--bg-soft)); border: 1px dashed hsl(var(--accent) / .45); border-radius: var(--radius); padding: .9rem 1.1rem; margin: 1rem 0; }
.pd__price .now { font-family: 'Barlow Condensed', sans-serif; font-size: 2.2rem; color: hsl(var(--danger)); line-height: 1; }
.pd__price s { color: hsl(var(--ink-soft)); margin-left: .6rem; }
.pd__price .note { display: block; font-size: .82rem; color: hsl(var(--ink-soft)); margin-top: .25rem; }
.pd__variants { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 1rem; }
.pd__variants span { border: 1px solid hsl(var(--border)); border-radius: .4rem; padding: .3rem .65rem; font-size: .85rem; background: #fff; }
.pd__cta { display: flex; gap: .6rem; flex-wrap: wrap; }
.pd__cta .btn { flex: 1 1 12rem; }

.tabs { margin-top: 2.2rem; }
.tabs__nav { display: flex; gap: .3rem; border-bottom: 2px solid hsl(var(--border)); flex-wrap: wrap; }
.tabs__nav button {
  background: transparent; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px;
  font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; font-weight: 700;
  font-size: 1.1rem; padding: .6rem 1rem; color: hsl(var(--ink-soft));
}
.tabs__nav button.is-active { color: hsl(var(--navy-dark)); border-bottom-color: hsl(var(--accent-2)); }
.tabs__panel { padding-top: 1.2rem; }
.tabs__panel[hidden] { display: none; }

/* -------------------------------------------------------------- Nội dung bài */
.prose { font-size: .98rem; line-height: 1.8; }
.prose h2 { font-size: 1.5rem; margin-top: 1.8rem; }
.prose h3 { font-size: 1.25rem; margin-top: 1.4rem; }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.prose li { margin-bottom: .35rem; }
.prose img { border-radius: var(--radius); margin: 1rem 0; }
.prose a { text-decoration: underline; }
.prose blockquote { margin: 1.2rem 0; padding: .8rem 1.1rem; border-left: 4px solid hsl(var(--accent-2)); background: hsl(var(--bg-soft)); }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .92rem; }
.prose th, .prose td { border: 1px solid hsl(var(--border)); padding: .5rem .7rem; text-align: left; vertical-align: top; }
.prose th { background: hsl(var(--bg-soft)); }
.prose figure { margin: 1rem 0; overflow-x: auto; }

/* -------------------------------------------------------------- Form */
.field { position: relative; margin-bottom: .85rem; }
.field .ic { position: absolute; left: .75rem; top: .82rem; width: 17px; height: 17px; color: hsl(var(--ink-soft)); pointer-events: none; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid hsl(var(--border)); border-radius: .5rem;
  padding: .7rem .8rem .7rem 2.35rem; font: inherit; font-size: .94rem;
  color: hsl(var(--ink));                   /* khai tường minh: tránh kế thừa text trắng của khối cha */
  background: #fff;
}
.field textarea { min-height: 7rem; padding-top: .7rem; resize: vertical; }
.field select option { color: hsl(var(--ink)); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: hsl(var(--accent)); outline: none; box-shadow: 0 0 0 3px hsl(var(--accent) / .15); }
.field--plain input, .field--plain textarea, .field--plain select { padding-left: .8rem; }
.form-note { font-size: .85rem; color: hsl(var(--ink-soft)); }
.form-msg { border-radius: .5rem; padding: .7rem .9rem; font-size: .9rem; margin-bottom: .8rem; }
.form-msg--ok { background: hsl(var(--accent-soft)); color: hsl(var(--accent-dark)); border: 1px solid hsl(var(--accent) / .35); }
.form-msg--err { background: hsl(4 80% 96%); color: hsl(var(--danger)); border: 1px solid hsl(var(--danger) / .3); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* -------------------------------------------------------------- Phân trang */
.pager { display: flex; gap: .35rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }
.pager .page-numbers {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 .6rem; border: 1px solid hsl(var(--border)); border-radius: .45rem;
  color: hsl(var(--navy-dark)); font-weight: 600; background: #fff;
}
.pager .page-numbers:hover { border-color: hsl(var(--accent)); color: hsl(var(--accent-dark)); }
.pager .page-numbers.current { background: hsl(var(--accent)); border-color: hsl(var(--accent)); color: #fff; }

/* -------------------------------------------------------------- Footer */
.footer { background: hsl(var(--navy-dark)); color: hsl(0 0% 100% / .78); padding-block: 3rem 1rem; font-size: .9rem; }
.footer h3 { color: #fff; font-size: 1.15rem; margin-bottom: .9rem; }
.footer a { color: hsl(0 0% 100% / .78); }
.footer a:hover { color: hsl(var(--accent-2)); }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 2rem; }
@media (max-width: 1020px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .footer__grid { grid-template-columns: 1fr; gap: 1.6rem; } }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer__contact li { display: flex; gap: .55rem; align-items: flex-start; }
.footer__contact .ic { width: 16px; height: 16px; flex: none; margin-top: .25rem; color: hsl(var(--accent-2)); }
/* `.footer a` (0,1,1) có độ ưu tiên cao hơn `.btn--*` (0,1,0) nên nuốt màu chữ
   của nút. Khai lại tường minh trong phạm vi footer.
   THỨ TỰ QUAN TRỌNG: mọi khai báo dưới đây cùng độ ưu tiên (0,2,1), nên cái
   chung `.footer a.btn` phải đứng TRƯỚC các biến thể, không thì nó thắng và
   nút vàng lại thành chữ trắng (đo được 1,93:1). */
.footer a.btn { color: #fff; }
.footer a.btn--amber, .footer a.btn--amber:hover { color: hsl(var(--ink)); }
.footer a.btn--white, .footer a.btn--white:hover { color: hsl(var(--navy-dark)); }
.footer a.btn--outline-white { color: #fff; }
.footer a.btn--outline-white:hover { color: hsl(var(--navy-dark)); }

.footer__bottom { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid hsl(0 0% 100% / .12); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; }
.footer__map { border: 0; width: 100%; height: 170px; border-radius: .6rem; filter: grayscale(.25); }

/* -------------------------------------------------------------- Nút nổi gọi / Zalo */
.floaters { position: fixed; right: 1rem; bottom: 1.2rem; z-index: 80; display: grid; gap: .6rem; }
.floaters a, .to-top {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; box-shadow: var(--shadow); border: 0;
}
.floaters .ic, .to-top .ic { width: 26px; height: 26px; }
.f-call { background: hsl(var(--accent)); animation: wobble 2.4s ease-in-out infinite, pulse-ring 1.6s cubic-bezier(.4,0,.6,1) infinite; }
.f-zalo { background: #0068ff; }
.f-call:hover, .f-zalo:hover { color: #fff; filter: brightness(1.08); }
.to-top { background: hsl(var(--navy)); transition: opacity .2s, height .2s; }
/* Khi ẩn phải THU VỀ 0, không chỉ trong suốt: nó là một ô trong lưới .floaters,
   để nguyên chiều cao thì đẩy nút Gọi/Zalo lên giữa màn hình và che mất chữ. */
.to-top:not(.is-on) { opacity: 0; pointer-events: none; height: 0; overflow: hidden; }
@keyframes wobble {
  0%, 65%, 100% { transform: rotate(0); }
  70% { transform: rotate(-13deg); } 75% { transform: rotate(10deg); }
  80% { transform: rotate(-7deg); }  85% { transform: rotate(5deg); } 90% { transform: rotate(-2deg); }
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 hsl(var(--accent) / .55); }
  70% { box-shadow: 0 0 0 16px hsl(var(--accent) / 0); }
  100% { box-shadow: 0 0 0 0 hsl(var(--accent) / 0); }
}

/* Bottombar mobile — điều hướng chính trong tầm ngón cái */
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 85; display: none;
  background: #fff; border-top: 1px solid hsl(var(--border));
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 16px hsl(var(--navy) / .1);
}
.bottombar ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.bottombar a {
  min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  font-size: 10.5px; color: hsl(var(--ink-soft)); text-align: center; padding: .3rem .1rem;
}
.bottombar .ic { width: 21px; height: 21px; }
.bottombar a.is-active { color: hsl(var(--accent-dark)); font-weight: 600; }
.bottombar a.is-active .ic { color: hsl(var(--accent)); }
@media (max-width: 860px) {
  .bottombar { display: block; }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .floaters { bottom: calc(60px + .75rem + env(safe-area-inset-bottom)); right: .75rem; }
  /* Bottombar đã có nút Gọi — nút Gọi nổi là thừa, và mỗi nút nổi lại che thêm
     một mảng chữ. Trên mobile chỉ giữ Zalo (bottombar không có) + lên đầu trang. */
  .floaters .f-call { display: none; }
  .floaters a, .to-top { width: 46px; height: 46px; }
  .floaters .ic, .to-top .ic { width: 22px; height: 22px; }
}

/* -------------------------------------------------------------- Hộp CTA */
.cta-band { background: hsl(var(--accent-2)); color: hsl(var(--ink)); }
.cta-band h2 { color: hsl(var(--ink)); }
.cta-band__in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding-block: 2.2rem; }
.cta-band p { margin: .3rem 0 0; max-width: 46rem; }

.partner-strip { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.partner-strip span {
  background: #fff; border: 1px solid hsl(var(--border)); border-radius: .5rem;
  padding: .5rem 1rem; font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase;
  font-weight: 700; color: hsl(var(--navy)); letter-spacing: .05em;
}

/* -------------------------------------------------------------- Hiện dần khi cuộn */
.js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .6s ease-out, transform .6s ease-out; }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .marquee__track { transform: none !important; }
  html { scroll-behavior: auto; }
}

/* -------------------------------------------------------------- Lightbox ảnh */
.lightbox { position: fixed; inset: 0; z-index: 120; background: hsl(var(--navy-dark) / .92); display: none; place-items: center; padding: 1.5rem; }
.lightbox.is-open { display: grid; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 88vh; object-fit: contain; border-radius: .5rem; background: #fff; }
.lightbox__close { position: absolute; top: 1rem; right: 1rem; background: hsl(0 0% 100% / .15); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }

.empty { text-align: center; padding: 3rem 1rem; color: hsl(var(--ink-soft)); }
.empty .ic { width: 52px !important; height: 52px !important; color: hsl(var(--border)); margin: 0 auto 1rem; }
