:root {
  --primary: #1d1a68;
  --primary-dark: #11103f;
  --accent: #e11d1d;
  --blue: #0068ff;
  --text: #172033;
  --muted: #5c6b7a;
  --soft: #f5f7fb;
  --white: #ffffff;
  --line: #dbe3ee;
  --shadow: 0 18px 50px rgba(17, 16, 63, 0.13);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1220px, calc(100% - 36px)); margin: 0 auto; }

.topbar {
  display: none;
  background: var(--primary-dark);
  color: rgba(255,255,255,.92);
  font-size: 14px;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 0;
  flex-wrap: wrap;
}
.topbar strong { font-weight: 700; }

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(219,227,238,.9);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  gap: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
  flex: 0 0 auto;
}
.logo {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(219,227,238,.9);
  box-shadow: 0 10px 26px rgba(17,16,63,.14);
  flex: 0 0 auto;
}
.logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.brand strong {
  display: block;
  font-size: 17px;
  color: var(--primary-dark);
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 700;
}
.brand span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.menu {
  display: flex;
  gap: 20px;
  align-items: center;
  color: #344255;
  font-size: 15px;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
}
.menu a {
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}
.menu a:hover { color: var(--accent); }
.menu .cta, .cta {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(225,29,29,.18);
  line-height: 1.2;
}
.mobile-toggle { display: none; }

.search-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px;
}
.header-search {
  flex: 0 0 170px;
  width: 170px;
  margin-left: auto;
}
.search-mini input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 7px 8px;
  font: inherit;
}
.search-mini button {
  border: 0;
  background: var(--primary);
  color: white;
  border-radius: 999px;
  padding: 7px 10px;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
}

/* Trang chủ quay lại bố cục thoáng kiểu v2 */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 12%, rgba(225,29,29,.13), transparent 28%),
    linear-gradient(135deg, #f9fbff 0%, #eef2ff 45%, #ffffff 100%);
  padding: 78px 0 56px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: auto -120px -190px auto;
  width: 440px;
  height: 440px;
  background: rgba(29,26,104,.08);
  border-radius: 50%;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 42px;
  align-items: center;
  position: relative;
}
.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--primary);
  background: rgba(29,26,104,.08);
  border: 1px solid rgba(29,26,104,.12);
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  margin: 20px 0 18px;
  color: var(--primary-dark);
  letter-spacing: -0.8px;
  font-weight: 700;
}
.lead {
  font-size: 18px;
  color: #465568;
  max-width: 690px;
  margin: 0 0 26px;
}
.hero-actions, .actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0 30px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: .18s ease;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.25;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-red { background: var(--accent); color: white; }
.btn-outline { background: white; color: var(--primary); border-color: rgba(29,26,104,.18); }
.btn-outline:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 650px;
}
.trust-item {
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(219,227,238,.9);
  border-radius: 16px;
  padding: 14px;
}
.trust-item b { display: block; color: var(--primary-dark); font-size: 20px; }
.trust-item span { color: var(--muted); font-size: 13px; }

.hero-card, .box {
  background: white;
  border: 1px solid rgba(219,227,238,.9);
  border-radius: 30px;
  padding: 26px;
  box-shadow: var(--shadow);
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.panel-title h3 { margin: 0; color: var(--primary-dark); font-size: 22px; font-weight: 700; line-height: 1.25; }
.status {
  background: #e8f7ee;
  color: #166534;
  font-weight: 600;
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 999px;
  line-height: 1.2;
}
.service-list { display: grid; gap: 12px; }
.service-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: var(--soft);
  border: 1px solid #e8eef6;
  transition: .18s ease;
}
.service-row:hover {
  background: #fff;
  box-shadow: 0 10px 26px rgba(17,16,63,.08);
  transform: translateY(-1px);
}
.icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: white;
  display: grid;
  place-items: center;
  color: var(--primary);
  font-weight: 700;
}
.service-row b { display: block; color: var(--primary-dark); }
.service-row span { color: var(--muted); font-size: 14px; }

section { padding: 72px 0; }
.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 34px;
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--primary-dark);
  letter-spacing: -.3px;
  font-weight: 700;
}
.section-head p { margin: 0; color: var(--muted); font-size: 17px; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(17,16,63,.06);
  transition: .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .icon { background: var(--soft); margin-bottom: 16px; }
.card h3 { margin: 0 0 10px; color: var(--primary-dark); font-size: 20px; line-height: 1.35; }
.card p { margin: 0 0 16px; color: var(--muted); }
.card a { color: var(--accent); font-weight: 700; }

.soft { background: var(--soft); }
.dark {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
}
.dark .section-head h2, .dark .section-head p { color: white; }

.about-grid, .contact-wrap, .two-col {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 34px;
  align-items: center;
}
.about-box {
  background-image: linear-gradient(135deg, var(--primary), #2d2a8f);
  color: white;
  padding: 34px;
  border-radius: 30px;
  box-shadow: var(--shadow);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.about-box h2 { margin: 0; font-size: 34px; line-height: 1.18; }
.about-box p { color: rgba(255,255,255,.84); margin: 18px 0 0; }
.about-box h2 + p { margin-top: 16px; }
.since {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.24);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  margin-bottom: 22px;
}
.about-content h3 { color: var(--primary-dark); font-size: 28px; margin: 0 0 16px; }
.about-content p { color: var(--muted); margin: 0 0 16px; }
.checklist {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 10px;
}
.checklist li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  color: #344255;
}
.checklist li::before {
  content: "✓";
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(225,29,29,.12);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

.process {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.step {
  counter-increment: step;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  margin-bottom: 18px;
}
.step h3 { margin: 0 0 9px; color: var(--primary-dark); font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: start; }
.client-box {
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.1);
  border-radius: 18px;
  padding: 18px;
  min-height: 96px;
}
.client-box b { display: block; margin-bottom: 6px; line-height: 1.3; }
.client-box span { color: rgba(255,255,255,.78); font-size: 14px; line-height: 1.55; }

.page-hero {
  background:
    radial-gradient(circle at 80% 10%, rgba(225,29,29,.12), transparent 28%),
    linear-gradient(135deg, #f9fbff 0%, #eef2ff 100%);
  padding: 64px 0;
}
.page-hero h1 { max-width: 900px; }
.page-hero p { max-width: 790px; color: #465568; font-size: 18px; }
.info-box {
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(17,16,63,.04);
}
.info-box h3 { margin: 0 0 12px; color: var(--primary-dark); }
.info-box p { color: var(--muted); margin: 0 0 12px; }
.info-box ul { margin: 0; padding-left: 20px; color: var(--muted); }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
  background: white;
}
th, td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th { background: var(--primary); color: white; }
tr:last-child td { border-bottom: 0; }
.badge {
  display: inline-block;
  background: rgba(29,26,104,.08);
  color: var(--primary);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}
.product-price { color: var(--accent); font-weight: 700; font-size: 18px; }
.note { color: var(--muted); font-size: 14px; }

.search-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.search-large { display: flex; gap: 10px; }
.search-large input {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  font: inherit;
}
.search-large button {
  border: 0;
  background: var(--primary);
  color: white;
  padding: 0 18px;
  border-radius: 16px;
  font-weight: 700;
  font-family: inherit;
}
.result-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.result-item:last-child { border-bottom: 0; }
.result-item h3 { margin: 0 0 5px; color: var(--primary-dark); }
.result-item p { margin: 0; color: var(--muted); }

form {
  background: white;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 14px; }
label { display: block; font-weight: 600; color: var(--primary-dark); margin-bottom: 8px; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  color: var(--text);
  outline: none;
  background: #fff;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(29,26,104,.08);
}
textarea { min-height: 120px; resize: vertical; }

.contact-lines { display: grid; gap: 13px; }
.contact-line {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  background: white;
  border-radius: 16px;
  padding: 13px;
  border: 1px solid #e8eef6;
}
.contact-line .small-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(29,26,104,.08);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 700;
}
.contact-line b { display: block; color: var(--primary-dark); }
.contact-line span { color: var(--muted); font-size: 14px; }

footer {
  background: #090821;
  color: rgba(255,255,255,.78);
  padding: 34px 0;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.footer-brand { display: flex; gap: 12px; align-items: center; }
.footer-brand .logo { width: 52px; height: 52px; box-shadow: none; }
footer b { color: white; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a:hover { color: white; }

.float-contact {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: grid;
  gap: 10px;
}
.float-contact a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 54px;
  padding: 0 14px;
  border-radius: 999px;
  color: white;
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(0,0,0,.2);
}
.float-zalo { background: var(--blue); }
.float-phone { background: var(--accent); }

@media (max-width: 1020px) {
  .menu { display: none; }
  .header-search { display: none; }
  .mobile-toggle {
    display: inline-flex;
    border: 1px solid var(--line);
    background: white;
    color: var(--primary);
    border-radius: 12px;
    padding: 9px 12px;
    font-weight: 700;
  }
  .menu.open {
    display: grid;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 84px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow);
    justify-content: stretch;
    gap: 10px;
  }
  .menu.open a { padding: 10px 12px; }
  .search-mini { width: 100%; border-radius: 14px; }
  .search-mini input { width: 100%; }
  .hero-grid, .about-grid, .contact-wrap, .two-col { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .process, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1160px); }
  .topbar .container { display: block; }
  .topbar span { display: block; margin: 2px 0; }
  .hero { padding-top: 48px; }
  .trust, .cards, .process, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .brand { min-width: auto; }
  .brand strong { font-size: 15px; }
  .brand span { font-size: 12px; }
  .logo { width: 52px; height: 52px; }
  section { padding: 54px 0; }
  form, .about-box, .info-box, .box { padding: 22px; }
  .float-contact { right: 12px; bottom: 12px; }
  .float-contact a { min-width: 50px; height: 50px; font-size: 13px; }
  .search-large { display: grid; }

  /* v9: mobile spacing fix for client boxes */
  .dark .section-head { margin-bottom: 22px; }
  .dark .section-head p { line-height: 1.55; }
  .grid-4 { gap: 10px; }
  .client-box {
    min-height: unset;
    padding: 14px 16px;
    border-radius: 16px;
  }
  .client-box b {
    margin-bottom: 4px;
    font-size: 16px;
    line-height: 1.3;
  }
  .client-box span {
    font-size: 13px;
    line-height: 1.45;
  }
}


.footer-info {
  display: grid;
  gap: 6px;
  line-height: 1.6;
}
.footer-contact-line {
  color: rgba(255,255,255,.82);
  font-size: 14px;
}
.footer-contact-line:first-of-type {
  margin-top: 2px;
}
@media (max-width: 640px) {
  .footer-info {
    gap: 4px;
  }
  .footer-contact-line {
    font-size: 13px;
    line-height: 1.55;
  }
}


@media (max-width: 1200px) {
  .container { width: min(100% - 30px, 1220px); }
  .menu { gap: 10px; font-size: 13px; }
  .menu .cta, .cta { padding: 9px 12px; }
  .header-search { flex-basis: 150px; width: 150px; }
}

@media (max-width: 1120px) {
  .header-search { display: none; }
}


/* v13: remove search box from header to keep menu on one line */
.header-search,
.search-mini.header-search {
  display: none !important;
}


.form-notice {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(29,26,104,.08);
  color: var(--primary);
  font-size: 14px;
  line-height: 1.5;
}


.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}


.product-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sale-badge {
  display: inline-block;
  background: rgba(225,29,29,.10);
  color: var(--accent);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 10px;
}
.stock-line {
  color: var(--primary-dark);
  font-weight: 700;
  margin: 8px 0 12px;
}
.product-detail-grid {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 28px;
  align-items: start;
}
.product-detail-image {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: white;
}
.product-detail-image img {
  width: 100%;
  height: auto;
}
@media (max-width: 920px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
  }
}


.product-category-card {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.product-category-card:hover h3,
.product-category-card:hover .card-link {
  color: var(--accent);
}
.card-link {
  color: var(--accent);
  font-weight: 700;
}

/* v22: force clickable category card */
.product-category-card {
  cursor: pointer !important;
}
.product-category-card .card-link {
  color: var(--accent);
  font-weight: 700;
}


.admin-link-note {
  color: var(--muted);
  font-size: 13px;
}
