:root {
  --navy: #071a2c;
  --navy-2: #0c2740;
  --green: #22d47f;
  --green-d: #12a861;
  --ink: #0f1d2b;
  --muted: #5b6b7c;
  --line: #e3e8ee;
  --bg: #ffffff;
  --bg-alt: #f3f6f9;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(7, 26, 44, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
a { color: var(--green-d); }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* Top bar & header */
.topbar { background: var(--navy); color: #c5d3e2; font-size: .82rem; }
.topbar a { color: var(--green); text-decoration: none; font-weight: 600; }
.topbar__in { display: flex; justify-content: space-between; gap: 16px; padding: 6px 16px; }
.header { position: sticky; top: 0; z-index: 30; background: var(--navy-2); color: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.2); }
.header__in { display: flex; align-items: center; gap: 16px; padding: 10px 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; flex-shrink: 0; }
.brand img { border-radius: 8px; }
.brand__name { font-weight: 800; font-size: 1.3rem; letter-spacing: .02em; }
.brand__name b { color: var(--green); }
.search { flex: 1; }
.search input { width: 100%; padding: 11px 14px; border-radius: 999px; border: 1px solid #2a4a68; background: #0a2036; color: #fff; font: inherit; }
.search input::placeholder { color: #8ea3b8; }
.search input:focus { outline: 2px solid var(--green); border-color: transparent; }
.quote-btn { display: flex; align-items: center; gap: 8px; background: var(--green); color: var(--navy); border: 0; border-radius: 999px; padding: 10px 16px; font: inherit; font-weight: 700; cursor: pointer; }
.quote-count { background: var(--navy); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: .78rem; padding: 0 6px; }
.catnav { background: #0f2f4d; border-top: 1px solid #1b3c5b; }
.catnav__in { display: flex; gap: 6px; overflow-x: auto; padding: 8px 16px; scrollbar-width: none; }
.catnav__in::-webkit-scrollbar { display: none; }
.catnav__item { position: relative; flex-shrink: 0; }
.catnav__item > a { display: block; white-space: nowrap; padding: 6px 14px; border-radius: 999px; font-size: .9rem; font-weight: 600; text-decoration: none; color: #dbe6f1; border: 1px solid #2a4a68; }
.catnav__item > a:hover { background: var(--green); color: var(--navy); border-color: var(--green); }
.catnav__menu { display: none; position: absolute; top: 100%; left: 0; padding-top: 6px; min-width: 220px; z-index: 40; }
.catnav__menu a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; background: #fff; color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 600; border-bottom: 1px solid var(--line); }
.catnav__menu a:first-child { border-radius: 10px 10px 0 0; } .catnav__menu a:last-child { border-radius: 0 0 10px 10px; border-bottom: 0; }
.catnav__menu a:hover { background: #ecfdf3; }
.catnav__menu small { color: var(--muted); }
@media (hover: hover) and (min-width: 641px) { .catnav__in { overflow: visible; } .catnav__item:hover .catnav__menu { display: block; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 10px; font: inherit; font-weight: 700; font-size: .92rem; text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: transform .1s, background .2s; }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--green); color: var(--navy); }
.btn--primary:hover { background: #3be596; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--green); }
.btn--lg { padding: 13px 22px; font-size: 1rem; }
.btn--block { width: 100%; margin-top: 8px; }
.btn.is-disabled, .btn:disabled { opacity: .45; pointer-events: none; }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 80% 40%, #0f3a4f 0%, var(--navy) 60%); color: #fff; }
.hero__in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; padding: 48px 16px; }
.eyebrow { color: var(--green); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin: 0 0 10px; }
.hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.7rem); font-weight: 800; }
.lead { color: #c5d3e2; font-size: 1.08rem; max-width: 560px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.hero .btn--ghost { color: #fff; border-color: #2f5577; }
.hero__logo { width: 100%; max-width: 440px; justify-self: center; border-radius: 20px; height: auto; }

.usp { background: var(--navy-2); color: #fff; }
.usp__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; padding: 0 16px; }
.usp__grid div { padding: 16px 12px; display: flex; flex-direction: column; border-left: 3px solid var(--green); margin: 10px 0; }
.usp__grid b { font-size: 1rem; }
.usp__grid span { color: #9fb3c7; font-size: .85rem; }

/* Sections */
.section { padding: 44px 0; }
.section--alt { background: var(--bg-alt); }
.section__title { font-size: 1.55rem; font-weight: 800; }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.section__head .section__title { margin: 0; }

.cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.cat { display: flex; gap: 18px; align-items: center; padding: 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: border-color .2s, transform .2s; }
.cat:hover { border-color: var(--green); transform: translateY(-2px); }
.cat p { margin: 0 0 6px; color: var(--muted); }
.cat__meta { font-weight: 700; color: var(--green-d); font-size: .9rem; }
.cell-art--cat { width: 110px; height: 110px; flex-shrink: 0; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; }
.filter.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin-bottom: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, border-color .2s; }
.card:hover { box-shadow: var(--shadow); border-color: #c9d6e2; }
.card__img { display: grid; place-items: center; background: linear-gradient(180deg, #f6f9fb, #eaf1f6); padding: 14px; }
.cell-art--card { width: 150px; height: 150px; }
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__code { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.card__title { font-size: 1.02rem; margin: 0; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--green-d); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.chips li { font-size: .75rem; font-weight: 600; background: #eef3f7; color: #34495e; padding: 3px 8px; border-radius: 6px; }
.chips--lg li { font-size: .88rem; padding: 5px 10px; }
.card__price { margin-top: auto; }
.card__price b { font-size: 1.2rem; color: #d9480f; }
.card__price span { font-size: .78rem; color: var(--muted); margin-left: 4px; }
.card__actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.empty { padding: 24px; text-align: center; background: #fff; border-radius: var(--radius); }

.why__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.why__grid > div { padding: 20px; border-radius: var(--radius); background: var(--bg-alt); border-top: 4px solid var(--green); }
.why__grid p { margin: 0; color: var(--muted); }

/* Product page */
.crumbs { padding: 18px 0 0; font-size: .88rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.product { display: grid; grid-template-columns: 1fr 1.1fr; gap: 36px; padding: 22px 0 10px; }
.product__media { background: linear-gradient(180deg, #f6f9fb, #e6eef5); border-radius: 20px; padding: 28px; text-align: center; align-self: start; }
.cell-art--lg { width: 100%; max-width: 340px; height: auto; }
.product__info h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 6px; }
.product__price { margin: 18px 0 10px; }
.product__price b { font-size: 2rem; color: #d9480f; }
.product__price span { display: block; color: var(--muted); font-size: .88rem; }
.wholesale { background: #ecfdf3; border: 1px solid #b7efd0; padding: 10px 14px; border-radius: 10px; font-size: .93rem; }
.wholesale a { font-weight: 700; }
.buy { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.qty { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty button { width: 42px; border: 0; background: var(--bg-alt); font-size: 1.2rem; cursor: pointer; }
.qty input { width: 70px; text-align: center; border: 0; font: inherit; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.buy .btn { flex: 1; min-width: 180px; }
.specs { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.specs th, .specs td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { width: 34%; background: var(--bg-alt); font-weight: 600; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }
.notes { padding-left: 20px; color: #34495e; }
.notes li { margin-bottom: 6px; }

/* Footer */
.footer { background: var(--navy); color: #c5d3e2; padding-top: 40px; margin-top: 20px; }
.footer a { color: var(--green); }
.footer h3 { color: #fff; font-size: 1rem; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; }
.footer__bottom { border-top: 1px solid #1b3c5b; padding: 16px; margin-top: 24px; font-size: .82rem; color: #7f96ac; }
.brand--footer { margin-bottom: 10px; }

/* Zalo button */
.zalo-fab { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; background: #0068ff; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .9rem; text-decoration: none; box-shadow: 0 8px 24px rgba(0, 104, 255, .45); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(0,104,255,.45); } 50% { box-shadow: 0 0 0 12px rgba(0,104,255,0); } }

/* Quote drawer */
.drawer { position: fixed; inset: 0; z-index: 50; background: rgba(4, 16, 28, .55); display: flex; justify-content: flex-end; }
.drawer__panel { width: min(440px, 100%); height: 100%; background: #fff; display: flex; flex-direction: column; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { margin: 0; font-size: 1.2rem; }
.drawer__close { border: 0; background: none; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.drawer__body { flex: 1; overflow-y: auto; padding: 12px 18px; }
.drawer__foot { padding: 14px 18px 18px; border-top: 1px solid var(--line); background: var(--bg-alt); }
.drawer__foot p { margin: 0 0 6px; }
.drawer__total b { color: #d9480f; font-size: 1.15rem; }
.field { display: block; margin: 8px 0; }
.field span { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 4px; }
.field input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.qitem { display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "name name rm" "ctrl sum sum"; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.qitem__name { grid-area: name; display: flex; flex-direction: column; }
.qitem__ctrl { grid-area: ctrl; display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; width: max-content; }
.qitem__ctrl button { width: 32px; border: 0; background: var(--bg-alt); cursor: pointer; font-size: 1.05rem; }
.qitem__ctrl input { width: 64px; border: 0; text-align: center; font: inherit; }
.qitem__sum { grid-area: sum; text-align: right; font-weight: 700; }
.qitem__rm { grid-area: rm; border: 0; background: none; font-size: 1.3rem; cursor: pointer; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 999px; z-index: 60; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow); transition: opacity .4s; max-width: calc(100% - 32px); text-align: center; }
.toast.is-out { opacity: 0; }

/* Category page */
.section--tight { padding: 20px 0 12px; }
.lead--dark { color: var(--muted); max-width: 720px; }
.filters--sub { margin-top: 12px; }
.cell-art--photo { object-fit: contain; background: #fff; border-radius: 10px; }

/* Checkout */
.checkout { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: start; padding-bottom: 40px; }
.checkout__main { display: grid; gap: 18px; }
.checkout__side { position: sticky; top: 140px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.panel h2 { font-size: 1.12rem; margin: 18px 0 12px; }
.panel h2:first-child { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field--full { grid-column: 1 / -1; }
.field select, .field textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--green); border-color: transparent; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.seg--col { flex-direction: column; }
.seg label { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; font-size: .93rem; }
.seg label:has(input:checked) { border-color: var(--green-d); background: #ecfdf3; }
.seg label:has(input:disabled) { opacity: .5; }
.biz { border: 1px dashed #b7efd0; border-radius: 10px; padding: 8px 14px 4px; margin: 10px 0; }
.biz legend { font-weight: 700; font-size: .9rem; padding: 0 6px; }
.check { display: flex; gap: 8px; align-items: center; margin: 8px 0; font-size: .93rem; }
.note { background: #fff7ed; border: 1px solid #fed7aa; padding: 9px 12px; border-radius: 8px; font-size: .9rem; }
.sum { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0 0 10px; }
.sum dd { margin: 0; text-align: right; font-weight: 600; }
.sum__total { font-size: 1.1rem; font-weight: 800; border-top: 1px solid var(--line); padding-top: 10px; }
dd.sum__total { color: #d9480f; }
.form-error { color: #b42318; font-weight: 600; font-size: .9rem; margin: 10px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.done { max-width: 640px; margin: 10px auto 50px; text-align: center; }
.done b { color: var(--green-d); font-size: 1.2rem; }

/* Tồn kho */
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; width: max-content; max-width: 100%; }
.stock::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.stock--in { color: #12a861; } .stock--low { color: #c2410c; } .stock--out { color: #b45309; }
.stock--lg { font-size: .95rem; margin-top: 10px; }
.qitem__stock { display: block; font-style: normal; font-size: .78rem; font-weight: 600; color: #b45309; }

/* Bài viết sản phẩm */
.article { max-width: 820px; font-size: 1.02rem; line-height: 1.75; color: #1d2b3a; }
.article h2 { font-size: 1.45rem; font-weight: 800; margin: 1.6em 0 .5em; }
.article h2:first-child { margin-top: 0; }
.article h3 { font-size: 1.12rem; margin: 1.3em 0 .4em; }
.article p, .article ul, .article ol { margin: 0 0 1em; }
.article li { margin-bottom: .35em; }
.article img { display: block; max-width: 100%; height: auto; border-radius: 12px; margin: 1em auto; }
.article figure { margin: 1.2em 0; text-align: center; } .article figcaption { font-size: .88rem; color: var(--muted); }
.article blockquote { margin: 1em 0; padding: 12px 16px; background: #ecfdf3; border-left: 4px solid var(--green); border-radius: 8px; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
.article table { border-collapse: collapse; width: 100%; font-size: .95rem; min-width: 420px; }
.article th, .article td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.article th { background: var(--bg-alt); }

/* Responsive */
@media (max-width: 900px) {
  .hero__in { grid-template-columns: 1fr; padding: 32px 16px; }
  .hero__logo { max-width: 260px; order: -1; }
  .usp__grid { grid-template-columns: repeat(2, 1fr); }
  .why__grid, .footer__grid { grid-template-columns: 1fr; }
  .product { grid-template-columns: 1fr; gap: 20px; }
  .checkout { grid-template-columns: 1fr; }
  .checkout__side { position: static; }
}
@media (max-width: 640px) {
  .topbar__hide { display: none; }
  .header__in { flex-wrap: wrap; gap: 10px; }
  .search { order: 3; flex-basis: 100%; }
  .quote-btn { margin-left: auto; padding: 8px 12px; }
  .brand__name { font-size: 1.1rem; }
  .cats { grid-template-columns: 1fr; }
  .cat { padding: 14px; }
  .cell-art--cat { width: 80px; height: 80px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card__body { padding: 10px; }
  .cell-art--card { width: 110px; height: 110px; }
  .card__price b { font-size: 1.05rem; }
  .card__price span { display: block; margin: 0; }
  .card__actions { grid-template-columns: 1fr; }
  .section { padding: 32px 0; }
  .specs th { width: 42%; }
  .form-grid { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
}

/* Ảnh sản phẩm thật: lấp đầy khung (ảnh đã cắt sát viền trắng) */
.card__img:has(.cell-art--photo) { padding: 0; background: #fff; }
.cell-art--photo.cell-art--card { width: 100%; height: 220px; border-radius: 0; }
.product__media:has(.cell-art--photo) { padding: 12px; background: #fff; border: 1px solid var(--line); }
.cell-art--photo.cell-art--lg { width: 100%; max-width: none; aspect-ratio: 1 / 1; }
@media (max-width: 640px) { .cell-art--photo.cell-art--card { width: 100%; height: 150px; } }
