:root {
  --blue: #0b4f9c;
  --blue-dark: #083a73;
  --blue-light: #e8f2ff;
  --white: #ffffff;
  --gray-50: #f7f9fc;
  --gray-100: #eef2f7;
  --gray-300: #c8d2df;
  --gray-500: #6b7a8f;
  --gray-700: #3a4658;
  --ink: #1a2332;
  --red: #d62839;
  --green: #1f9d55;
  --container: 1240px;
  --shadow: 0 12px 32px rgba(11, 79, 156, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--gray-50);
  color: var(--ink);
  font-family: "Noto Sans Thai", "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

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

.container {
  margin: 0 auto;
  width: min(100% - 32px, var(--container));
}

.topbar {
  background: var(--blue-dark);
  color: #dce9fb;
  font-size: 0.86rem;
  padding: 8px 0;
}

.topbar-inner {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: flex-end;
}

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  position: sticky;
  top: 0;
  z-index: 80;
}

.header-row {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: auto 1fr auto;
  min-height: 78px;
}

.brand {
  align-items: center;
  display: flex;
  font-size: 1.35rem;
  font-weight: 900;
  gap: 10px;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--blue), #2f7fd6);
  border-radius: 10px;
  color: white;
  display: inline-flex;
  font-size: 1rem;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.search-box {
  align-items: center;
  background: var(--gray-50);
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  display: flex;
  gap: 8px;
  padding: 0 14px;
}

.search-box input {
  background: transparent;
  border: 0;
  flex: 1;
  font: inherit;
  min-height: 42px;
  outline: 0;
}

.header-actions {
  align-items: center;
  display: flex;
  gap: 14px;
  font-size: 0.9rem;
  font-weight: 700;
}

.cart-badge {
  align-items: center;
  background: var(--red);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 0.75rem;
  height: 22px;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
}

.main-nav {
  background: var(--blue);
  color: white;
}

.main-nav .container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  padding: 12px 0;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
  font-weight: 700;
}

.main-nav a:hover,
.main-nav a.active {
  color: white;
}

.hero-banner {
  background:
    linear-gradient(90deg, rgba(8, 58, 115, 0.92), rgba(11, 79, 156, 0.72)),
    url("assets/images/hero.jpg");
  background-position: center;
  background-size: cover;
  color: white;
  padding: 56px 0;
}

.hero-grid {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: 1.1fr 0.9fr;
}

.hero-banner h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.2;
  margin: 10px 0 14px;
}

.hero-banner p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn {
  border-radius: 8px;
  display: inline-flex;
  font-weight: 800;
  min-height: 44px;
  padding: 0 20px;
  place-items: center;
}

.btn-primary {
  background: white;
  color: var(--blue-dark);
}

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: white;
}

.hero-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  padding: 22px;
}

.section {
  padding: 48px 0;
}

.section-head {
  align-items: end;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.product-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, 1fr);
}

.product-card {
  background: white;
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: 0.2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
}

.product-image {
  aspect-ratio: 1 / 1;
  background: #f8fafc;
  overflow: hidden;
}

.product-image img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.product-body {
  padding: 14px;
}

.product-body h3 {
  font-size: 0.95rem;
  line-height: 1.45;
  margin-bottom: 10px;
  min-height: 2.9em;
}

.price-row {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sale-price {
  color: var(--red);
  font-size: 1.15rem;
  font-weight: 900;
}

.old-price {
  color: var(--gray-500);
  font-size: 0.9rem;
  text-decoration: line-through;
}

.save-badge {
  background: #ffe8ea;
  border-radius: 999px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 8px;
}

.stock-out {
  color: var(--gray-500);
  font-size: 0.86rem;
  font-weight: 700;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.card-actions .btn {
  flex: 1;
  font-size: 0.86rem;
  min-height: 38px;
}

.btn-cart {
  background: var(--blue);
  color: white;
}

.btn-view {
  background: var(--gray-100);
  color: var(--ink);
}

.brand-strip {
  background: white;
  border: 1px solid var(--gray-100);
  border-radius: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(8, 1fr);
  padding: 18px;
}

.brand-strip span {
  align-items: center;
  background: var(--gray-50);
  border-radius: 8px;
  color: var(--gray-700);
  display: flex;
  font-size: 0.82rem;
  font-weight: 800;
  justify-content: center;
  min-height: 46px;
  text-align: center;
}

.promo-banner {
  align-items: center;
  background: linear-gradient(90deg, var(--blue-light), white);
  border: 1px solid #cfe0f7;
  border-radius: 16px;
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr auto;
  padding: 24px;
}

.page-hero {
  background: white;
  border-bottom: 1px solid var(--gray-100);
  padding: 36px 0;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.lead {
  color: var(--gray-700);
  max-width: 760px;
}

.footer {
  background: #0f2740;
  color: #d7e4f7;
  margin-top: 40px;
  padding: 42px 0 20px;
}

.footer-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.2fr repeat(3, 1fr);
}

.footer h3 {
  color: white;
  font-size: 1rem;
  margin-bottom: 12px;
}

.footer a {
  color: #c9daf3;
  display: block;
  font-size: 0.9rem;
  margin: 6px 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #9eb4d4;
  font-size: 0.86rem;
  margin-top: 24px;
  padding-top: 16px;
  text-align: center;
}

.panel {
  background: white;
  border: 1px solid var(--gray-100);
  border-radius: 14px;
  padding: 22px;
}

.form-grid label {
  display: block;
  font-weight: 700;
  margin: 12px 0 6px;
}

.form-grid input,
.form-grid textarea,
.form-grid select {
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font: inherit;
  padding: 10px 12px;
  width: 100%;
}

.form-grid textarea {
  min-height: 120px;
  resize: vertical;
}

.split {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1fr;
}

.faq-item {
  border-bottom: 1px solid var(--gray-100);
  padding: 14px 0;
}

.faq-item h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.whatsapp-float {
  align-items: center;
  background: #25d366;
  border-radius: 50%;
  bottom: 22px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  color: white;
  display: flex;
  font-size: 1.4rem;
  height: 56px;
  justify-content: center;
  position: fixed;
  right: 22px;
  width: 56px;
  z-index: 90;
}

.filter-bar {
  background: white;
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding: 14px;
}

.filter-bar a {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 8px 14px;
}

.filter-bar a.active {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .brand-strip { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .header-row { grid-template-columns: 1fr auto; }
  .search-box { grid-column: 1 / -1; order: 3; }
  .hero-grid,
  .split,
  .promo-banner { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-strip { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .brand-strip { grid-template-columns: repeat(2, 1fr); }
}
