/* ============================================================
   mayxaydung.online — Style chung (landing + admin)
   Tông màu: cam máy xây dựng + xanh thép đậm
   ============================================================ */
:root {
  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-light: #fff7ed;
  --navy: #0f2942;
  --navy-soft: #1b3c5d;
  --text: #1f2937;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f6f8fb;
  --white: #ffffff;
  --green: #16a34a;
  --red: #dc2626;
  --yellow: #f59e0b;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(15, 41, 66, 0.08);
  --shadow: 0 6px 20px rgba(15, 41, 66, 0.1);
  --shadow-lg: 0 18px 45px rgba(15, 41, 66, 0.18);
  --container: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Nút ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(249, 115, 22, .35); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-soft); }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.22); }
.btn-danger { background: #fee2e2; color: var(--red); }
.btn-danger:hover { background: #fecaca; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- Header ---------- */
.topbar {
  background: var(--navy);
  color: #cbd5e1;
  font-size: 13.5px;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  flex-wrap: wrap;
}
.topbar a { color: #e2e8f0; }
.topbar a:hover { color: var(--primary); }
.topbar-list { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }

.header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: grid; place-items: center;
  font-size: 22px;
  box-shadow: 0 6px 16px rgba(249,115,22,.35);
}
.logo-text b { display: block; font-size: 19px; color: var(--navy); line-height: 1.15; letter-spacing: -.3px; }
.logo-text span { font-size: 12.5px; color: var(--muted); }

.nav { display: flex; gap: 22px; align-items: center; font-weight: 600; font-size: 15px; color: var(--navy); }
.nav a:hover { color: var(--primary); }

.header-cta { display: flex; gap: 10px; align-items: center; }

.menu-toggle {
  display: none;
  background: #fff; border: 1px solid var(--border);
  border-radius: 9px; padding: 8px 11px; font-size: 18px; line-height: 1;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, #0f2942 0%, #1b3c5d 55%, #2a5480 100%);
  color: #fff;
  overflow: hidden;
  padding: 60px 0 70px;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 88% 12%, rgba(249,115,22,.35), transparent 45%),
    radial-gradient(circle at 8% 92%, rgba(249,115,22,.18), transparent 42%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 42px;
  align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(249,115,22,.18);
  border: 1px solid rgba(249,115,22,.5);
  color: #ffd9b8;
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; margin-bottom: 16px;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
  letter-spacing: -.6px;
}
.hero h1 em { font-style: normal; color: #fdba74; }
.hero p.lead {
  font-size: 16.5px;
  color: #cbd5e1;
  max-width: 560px;
  margin: 0 0 24px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-stat b { display: block; font-size: 25px; color: #fdba74; line-height: 1.2; }
.hero-stat span { font-size: 13.5px; color: #b9c6d4; }

.hero-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(6px);
}
.hero-card h3 { margin: 0 0 6px; font-size: 19px; }
.hero-card p { margin: 0 0 16px; color: #c7d3df; font-size: 14.5px; }
.hero-card .field { margin-bottom: 11px; }
.hero-card .field input,
.hero-card .field select,
.hero-card .field textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.95);
  color: var(--text);
}
.hero-note { font-size: 12.5px; color: #9fb0c0; margin: 10px 0 0; text-align: center; }

/* ---------- Trust bar ---------- */
.trust { background: #fff; border-bottom: 1px solid var(--border); }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 22px 0;
}
.trust-item { display: flex; gap: 12px; align-items: flex-start; }
.trust-icon {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 10px; background: var(--primary-light);
  display: grid; place-items: center; font-size: 19px;
}
.trust-item b { display: block; font-size: 14.5px; color: var(--navy); }
.trust-item span { font-size: 13px; color: var(--muted); }

/* ---------- Section chung ---------- */
.section { padding: 54px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 32px; }
.section-head .eyebrow {
  color: var(--primary); font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: 1.4px;
}
.section-head h2 {
  margin: 8px 0 10px;
  font-size: clamp(23px, 3vw, 32px);
  color: var(--navy);
  letter-spacing: -.4px;
}
.section-head p { margin: 0; color: var(--muted); }

/* ---------- Danh mục (chips) ---------- */
.chips-label {
  text-align: center;
  margin: 0 0 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .2px;
}
.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 26px;
}
.chip {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--navy);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14.5px;
  font-weight: 600;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 5px 16px rgba(249,115,22,.35);
}

/* ---------- Lưới sản phẩm ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 22px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #cbd5e1; }
.card-media { position: relative; aspect-ratio: 4 / 3; background: #eef2f7; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--red); color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  letter-spacing: .3px;
}
.badge-used { background: var(--navy); left: auto; right: 10px; }
.badge-hot { background: linear-gradient(135deg, #ef4444, #f97316); }
.badge-sold { background: #6b7280; }
.card-sold .card-media img { filter: grayscale(.55); opacity: .8; }
.card-sold .price, .card-sold .price-ask { color: var(--muted); }
.card-body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-cat { font-size: 12.5px; color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.card-title {
  font-size: 16px; font-weight: 700; color: var(--navy); line-height: 1.35;
  margin: 0; min-height: 44px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-desc {
  font-size: 13.5px; color: var(--muted); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-specs { display: flex; flex-wrap: wrap; gap: 6px; }
.spec {
  background: #f1f5f9; color: #475569;
  font-size: 12px; font-weight: 600;
  padding: 3px 9px; border-radius: 6px;
}
.card-price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.price { font-size: 19px; font-weight: 800; color: var(--red); letter-spacing: -.3px; }
.price-ask { font-size: 15px; font-weight: 700; color: var(--primary); }
.card-actions { display: flex; gap: 8px; margin-top: 4px; }
.card-actions .btn { flex: 1; }

/* ---------- Quy trình ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 20px;
  position: relative;
}
.step-num {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--navy); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 16px; margin-bottom: 12px;
}
.step b { display: block; color: var(--navy); font-size: 15.5px; margin-bottom: 6px; }
.step p { margin: 0; font-size: 13.8px; color: var(--muted); }

/* ---------- Bảng so sánh / lý do ---------- */
.reasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.reason {
  background: #fff; border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius); padding: 20px;
}
.reason h4 { margin: 0 0 8px; color: var(--navy); font-size: 16px; }
.reason p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, #24557f 100%);
  color: #fff; padding: 46px 0;
}
.cta-band .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 26px; flex-wrap: wrap;
}
.cta-band h2 { margin: 0 0 6px; font-size: clamp(21px, 2.6vw, 28px); }
.cta-band p { margin: 0; color: #c7d3df; }

/* ---------- Footer ---------- */
.footer { background: #0b1f33; color: #9fb0c0; padding: 46px 0 0; font-size: 14px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 28px;
  padding-bottom: 34px;
}
.footer h4 { color: #fff; margin: 0 0 14px; font-size: 15.5px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer a:hover { color: var(--primary); }
.footer .logo-text b { color: #fff; }
.footer .logo-text span { color: #8fa3b5; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 0; font-size: 13px;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}

/* ---------- Popup tư vấn ---------- */
.modal {
  position: fixed; inset: 0;
  background: rgba(9, 20, 33, .62);
  display: none;
  align-items: center; justify-content: center;
  padding: 18px; z-index: 200;
  backdrop-filter: blur(3px);
}
.modal.open { display: flex; }
.modal-box {
  background: #fff; border-radius: var(--radius-lg);
  width: 100%; max-width: 480px;
  max-height: 92vh; overflow: auto;
  box-shadow: var(--shadow-lg);
  animation: pop .22s ease;
}
@keyframes pop { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 20px 22px 0;
}
.modal-head h3 { margin: 0; font-size: 19px; color: var(--navy); }
.modal-head p { margin: 5px 0 0; font-size: 13.5px; color: var(--muted); }
.modal-close {
  background: #f1f5f9; border: none; border-radius: 9px;
  width: 34px; height: 34px; font-size: 18px; line-height: 1;
  color: var(--muted); flex: 0 0 34px;
}
.modal-close:hover { background: #e2e8f0; color: var(--navy); }
.modal-body { padding: 18px 22px 22px; }
.modal-product {
  display: flex; gap: 12px; align-items: center;
  background: var(--primary-light); border: 1px solid #fed7aa;
  border-radius: 10px; padding: 10px 12px; margin-bottom: 14px;
}
.modal-product img { width: 58px; height: 58px; border-radius: 8px; object-fit: cover; flex: 0 0 58px; }
.modal-product b { display: block; font-size: 14.5px; color: var(--navy); line-height: 1.3; }
.modal-product span { font-size: 13px; color: var(--red); font-weight: 700; }

/* ---------- Form chung ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { margin-bottom: 13px; }
.form-group label {
  display: block; font-size: 13.5px; font-weight: 600;
  color: var(--navy); margin-bottom: 6px;
}
.form-group label .req { color: var(--red); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249,115,22,.14);
}
.form-group textarea { resize: vertical; min-height: 86px; }
.form-hint { font-size: 12.5px; color: var(--muted); margin: 5px 0 0; }
.checkbox {
  display: flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 600; color: var(--navy);
  cursor: pointer; user-select: none;
}
.checkbox input { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed; right: 18px; bottom: 18px;
  display: grid; gap: 10px; z-index: 500;
  max-width: 340px;
}
.toast {
  background: #fff; border: 1px solid var(--border);
  border-left: 4px solid var(--navy);
  border-radius: 10px; padding: 12px 15px;
  box-shadow: var(--shadow);
  font-size: 14px; color: var(--text);
  animation: slideIn .2s ease;
}
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
.toast b { display: block; color: var(--navy); font-size: 14px; margin-bottom: 2px; }

/* ---------- Trạng thái rỗng / đang tải ---------- */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.empty span { font-size: 40px; display: block; margin-bottom: 10px; }
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   TRANG ADMIN
   ============================================================ */
.admin-body { background: #eef2f7; }

.login-wrap {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #0f2942 0%, #1b3c5d 60%, #2a5480 100%);
}
.login-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 32px 30px; width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.login-card .logo { justify-content: center; margin-bottom: 18px; }
.login-card h1 { margin: 0 0 6px; font-size: 21px; color: var(--navy); text-align: center; }
.login-card > p { margin: 0 0 20px; font-size: 14px; color: var(--muted); text-align: center; }

/* Cảnh báo khi chạy trên hosting tĩnh (Netlify…) — không có server Node.js */
.notice {
  display: none;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #fcd34d;
  border-left: 4px solid var(--yellow);
  background: #fffbeb;
  border-radius: 10px;
  font-size: 13.2px;
  line-height: 1.55;
  color: #7c2d12;
  text-align: left;
}
.notice.show { display: block; }
.notice b { color: #b45309; }

.admin-header {
  background: var(--navy); color: #fff;
  position: sticky; top: 0; z-index: 40;
  box-shadow: var(--shadow);
}
.admin-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px; flex-wrap: wrap;
}
.admin-header .logo-text b { color: #fff; }
.admin-header .logo-text span { color: #a8b8c8; }
.admin-user { display: flex; align-items: center; gap: 12px; font-size: 14px; }

.admin-main { padding: 26px 0 60px; }

.tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 6px; margin-bottom: 22px;
}
.tab {
  border: none; background: transparent;
  padding: 9px 18px; border-radius: 9px;
  font-size: 14.5px; font-weight: 600; color: var(--muted);
}
.tab:hover { background: #f1f5f9; color: var(--navy); }
.tab.active { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(249,115,22,.3); }

.panel { display: none; }
.panel.active { display: block; }

.panel-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  margin-bottom: 20px;
}
.panel-card > h2 { margin: 0 0 4px; font-size: 18px; color: var(--navy); }
.panel-card > p.sub { margin: 0 0 18px; font-size: 13.8px; color: var(--muted); }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
}
.panel-head h2 { margin: 0; font-size: 18px; color: var(--navy); }

.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 22px; }
.stat {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.stat b { display: block; font-size: 26px; color: var(--navy); line-height: 1.15; }
.stat span { font-size: 13.5px; color: var(--muted); }
.stat.accent b { color: var(--primary); }
.stat.danger b { color: var(--red); }

/* ---------- Bảng sản phẩm (admin) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table.admin-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.admin-table thead th {
  background: #f8fafc;
  text-align: left;
  font-size: 12.8px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  vertical-align: middle;
}
.admin-table tbody tr:hover { background: #fbfcfe; }
.admin-table tbody tr.dragging { opacity: .45; background: var(--primary-light); }
.admin-table tbody tr.drop-target { box-shadow: inset 0 3px 0 var(--primary); }
.row-index {
  font-weight: 800; color: var(--muted); font-size: 13px;
  background: #f1f5f9; border-radius: 7px;
  padding: 3px 9px; display: inline-block;
}
.drag-handle {
  cursor: grab; color: #94a3b8; font-size: 17px;
  padding: 4px 6px; border-radius: 6px; user-select: none;
}
.drag-handle:active { cursor: grabbing; }
.thumb {
  width: 62px; height: 46px; border-radius: 8px;
  object-fit: cover; background: #eef2f7; border: 1px solid var(--border);
}
.cell-title b { display: block; color: var(--navy); font-size: 14.3px; line-height: 1.3; }
.cell-title span { font-size: 12.5px; color: var(--muted); }
.pill {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  background: #f1f5f9; color: #475569; white-space: nowrap;
}
.pill.hot { background: #fee2e2; color: var(--red); }
.pill.used { background: #e0e7ff; color: #4338ca; }
.pill.new { background: #dcfce7; color: var(--green); }
.pill.sold { background: #e2e8f0; color: #475569; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff;
  display: grid; place-items: center;
  font-size: 14px; color: var(--navy);
  transition: all .14s ease;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.icon-btn.danger:hover { border-color: var(--red); color: var(--red); background: #fee2e2; }
.icon-btn.top-btn { width: auto; padding: 0 10px; font-size: 12.5px; font-weight: 700; gap: 5px; }

/* ---------- Uploader ---------- */
.uploader {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius);
  background: #fbfcfe;
  padding: 22px;
  text-align: center;
  transition: border-color .15s ease, background .15s ease;
}
.uploader.dragover { border-color: var(--primary); background: var(--primary-light); }
.uploader .up-icon { font-size: 32px; }
.uploader p { margin: 8px 0 4px; font-size: 14.5px; color: var(--navy); font-weight: 600; }
.uploader small { color: var(--muted); font-size: 12.8px; }
.uploader input[type="file"] { display: none; }
/* ---------- Danh sách ảnh + sắp xếp thứ tự ---------- */
.thumb-head {
  margin-top: 18px; padding: 10px 12px;
  border: 1px dashed var(--border); border-radius: 10px;
  background: #f8fafc;
}
.thumb-head b { display: block; color: var(--navy); font-size: 13.5px; }
.thumb-head .pill { margin-left: 6px; font-size: 11px; padding: 2px 8px; }
.thumb-head .form-hint { margin-top: 4px; }
.thumb-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.thumb-item {
  width: 104px;
  display: flex; flex-direction: column; gap: 4px;
}
.thumb-item.dragging { opacity: .45; }
.thumb-item.drop-target .thumb-media {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .22);
}
.thumb-media {
  position: relative; width: 104px; height: 104px;
  border-radius: 10px; overflow: hidden; cursor: grab;
  border: 1px solid var(--border); background: #eef2f7;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.thumb-item.dragging .thumb-media { cursor: grabbing; }
.thumb-media img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.thumb-item .rm {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(220, 38, 38, .92); color: #fff;
  border: none; font-size: 13px; line-height: 1;
  display: grid; place-items: center;
}
.thumb-item .cover-tag {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(15, 41, 66, .82); color: #fff;
  font-size: 10.5px; font-weight: 700; text-align: center;
  padding: 2px 0; letter-spacing: .4px;
}
/* Ảnh đang nằm trên CDN ngoài (không lưu trong uploads/) */
.thumb-item .cdn-tag {
  position: absolute; top: 4px; left: 4px;
  background: rgba(249, 115, 22, .92); color: #fff;
  font-size: 9.5px; font-weight: 700; letter-spacing: .4px;
  padding: 2px 5px; border-radius: 6px;
}
/* Số thứ tự ảnh (= thứ tự trong carousel) */
.thumb-order {
  flex: 0 0 auto; min-width: 18px; height: 22px; padding: 0 4px;
  border-radius: 6px; background: var(--navy); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 22px; text-align: center;
}
.thumb-sort { display: flex; align-items: center; gap: 2px; }
.thumb-sort button {
  flex: 1; height: 22px; padding: 0;
  border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: var(--navy);
  font-size: 11px; line-height: 1;
  transition: all .14s ease;
}
.thumb-sort button:hover:not(:disabled) {
  border-color: var(--primary); color: var(--primary); background: var(--primary-light);
}
.thumb-sort button:disabled { opacity: .35; cursor: not-allowed; }
.thumb-sort button[data-img-act="cover"] { color: var(--yellow); font-size: 12px; }
/* Hàng nút dưới ô dán URL ảnh */
.thumb-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ---------- Modal lớn (form admin) ---------- */
.modal-box.lg { max-width: 780px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--border);
  background: #fbfcfe;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  position: sticky; bottom: 0;
}

/* ---------- Popup chi tiết: carousel ảnh ---------- */
.pd-gallery { margin-bottom: 18px; }
.pd-stage {
  position: relative;
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  max-height: 420px;
  touch-action: pan-y;
}
.pd-track {
  display: flex;
  height: 100%;
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}
.pd-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.pd-slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}
.pd-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: rgba(15, 41, 66, .62); color: #fff;
  font-size: 24px; line-height: 1;
  display: grid; place-items: center;
  transition: background .15s ease, opacity .15s ease;
  z-index: 2;
}
.pd-nav:hover { background: var(--primary); }
.pd-nav.prev { left: 10px; }
.pd-nav.next { right: 10px; }
.pd-zoom {
  position: absolute; right: 10px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: 999px;
  border: none; background: rgba(15, 41, 66, .72); color: #fff;
  font-size: 12.5px; font-weight: 600;
  transition: background .15s ease;
  z-index: 2;
}
.pd-zoom:hover { background: var(--primary); }
.pd-counter {
  position: absolute; left: 10px; bottom: 10px;
  background: rgba(15, 41, 66, .72); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .3px;
  padding: 4px 10px; border-radius: 999px;
  z-index: 2;
}
.pd-thumbs {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 2px 4px;
  scrollbar-width: thin;
}
.pd-thumb {
  flex: 0 0 auto;
  width: 78px; height: 58px;
  padding: 0; border-radius: 9px; overflow: hidden;
  border: 2px solid transparent; background: #eef2f7;
  transition: border-color .15s ease, transform .15s ease;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb:hover { transform: translateY(-2px); border-color: #fdba74; }
.pd-thumb.active { border-color: var(--primary); box-shadow: 0 4px 12px rgba(249, 115, 22, .3); }
.pd-gallery.single .pd-nav,
.pd-gallery.single .pd-counter,
.pd-gallery.single .pd-thumbs { display: none; }
.pd-desc { margin: 0 0 16px; font-size: 14.6px; color: #334155; }
.pd-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pd-table td { padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.pd-table td:first-child { color: var(--muted); width: 42%; }
.pd-table td:last-child { font-weight: 600; color: var(--navy); }

/* ---------- Lightbox phóng to ảnh ---------- */
body.lb-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  /* Nền đục hẳn: popup chi tiết phía sau không lộ chữ qua nền tối */
  background: #060e18;
  display: none;
  flex-direction: column;
  animation: fadeIn .16s ease;
}
.lightbox.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lb-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  color: #e2e8f0; font-size: 14px;
  background: rgba(255, 255, 255, .04);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.lb-title {
  font-weight: 600; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; min-width: 0;
}
.lb-counter {
  font-size: 12.5px; font-weight: 700; color: #cbd5e1;
  background: rgba(255, 255, 255, .1);
  padding: 3px 10px; border-radius: 999px;
  white-space: nowrap;
}
.lb-tools { display: flex; gap: 6px; }
.lb-btn {
  min-width: 36px; height: 34px; padding: 0 9px;
  border-radius: 9px; border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08); color: #e2e8f0;
  font-size: 13px; font-weight: 700;
  display: grid; place-items: center;
  transition: background .14s ease, color .14s ease;
}
.lb-btn:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.lb-btn.close:hover { background: var(--red); border-color: var(--red); }
.lb-stage {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  padding: 10px;
  touch-action: none;
  cursor: default;
}
.lb-stage.zoomed { cursor: grab; }
.lb-stage.grabbing { cursor: grabbing; }
.lb-stage img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  transform-origin: center center;
  transition: transform .12s ease-out;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}
.lb-stage.grabbing img { transition: none; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, .14); color: #fff;
  font-size: 28px; line-height: 1;
  display: grid; place-items: center;
  transition: background .15s ease;
  z-index: 2;
}
.lb-nav:hover { background: var(--primary); }
.lb-nav.prev { left: 12px; }
.lb-nav.next { right: 12px; }
.lightbox.single .lb-nav,
.lightbox.single .lb-strip { display: none; }
.lb-strip {
  display: flex; gap: 8px; justify-content: center;
  padding: 10px 14px 4px;
  overflow-x: auto;
}
.lb-thumb {
  flex: 0 0 auto;
  width: 70px; height: 52px; padding: 0;
  border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; background: rgba(255, 255, 255, .1);
  opacity: .6;
  transition: opacity .15s ease, border-color .15s ease;
}
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumb:hover { opacity: 1; }
.lb-thumb.active { opacity: 1; border-color: var(--primary); }
.lb-hint {
  margin: 0; padding: 6px 14px 12px;
  text-align: center; font-size: 12.3px; color: #94a3b8;
}

/* ============================================================
   THANH CTA CỐ ĐỊNH (mobile) — mặc định ẩn, chỉ hiện ở breakpoint nhỏ
   ============================================================ */
.mobile-cta { display: none; }

/* Neo tới section không bị header sticky che */
[id] { scroll-margin-top: 88px; }

/* Tôn trọng cài đặt giảm chuyển động của người dùng */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- Responsive ---------- */

/* --- Tablet ngang / laptop nhỏ --- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-card { max-width: 540px; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .reasons { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .footer-grid > div:last-child { grid-column: 1 / -1; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}

/* --- Tablet dọc: chuyển menu sang dạng sổ xuống --- */
@media (max-width: 900px) {
  .header .container { position: relative; min-height: 66px; }
  [id] { scroll-margin-top: 76px; }

  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 10px 16px 14px;
    background: #fff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 20px 32px rgba(15, 41, 66, .16);
    max-height: calc(100vh - 66px);
    max-height: calc(100dvh - 66px);
    overflow-y: auto;
    overscroll-behavior: contain;
    animation: navDrop .18s ease;
    z-index: 60;
  }
  @keyframes navDrop {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
  }
  .nav.open a {
    padding: 13px 10px;
    border-radius: 9px;
    font-size: 15.5px;
    border-bottom: 1px solid #f1f5f9;
  }
  .nav.open a:last-child { border-bottom: none; }
  .nav.open a:active { background: var(--primary-light); color: var(--primary); }

  .menu-toggle { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; font-size: 19px; }
  .header-cta { gap: 8px; }
  .header-cta .btn { padding: 8px 12px; }

  .hero { padding: 46px 0 54px; }
  .hero-card { max-width: 100%; }
  .section { padding: 44px 0; }
  .section-head { margin-bottom: 26px; }

  /* Chips lọc: cuộn ngang thay vì xuống dòng */
  .chips-label { text-align: left; margin-bottom: 10px; }
  .chips {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    margin: 0 -16px 22px;
    padding: 2px 16px 8px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; scroll-snap-align: start; padding: 8px 15px; font-size: 14px; }

  /* Bảng admin: cuộn mượt trên cảm ứng */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .admin-main { padding: 20px 0 48px; }
  .panel-card { padding: 18px; }
}

/* --- Tablet nhỏ / điện thoại ngang --- */
@media (max-width: 768px) {
  .topbar { font-size: 12.5px; }
  .topbar .container { min-height: 34px; gap: 6px; padding-top: 5px; padding-bottom: 5px; }
  .topbar-hours { display: none; }

  .hero { padding: 36px 0 44px; }
  .hero-badge { font-size: 12px; padding: 5px 11px; margin-bottom: 12px; }
  .hero h1 { font-size: clamp(24px, 7vw, 32px); letter-spacing: -.3px; }
  .hero p.lead { font-size: 15px; margin-bottom: 20px; }
  .hero-actions { gap: 10px; margin-bottom: 22px; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
  .hero-stat b { font-size: 22px; }
  .hero-card { padding: 18px 16px; border-radius: var(--radius); }
  .hero-card h3 { font-size: 17.5px; }
  .hero-card p { font-size: 13.8px; }

  /* Chống iOS tự zoom khi focus vào ô nhập liệu */
  input, select, textarea { font-size: 16px; }
  .form-group input,
  .form-group select,
  .form-group textarea { font-size: 16px; }

  .section { padding: 36px 0; }
  .section-head h2 { font-size: clamp(20px, 5.4vw, 26px); }
  .section-head p { font-size: 14.2px; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
  .card-body { padding: 13px 14px 14px; gap: 8px; }
  .card-title { font-size: 15.4px; }
  .card-actions .btn { padding: 9px 10px; font-size: 13.4px; }

  /* Header gọn: chỉ còn icon + nút menu */
  .header-cta .btn { padding: 8px 10px; }
  .header-cta .btn span.label { display: none; }

  .trust-grid { gap: 14px; padding: 18px 0; }
  .step { padding: 18px 16px; }
  .reasons { gap: 14px; }
  .reason { padding: 16px; }

  .cta-band { padding: 32px 0; }
  .cta-band .container { flex-direction: column; align-items: stretch; gap: 18px; }
  .cta-band .container > div:last-child { flex-direction: column; gap: 10px; }
  .cta-band .btn { width: 100%; }

  .footer { padding: 34px 0 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; padding-bottom: 26px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: left; }
  /* Popup -> bottom sheet */
  .modal { padding: 0; align-items: flex-end; }
  .modal-box {
    max-width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
    animation: sheetUp .26s cubic-bezier(.32, .72, 0, 1);
  }
  @keyframes sheetUp {
    from { transform: translateY(100%); }
    to { transform: none; }
  }
  .modal-box::before {
    content: "";
    display: block;
    width: 44px; height: 4px;
    border-radius: 999px;
    background: #cbd5e1;
    margin: 9px auto 0;
  }
  .modal-box.lg { max-width: 100%; }
  .modal-head { padding: 12px 16px 0; }
  .modal-head h3 { font-size: 17.5px; }
  .modal-head p { font-size: 13px; }
  .modal-body { padding: 14px 16px 18px; }
  .modal-foot {
    flex-direction: column-reverse;
    gap: 8px;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  }
  .modal-foot .btn { width: 100%; }
  .modal-close { width: 38px; height: 38px; flex: 0 0 38px; }
  .modal-product img { width: 52px; height: 52px; flex: 0 0 52px; }
  .form-row { grid-template-columns: 1fr; }

  /* Carousel + lightbox trên mobile */
  .pd-stage { aspect-ratio: 1 / 1; max-height: 56vh; }
  .pd-nav { width: 36px; height: 36px; font-size: 22px; }
  .pd-thumb { width: 62px; height: 48px; }
  .pd-zoom { font-size: 11.5px; padding: 5px 9px; }
  .lb-bar { padding: 8px 10px; gap: 8px; }
  .lb-title { font-size: 13px; }
  .lb-hint { font-size: 11.4px; padding: 6px 10px calc(10px + env(safe-area-inset-bottom)); }
  .lb-nav { width: 38px; height: 38px; font-size: 24px; }
  .lb-nav.prev { left: 6px; }
  .lb-nav.next { right: 6px; }
  .lb-thumb { width: 56px; height: 44px; }
  .lb-btn { min-width: 32px; height: 31px; font-size: 12px; }
  .lb-stage { padding: 4px; }
}

/* --- Điện thoại: thanh CTA, admin và tinh chỉnh cuối --- */
@media (max-width: 560px) {
  .trust-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: 1fr; }
  .topbar-list { gap: 12px; font-size: 12.5px; }
  .topbar-email { display: none; }
  .logo-text b { font-size: 17px; }
  .logo-text span { font-size: 11.5px; }
  .logo-mark { width: 38px; height: 38px; font-size: 20px; }
  .header-cta .btn-outline { display: none; }
  .header .container { gap: 10px; }
  .toast-wrap { left: 14px; right: 14px; max-width: none; }

  /* Thanh CTA cố định dưới màn hình */
  .mobile-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 90;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 22px rgba(15, 41, 66, .12);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .mobile-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14.4px;
    font-weight: 700;
    line-height: 1.15;
    transition: transform .14s ease;
  }
  .mobile-cta-btn:active { transform: scale(.98); }
  .mobile-cta-btn .ico { font-size: 18px; line-height: 1; }
  .mobile-cta-btn .txt { display: flex; flex-direction: column; text-align: left; min-width: 0; }
  .mobile-cta-btn .txt b { font-size: 14.2px; }
  .mobile-cta-btn .txt small { font-size: 11.2px; font-weight: 600; opacity: .85; }
  .mobile-cta-btn.call { background: var(--navy); color: #fff; }
  .mobile-cta-btn.quote { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(249, 115, 22, .32); }

  /* Chừa chỗ cho thanh CTA để không che nội dung cuối trang */
  .landing-body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .toast-wrap { bottom: calc(88px + env(safe-area-inset-bottom)); }

  /* Admin trên điện thoại */
  .admin-header .container { min-height: 58px; }
  .admin-user { gap: 8px; }
  .admin-user .btn { padding: 6px 10px; font-size: 12.4px; }
  .admin-main { padding: 16px 0 40px; }
  .stat-grid { gap: 12px; }
  .stat { padding: 14px; }
  .stat b { font-size: 22px; }
  .stat span { font-size: 12.5px; }
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 5px;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; padding: 9px 14px; font-size: 14px; }
  .panel-card { padding: 15px; border-radius: 10px; }
  .panel-head { align-items: flex-start; }
  .admin-table thead th { padding: 10px 11px; font-size: 12px; }
  .admin-table tbody td { padding: 10px 11px; font-size: 13.4px; }
  .thumb { width: 54px; height: 42px; }
  /* Thẻ ảnh trong form sửa sản phẩm nhỏ lại cho vừa màn hình điện thoại */
  .thumb-list { gap: 8px; }
  .thumb-item, .thumb-media { width: 92px; }
  .thumb-media { height: 92px; }
  /* Trên cảm ứng không kéo–thả được -> nút ◀ ★ ▶ phải đủ lớn để bấm */
  .thumb-order { height: 28px; line-height: 28px; font-size: 12px; }
  .thumb-sort button { height: 28px; font-size: 13px; }
  .thumb-item .rm { width: 26px; height: 26px; font-size: 15px; }
  .login-wrap { padding: 16px; }
  .login-card { padding: 26px 20px; }
  .login-card h1 { font-size: 19.5px; }
}

/* --- Điện thoại rất nhỏ (iPhone SE, 360px…) --- */
@media (max-width: 380px) {
  .container { padding: 0 12px; }
  /* Bù lại padding nhỏ hơn để menu/chips không tràn ngang gây cuộn ngang */
  .nav.open { left: 0; right: 0; padding-left: 12px; padding-right: 12px; }
  .chips { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
  .topbar { font-size: 11.8px; }
  .logo-text span { display: none; }
  .hero h1 { font-size: 22.5px; }
  .hero-stats { gap: 12px; }
  .hero-stat b { font-size: 20px; }
  .hero-stat span { font-size: 12.2px; }
  .hero-card { padding: 16px 14px; }
  .section-head h2 { font-size: 19.5px; }
  .btn { padding: 10px 16px; font-size: 14.4px; }
  .card-title { font-size: 14.8px; }
  .card-actions { flex-direction: column; }
  .mobile-cta { gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
  .mobile-cta-btn { gap: 6px; padding: 8px; }
  .mobile-cta-btn .txt b { font-size: 13.2px; }
  .mobile-cta-btn .txt small { font-size: 10.4px; }
  .modal-head h3 { font-size: 16.4px; }
  .pd-thumb { width: 54px; height: 42px; }
  .lb-thumb { width: 48px; height: 38px; }
  /* Thẻ ảnh sắp xếp: thu nhỏ để mỗi hàng vẫn đủ 3 ảnh */
  .thumb-item, .thumb-media { width: 84px; }
  .thumb-media { height: 84px; }
  .lb-hint { font-size: 10.8px; }
  .stat-grid { grid-template-columns: 1fr; }
}

/* --- Điện thoại nằm ngang: giảm chiều cao hero/modal --- */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding: 26px 0 32px; }
  .modal-box { max-height: 96vh; max-height: 96dvh; }
  .mobile-cta { display: none; }
  .landing-body { padding-bottom: 0; }
}
