/* ------------------------------------------------------------------
   Theme3 - giao dien sieu thi mini phong cach EGA Mini Mart.

   Viet tay, khong nhung CSS cua trang nao khac va khong dung framework: trang
   cong khai phai nhe (dac ta muc 26). Uu tien dien thoai: quy tac mac dinh la cho
   man hinh hep, cac @media chi NOI THEM cho man hinh rong hon.

   Bo cuc file: bien mau -> nen chung/nut/o nhap -> ngan keo, thanh duoi, bo cuc
   chung, trang chi tiet, gio hang, bai viet, bo loc (khoi dung chung) -> phan rieng
   cua Theme3 ghi de va them (header, slide, the san pham, Flash Sale, chan trang...).
   ------------------------------------------------------------------ */

:root {
  /* Bon mau duoi day bi layout ghi de theo cau hinh cua tung website */
  --mau-chinh: #016735;
  --mau-nhan: #ff3c02;
  --mau-sale: #ee1926;
  --mau-noi-bat: #ff9d02;
  /* Ban dam hon cua mau nhan, DUNG CHO CHU NHO va nen co chu trang nho: mau goc #ff3c02
     chi dat do tuong phan ~3.5:1 tren nen trang, duoi muc 4.5:1 cua chuan truy cap.
     Cac MANG LON (dai thong bao, khoi Flash Sale, dai nhom hang) van dung dung mau goc de
     giu nguyen dien mao; chi chu nho/nut moi dung ban dam. Dan xuat tu mau cai dat nen doi mau nhan o admin thi hai ban nay doi theo. */
  --mau-nhan-nen: color-mix(in srgb, var(--mau-nhan) 86%, black);
  --mau-nhan-chu: color-mix(in srgb, var(--mau-nhan) 82%, black);

  --mau-chinh-dam: #004f28;
  --mau-nen: #f2f6f3;
  --mau-the: #ffffff;
  --mau-chu: #383838;
  --mau-chu-nhat: #6b7280;
  --mau-vien: #e3e8e5;

  --bo-goc: 12px;
  --bo-goc-nho: 8px;
  --bo-goc-lon: 16px;

  --bong: 0 1px 2px rgba(16, 24, 40, .05);
  --bong-noi: 0 8px 24px rgba(16, 24, 40, .14);

  --khung-rong: 1296px;
  --cot-san-pham: 6;

  --cao-thanh-duoi: 56px;
}


/* ---------- Nen chung ---------- */

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

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

body {
  margin: 0;
  background: var(--mau-nen);
  color: var(--mau-chu);
  font: 400 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  /* Thanh dieu huong duoi se che mat phan cuoi trang neu khong chua san cho */
  padding-bottom: var(--cao-thanh-duoi);
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--mau-chinh); }

h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.3; font-weight: 700; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }

p { margin: 0 0 .75rem; }

button { font: inherit; color: inherit; }

/* Bieu tuong SVG noi tuyen: net ve theo mau chu hien tai */
.bt {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chu-an {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Duong tat cho ban phim - chi hien khi duoc focus */
.bo-qua {
  position: absolute;
  left: -9999px;
  z-index: 100;
  background: var(--mau-chinh);
  color: #fff;
  padding: .6rem 1rem;
}
.bo-qua:focus { left: .5rem; top: .5rem; }

:focus-visible { outline: 2px solid var(--mau-chinh); outline-offset: 2px; }

.khung {
  width: 100%;
  max-width: var(--khung-rong);
  margin: 0 auto;
  padding: 0 12px;
}

.khoi { margin: 1.5rem auto; }

.the-trang {
  background: var(--mau-the);
  border: 1px solid var(--mau-vien);
  border-radius: var(--bo-goc);
  box-shadow: var(--bong);
  padding: 1rem;
  margin: 1rem 0;
}

.trong {
  color: var(--mau-chu-nhat);
  background: var(--mau-the);
  border: 1px dashed var(--mau-vien);
  border-radius: var(--bo-goc);
  padding: 1.5rem;
  text-align: center;
}

.ghi-chu { color: var(--mau-chu-nhat); font-size: .85rem; }
.lien-ket-phu { color: var(--mau-chu-nhat); }

.o-trong { text-align: center; }
.o-trong .bt { width: 40px; height: 40px; margin: 0 auto .5rem; color: var(--mau-chu-nhat); }

.bang-bao {
  border-radius: var(--bo-goc);
  padding: .75rem 1rem;
  margin: 0 0 1rem;
  border: 1px solid transparent;
}
.bang-bao-loi { background: #fdecea; border-color: #f5c2c0; color: #a32019; }
.bang-bao-xong { background: #e8f5ec; border-color: #b7e0c4; color: #1b6b3a; }

.thanh-xem-thu {
  background: #fff7e6;
  border-bottom: 1px solid #f0d9a8;
  color: #7a5200;
  padding: .5rem 12px;
  text-align: center;
  font-size: .85rem;
}

/* ---------- Nut ---------- */

.nut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 40px;
  padding: .5rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--bo-goc);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  text-align: center;
  transition: background-color .15s, color .15s, border-color .15s;
}

.nut-chinh { background: var(--mau-chinh); color: #fff; }
.nut-chinh:hover { background: var(--mau-chinh-dam); color: #fff; }

.nut-nhan { background: var(--mau-nhan); color: #fff; }
.nut-nhan:hover { filter: brightness(.94); color: #fff; }

.nut-vien { background: #fff; border-color: var(--mau-vien); color: var(--mau-chu); }
.nut-vien:hover { border-color: var(--mau-chinh); color: var(--mau-chinh); }

.nut-lon { width: 100%; min-height: 46px; font-size: 1rem; }
.nut-nho { min-height: 34px; padding: .25rem .6rem; font-size: .8rem; }

.nut-tron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.nut-tron:hover { background: rgba(0, 0, 0, .06); }

.nut-len-dau {
  position: fixed;
  right: 12px;
  bottom: calc(var(--cao-thanh-duoi) + 12px);
  z-index: 30;
  width: 42px; height: 42px;
  border: 1px solid var(--mau-vien);
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--bong-noi);
  cursor: pointer;
}
.nut-len-dau[hidden] { display: none; }
.nut-len-dau .bt { transform: rotate(-90deg); margin: 0 auto; }

/* ---------- O nhap ---------- */

.o-nhap { margin-bottom: .85rem; position: relative; }

.o-nhap label {
  display: block;
  margin-bottom: .25rem;
  font-size: .85rem;
  font-weight: 600;
}

.o-nhap input,
.o-nhap select,
.o-nhap textarea {
  width: 100%;
  min-height: 42px;
  padding: .5rem .7rem;
  border: 1px solid var(--mau-vien);
  border-radius: var(--bo-goc-nho);
  background: #fff;
  font: inherit;
  color: inherit;
}

.o-nhap textarea { min-height: 88px; resize: vertical; }

.o-nhap input:focus,
.o-nhap select:focus,
.o-nhap textarea:focus {
  border-color: var(--mau-chinh);
  outline: none;
  box-shadow: 0 0 0 3px rgba(1, 103, 53, .12);
}

.o-nhap-doi { display: grid; gap: 0 .75rem; }

.bat-buoc { color: var(--mau-sale); }
.o-nhap-loi { color: var(--mau-sale); font-size: .8rem; margin: .25rem 0 0; }
.o-nhap-goi-y { color: var(--mau-chu-nhat); font-size: .8rem; font-weight: 400; }

.bay-bot { position: absolute; left: -9999px; }

.ds-chon { display: grid; gap: .5rem; }

.o-chon {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem .8rem;
  border: 1px solid var(--mau-vien);
  border-radius: var(--bo-goc-nho);
  cursor: pointer;
}
.o-chon:has(input:checked) {
  border-color: var(--mau-chinh);
  background: rgba(1, 103, 53, .05);
}

.o-so-luong {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--mau-vien);
  border-radius: var(--bo-goc-nho);
  overflow: hidden;
  background: #fff;
}
.o-so-luong button {
  width: 40px;
  border: 0;
  background: #f3f4f6;
  font-size: 1.1rem;
  cursor: pointer;
}
.o-so-luong button[hidden] { display: none; }
.o-so-luong input {
  width: 56px;
  min-height: 40px;
  border: 0;
  border-left: 1px solid var(--mau-vien);
  border-right: 1px solid var(--mau-vien);
  text-align: center;
  font: inherit;
  /* Bo mui ten tang giam mac dinh: da co hai nut hai ben */
  -moz-appearance: textfield;
}
.o-so-luong input::-webkit-outer-spin-button,
.o-so-luong input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* O goi y dia gioi hanh chinh */
.goi-y {
  position: absolute;
  z-index: 40;
  left: 0; right: 0;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--mau-vien);
  border-radius: var(--bo-goc-nho);
  box-shadow: var(--bong-noi);
}
.goi-y[hidden] { display: none; }
.goi-y li { padding: .55rem .7rem; cursor: pointer; }
.goi-y li:hover,
.goi-y li.dang-chon { background: rgba(1, 103, 53, .08); }


/* ---------- Ngan keo cho dien thoai ---------- */

.ngan { position: fixed; inset: 0; z-index: 60; }
.ngan[hidden] { display: none; }

.ngan-nen { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); }

.ngan-trong {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: min(86vw, 340px);
  background: #fff;
  color: var(--mau-chu);
  overflow-y: auto;
  padding-bottom: 2rem;
  transform: translateX(-100%);
  transition: transform .2s ease-out;
}
.ngan.dang-mo .ngan-trong { transform: translateX(0); }

.ngan-dau {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .6rem .5rem .6rem 1rem;
  background: var(--mau-chinh);
  color: #fff;
}
.ngan-ten { font-weight: 700; }

.ngan-tai-khoan {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--mau-vien);
}
.ngan-tai-khoan span { display: flex; flex-direction: column; font-weight: 600; }
.ngan-tai-khoan small { font-weight: 400; color: var(--mau-chu-nhat); }

.ngan-nhan {
  margin: 0;
  padding: .7rem 1rem .3rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--mau-chu-nhat);
}

.ngan-list { list-style: none; margin: 0; padding: 0; }
.ngan-list > li { border-bottom: 1px solid var(--mau-vien); }
.ngan-list a,
.ngan-list summary {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  min-height: 46px;
  cursor: pointer;
}
.ngan-list summary { list-style: none; font-weight: 500; }
.ngan-list summary::-webkit-details-marker { display: none; }
.ngan-list summary .bt { margin-left: auto; width: 16px; height: 16px; transform: rotate(90deg); }
.ngan-list details[open] summary .bt { transform: rotate(-90deg); }
.ngan-list details ul { list-style: none; margin: 0; padding: 0 0 .3rem; background: #f8fafc; }
.ngan-list details ul a { padding-left: 2rem; font-size: .9rem; min-height: 42px; }

.ngan-hotline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin: 1rem;
  padding: .7rem;
  border-radius: var(--bo-goc);
  background: var(--mau-nhan);
  color: #fff;
  font-weight: 700;
}
.ngan-hotline:hover { color: #fff; }

/* ---------- Thanh dieu huong duoi ---------- */

.thanh-duoi {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: var(--cao-thanh-duoi);
  background: #fff;
  border-top: 1px solid var(--mau-vien);
  box-shadow: 0 -2px 10px rgba(16, 24, 40, .08);
}

.thanh-duoi a,
.thanh-duoi button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  background: none;
  color: var(--mau-chu-nhat);
  font-size: .68rem;
  cursor: pointer;
}
.thanh-duoi .bt { width: 21px; height: 21px; }
.thanh-duoi .dang-xem { color: var(--mau-chinh); font-weight: 600; }

.thanh-duoi-bt { position: relative; display: inline-flex; }


/* ---------- Duong dan va phan trang ---------- */

.duong-dan {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .2rem;
  padding: .7rem 0;
  color: var(--mau-chu-nhat);
  font-size: .8rem;
}
.duong-dan .bt { width: 14px; height: 14px; }
.duong-dan span[aria-current] { color: var(--mau-chu); font-weight: 600; }

.phan-trang {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin: 1.25rem 0;
}
.phan-trang a {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  min-height: 40px;
  padding: .4rem .8rem;
  background: #fff;
  border: 1px solid var(--mau-vien);
  border-radius: var(--bo-goc);
  font-size: .85rem;
  font-weight: 600;
}
.phan-trang a:hover { border-color: var(--mau-chinh); color: var(--mau-chinh); }
.phan-trang-so { color: var(--mau-chu-nhat); font-size: .85rem; }

/* ---------- Bo cuc hai cot ---------- */

.hai-cot { display: grid; gap: 1rem; align-items: start; }
.cot-ben { display: grid; gap: .75rem; }

.hop-ben {
  background: var(--mau-the);
  border: 1px solid var(--mau-vien);
  border-radius: var(--bo-goc);
  box-shadow: var(--bong);
  padding: .9rem;
}
.hop-ben h2 { font-size: 1rem; }

.ben-danh-muc { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.ben-danh-muc > li { border-bottom: 1px solid var(--mau-vien); }
.ben-danh-muc > li:last-child { border-bottom: 0; }
.ben-danh-muc a { display: block; padding: .45rem 0; font-size: .88rem; }
.ben-danh-muc ul { list-style: none; margin: 0 0 .3rem; padding: 0 0 0 .8rem; }
.ben-danh-muc ul a { color: var(--mau-chu-nhat); font-size: .83rem; padding: .3rem 0; }
.ben-danh-muc .dang-xem { color: var(--mau-chinh); font-weight: 700; }

.hop-ben-hotline { display: flex; align-items: center; gap: .6rem; }
.hop-ben-hotline .bt { width: 28px; height: 28px; color: var(--mau-chinh); }
.hop-ben-hotline small { display: block; color: var(--mau-chu-nhat); font-size: .78rem; }
.hop-ben-hotline strong { color: var(--mau-sale); font-size: 1.05rem; }

/* Cot loc ben trai chi co ich khi con du cho; tren dien thoai danh muc da nam
   trong ngan keo nen de o day chi day san pham xuong duoi mot man hinh */
.cot-ben-loc { display: none; }

/* ---------- Trang chi tiet san pham ---------- */

.chi-tiet { display: grid; gap: 1rem; margin-bottom: 1rem; }

.anh-chinh {
  background: #fff;
  border: 1px solid var(--mau-vien);
  border-radius: var(--bo-goc);
  overflow: hidden;
}
.anh-chinh img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; padding: .5rem; }

.anh-nho { display: flex; gap: .4rem; margin-top: .5rem; overflow-x: auto; }
.anh-nho-o {
  flex: none;
  width: 64px; height: 64px;
  padding: 2px;
  border: 1px solid var(--mau-vien);
  border-radius: var(--bo-goc-nho);
  background: #fff;
  cursor: pointer;
}
.anh-nho-o.dang-chon { border-color: var(--mau-chinh); }
.anh-nho-o img { width: 100%; height: 100%; object-fit: contain; }

.chi-tiet-mua {
  background: var(--mau-the);
  border: 1px solid var(--mau-vien);
  border-radius: var(--bo-goc);
  box-shadow: var(--bong);
  padding: 1rem;
}

.chi-tiet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  color: var(--mau-chu-nhat);
  font-size: .82rem;
}

.hop-gia {
  margin: .5rem 0 .75rem;
  padding: .7rem .9rem;
  background: #fff6f6;
  border: 1px solid #ffdede;
  border-radius: var(--bo-goc);
}
.chi-tiet-gia { color: var(--mau-sale); font-size: 1.5rem; font-weight: 800; }
.hop-gia small { display: block; color: var(--mau-chu-nhat); font-size: .78rem; }

.chi-tiet-tom-tat { color: #374151; }

.form-mua { margin: .75rem 0; }

.chi-tiet-cam-ket {
  list-style: none;
  margin: 1rem 0 0;
  padding: .8rem 0 0;
  border-top: 1px dashed var(--mau-vien);
}
.chi-tiet-cam-ket li {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  margin-bottom: .5rem;
  font-size: .85rem;
}
.chi-tiet-cam-ket .bt { width: 18px; height: 18px; color: var(--mau-chinh); margin-top: .1rem; }

.bang-thong-so { width: 100%; border-collapse: collapse; font-size: .88rem; }
.bang-thong-so th,
.bang-thong-so td { padding: .5rem .6rem; border-bottom: 1px solid var(--mau-vien); text-align: left; }
.bang-thong-so th { width: 40%; color: var(--mau-chu-nhat); font-weight: 600; }

.thanh-mua-duoi {
  position: fixed;
  left: 0; right: 0;
  bottom: var(--cao-thanh-duoi);
  z-index: 44;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .5rem .75rem;
  background: #fff;
  border-top: 1px solid var(--mau-vien);
  box-shadow: 0 -2px 10px rgba(16, 24, 40, .1);
}
.thanh-mua-duoi[hidden] { display: none; }
.thanh-mua-duoi small {
  display: block;
  max-width: 55vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--mau-chu-nhat);
  font-size: .75rem;
}
.thanh-mua-duoi strong { color: var(--mau-sale); }

/* ---------- Gio hang va dat hang ---------- */

.ds-gio { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .6rem; }

.gio-dong {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "ten  xoa"
    "sua  tien";
  gap: .5rem;
  align-items: center;
  padding: .8rem;
  background: var(--mau-the);
  border: 1px solid var(--mau-vien);
  border-radius: var(--bo-goc);
  box-shadow: var(--bong);
}
.gio-ten { grid-area: ten; }
.gio-ten small { display: block; color: var(--mau-chu-nhat); font-size: .78rem; }
.gio-don-gia { display: block; color: var(--mau-chu-nhat); font-size: .82rem; }
.gio-sua { grid-area: sua; display: flex; align-items: center; gap: .4rem; margin: 0; }
.gio-tien { grid-area: tien; font-weight: 700; color: var(--mau-sale); text-align: right; }
.gio-xoa { grid-area: xoa; justify-self: end; margin: 0; }
.gio-xoa .bt { width: 18px; height: 18px; color: var(--mau-chu-nhat); }

.ds-gio-xem .gio-dong { grid-template-areas: "ten tien"; }

.tom-tat-hang {
  list-style: none;
  margin: 0 0 .75rem;
  padding: 0 0 .75rem;
  border-bottom: 1px solid var(--mau-vien);
}
.tom-tat-hang li {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .4rem;
  font-size: .85rem;
}
.tom-tat-ten em { color: var(--mau-chu-nhat); font-style: normal; }

.tom-tat-tien { display: grid; grid-template-columns: 1fr auto; gap: .35rem .5rem; margin: 0 0 .75rem; }
.tom-tat-tien dt { color: var(--mau-chu-nhat); font-size: .88rem; }
.tom-tat-tien dd { margin: 0; text-align: right; font-size: .88rem; }
.tom-tat-giam { color: var(--mau-chinh); }
.tom-tat-tong { font-weight: 800; color: var(--mau-sale); }
dt.tom-tat-tong, dd.tom-tat-tong { font-size: 1.05rem; }

.dat-hang-xong { text-align: center; }
.dat-hang-xong .ds-gio, .dat-hang-xong .tom-tat-tien { text-align: left; }
.dau-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  margin-bottom: .5rem;
  border-radius: 50%;
  background: rgba(1, 103, 53, .12);
  color: var(--mau-chinh);
}
.dau-tick .bt { width: 30px; height: 30px; stroke-width: 2.2; }
.dat-hang-ma { font-size: 1.05rem; }

.thanh-loc { display: flex; align-items: center; gap: .5rem; flex: none; }
.thanh-loc label { font-size: .82rem; color: var(--mau-chu-nhat); }
.thanh-loc select {
  min-height: 38px;
  padding: .3rem .5rem;
  border: 1px solid var(--mau-vien);
  border-radius: var(--bo-goc-nho);
  background: #fff;
  font: inherit;
}

.thanh-tim-lon { display: grid; gap: .5rem; margin-bottom: 1rem; }
.thanh-tim-lon .o-nhap { margin-bottom: 0; }

/* ---------- Hop xem nhanh ---------- */

.hop-xem-nhanh { position: fixed; inset: 0; z-index: 70; }
.hop-xem-nhanh[hidden] { display: none; }
.hop-nen { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); }
.hop-trong {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(94vw, 760px);
  max-height: 88vh;
  overflow-y: auto;
  padding: 1rem;
  background: #fff;
  border-radius: var(--bo-goc-lon);
  box-shadow: var(--bong-noi);
}
.hop-dong { position: absolute; top: .3rem; right: .3rem; }

.xem-nhanh { display: grid; gap: 1rem; }
.xem-nhanh-anh img { width: 100%; max-height: 40vh; object-fit: contain; }

/* ---------- Bai viet ---------- */

.bai-viet-anh { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--bo-goc); margin-bottom: .75rem; }
.bai-viet-tom-tat { font-size: 1rem; color: #374151; font-weight: 500; }
.bai-viet-than { line-height: 1.7; }
.bai-viet-than img { border-radius: var(--bo-goc); margin: .75rem 0; }
.bai-viet-than h2, .bai-viet-than h3 { margin-top: 1.25rem; }
.bai-viet-than ul, .bai-viet-than ol { padding-left: 1.2rem; }
.bai-viet-than table { width: 100%; border-collapse: collapse; }
.bai-viet-than td, .bai-viet-than th { border: 1px solid var(--mau-vien); padding: .4rem .6rem; }

.the-tag { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.the-tag a {
  padding: .2rem .6rem;
  border: 1px solid var(--mau-vien);
  border-radius: 999px;
  font-size: .8rem;
  color: var(--mau-chu-nhat);
}


/* ---------- Bo loc thuoc tinh / khoang gia (danh muc) ---------- */

.hop-loc .xoa-loc { float: right; font-size: .8rem; font-weight: 400; color: var(--mau-chu-nhat); text-decoration: underline; }
.hop-loc .nhom-loc { margin: .75rem 0 0; padding: 0; border: 0; min-width: 0; }
.hop-loc .nhom-loc legend { padding: 0; margin-bottom: .35rem; font-weight: 600; font-size: .9rem; }
.hop-loc .lua-chon-loc { display: flex; align-items: center; gap: .45rem; padding: .2rem 0; cursor: pointer; font-size: .9rem; }
.hop-loc .lua-chon-loc input { width: 1rem; height: 1rem; accent-color: var(--mau-chinh); flex: none; }
.hop-loc .lua-chon-loc small { color: var(--mau-chu-nhat); margin-left: auto; }
.hop-loc .khoang-loc { display: flex; align-items: center; gap: .4rem; }
.hop-loc .khoang-loc input { width: 100%; min-width: 0; padding: .4rem .5rem; border: 1px solid var(--mau-vien); border-radius: 6px; font: inherit; }
.hop-loc .nut-loc { width: 100%; margin-top: 1rem; text-align: center; }


/* ==================================================================
   PHAN RIENG CUA THEME3 - phong cach EGA Mini Mart.

   Viet lai tu dau theo hinh dung quan sat duoc (mau, bo cuc, do bo tron); khong
   dung lai CSS/JS cua trang tham chieu. Dat SAU cac khoi chung o tren nen ghi de
   duoc khi can.
   ================================================================== */

/* ---------- Font Quicksand tu dong goi (SIL OFL), chi ban tieng Viet + Latin ---------- */

@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/quicksand-vi.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/quicksand-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Nen chung ---------- */

body {
  font-family: "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
}

h1, h2, h3 { font-weight: 700; }
h1 { font-size: 1.5rem; }

.khoi { margin: 28px auto; }

/* Nut bo tron hoan toan, dac trung cua giao dien */
.nut { border-radius: 999px; font-weight: 700; min-height: 42px; padding: .5rem 1.2rem; }
.nut-chinh { background: var(--mau-chinh); }
.nut-chinh:hover { background: var(--mau-chinh-dam); }
.nut-nhan { background: var(--mau-nhan-nen); }
.nut-vien-cam {
  background: #fff;
  border-color: var(--mau-nhan-chu);
  color: var(--mau-nhan-chu);
}
.nut-vien-cam:hover { background: var(--mau-nhan-nen); color: #fff; }
.nut-xam { background: #eceeed; color: #6b7280; cursor: default; }
.nut-tron-day { min-width: 180px; }

.nut-tron-vien {
  width: 40px; height: 40px;
  border: 1px solid #e3e8e5;
  background: #fff;
}
.nut-tron-vien:hover { background: #f2f6f3; color: var(--mau-chinh); }

.o-nhap input, .o-nhap select, .o-nhap textarea { border-radius: 8px; }
.o-nhap input:focus, .o-nhap select:focus, .o-nhap textarea:focus {
  border-color: var(--mau-chinh);
  box-shadow: 0 0 0 3px rgba(1, 103, 53, .14);
}

/* ---------- Dai thong bao + header ---------- */

.dai-thong-bao {
  background: var(--mau-nhan);
  color: #fff;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
}
.dai-thong-bao .khung { padding-top: 7px; padding-bottom: 7px; }

.dau-trang { position: relative; z-index: 40; background: #fff; }

.thanh-chinh { background: #fff; }
.thanh-chinh-trong {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .5rem;
  min-height: 62px;
}

.nut-danh-muc {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  padding: 0;
  border: 0;
  background: none;
  justify-self: start;
  font-weight: 600;
  cursor: pointer;
}
.nut-danh-muc-chu { display: none; }

.logo { display: inline-flex; align-items: center; justify-content: center; }
.logo img { max-height: 40px; width: auto; }
.logo-chu { font-size: 1.25rem; font-weight: 700; color: var(--mau-chinh); }

.thanh-chinh-phai { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; }
.khoi-tai-khoan { display: none; }

.khoi-gio { display: inline-flex; align-items: center; gap: .6rem; color: #6b7280; font-size: 12.5px; }
.khoi-gio:hover { color: var(--mau-chinh); }
.khoi-gio-bieu-tuong { position: relative; }
.khoi-gio-chu { display: none; }

.dem-gio {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--mau-sale);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.o-tim { border-top: 1px solid #edf0ee; background: #fff; }
.o-tim[hidden] { display: none; }
.o-tim-trong { display: flex; gap: .5rem; padding-top: .7rem; padding-bottom: .7rem; }
.o-tim input {
  flex: 1;
  min-height: 44px;
  padding: .5rem 1.1rem;
  border: 1px solid #dfe5e1;
  border-radius: 999px;
  font: inherit;
}
.o-tim input:focus { outline: none; border-color: var(--mau-chinh); box-shadow: 0 0 0 3px rgba(1, 103, 53, .14); }

/* Thanh menu xanh: chi hien tren man hinh rong, dien thoai dung ngan keo */
.thanh-dieu-huong { display: none; background: var(--mau-chinh); color: #fff; }

.menu-ngang {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 auto;
  padding: 0 12px;
  list-style: none;
}
.menu-ngang > li { position: relative; }
.menu-ngang > li > a {
  display: flex;
  align-items: center;
  gap: .35rem;
  height: 48px;
  padding: 0 .8rem;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  /* Menu dai (nhieu muc) van nam tren MOT hang: xuong dong lam thanh menu cao gap doi */
  white-space: nowrap;
}
.menu-ngang > li > a:hover,
.menu-ngang > li:focus-within > a { color: var(--mau-noi-bat); }
.menu-ngang .bt { width: 15px; height: 15px; transform: rotate(90deg); }

.menu-con {
  position: absolute;
  top: 100%; left: 0;
  z-index: 50;
  display: none;
  min-width: 220px;
  margin: 0;
  padding: .4rem 0;
  list-style: none;
  background: #fff;
  border-radius: 0 0 12px 12px;
  box-shadow: var(--bong-noi);
}
.co-con:hover > .menu-con,
.co-con:focus-within > .menu-con { display: block; }
.menu-con a { display: block; padding: .55rem 1.1rem; color: var(--mau-chu); font-weight: 600; }
.menu-con a:hover { background: #f2f6f3; color: var(--mau-nhan); }

/* ---------- Ngan keo: doi mau cho hop voi giao dien ---------- */

.ngan-dau { background: var(--mau-chinh); }
.ngan-list a:hover, .ngan-list summary:hover { color: var(--mau-nhan); }
.ngan-hotline { background: var(--mau-nhan); border-radius: 999px; }

/* ---------- Slide banner ---------- */

.slide { position: relative; background: #fff; }
.slide-khung { position: relative; }
.slide-muc { display: none; position: relative; }
.slide-muc.dang-hien { display: block; }
.slide-muc img { width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; }

.slide-chu {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.2rem 5% 2rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
}
.slide-chu h2 { margin: .3rem 0; font-size: 1.15rem; line-height: 1.25; }
.slide-chu p { margin: 0 0 .5rem; max-width: 560px; font-size: .9rem; }
.slide-phu {
  display: inline-block;
  padding: .15rem .7rem;
  border-radius: 999px;
  background: var(--mau-nhan);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
}
.slide-chu .nut { min-height: 36px; }

.slide-nut {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  margin-top: -22px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  color: var(--mau-chinh);
  cursor: pointer;
  box-shadow: var(--bong);
}
.slide-nut:hover { background: #fff; }
.slide-truoc { left: 16px; }
.slide-sau { right: 16px; }

.slide-cham {
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.slide-cham button {
  width: 8px; height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .6);
  cursor: pointer;
  transition: width .2s, background-color .2s;
}
.slide-cham button.dang-hien { width: 22px; background: #fff; }

/* ---------- Dai cam ket ---------- */

.dai-cam-ket { background: #fff; padding: 12px 0; }
.dai-cam-ket-ds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 8px;
}
.cam-ket { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.cam-ket img, .cam-ket-bt { width: 32px; height: 32px; flex: none; object-fit: contain; }
.cam-ket-bt { display: inline-flex; align-items: center; justify-content: center; color: var(--mau-chinh); }
.cam-ket strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; }
.cam-ket span { display: block; color: #6b7280; font-size: 12px; line-height: 1.3; }

/* ---------- Nhom banner bo tron ---------- */

.nhom-banner {
  display: flex;
  gap: 10px;
  margin: 24px auto;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.nhom-banner-o {
  flex: 0 0 82%;
  scroll-snap-align: start;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
}
.nhom-banner-o img { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; }
.nhom-banner-chu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 140px;
  padding: 1rem 1.2rem;
  background: #e4efe8;
  color: var(--mau-chinh);
}
.nhom-banner-chu strong { font-size: 1.25rem; }
/* O khong co anh: moi o mot sac pastel (xanh la, xanh troi, vang, bac ha), nhu hang 4 o cua trang goc */
.nhom-banner-o:nth-child(4n+1) .nhom-banner-chu { background: #d3e5b9; }
.nhom-banner-o:nth-child(4n+2) .nhom-banner-chu { background: #c8e6f2; }
.nhom-banner-o:nth-child(4n+3) .nhom-banner-chu { background: #ffe5a3; }
.nhom-banner-o:nth-child(4n) .nhom-banner-chu { background: #c9ecd9; }
.nhom-banner-4 .nhom-banner-chu { min-height: 190px; align-items: center; text-align: center; }
.nhom-banner-chu small { color: var(--mau-nhan-chu); font-weight: 700; }

/* ---------- Tieu de khoi (ke doi hai ben) ---------- */

.khoi-dau { margin-bottom: 14px; text-align: center; }
.khoi-tieu-de {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: var(--mau-chinh);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.2;
}
.khoi-tieu-de::before,
.khoi-tieu-de::after {
  content: "";
  flex: 1;
  height: 6px;
  border-top: 1px solid #d3dad6;
  border-bottom: 1px solid #d3dad6;
}
.khoi-phu { margin: .3rem 0 0; color: #6b7280; }

/* ---------- Tab san pham ---------- */

.tab-nut { display: none; }
.co-js .tab-nut {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.co-js .tab-nut::-webkit-scrollbar { display: none; }
.tab-nut button {
  flex: none;
  padding: 9px 18px;
  border: 0;
  border-radius: 4px;
  background: #fff;
  color: var(--mau-nhan-chu);
  font-weight: 700;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.tab-nut button:hover { background: #fff0ea; }
.tab-nut button.dang-hien { background: var(--mau-nhan-nen); color: #fff; }

.tab-nhan-an { margin: 18px 0 8px; color: var(--mau-chinh); font-weight: 700; }
.co-js .tab-nhan-an { display: none; }
.co-js .tab-bang { display: none; }
.co-js .tab-bang.dang-hien { display: block; }
.tab-bang:first-of-type .tab-nhan-an { margin-top: 0; }

/* ---------- Luoi + the san pham ---------- */

.luoi-san-pham {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
/* Ke chia o bang bong trong (khong tao khoang xam o hang le cuoi cung) */
.the-sp { box-shadow: inset -1px -1px 0 #edf1ee; }

/* Cuon ngang tren dien thoai (Flash Sale, ma giam, video) */
.luoi-cuon {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.luoi-cuon > * { flex: 0 0 72%; scroll-snap-align: start; }

.the-sp { position: relative; display: flex; flex-direction: column; padding: 12px; }

.the-sp-anh {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #f6f8f7;
}
.the-sp-anh img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform .3s ease-out;
}
.the-sp:hover .the-sp-anh img { transform: scale(1.04); }
.the-sp-khong-anh {
  display: block;
  aspect-ratio: 1 / 1;
  background: repeating-linear-gradient(45deg, #f0f3f1, #f0f3f1 10px, #f6f8f7 10px, #f6f8f7 20px);
}

.the-sp-nhan {
  position: absolute;
  top: 20px; left: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.nhan {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
}
.nhan-moi, .nhan-noi-bat { background: var(--mau-noi-bat); color: #3b2300; }
.nhan-giam { background: color-mix(in srgb, var(--mau-sale) 92%, black); }

.the-sp-chu { display: flex; flex: 1; flex-direction: column; padding-top: 10px; }
.the-sp-hang { margin: 0 0 2px; color: #6b7280; font-size: 11.5px; text-transform: uppercase; }

.the-sp-ten {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}
.the-sp-ten a:hover { color: var(--mau-nhan-chu); }

.the-sp-gia-hang { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin-top: auto; }
.the-sp-gia strong { display: block; color: var(--mau-nhan-chu); font-size: 16px; font-weight: 700; line-height: 1.3; }
.the-sp-gia-cu { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.the-sp-gia-cu del { color: #6b7280; font-size: 11.5px; }
.the-sp-gia-cu .nhan { padding: 1px 8px; }

.the-sp-gio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 60, 2, .1);
  color: var(--mau-nhan-chu);
  transition: background-color .15s, color .15s, transform .1s;
}
.the-sp-gio:hover { background: var(--mau-nhan-nen); color: #fff; }
.the-sp-gio:active { transform: scale(.94); }
.the-sp-gio .bt { width: 19px; height: 19px; }

.the-sp-het-hang {
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eceeed;
  color: var(--mau-sale);
  font-size: 12px;
  font-weight: 700;
}

.the-sp-da-ban { margin: 8px 0 3px; color: #4b5563; font-size: 12.5px; }
.thanh-tien-do { display: block; height: 5px; border-radius: 999px; background: #e9ecea; overflow: hidden; }
.thanh-tien-do > span { display: block; height: 100%; border-radius: 999px; background: var(--mau-sale); }
.the-sp-ton { margin: 6px 0 0; color: #4b5563; font-size: 12px; }

.xem-tat-ca {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  height: 40px;
  margin-top: 18px;
  border-radius: 8px;
  background: #fff;
  color: var(--mau-chinh);
  font-weight: 700;
}
.xem-tat-ca .bt { width: 16px; height: 16px; }
.xem-tat-ca:hover { background: var(--mau-chinh); color: #fff; }

.luoi-co-banner { display: grid; gap: 0; background: #fff; border-radius: 8px; overflow: hidden; }
.luoi-co-banner .luoi-san-pham { border-radius: 0; }
.banner-doc { display: block; background: #fff; }
.banner-doc img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Flash Sale ---------- */

.khoi-flash {
  margin-top: 28px;
  margin-bottom: 28px;
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--mau-nhan);
  border-radius: 14px;
  background: var(--mau-nhan);
  color: #fff;
}
.flash-dau {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
}
.flash-dau h2 { margin: 0; font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.flash-dem { display: flex; align-items: center; gap: 8px; }
.flash-dem p { margin: 0 8px 0 0; font-size: 12px; line-height: 1.35; text-align: right; }
.flash-o {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  padding: 4px 6px;
  border-radius: 4px;
  background: #f4dc00;
  color: #2e2e2e;
  line-height: 1.15;
}
.flash-o b { font-size: 1.45rem; font-weight: 700; }
.flash-o small { font-size: 11px; font-weight: 600; opacity: .8; }

.flash-luoi { color: var(--mau-chu); background: #fff; gap: 0; }

/* ---------- Ma giam gia ---------- */

.dai-ma-giam { margin-top: 28px; margin-bottom: 28px; }
.dai-ma-giam-ds { gap: 14px; margin: 0; padding: 4px 2px 10px; list-style: none; }
.the-ma {
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .08);
}
.the-ma-trong { padding: 12px; border: 1px dashed #d9dfdb; border-radius: 8px; }
.the-ma-dau { display: flex; justify-content: space-between; gap: 6px; margin: 0 0 6px; }
.the-ma-dau strong { color: var(--mau-chinh); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.the-ma-dau span { color: #6b7280; font-size: 12.5px; white-space: nowrap; }
.the-ma-mo-ta { margin: 0 0 10px; color: #4b5563; font-size: 12.5px; line-height: 1.45; }
.the-ma .nut-nho { min-height: 30px; padding: .2rem 1rem; }

/* ---------- Video ngan ---------- */

.dai-video { gap: 0; margin: 0; padding: 0; list-style: none; }
.dai-video > li { flex: 0 0 44%; padding: 0 6px 0 0; }
.dai-video a { display: block; }
.dai-video-anh { position: relative; display: block; overflow: hidden; border-radius: 8px; background: #111; }
.dai-video-anh img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; }
.dai-video-phat {
  position: absolute;
  left: 10px; bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
}
.dai-video-phat .bt { width: 16px; height: 16px; }
.dai-video-ten {
  display: -webkit-box;
  margin-top: 8px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.4;
}

/* ---------- Dai nhom hang nen cam ---------- */

.dai-nhom {
  position: relative;
  margin: 32px 0;
  padding: 26px 0;
  background: var(--mau-nhan);
  color: #fff;
  overflow: hidden;
}
/* Hoa van mo tren nen cam: lop gradient tron, khong can tai them anh */
.dai-nhom::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 30%, rgba(255, 255, 255, .13) 0 38px, transparent 39px),
    radial-gradient(circle at 38% 80%, rgba(255, 255, 255, .1) 0 56px, transparent 57px),
    radial-gradient(circle at 64% 22%, rgba(255, 255, 255, .1) 0 44px, transparent 45px),
    radial-gradient(circle at 90% 70%, rgba(255, 255, 255, .13) 0 62px, transparent 63px);
  pointer-events: none;
}
.dai-nhom-ds {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 8px;
  margin: 0 auto;
  padding: 0 12px;
  list-style: none;
}
.dai-nhom-ds a { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #fff; text-align: center; }
.dai-nhom-anh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px; height: 68px;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .16);
}
.dai-nhom-anh img { width: 100%; height: 100%; object-fit: cover; }
.dai-nhom-chu-cai { color: var(--mau-nhan-chu); font-size: 1.6rem; font-weight: 700; }
.dai-nhom-ten { font-size: 13px; font-weight: 700; line-height: 1.3; }
.dai-nhom-ds a:hover .dai-nhom-anh { transform: translateY(-3px); }
.dai-nhom-anh { transition: transform .2s; }

/* ---------- Tin tuc ---------- */

.luoi-tin { display: grid; grid-template-columns: 1fr; gap: 12px; }
.tin-the { display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; background: #fff; }
.tin-anh img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.tin-chu { display: flex; flex: 1; flex-direction: column; padding: 14px 16px; }
.tin-tieu-de {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tin-chu .tin-tieu-de a:hover { color: var(--mau-nhan-chu); }
.tin-tom-tat {
  margin: 0 0 12px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tin-chan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #eef1ef;
}
.tin-chan time { display: inline-flex; align-items: center; gap: 5px; color: #6b7280; font-size: 12.5px; }
.tin-chan time .bt { width: 14px; height: 14px; }
.tin-chan .nut-nho { min-height: 34px; padding: .2rem 1.1rem; }

.tin-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; color: #6b7280; font-size: .82rem; }
.tin-nhom { color: var(--mau-nhan); font-weight: 700; }

/* ---------- Thuong hieu ---------- */

.dai-thuong-hieu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 10px 6px;
  margin: 0;
  padding: 10px 6px;
  list-style: none;
  border-radius: 8px;
  background: #fff;
}
.dai-thuong-hieu li { display: flex; align-items: center; justify-content: center; }
.dai-thuong-hieu img { max-height: 44px; width: auto; filter: grayscale(1); opacity: .75; transition: filter .2s, opacity .2s; }
.dai-thuong-hieu li:hover img { filter: none; opacity: 1; }

/* ---------- Y kien khach hang ---------- */

.luoi-y-kien { display: grid; grid-template-columns: 1fr; gap: 12px; }
.y-kien { margin: 0; padding: 18px; border-radius: 12px; background: #fff; }
.y-kien blockquote { margin: 0 0 12px; color: #4b5563; font-size: 13.5px; line-height: 1.6; }
.y-kien figcaption { display: flex; align-items: center; gap: 10px; }
.y-kien figcaption img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.y-kien figcaption span { display: flex; flex-direction: column; }
.y-kien em { color: #6b7280; font-size: 12.5px; font-style: normal; }

/* ---------- Duong dan, phan trang ---------- */

.duong-dan { padding: 14px 0; font-size: 13px; color: #6b7280; }
.duong-dan a:hover { color: var(--mau-nhan); }
.duong-dan span[aria-current] { color: #6b7280; font-weight: 500; }

.phan-trang a { border-radius: 999px; }
.phan-trang a:hover { border-color: var(--mau-nhan); color: var(--mau-nhan); }

/* ---------- Danh muc + bo loc ---------- */

.hai-cot { gap: 16px; }
.than-trang h1 { color: var(--mau-chinh); font-size: 1.6rem; font-weight: 600; }

.hop-ben { border: 0; box-shadow: none; border-radius: 12px; padding: 14px 16px; }
.hop-ben h2 { margin-bottom: .6rem; font-size: 14.5px; font-weight: 700; }
.ben-danh-muc .dang-xem { color: var(--mau-nhan); }
.hop-loc .xoa-loc { color: var(--mau-nhan); }
.hop-loc .lua-chon-loc input { accent-color: var(--mau-nhan); }
.hop-loc .nut-loc { border-radius: 999px; }

.khoi-dau:has(.thanh-loc) { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; text-align: left; }
.khoi-dau h1 { margin-bottom: 0; }
.thanh-loc label { color: #6b7280; }
.thanh-loc select { border-radius: 8px; border-color: #dfe5e1; }

/* ---------- Trang chi tiet san pham ---------- */

.chi-tiet { margin-bottom: 20px; gap: 18px; }
.anh-chinh { border: 0; border-radius: 16px; }
.anh-chinh img { padding: 0; object-fit: cover; }
.anh-nho { justify-content: center; margin-top: 12px; }
.anh-nho-o { width: 56px; height: 56px; border-radius: 8px; padding: 0; overflow: hidden; }
.anh-nho-o.dang-chon { border-color: var(--mau-nhan); border-width: 2px; }
.anh-nho-o img { object-fit: cover; }

.chi-tiet-mua { padding: 4px 0; background: none; border: 0; box-shadow: none; }
.chi-tiet-mua h1 { margin-bottom: 8px; color: #222; font-size: 1.5rem; font-weight: 600; line-height: 1.25; }
.chi-tiet-meta { padding-bottom: 12px; border-bottom: 1px solid #e3e8e5; font-size: 12.5px; }
.chi-tiet-meta strong { color: var(--mau-chinh); }

.hop-gia { margin: 14px 0; padding: 0; background: none; border: 0; }
.chi-tiet-gia { color: var(--mau-nhan-chu); font-size: 1.9rem; font-weight: 700; }

.chi-tiet-nhan { display: block; margin: 0 0 6px; color: #6b7280; font-size: 13.5px; font-weight: 600; }
.chi-tiet-ma { margin-bottom: 14px; }
.chi-tiet-ma ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.the-ma-nho {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: #fff1e9;
  color: var(--mau-nhan-chu);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.the-ma-nho .bt { width: 15px; height: 15px; }

.o-phan-loai { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.phan-loai-ds { display: flex; flex-wrap: wrap; gap: 8px; }
.phan-loai { position: relative; cursor: pointer; }
.phan-loai input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.phan-loai > span {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid #d3d8d5;
  border-radius: 4px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 600;
}
.phan-loai input:checked + span,
.phan-loai-chon > span { border-color: var(--mau-chinh); color: var(--mau-chinh); box-shadow: inset 0 0 0 1px var(--mau-chinh); }
.phan-loai input:focus-visible + span { outline: 2px solid var(--mau-chinh); outline-offset: 2px; }

.o-so-luong-dong { margin-bottom: 16px; }
.o-so-luong { border-radius: 4px; border-color: #d3d8d5; }
.o-so-luong button { background: #fff; color: #444; }

.nut-mua-doi { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 14px; border-top: 1px solid #e3e8e5; }
.nut-mua-doi .nut { min-height: 46px; font-size: 14.5px; }

.chi-tiet-cam-ket { padding-top: 14px; border-top: 0; }
.chi-tiet-cam-ket li { align-items: center; color: #4b5563; font-size: 13px; }
.chi-tiet-cam-ket .bt { color: #6b7280; margin-top: 0; }

.chi-tiet-mo-ta { margin: 12px 0 0; background: #fff; }
.chi-tiet-mo-ta-tieu-de {
  margin: 0;
  padding: 10px 12px;
  background: #e4efe8;
  color: var(--mau-chinh);
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
}
.chi-tiet-mo-ta .khung { max-width: 980px; padding-top: 18px; padding-bottom: 22px; }
.gon-lai { position: relative; max-height: 340px; overflow: hidden; }
.gon-lai::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 90px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
}
.xem-them-ban { margin: 10px 0 0; text-align: center; }
.xem-them-ban[hidden], [data-xem-them][hidden] { display: none; }

.bang-thong-so th { color: #6b7280; }

.thanh-mua-duoi strong { color: var(--mau-nhan-chu); }

/* ---------- Gio hang ---------- */

.gio-trong {
  margin: 8px 0 24px;
  padding: 36px 16px 44px;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}
.gio-trong-hinh { width: min(260px, 70%); height: auto; margin: 0 auto 8px; }
.gio-trong h2 { margin-bottom: 6px; color: #111; font-size: 1.35rem; }
.gio-trong p { margin-bottom: 18px; color: #4b5563; }

.gio-dong { border: 0; box-shadow: none; border-radius: 12px; }
.gio-tien { color: var(--mau-nhan-chu); }
.tom-tat-tong, dt.tom-tat-tong, dd.tom-tat-tong { color: var(--mau-nhan-chu); }

.the-trang { border: 0; box-shadow: none; border-radius: 12px; }

/* ---------- Chan trang ---------- */

.chan-trang { margin-top: 36px; background: #fff; color: #333; }
.chan-cot { display: grid; grid-template-columns: 1fr; gap: 24px; padding-top: 32px; padding-bottom: 28px; }
.chan-o h3 { margin: 0 0 12px; font-size: 14.5px; font-weight: 700; }
.chan-tieu-de-thanh-toan { margin-top: 26px !important; text-transform: uppercase; }
.chan-logo img { max-height: 48px; width: auto; }

.chan-lien-he { margin: 14px 0 18px; padding: 0; list-style: none; display: grid; gap: 10px; }
.chan-lien-he li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.chan-lien-he .bt { width: 17px; height: 17px; margin-top: 2px; color: #6b7280; }
.chan-lien-he small { display: block; color: #6b7280; font-size: 12.5px; }
.chan-lien-he a { color: var(--mau-chinh); font-weight: 700; }

.chan-list { margin: 0 0 20px; padding: 0 0 0 1.1rem; display: grid; gap: 12px; list-style: disc; color: #9aa09d; font-size: 13.5px; }
.chan-list a { color: #333; }
.chan-list a:hover { color: var(--mau-nhan); }

.chan-mang-xa-hoi { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chan-mang-xa-hoi a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid #e3e8e5;
  border-radius: 6px;
  color: var(--mau-chinh);
}
.chan-mang-xa-hoi a:hover { background: var(--mau-chinh); color: #fff; }
.chan-mang-xa-hoi .bt { width: 19px; height: 19px; }

.chan-o-cuoi p { margin-bottom: 14px; color: #4b5563; font-size: 13.5px; }
.chan-thanh-toan { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chan-thanh-toan li { padding: 6px 12px; border: 1px solid #e3e8e5; border-radius: 6px; color: #4b5563; font-size: 12.5px; font-weight: 600; }

.chan-duoi { border-top: 1px solid #e9eeeb; padding: 14px 0; text-align: center; color: #4b5563; font-size: 13px; }
.chan-duoi .khung { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.2rem; }

/* ---------- Nut lien he noi ---------- */

.lien-he-noi {
  position: fixed;
  right: 12px;
  bottom: calc(var(--cao-thanh-duoi) + 62px);
  z-index: 35;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lien-he-noi a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
  transition: transform .15s;
}
.lien-he-noi a:hover { color: #fff; transform: scale(1.08); }
.lien-he-noi-goi { background: #e11d2e; }
.lien-he-noi-zalo { background: #1c7cf0; font-size: 11px; font-weight: 800; }
.lien-he-noi-fb { background: linear-gradient(135deg, #0b84ff, #a334fa 60%, #ff6968); }
.lien-he-noi .bt { width: 22px; height: 22px; }

/* ---------- Nut len dau trang: nhuong cho nut lien he ---------- */

.nut-len-dau { right: auto; left: 12px; }

/* ==================================================================
   MAN HINH RONG HON
   ================================================================== */

@media (min-width: 640px) {
  .khung { padding: 0 16px; }

  .luoi-san-pham { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .luoi-cuon > * { flex-basis: 38%; }

  .o-nhap-doi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .thanh-tim-lon { grid-template-columns: 1fr auto auto; align-items: end; }
  .xem-nhanh { grid-template-columns: 1fr 1fr; }

  .dai-cam-ket-ds { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nhom-banner-o { flex-basis: 48%; }
  .slide-muc img { aspect-ratio: 3 / 1; }
  .slide-chu h2 { font-size: 1.5rem; }

  .luoi-tin { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .luoi-y-kien { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dai-nhom-ds { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .dai-thuong-hieu { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .dai-video > li { flex-basis: 24%; }

  .flash-dau { flex-direction: row; align-items: center; justify-content: space-between; padding: 14px 20px; }
  .flash-dau h2 { font-size: 2rem; }

  .khoi-tieu-de { font-size: 2.1rem; gap: 22px; }
  .chan-cot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .cot-ben-loc { display: grid; }

  .chi-tiet { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
  .chi-tiet-mua h1 { font-size: 1.75rem; }

  .hai-cot { grid-template-columns: 260px minmax(0, 1fr); gap: 16px; }
  .hai-cot-loc-phai { grid-template-columns: minmax(0, 1fr) 280px; }
  .hai-cot-loc-phai .cot-ben-loc { order: 2; }
  .hai-cot-gio,
  .hai-cot-thanh-toan,
  .hai-cot-lien-he { grid-template-columns: minmax(0, 1fr) 340px; }
  .hai-cot-gio .cot-ben,
  .hai-cot-thanh-toan .cot-ben,
  .hai-cot-lien-he .cot-ben { order: 2; }
  .hop-tong { position: sticky; top: 140px; }

  .luoi-tin { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .luoi-y-kien { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nhom-banner { overflow: visible; }
  .nhom-banner-o { flex: 1 1 0; }
  .nhom-banner { gap: 16px; margin: 36px auto; }
  .nhom-banner-4 .nhom-banner-o { flex: 1 1 0; }

  .gio-dong {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    grid-template-areas: "ten sua tien xoa";
  }
  .ds-gio-xem .gio-dong { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "ten tien"; }

  .luoi-co-banner { grid-template-columns: 31% minmax(0, 1fr); }
  .luoi-co-banner .luoi-san-pham { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .than-trang h1 { font-size: 2.6rem; }

  .thanh-duoi { display: none; }
  .thanh-mua-duoi { display: none !important; }
  .nut-len-dau { bottom: 20px; left: 20px; }
  .lien-he-noi { bottom: 24px; right: 20px; }

  .thanh-chinh-trong { min-height: 84px; }
  .logo img { max-height: 52px; }
  .nut-danh-muc-chu { display: inline; font-size: 14px; }
  .khoi-tai-khoan { display: inline-flex; }
  .khoi-gio-chu { display: inline; }
  .thanh-chinh-phai { gap: 14px; }
  .o-tim-trong { max-width: 720px; margin: 0 auto; }

  .thanh-dieu-huong { display: block; }
  
  .slide-nut { display: flex; }
  .slide-muc img { aspect-ratio: 1440 / 468; }
  .slide-chu { padding: 2rem 8% 3rem; }
  .slide-chu h2 { font-size: 2.1rem; }
  .slide-chu p { font-size: 1.05rem; }

  .dai-cam-ket { padding: 18px 0; }
  .cam-ket img, .cam-ket-bt { width: 36px; height: 36px; }
  .cam-ket strong { font-size: 14px; }

  .luoi-san-pham { grid-template-columns: repeat(var(--cot-san-pham), minmax(0, 1fr)); }
  .luoi-san-pham.luoi-hep { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .luoi-cuon > * { flex-basis: auto; }
  .flash-luoi { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; }
  .the-sp { padding: 16px; }
  .the-sp-nhan { top: 24px; left: 24px; }
  .the-sp-gia strong { font-size: 17px; }

  .dai-ma-giam-ds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
  .dai-ma-giam-ds > * { flex-basis: auto; }
  .dai-video > li { flex-basis: 12.5%; }

  .dai-nhom { padding: 44px 0 38px; }
  .dai-nhom-anh { width: 84px; height: 84px; }
  .dai-nhom-ten { font-size: 14.5px; }

  .flash-dau h2 { font-size: 2.5rem; }
  .flash-o { min-width: 56px; }
  .flash-o b { font-size: 1.75rem; }

  .khoi-tieu-de { font-size: 2.75rem; }
  .khoi { margin: 48px auto; }
  .khoi-dau { margin-bottom: 22px; }
  .co-js .tab-nut { justify-content: center; margin-bottom: 20px; }

  .chan-cot { grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 32px; padding-top: 44px; }
  .chan-duoi .khung { justify-content: center; }
}

@media (min-width: 1280px) {
  .khung { max-width: 1320px; }
}

/* Nguoi dat che do giam chuyen dong thi bo hieu ung */
@media (prefers-reduced-motion: reduce) {
  .the-sp-anh img, .dai-nhom-anh, .lien-he-noi a { transition: none; }
  .the-sp:hover .the-sp-anh img { transform: none; }
}

/* Anh trong than bai: editor hay chen san style="height:712px" kem width. Co max-width 100% ma
   khong ep height:auto thi anh bi keo meo khi man hinh hep (loi aspect ratio cua Lighthouse). */
.bai-viet-than img, .bai-viet img { max-width: 100%; height: auto !important; }
.bai-viet-than, .bai-viet { overflow-wrap: anywhere; }

/* ==================================================================
   NUT XEM NHANH KHI RE CHUOT + HOP XEM NHANH
   ================================================================== */

.the-sp-xem-nhanh {
  position: absolute;
  top: 20px; right: 20px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid #d9dfdb;
  border-radius: 50%;
  background: #fff;
  color: #2b2b2b;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .18s ease-out, transform .18s ease-out, background-color .15s, color .15s;
  pointer-events: none;
}
.the-sp-xem-nhanh .bt { width: 18px; height: 18px; }
.the-sp-xem-nhanh::before {
  content: "Xem nhanh";
  position: absolute;
  right: calc(100% + 8px);
  padding: 5px 12px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .15s;
  pointer-events: none;
}
.the-sp-xem-nhanh:hover { background: var(--mau-chinh); border-color: var(--mau-chinh); color: #fff; }
.the-sp-xem-nhanh:hover::before,
.the-sp-xem-nhanh:focus-visible::before { opacity: 1; }

/* Hien khi re chuot vao the hoac khi Tab toi (ban phim) */
@media (hover: hover) {
  .the-sp:hover .the-sp-xem-nhanh,
  .the-sp:focus-within .the-sp-xem-nhanh {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}
/* Man hinh cam ung: nut gio ben duoi da mo cung hop xem nhanh */
@media (hover: none) { .the-sp-xem-nhanh { display: none; } }

.hop-xem-nhanh { z-index: 80; }
.hop-trong {
  width: min(94vw, 880px);
  padding: 24px;
  border-radius: 16px;
}
.hop-dong {
  /* Nam TRONG hop: hop co overflow-y nen nut dat lech ra ngoai se bi cat mat */
  top: 10px; right: 10px;
  z-index: 3;
  width: 36px; height: 36px;
  border: 0;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.hop-dong:hover { background: #f2f6f3; }

.xem-nhanh { display: grid; gap: 20px; }
.xem-nhanh-anh img, .xem-nhanh-anh .the-sp-khong-anh {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: none;
  object-fit: cover;
  border-radius: 12px;
  background: #f6f8f7;
}
.xem-nhanh-chu h2 { margin: 0 0 6px; color: #222; font-size: 1.3rem; font-weight: 600; line-height: 1.3; }
.xem-nhanh-chu .chi-tiet-gia { margin: 10px 0; font-size: 1.6rem; }
.xem-nhanh-chu .chi-tiet-meta { padding-bottom: 8px; }
.xem-nhanh-chu .nut-mua-doi { margin-top: 4px; }
@media (min-width: 700px) { .xem-nhanh { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px; } }

/* ==================================================================
   NGAN KEO DANH MUC (bang trai + bang phai ben canh)
   ================================================================== */

.ngan-trong {
  width: min(90vw, 380px);
  padding: 0;
  background: #fff;
  overflow-y: auto;
}
.ngan-dau {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  color: var(--mau-chu);
  border-bottom: 1px solid #edf0ee;
}
.ngan-tai-khoan { display: flex; align-items: center; gap: 12px; padding: 0; border: 0; }
.ngan-tai-khoan-bt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 40px;
  border: 1px solid #e3e8e5;
  border-radius: 6px;
}
.ngan-tai-khoan span { flex-direction: column; }
.ngan-tai-khoan small { display: block; color: #6b7280; font-size: 13px; font-weight: 500; }
.ngan-tai-khoan strong { display: block; font-size: 16px; font-weight: 600; }

.ngan-list { list-style: none; margin: 0; padding: 0; }
.ngan-list > li { border-bottom: 0; }
.ngan-muc > a,
.ngan-muc summary,
.ngan-muc-lien-ket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 56px;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 500;
  color: var(--mau-chu);
  cursor: pointer;
}
.ngan-muc > a:hover,
.ngan-muc summary:hover,
.ngan-muc.dang-chon > .ngan-muc-lien-ket,
.ngan-muc-lien-ket:hover { background: #ececec; color: var(--mau-chu); }
.ngan-muc .bt { width: 16px; height: 16px; color: #9aa09d; }
.ngan-muc summary .bt { transform: rotate(90deg); }
.ngan-muc details[open] summary .bt { transform: rotate(-90deg); }

.ngan-con-di-dong { list-style: none; margin: 0; padding: 0 0 6px; background: #f7f9f8; }
.ngan-con-di-dong a { display: block; padding: 10px 20px 10px 36px; font-size: 15px; }
.ngan-con-di-dong ul { list-style: none; margin: 0; padding: 0; }
.ngan-con-di-dong ul a { padding-left: 52px; color: #6b7280; font-size: 14px; }
.ngan-con-di-dong a:hover { color: var(--mau-nhan-chu); }

.ngan-thong-tin { margin-top: 12px; padding-top: 12px; border-top: 4px solid #eef0ef; }

/* Dien thoai: khong co bang phai, danh muc con mo ngay trong danh sach */
.ngan-muc-lien-ket, .ngan-phu { display: none; }

@media (min-width: 1024px) {
  .ngan-trong { width: 540px; }
  .ngan-dau { padding: 22px 28px; border-bottom-color: #f1f3f2; }
  .ngan-muc > a, .ngan-muc summary, .ngan-muc-lien-ket { min-height: 64px; padding: 0 36px; font-size: 17px; }
  .ngan-muc .bt { width: 18px; height: 18px; }

  /* Man hinh rong: bang phai thay cho <details> */
  .ngan-muc.co-con > details { display: none; }
  .ngan-muc.co-con > .ngan-muc-lien-ket { display: flex; }

  .ngan-phu {
    position: absolute;
    top: 0; bottom: 0;
    left: 540px;
    width: min(540px, calc(100vw - 580px));
    overflow-y: auto;
    padding: 28px 28px 40px;
    background: #fff;
    box-shadow: 8px 0 24px rgba(0, 0, 0, .08);
  }
  .ngan-phu.dang-co { display: block; }
  .ngan-phu-bang[hidden] { display: none; }
  .ngan-phu-bang h3 { margin: 0 0 10px; font-size: 16px; font-weight: 700; }
  .ngan-phu-bang h3:not(:first-child) { margin-top: 26px; }
  .ngan-phu-bang ul { margin: 0; padding: 0 0 0 22px; display: grid; gap: 8px; list-style: disc; font-size: 16px; }
  .ngan-phu-bang a:hover { color: var(--mau-nhan-chu); }

  /* Bang phai chi truot ra cung bang trai */
  .ngan-phu { transform: translateX(-24px); opacity: 0; transition: transform .2s ease-out, opacity .2s; }
  .ngan.dang-mo .ngan-phu.dang-co { transform: none; opacity: 1; }
}

/* ---------- Hop "Khuyen mai dang ap dung" o trang san pham ---------- */

.chi-tiet-uu-dai { margin: 0 0 14px; overflow: hidden; border: 1px solid #cfe3d6; border-radius: 8px; background: #fff; }
.chi-tiet-uu-dai-dau {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 12px;
  background: #e4efe8;
  color: var(--mau-chinh);
  font-size: 13px;
  font-weight: 700;
}
.chi-tiet-uu-dai-dau .bt { width: 17px; height: 17px; }
.chi-tiet-uu-dai ul { display: grid; gap: 4px; margin: 0; padding: 10px 14px 10px 30px; font-size: 13.5px; color: #374151; }
@media (min-width: 640px) { .chi-tiet-uu-dai ul { grid-template-columns: 1fr 1fr; gap: 6px 20px; } }

/* ==================================================================
   GIO MINI (ngan truot ben phai)
   ================================================================== */

.gio-mini { position: fixed; inset: 0; z-index: 85; }
.gio-mini[hidden] { display: none; }
.gio-mini-nen { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); }
.gio-mini-trong {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(94vw, 420px);
  background: #fff;
  transform: translateX(100%);
  transition: transform .2s ease-out;
}
.gio-mini.dang-mo .gio-mini-trong { transform: none; }
.gio-mini-dau {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #edf0ee;
}
.gio-mini-dau h2 { margin: 0; color: var(--mau-chinh); font-size: 1.15rem; }
.gio-mini-than { display: flex; flex: 1; flex-direction: column; min-height: 0; overflow-y: auto; }

.gio-mini-loi { margin: 12px 16px 0; }
.gio-mini-rong { padding: 40px 20px; text-align: center; }
.gio-mini-rong .gio-trong-hinh { display: block; width: 160px; margin: 0 auto 6px; }

.gio-mini-ds { flex: 1; margin: 0; padding: 4px 16px; list-style: none; overflow-y: auto; }
.gio-mini-dong {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "ten xoa" "sua tien";
  gap: 6px 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #edf0ee;
}
.gio-mini-ten { grid-area: ten; min-width: 0; }
.gio-mini-ten strong { display: block; font-size: 13.5px; line-height: 1.4; }
.gio-mini-ten small { display: block; color: #6b7280; font-size: 12px; }
.gio-mini-gia { color: #6b7280; font-size: 12.5px; }
.gio-mini-sua { grid-area: sua; display: flex; align-items: center; gap: 6px; margin: 0; }
.gio-mini-sua .o-so-luong input { width: 44px; }
.gio-mini-sua .o-so-luong button { width: 30px; }
.gio-mini-tien { grid-area: tien; color: var(--mau-nhan-chu); font-weight: 700; text-align: right; }
.gio-mini-xoa { grid-area: xoa; justify-self: end; margin: 0; }
.gio-mini-xoa .bt { width: 18px; height: 18px; color: #6b7280; }

.gio-mini-chan { padding: 14px 16px 18px; border-top: 1px solid #edf0ee; background: #fff; }
.gio-mini-chan .tom-tat-tien { margin-bottom: 4px; }
.gio-mini-tong { color: var(--mau-nhan-chu); font-size: 1.15rem; font-weight: 700; }
.gio-mini-chan .nut-mua-doi { padding-top: 10px; border-top: 0; }

/* ---------- Dang ky nhan uu dai o chan trang ---------- */

.chan-dang-ky { display: flex; gap: 8px; margin-bottom: 8px; }
.chan-dang-ky input[type=email] {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid #dfe5e1;
  border-radius: 999px;
  font: inherit;
}
.chan-dang-ky input[type=email]:focus { outline: none; border-color: var(--mau-chinh); box-shadow: 0 0 0 3px rgba(1, 103, 53, .14); }
.chan-dong-y { margin: 0 0 6px; color: #6b7280; font-size: 12px; line-height: 1.5; }

/* ---------- Hop phat video ---------- */

.hop-video { position: fixed; inset: 0; z-index: 90; }
.hop-video[hidden] { display: none; }
.hop-video-trong {
  position: absolute;
  left: 50%; top: 50%;
  width: min(94vw, 420px);
  transform: translate(-50%, -50%);
}
.hop-video-khung { position: relative; width: 100%; aspect-ratio: 9 / 16; max-height: 86vh; background: #000; border-radius: 12px; overflow: hidden; }
.hop-video-khung iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hop-video-trong .hop-dong { top: -12px; right: -12px; }
@media (min-width: 900px) { .hop-video-trong { width: min(90vw, 440px); } }

/* ---------- Goi y tim kiem ---------- */

.o-tim-trong { position: relative; }
.goi-y-tim {
  position: absolute;
  top: calc(100% - .4rem);
  left: 16px; right: 16px;
  z-index: 60;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid #e3e8e5;
  border-radius: 12px;
  box-shadow: var(--bong-noi);
}
.goi-y-tim[hidden] { display: none; }
@media (min-width: 1024px) { .goi-y-tim { left: 50%; right: auto; width: min(720px, calc(100% - 32px)); transform: translateX(-50%); } }
.goi-y-tim a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--mau-chu);
}
.goi-y-tim a:hover, .goi-y-tim a.dang-chon { background: #f2f6f3; }
.goi-y-tim img { flex: none; width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: #f6f8f7; }
.goi-y-tim span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.goi-y-tim strong { flex: none; color: var(--mau-nhan-chu); }
