:root {
  color-scheme: light;
  --nen: #E6E8EA;
  --giay: #FFFFFF;
  --muc: #16233A;
  --muc-2: #4A5568;
  --vach: #C9CED5;
  --vang: #FFC531;
  --vang-dam: #E5A800;
  --xanh: #1F5FD1;
  --do: #D93A2B;
  --chu-to: "Barlow Condensed", "Arial Narrow", sans-serif;
  --chu: "Be Vietnam Pro", system-ui, "Segoe UI", sans-serif;
  --rong: 1240px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--nen); color: var(--muc); font: 15px/1.55 var(--chu); }
img { display: block; max-width: 100%; }
a { color: var(--xanh); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--xanh); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--chu-to); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: .2px; }
h1 { font-size: 34px; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
.khung { max-width: var(--rong); margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.dau { background: var(--muc); color: #fff; position: sticky; top: 0; z-index: 20; }
.dau .khung { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font: 700 24px/1 var(--chu-to); white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo img { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--vang); object-fit: cover; }
.logo .cham { width: 14px; height: 14px; background: var(--vang); transform: rotate(45deg); }
.tim { flex: 1; display: flex; max-width: 520px; }
.tim input { flex: 1; min-width: 0; border: 0; padding: 0 14px; height: 40px; border-radius: 4px 0 0 4px; }
.tim button { border: 0; background: var(--vang); color: var(--muc); font-weight: 700; padding: 0 18px; border-radius: 0 4px 4px 0; cursor: pointer; }
.menu { display: flex; gap: 4px; margin-left: auto; }
.menu a { color: #D7DEE8; padding: 8px 12px; border-radius: 4px; font-weight: 500; white-space: nowrap; }
.menu a:hover, .menu a[aria-current] { color: #fff; background: rgba(255,255,255,.1); text-decoration: none; }
.dem { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: var(--vang); color: var(--muc); font-size: 12px; font-weight: 700; text-align: center; line-height: 20px; }
.bao-mau { background: var(--vang); color: var(--muc); font-size: 14px; padding: 8px 0; }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--muc); overflow: hidden; }
.hero-truot { display: flex; transition: transform .5s ease; }
.hero-truot a, .hero-truot div.o { flex: 0 0 100%; }
.hero-truot img { width: 100%; aspect-ratio: 1200 / 400; object-fit: cover; }
.hero-cham { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 8px; }
.hero-cham button { width: 28px; height: 6px; border: 0; padding: 0; border-radius: 3px; background: rgba(255,255,255,.5); cursor: pointer; }
.hero-cham button[aria-current] { background: var(--vang); }
.hero-chu { padding: 72px 16px 64px; color: #fff; }
.hero-chu h1 { font-size: clamp(40px, 7vw, 76px); max-width: 14ch; }
.hero-chu p { color: #C5CEDB; max-width: 48ch; font-size: 17px; margin: 16px 0 28px; }

/* ---------- shop strip ---------- */
.dai-shop { background: var(--giay); border-bottom: 1px solid var(--vach); }
.dai-shop .khung { display: flex; align-items: center; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.dai-shop img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.dai-shop .so { display: flex; gap: 24px; color: var(--muc-2); font-size: 14px; flex-wrap: wrap; }
.dai-shop .so b { color: var(--muc); font: 700 20px/1 var(--chu-to); margin-right: 4px; }
.dai-shop .nut { margin-left: auto; }

/* ---------- buttons ---------- */
.nut { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 4px; border: 2px solid var(--muc); background: var(--giay); color: var(--muc); font-weight: 600; cursor: pointer; white-space: nowrap; }
.nut:hover { text-decoration: none; background: #F1F3F5; }
.nut.chinh { background: var(--vang); border-color: var(--vang); }
.nut.chinh:hover { background: var(--vang-dam); border-color: var(--vang-dam); }
.nut.toi { background: var(--muc); color: #fff; }
.nut.toi:hover { background: #22324F; }
.nut.nho { height: 34px; padding: 0 12px; font-size: 14px; border-width: 1px; }

/* ---------- sections ---------- */
.phan { padding: 40px 0 8px; }
.phan-dau { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.phan-dau a { font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; padding: 8px 16px; border: 1px solid var(--vach); background: var(--giay); border-radius: 22px; color: var(--muc); font-weight: 500; cursor: pointer; }
.chip:hover { border-color: var(--muc); text-decoration: none; }
.chip[aria-pressed="true"] { background: var(--muc); border-color: var(--muc); color: #fff; }

.danh-muc { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.danh-muc a { display: flex; align-items: center; gap: 12px; background: var(--giay); padding: 10px; border-radius: 4px; color: var(--muc); border-left: 4px solid var(--vang); }
.danh-muc a:hover { text-decoration: none; background: #FAFBFC; }
.danh-muc img { width: 48px; height: 48px; object-fit: cover; border-radius: 3px; background: var(--nen); }
.danh-muc span { font-weight: 600; line-height: 1.25; }
.danh-muc small { display: block; color: var(--muc-2); font-weight: 400; }

/* ---------- product tag card ---------- */
.luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.the { position: relative; display: flex; flex-direction: column; background: var(--giay); color: var(--muc); border-radius: 4px; overflow: hidden; }
.the:hover { text-decoration: none; outline: 2px solid var(--muc); }
.the .anh { aspect-ratio: 1; background: #F3F4F6; }
.the .anh img { width: 100%; height: 100%; object-fit: cover; }
.the .ma { position: absolute; top: 8px; left: 8px; background: rgba(22,35,58,.85); color: #fff; font: 600 12px/1 var(--chu-to); padding: 4px 7px; border-radius: 2px; letter-spacing: .5px; }
.the .giam { position: absolute; top: 8px; right: 8px; background: var(--do); color: #fff; font: 700 13px/1 var(--chu-to); padding: 4px 7px; border-radius: 2px; }
.the .ten { padding: 10px 12px 6px; font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 50px; }
.the .chan { margin-top: auto; display: flex; align-items: stretch; justify-content: space-between; border-top: 1px dashed var(--vach); }
.the .gia { background: var(--vang); padding: 7px 18px 7px 12px; font: 700 20px/1.1 var(--chu-to); clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 50%, 100% 100%, 0 100%); }
.the .gia s { display: block; font: 400 12px/1.2 var(--chu); color: rgba(22,35,58,.65); }
.the .ban { align-self: center; padding: 0 12px; color: var(--muc-2); font-size: 12px; text-align: right; }

.trong { background: var(--giay); padding: 48px 24px; text-align: center; border-radius: 4px; }
.trong p { color: var(--muc-2); margin: 8px 0 20px; }

.tranh { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tranh img { width: 100%; border-radius: 4px; background: var(--giay); }

/* ---------- product list page ---------- */
.trang-ds { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 28px 0 40px; }
.loc { background: var(--giay); border-radius: 4px; padding: 16px; align-self: start; position: sticky; top: 80px; }
.loc h3 { font-size: 18px; margin: 4px 0 10px; }
.loc h3 + * { margin-bottom: 18px; }
.loc .chips { gap: 6px; }
.loc .chip { padding: 5px 12px; font-size: 14px; }
.loc-ds { list-style: none; margin: 0; padding: 0; }
.loc-ds button { width: 100%; text-align: left; background: none; border: 0; padding: 7px 8px; border-radius: 3px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.loc-ds button:hover { background: var(--nen); }
.loc-ds button[aria-pressed="true"] { background: var(--muc); color: #fff; }
.loc-ds small { opacity: .7; }
.thanh { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.thanh select { height: 38px; padding: 0 10px; border: 1px solid var(--vach); border-radius: 4px; background: var(--giay); }
.them { text-align: center; margin: 24px 0 0; }
.mo-loc { display: none; }

/* ---------- detail page ---------- */
.duong { padding: 16px 0 0; font-size: 14px; color: var(--muc-2); }
.ct { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; background: var(--giay); border-radius: 4px; padding: 24px; margin: 14px 0 0; }
.ct-anh .lon { aspect-ratio: 1; background: #F3F4F6; border-radius: 4px; overflow: hidden; }
.ct-anh .lon img { width: 100%; height: 100%; object-fit: contain; }
.ct-anh .nho { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.ct-anh .nho button { flex: 0 0 72px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: 3px; background: #F3F4F6; cursor: pointer; overflow: hidden; }
.ct-anh .nho button[aria-current] { border-color: var(--vang-dam); }
.ct-anh .nho img { width: 100%; height: 100%; object-fit: cover; }
.ct-tt h1 { font-size: 30px; }
.ct-tt .phu { color: var(--muc-2); font-size: 14px; margin: 8px 0 16px; display: flex; gap: 16px; flex-wrap: wrap; }
.o-gia { display: inline-block; background: var(--vang); padding: 10px 30px 10px 16px; clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 50%, 100% 100%, 0 100%); }
.o-gia b { font: 700 34px/1 var(--chu-to); }
.o-gia s { margin-left: 10px; color: rgba(22,35,58,.65); }
.pl { margin: 20px 0 0; }
.pl h3 { font: 600 14px/1 var(--chu); color: var(--muc-2); margin-bottom: 8px; }
.pl .chips button { border-radius: 4px; }
.sl { display: inline-flex; border: 1px solid var(--vach); border-radius: 4px; overflow: hidden; }
.sl button { width: 38px; height: 40px; border: 0; background: #F3F4F6; cursor: pointer; font-size: 18px; }
.sl input { width: 52px; height: 40px; border: 0; text-align: center; }
.hang-nut { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.mo-ta { background: var(--giay); border-radius: 4px; padding: 24px; margin-top: 14px; }
.mo-ta div { white-space: pre-line; max-width: 75ch; margin-top: 12px; }

/* ---------- cart ---------- */
.gh { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; padding: 28px 0 40px; align-items: start; }
.gh-ds { background: var(--giay); border-radius: 4px; }
.dong { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--nen); align-items: center; }
.dong img { width: 76px; height: 76px; object-fit: cover; border-radius: 3px; background: #F3F4F6; }
.dong .ten { font-weight: 500; color: var(--muc); }
.dong small { color: var(--muc-2); display: block; }
.dong .phai { text-align: right; display: grid; gap: 6px; justify-items: end; }
.dong .phai b { font: 700 20px/1 var(--chu-to); }
.xoa { background: none; border: 0; color: var(--do); cursor: pointer; font-size: 13px; padding: 0; }
.gh-tong { background: var(--giay); border-radius: 4px; padding: 20px; position: sticky; top: 80px; }
.gh-tong .tong { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0 14px; border-bottom: 1px dashed var(--vach); margin-bottom: 14px; }
.gh-tong .tong b { font: 700 30px/1 var(--chu-to); }
.gh-tong label { display: block; font-size: 14px; font-weight: 500; margin: 10px 0 4px; }
.gh-tong input, .gh-tong textarea { width: 100%; border: 1px solid var(--vach); border-radius: 4px; padding: 9px 10px; }
.gh-tong .nut { width: 100%; margin-top: 12px; }
.gh-tong .ghi { font-size: 13px; color: var(--muc-2); margin: 10px 0 0; }
.loi { color: var(--do); font-size: 13px; margin: 4px 0 0; }

/* ---------- footer, toast ---------- */
.chan-trang { background: var(--muc); color: #C5CEDB; margin-top: 48px; padding: 36px 0 24px; font-size: 14px; }
.chan-trang .khung { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.chan-trang h3 { color: #fff; margin-bottom: 10px; }
.chan-trang a { color: var(--vang); }
.chan-trang p { margin: 4px 0; }
.chan-trang .cuoi { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.12); padding-top: 14px; font-size: 13px; color: #8A97AB; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--muc); color: #fff; padding: 12px 18px; border-radius: 4px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; max-width: calc(100% - 32px); }
.toast.hien { opacity: 1; transform: translateX(-50%); }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .dau .khung { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .tim { order: 3; flex-basis: 100%; max-width: none; }
  .menu a { padding: 6px 8px; }
  .menu .an-dt { display: none; }
  .trang-ds { grid-template-columns: 1fr; }
  .loc { position: static; display: none; }
  .loc.mo { display: block; }
  .mo-loc { display: inline-flex; }
  .ct { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 20px; }
  .ct-tt h1 { font-size: 24px; }
  .gh { grid-template-columns: minmax(0, 1fr); }
  .gh-tong { position: static; }
  .chan-trang .khung { grid-template-columns: 1fr; }
  .luoi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .the .gia { font-size: 17px; }
  .dai-shop .nut { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* chip phan loai co anh mau */
.chip.co-anh { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 4px; }
.chip.co-anh img { width: 36px; height: 36px; object-fit: cover; border-radius: 3px; background: #F3F4F6; }
.pl .chips { max-height: 260px; overflow-y: auto; }

.ct-tt, .ct-anh { min-width: 0; }
.ct-tt h1, .the .ten, .dong .ten { overflow-wrap: anywhere; }
.chip.co-anh span { text-align: left; }

/* ---------- chat voi shop ---------- */
.chat-nut { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 18px; border: 0; border-radius: 24px; background: var(--muc); color: #fff; font-weight: 600;
  box-shadow: 0 4px 14px rgba(22,35,58,.35); cursor: pointer; }
.chat-nut:hover { background: #22324F; }
.chat-cham { width: 10px; height: 10px; border-radius: 50%; background: var(--vang); }
.chat-khung { position: fixed; right: 16px; bottom: 76px; z-index: 41; width: 380px; max-width: calc(100vw - 32px);
  height: min(600px, calc(100vh - 100px)); display: flex; flex-direction: column; background: var(--giay);
  border-radius: 8px; box-shadow: 0 10px 40px rgba(22,35,58,.3); overflow: hidden; }
.chat-khung[hidden] { display: none; }
.chat-khung header { display: flex; align-items: center; gap: 4px; padding: 12px 10px 12px 16px; background: var(--muc); color: #fff; }
.chat-khung header div { flex: 1; min-width: 0; }
.chat-khung header b { display: block; font: 700 19px/1.1 var(--chu-to); }
.chat-khung header small { color: #C5CEDB; font-size: 12px; }
.chat-x { width: 34px; height: 34px; border: 0; border-radius: 4px; background: none; color: #fff; font-size: 17px; cursor: pointer; }
.chat-x:hover { background: rgba(255,255,255,.12); }
.chat-ds { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; background: #F3F4F6; }
.chat-tn { max-width: 86%; display: grid; gap: 6px; }
.chat-tn p { margin: 0; padding: 9px 12px; border-radius: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.chat-tn.shop { align-self: flex-start; }
.chat-tn.shop p { background: var(--giay); border-bottom-left-radius: 3px; }
.chat-tn.khach { align-self: flex-end; }
.chat-tn.khach p { background: var(--muc); color: #fff; border-bottom-right-radius: 3px; }
.chat-tn.loi p { background: #FFF6DB; }
.chat-tn .nut.nho { justify-self: start; }
.chat-sp { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: center; padding: 6px; background: var(--giay);
  border: 1px solid var(--vach); border-radius: 6px; color: var(--muc); font-size: 13px; line-height: 1.3; }
.chat-sp:hover { border-color: var(--muc); text-decoration: none; }
.chat-sp img { width: 52px; height: 52px; object-fit: cover; border-radius: 4px; background: #F3F4F6; }
.chat-sp span { min-width: 0; }
.chat-sp i { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-style: normal; }
.chat-tn.khach a { color: var(--vang); }
.chat-sp b { display: block; margin-top: 2px; font: 700 15px/1.2 var(--chu-to); }
.chat-tt { margin: 0; padding: 6px 14px; font-size: 13px; color: var(--muc-2); background: #F3F4F6; border-top: 1px solid var(--vach); }
.chat-o { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--vach); }
.chat-o textarea { flex: 1; min-width: 0; resize: none; border: 1px solid var(--vach); border-radius: 6px; padding: 9px 10px; max-height: 96px; }
.chat-o .nut { height: auto; padding: 0 16px; }
.chat-o .nut:disabled { opacity: .55; cursor: wait; }
@media (max-width: 560px) {
  .chat-khung { right: 0; bottom: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; border-radius: 0; }
  .chat-nut { right: 12px; bottom: 12px; }
}
