:root {
  --teal: #10756e;
  --teal-dam: #135752;
  --kem: #fdfaea;
  --vang: #f5a623;
  --chu: #2f2f2f;
  --mo: #6b6b6b;
  --nen-the: #ffffff;
  --vien: #ece6cc;
  --bo: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--kem); color: var(--chu);
  font: 16px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); }
h1, h2, h3 { color: var(--teal-dam); line-height: 1.25; }
.khung { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.nho { font-size: 13px; color: var(--mo); }

/* đầu trang */
.dau { background: var(--teal); position: sticky; top: 0; z-index: 10; }
.dau-trong { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 19px; text-decoration: none; }
.logo img { border-radius: 50%; background: #fff; }
.dau nav a { color: #fff; text-decoration: none; margin-left: 18px; font-size: 15px; opacity: .92; }
.dau nav a:hover { opacity: 1; text-decoration: underline; }

/* hero */
.hero { padding: 40px 0 28px; }
.hero h1 { font-size: clamp(30px, 6vw, 46px); margin: 0 0 12px; }
.hero > .khung > p { font-size: 18px; color: var(--mo); max-width: 560px; margin: 0 0 24px; }
.tim-so { background: var(--nen-the); border: 1px solid var(--vien); border-radius: var(--bo); padding: 16px; max-width: 420px; }
.tim-so label { display: block; font-weight: 600; margin-bottom: 8px; }
.tim-so div { display: flex; gap: 8px; }
.tim-so input { flex: 1; min-width: 0; font-size: 18px; padding: 10px 12px; border: 2px solid var(--vien); border-radius: 10px; }
.tim-so input:focus { outline: none; border-color: var(--teal); }
.tim-so button { background: var(--teal); color: #fff; border: 0; border-radius: 10px; padding: 0 22px; font-size: 16px; font-weight: 600; cursor: pointer; }
.loi { color: #b3261e; margin: 8px 0 0; font-size: 14px; }

/* lọc + lưới */
.loc { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 18px; }
.chip { border: 1px solid var(--vien); background: var(--nen-the); color: var(--chu); border-radius: 999px; padding: 6px 16px; font-size: 14px; cursor: pointer; }
.chip.bat { background: var(--teal); border-color: var(--teal); color: #fff; }
.luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; padding-bottom: 40px; }
.the { background: var(--nen-the); border: 1px solid var(--vien); border-radius: var(--bo); overflow: hidden; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.the:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(16, 117, 110, .12); }
.the[hidden] { display: none; }
.the-anh, .anh-chinh { position: relative; aspect-ratio: 1; background: #fff; }
.the-anh img, .anh-chinh img { width: 100%; height: 100%; object-fit: cover; }
.so { position: absolute; top: 10px; left: 10px; background: var(--vang); color: var(--teal-dam); font-weight: 800; padding: 2px 10px; border-radius: 8px; font-size: 15px; }
.the-chu { padding: 12px 14px 16px; }
.the-chu h3 { margin: 4px 0 6px; font-size: 17px; }
.the-chu p { margin: 0; font-size: 14px; color: var(--mo); }
.nhom { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--teal); }

/* trang sản phẩm */
.sp { display: grid; gap: 28px; padding-top: 24px; padding-bottom: 32px; }
@media (min-width: 860px) {
  .sp { grid-template-columns: 1fr 1fr; align-items: start; }
  .sp-anh { position: sticky; top: 80px; }
}
.anh-chinh { border-radius: var(--bo); overflow: hidden; border: 1px solid var(--vien); }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumb { flex: 0 0 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: #fff; }
.thumb.bat { border-color: var(--teal); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.sp-chu h1 { font-size: clamp(24px, 4vw, 32px); margin: 6px 0 12px; }
.mo-dau { font-size: 17px; }
.nut-mua { display: block; text-align: center; background: var(--vang); color: var(--teal-dam); font-weight: 800; font-size: 17px; text-decoration: none; padding: 14px 18px; border-radius: 12px; margin-top: 16px; }
.nut-mua:hover { filter: brightness(1.05); }
.sp-chu > .nho { text-align: center; margin: 6px 0 20px; }
.hop { background: var(--nen-the); border: 1px solid var(--vien); border-radius: var(--bo); padding: 14px 18px; margin-bottom: 14px; }
.hop h2 { font-size: 17px; margin: 0 0 6px; }
.hop ul { margin: 0; padding-left: 20px; }
.hop li { margin: 3px 0; }
.hop.xanh { border-left: 5px solid #2e9d63; }
.hop.do { border-left: 5px solid #d0573f; }
.hop.vang { border-left: 5px solid var(--vang); }
.hai-cot { display: grid; gap: 0 14px; }
@media (min-width: 520px) { .hai-cot { grid-template-columns: 1fr 1fr; } }
.luu-y { font-size: 14px; color: var(--mo); }
.tieu-de-phu { margin-top: 8px; }

/* video dọc, chỉ tải khi bấm */
.yt, .hop iframe { display: block; width: 100%; max-width: 320px; aspect-ratio: 9 / 16; border: 0; border-radius: 12px; overflow: hidden; margin: 8px auto 0; background: #000; }
.yt { position: relative; padding: 0; cursor: pointer; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.play { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; font-size: 28px; display: grid; place-items: center; }

/* nút mua dính đáy trên điện thoại */
.thanh-mua { display: none; }
@media (max-width: 859px) {
  .thanh-mua { display: block; position: sticky; bottom: 0; padding: 10px 16px; background: rgba(253, 250, 234, .96); border-top: 1px solid var(--vien); }
  .thanh-mua .nut-mua { margin: 0; }
}

/* văn bản */
.van-ban { max-width: 720px; padding-top: 28px; padding-bottom: 40px; }

/* chân trang */
.chan { background: var(--teal-dam); color: #e6f0ee; padding: 28px 0; font-size: 14px; }
.chan a { color: #fff; }
.chan .cong-khai { font-weight: 600; }
.chan .nho { color: #b9d3cf; }

/* chống tràn ngang trên điện thoại */
.sp > *, .luoi > *, .hai-cot > * { min-width: 0; }
.sp-chu { overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .logo { font-size: 17px; }
  .dau nav a { margin-left: 12px; font-size: 14px; }
}

/* danh mục */
a.chip { text-decoration: none; display: inline-block; }
.vet { font-size: 14px; color: var(--mo); margin: 0 0 4px; }
.vet a { color: var(--mo); }
.dm-dau { padding-top: 28px; }
.dm-dau h1 { margin: 4px 0 6px; font-size: clamp(26px, 5vw, 36px); }
.dm-dau > p:last-child { color: var(--mo); margin: 0 0 8px; }

/* video nổi bật */
.co-video { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.72); color: #fff; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 8px; }
.xem-video { display: inline-block; background: #fff; border: 2px solid var(--teal); color: var(--teal); font-weight: 700; font-size: 14px; padding: 5px 14px; border-radius: 999px; text-decoration: none; margin-bottom: 8px; }
.hop.video { text-align: center; scroll-margin-top: 80px; }
.hop.video h2 { text-align: left; }
