:root {
  --teal: #40acb6;
  --teal-dark: #06455c;
  --yellow: #f6d745;
  --green: #1da071;
  --teal-light: #96c5ca;
  --mint: #cce2e5;
  --bg: #fafcfc;
  --card-bg: #ffffff;
  --text: #16333c;
  --text-muted: #5a7680;
  --border: #e3eef0;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(6, 69, 92, 0.08);
  --shadow-lg: 0 12px 32px rgba(6, 69, 92, 0.16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  scroll-behavior: smooth;
}

h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--teal-dark);
  margin: 0 0 0.5em;
}

a { color: var(--teal-dark); }

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
header.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 16px;
}
.logo-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-link img { height: 34px; width: auto; }
.tagline {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  display: none;
}
@media (min-width: 640px) {
  .tagline { display: block; }
}
nav.main-nav {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
nav.main-nav a {
  text-decoration: none;
  color: var(--teal-dark);
  font-weight: 500;
  font-size: 14px;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
}
nav.main-nav a:hover, nav.main-nav a.active { border-bottom-color: var(--teal); }
nav.main-nav a.nav-back {
  color: var(--text-muted);
  padding-right: 14px;
  border-right: 1px solid var(--border);
}
nav.main-nav a.nav-back:hover { color: var(--teal-dark); border-bottom-color: transparent; }

.cart-btn {
  position: relative;
  background: var(--teal-dark);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-btn:hover { background: var(--teal); }
.cart-badge {
  background: var(--yellow);
  color: var(--teal-dark);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--teal-dark), #0a5a74);
  color: #fff;
  padding: 56px 20px 64px;
  text-align: center;
}
.hero h1 {
  color: #fff;
  font-size: 32px;
  max-width: 720px;
  margin: 0 auto 14px;
}
.hero p {
  max-width: 560px;
  margin: 0 auto 24px;
  color: #dff2f4;
  font-size: 15px;
  line-height: 1.6;
}
.hero-badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.hero-badge {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
}

/* ---------- Filters ---------- */
.filters-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 24px 0 8px;
  align-items: center;
}
.filter-chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 7px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--teal-dark);
  cursor: pointer;
}
.filter-chip.active, .filter-chip:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.result-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Product grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding: 16px 0 60px;
}
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-img {
  aspect-ratio: 4/3;
  background: var(--mint);
  position: relative;
  overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .noimg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--teal-dark); font-size: 13px; text-align: center; padding: 10px;
  background: var(--mint);
}
.card-cat {
  position: absolute; top: 10px; left: 10px;
  background: rgba(6,69,92,0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.card-title { font-size: 15px; font-weight: 600; color: var(--teal-dark); line-height: 1.3; }
.card-dims { font-size: 12px; color: var(--text-muted); }
.card-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
}
.card-price { font-size: 18px; font-weight: 700; color: var(--teal-dark); }
.card-price-ht { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.card-stock { font-size: 11px; color: var(--green); font-weight: 600; }
.card-stock.low { color: #c9742a; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-outline { background: #fff; color: var(--teal-dark); border: 1.5px solid var(--teal-dark); }
.btn-outline:hover { background: var(--mint); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Modal (product detail) ---------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(6,20,25,0.55);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 24px 14px;
}
.overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 18px;
  max-width: 920px;
  width: 100%;
  margin: auto;
  position: relative;
  overflow: hidden;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: #fff; border: 1px solid var(--border);
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 18px; cursor: pointer; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  color: var(--teal-dark);
}
.modal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 760px) {
  .modal-grid { grid-template-columns: 1.1fr 1fr; }
}
.modal-gallery { background: var(--mint); }
.modal-gallery-main { aspect-ratio: 4/3; overflow: hidden; }
.modal-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.modal-gallery-thumbs { display: flex; gap: 8px; padding: 10px; flex-wrap: wrap; }
.modal-gallery-thumbs img {
  width: 56px; height: 56px; object-fit: cover; border-radius: 8px; cursor: pointer;
  border: 2px solid transparent;
}
.modal-gallery-thumbs img.active { border-color: var(--teal); }
.modal-info { padding: 26px 28px 28px; display: flex; flex-direction: column; gap: 14px; }
.modal-info .cat-tag {
  align-self: flex-start;
  background: var(--mint); color: var(--teal-dark);
  font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 999px;
}
.modal-price-row { display: flex; align-items: baseline; gap: 10px; }
.modal-price { font-size: 26px; font-weight: 700; color: var(--teal-dark); }
.modal-price-ttc { font-size: 12px; color: var(--text-muted); margin-top: -8px; }
.modal-desc { font-size: 14px; line-height: 1.7; color: var(--text); white-space: pre-line; }
.modal-specs { font-size: 13px; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 12px; }
.modal-specs div { padding: 2px 0; }
.avail-box {
  background: var(--mint);
  border: 1px solid var(--teal-light);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}
.avail-box strong { color: var(--teal-dark); font-size: 12px; text-transform: uppercase; letter-spacing: .02em; }
.qty-row { display: flex; align-items: center; gap: 12px; }
.qty-control { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 999px; overflow: hidden; }
.qty-control button { background: #fff; border: none; width: 32px; height: 32px; font-size: 16px; cursor: pointer; color: var(--teal-dark); }
.qty-control span { min-width: 28px; text-align: center; font-weight: 600; font-size: 14px; }

/* ---------- Cart drawer ---------- */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(6,20,25,0.45);
  z-index: 110; display: none;
}
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 100%; max-width: 420px;
  background: #fff;
  z-index: 111;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s ease;
  box-shadow: -8px 0 24px rgba(0,0,0,0.15);
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
}
.drawer-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--teal-dark); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-footer { border-top: 1px solid var(--border); padding: 16px 20px 20px; }
.cart-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-line img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--mint); }
.cart-line-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cart-line-title { font-size: 13px; font-weight: 600; color: var(--teal-dark); }
.cart-line-row { display: flex; justify-content: space-between; align-items: center; }
.cart-line-remove { background: none; border: none; color: #b3463f; font-size: 12px; cursor: pointer; text-decoration: underline; padding: 0; }
.cart-totals { margin-bottom: 14px; }
.cart-total-row { display: flex; justify-content: space-between; padding: 2px 0; }
.cart-total-row.sub { font-size: 12px; color: var(--text-muted); }
.cart-total-row.main { font-size: 16px; font-weight: 700; color: var(--teal-dark); border-top: 1px solid var(--border); margin-top: 4px; padding-top: 6px; }
.empty-cart { text-align: center; color: var(--text-muted); padding: 40px 10px; font-size: 14px; }

/* ---------- Checkout ---------- */
.checkout-wrap { max-width: 680px; margin: 0 auto; padding: 40px 20px 80px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: var(--teal-dark); }
.field input, .field textarea, .field select {
  font-family: inherit;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--teal);
}
.delivery-choice { display: flex; gap: 12px; margin-bottom: 6px; }
.delivery-option {
  flex: 1; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 12px; cursor: pointer; font-size: 13px; text-align: center; font-weight: 600;
  color: var(--text-muted);
}
.delivery-option.active { border-color: var(--teal); background: var(--mint); color: var(--teal-dark); }
.order-summary { background: var(--mint); border-radius: 12px; padding: 16px 18px; margin-bottom: 20px; font-size: 13px; }
.order-summary .line { display: flex; justify-content: space-between; padding: 3px 0; }
.order-summary .line.sub { color: var(--text-muted); font-size: 12px; }
.order-summary .total { font-weight: 700; font-size: 15px; border-top: 1px solid rgba(6,69,92,0.2); margin-top: 8px; padding-top: 8px; }
.note-box { font-size: 12px; color: var(--text-muted); background: #fff8e0; border: 1px solid #f0e2a0; border-radius: 10px; padding: 12px 14px; margin-top: 16px; line-height: 1.5; }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--teal-dark); color: #d9edf0;
  padding: 40px 20px 28px; font-size: 13px; margin-top: 40px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 24px;
}
footer.site-footer h4 { color: #fff; font-size: 14px; }
footer.site-footer a { color: #d9edf0; text-decoration: none; }
footer.site-footer a:hover { text-decoration: underline; }
.footer-bottom {
  max-width: 1200px; margin: 24px auto 0; padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 12px; color: #a9ccd2;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ---------- Static pages ---------- */
.static-page { max-width: 760px; margin: 0 auto; padding: 48px 20px 80px; line-height: 1.7; font-size: 14px; }
.static-page h2 { margin-top: 1.4em; }
.static-page [data-fill] { background: #fff3cd; padding: 1px 5px; border-radius: 4px; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--teal-dark); color: #fff; padding: 12px 22px;
  border-radius: 999px; font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-lg); z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
