/* ═══════════════════════════════════════════════════════════
   BAAKAD FISHING LURE — Design System
   โทน ดำ / แดง / ขาว — เน้นรูปสินค้า, โมเดิร์น เรียบหรู
   ═══════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'NotoSansThaiFB';
  src: local('Noto Sans Thai'), local('Sarabun'), local('Prompt');
  font-display: swap;
}

:root {
  --bg: #0a0a0c;
  --bg-2: #101013;
  --surface: #16161a;
  --surface-2: #1e1e24;
  --surface-3: #26262e;
  --line: #2c2c36;
  --line-soft: #22222a;

  --red: #e01432;
  --red-2: #ff2d4a;
  --red-dark: #a70d24;
  --gold: #f2a93b;

  --text: #f4f4f6;
  --text-2: #b9b9c4;
  --muted: #85858f;

  --white: #ffffff;
  --ok: #22c55e;
  --warn: #f59e0b;
  --info: #38bdf8;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-red: 0 8px 24px rgba(224, 20, 50, .3);

  --header-h: 60px;
  --maxw: 1240px;
  --pad: 16px;

  --font: 'Noto Sans Thai', 'Sarabun', 'Prompt', -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, 'Helvetica Neue', 'Thonburi', sans-serif;
}

* { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0 0 .8em; }
ul { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ───────── Announcement ───────── */
.announce {
  background: linear-gradient(90deg, var(--red-dark), var(--red) 45%, var(--red-2));
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  padding: 7px 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ───────── Header ───────── */
.header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(10, 10, 12, .92);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header-in {
  height: var(--header-h);
  display: flex; align-items: center; gap: 10px;
}
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand img {
  width: 38px; height: 38px; border-radius: 10px; object-fit: cover;
  border: 1px solid var(--line);
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.05; }
.brand-txt b {
  font-size: 17px; font-weight: 900; letter-spacing: .06em;
  background: linear-gradient(92deg, #fff 20%, var(--red-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-txt span { font-size: 9.5px; color: var(--muted); letter-spacing: .16em; font-weight: 600; }

.hd-search { flex: 1; position: relative; max-width: 460px; margin: 0 auto; }
.hd-search input {
  width: 100%; height: 40px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 0 40px 0 40px; font-size: 14px; outline: none;
  transition: border-color .16s, background .16s;
}
.hd-search input:focus { border-color: var(--red); background: var(--surface-3); }
.hd-search input::placeholder { color: var(--muted); }
.hd-search .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.hd-search button.go {
  position: absolute; right: 4px; top: 4px; width: 32px; height: 32px;
  border-radius: 50%; background: var(--red); display: grid; place-items: center;
}
.hd-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center; position: relative;
  border: 1px solid transparent; transition: background .15s, border-color .15s;
}
.icon-btn:hover, .icon-btn:focus-visible { background: var(--surface-2); border-color: var(--line); }
.badge-count {
  position: absolute; top: 1px; right: 1px; min-width: 18px; height: 18px;
  background: var(--red); color: #fff; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; display: grid; place-items: center;
  padding: 0 4px; border: 2px solid var(--bg); line-height: 1;
}
.badge-count[data-empty="1"] { display: none; }

/* ───────── Category nav ───────── */
.catnav {
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-2);
  position: sticky; top: var(--header-h); z-index: 80;
}
.catnav-in {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 8px var(--pad); -webkit-overflow-scrolling: touch;
}
.catnav-in::-webkit-scrollbar { display: none; }
.catnav a {
  flex-shrink: 0; padding: 7px 14px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; color: var(--text-2);
  border: 1px solid var(--line); background: var(--surface);
  transition: all .16s; white-space: nowrap;
}
.catnav a:hover { color: #fff; border-color: #494954; }
.catnav a.on {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-color: transparent; color: #fff; box-shadow: var(--shadow-red);
}

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 12px;
  font-weight: 700; font-size: 15px; border: 1px solid transparent;
  transition: transform .12s, filter .16s, background .16s, border-color .16s;
  text-align: center;
}
.btn:active { transform: scale(.975); }
.btn-primary {
  background: linear-gradient(135deg, var(--red-2), var(--red) 55%, var(--red-dark));
  color: #fff; box-shadow: var(--shadow-red);
}
.btn-primary:hover { filter: brightness(1.09); }
.btn-ghost { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--surface-3); border-color: #45454f; }
.btn-line { background: #06C755; color: #fff; }
.btn-line:hover { filter: brightness(1.08); }
.btn-block { width: 100%; }
.btn-sm { height: 38px; padding: 0 15px; font-size: 13.5px; border-radius: 10px; }
.btn-lg { height: 54px; font-size: 16.5px; border-radius: 14px; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }

/* ───────── Hero / Banner ───────── */
.hero { padding: 18px 0 6px; }
.slider { position: relative; border-radius: var(--r-xl); overflow: hidden; }
.slides { display: flex; transition: transform .5s cubic-bezier(.4, 0, .2, 1); }
.slide {
  min-width: 100%;
  display: grid; grid-template-columns: 1.05fr .95fr;
  background: radial-gradient(120% 130% at 8% 15%, #23232c 0%, #0e0e12 58%, #08080a 100%);
  position: relative; isolation: isolate;
}
.slide::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(60% 80% at 90% 50%, rgba(224, 20, 50, .28), transparent 70%);
}
.slide-txt { padding: 40px 34px; display: flex; flex-direction: column; justify-content: center; gap: 12px; position: relative; z-index: 1; }
.slide-badge {
  align-self: flex-start; font-size: 11.5px; font-weight: 800; letter-spacing: .1em;
  padding: 5px 12px; border-radius: 999px; text-transform: uppercase;
  background: rgba(224, 20, 50, .16); color: var(--red-2);
  border: 1px solid rgba(224, 20, 50, .42);
}
.slide-txt h2 { font-size: clamp(22px, 3.4vw, 40px); font-weight: 900; letter-spacing: -.02em; }
.slide-txt p { color: var(--text-2); font-size: clamp(13px, 1.4vw, 16px); margin: 0; max-width: 44ch; }
.slide-img { position: relative; z-index: 1; min-height: 260px; }
.slide-img img { width: 100%; height: 100%; object-fit: cover; }
.slide-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, #0e0e12 0%, rgba(14, 14, 18, .35) 26%, transparent 60%);
}

.slider-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; z-index: 3; }
.slider-dots button {
  width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .35);
  transition: all .22s;
}
.slider-dots button.on { width: 26px; background: var(--red-2); }
.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(10, 10, 12, .6); border: 1px solid var(--line);
  display: grid; place-items: center; backdrop-filter: blur(6px);
  transition: background .16s;
}
.slider-arrow:hover { background: var(--red); border-color: var(--red); }
.slider-arrow.prev { left: 12px; }
.slider-arrow.next { right: 12px; }

/* ───────── Section ───────── */
.section { padding: 34px 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.section-head h2 {
  font-size: clamp(19px, 2.4vw, 26px); font-weight: 900; display: flex;
  align-items: center; gap: 10px; letter-spacing: -.01em;
}
.section-head h2::before {
  content: ''; width: 5px; height: 24px; border-radius: 3px;
  background: linear-gradient(180deg, var(--red-2), var(--red-dark));
}
.section-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; font-weight: 400; }
.link-more { color: var(--text-2); font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.link-more:hover { color: var(--red-2); }

/* ───────── Category chips grid ───────── */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.cat-card {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 14px; display: flex; flex-direction: column; gap: 4px;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  position: relative; overflow: hidden;
}
.cat-card::after {
  content: ''; position: absolute; right: -22px; bottom: -22px;
  width: 78px; height: 78px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 20, 50, .2), transparent 68%);
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--red); box-shadow: var(--shadow-red); }
.cat-card b { font-size: 14.5px; font-weight: 700; }
.cat-card span { font-size: 12px; color: var(--muted); }

/* ───────── Product grid ───────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 16px;
}
.grid.g2 { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s cubic-bezier(.2,.7,.3,1), border-color .2s, box-shadow .2s;
  position: relative;
}
.card:hover { transform: translateY(-4px); border-color: #3a3a46; box-shadow: var(--shadow); }
.card-img {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  background: linear-gradient(160deg, #ffffff, #ececed);
}
.card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .45s cubic-bezier(.2,.7,.3,1);
}
.card:hover .card-img img { transform: scale(1.06); }
.card-tags { position: absolute; top: 9px; left: 9px; display: flex; flex-direction: column; gap: 5px; z-index: 2; }
.tag {
  font-size: 10.5px; font-weight: 800; padding: 3.5px 9px; border-radius: 999px;
  color: #fff; letter-spacing: .04em; line-height: 1.35; box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.tag-new { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.tag-sale { background: linear-gradient(135deg, var(--red-2), var(--red-dark)); }
.tag-hot { background: linear-gradient(135deg, var(--gold), #c2760a); }
.tag-out { background: #3f3f46; }

.card-body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-cat { font-size: 11px; color: var(--red-2); font-weight: 700; letter-spacing: .03em; }
.card-name {
  font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.9em;
}
.card-price { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; margin-top: auto; }
.price { font-size: 18px; font-weight: 900; color: #fff; letter-spacing: -.01em; }
.price small { font-size: 12px; font-weight: 700; color: var(--text-2); margin-left: 1px; }
.price-old { font-size: 12.5px; color: var(--muted); text-decoration: line-through; }
.card-foot { display: flex; gap: 7px; align-items: center; }
.card-foot .btn { flex: 1; }
.card-meta { font-size: 11.5px; color: var(--muted); display: flex; gap: 10px; }

/* ───────── Trust bar ───────── */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.trust-item {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r);
  padding: 15px 16px; display: flex; gap: 12px; align-items: center;
}
.trust-item .ic {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  background: rgba(224, 20, 50, .12); color: var(--red-2);
  display: grid; place-items: center; border: 1px solid rgba(224, 20, 50, .28);
}
.trust-item b { font-size: 13.5px; display: block; }
.trust-item span { font-size: 12px; color: var(--muted); }

/* ───────── Product detail ───────── */
.pd { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 32px; padding: 22px 0 10px; }
.pd-gallery { position: sticky; top: calc(var(--header-h) + 60px); align-self: start; }
.pd-main {
  border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 1/1;
  background: linear-gradient(160deg, #fff, #ececee); border: 1px solid var(--line);
}
.pd-main img { width: 100%; height: 100%; object-fit: contain; }
.pd-thumbs { display: flex; gap: 9px; margin-top: 11px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pd-thumbs::-webkit-scrollbar { display: none; }
.pd-thumbs button {
  width: 68px; height: 68px; flex-shrink: 0; border-radius: 11px; overflow: hidden;
  border: 2px solid var(--line); background: #fff; transition: border-color .16s;
}
.pd-thumbs button.on { border-color: var(--red); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.pd-info { display: flex; flex-direction: column; gap: 15px; }
.crumb { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.crumb a:hover { color: var(--red-2); }
.pd-title { font-size: clamp(20px, 2.6vw, 28px); font-weight: 900; letter-spacing: -.02em; }
.pd-short { color: var(--text-2); font-size: 14.5px; }
.pd-pricebox {
  background: linear-gradient(140deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.pd-pricebox .price { font-size: 32px; color: var(--red-2); }
.pd-pricebox .price small { font-size: 17px; color: var(--red-2); }
.save-pill {
  font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px;
  background: rgba(34, 197, 94, .14); color: #4ade80; border: 1px solid rgba(34, 197, 94, .3);
}
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.spec {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 9px 12px;
}
.spec span { font-size: 11.5px; color: var(--muted); display: block; }
.spec b { font-size: 13.5px; font-weight: 700; }

/* ───────── ตัวเลือกสินค้า (สี / ขนาด …) ───────── */
.pd-options { display: flex; flex-direction: column; gap: 14px; }
.optgrp { display: flex; flex-direction: column; gap: 8px; }
.optgrp-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.optgrp-head label { font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.optgrp-head .req { color: var(--red-2); }
.optgrp-sel { font-size: 13px; font-weight: 700; color: var(--muted); }
.optgrp-sel.picked { color: #fff; }
.optgrp.needs-pick .optgrp-sel { color: var(--red-2); }
.optgrp.needs-pick .opt-chips {
  outline: 1px solid var(--red); outline-offset: 5px; border-radius: 8px;
  animation: shake .3s;
}
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.opt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 11px; font-size: 13.5px; font-weight: 600;
  background: var(--surface-2); border: 1.5px solid var(--line); color: var(--text-2);
  transition: border-color .15s, color .15s, background .15s;
  min-height: 40px;
}
.opt-chip.has-img { padding: 5px 13px 5px 5px; }
.opt-chip img {
  width: 34px; height: 34px; border-radius: 8px; object-fit: cover;
  background: #fff; flex-shrink: 0;
}
.opt-chip:hover { border-color: #55555f; color: #fff; }
.opt-chip.on {
  border-color: var(--red); color: #fff; background: rgba(224, 20, 50, .1);
  box-shadow: 0 0 0 1px var(--red) inset;
}
.card-opt { font-size: 11.5px; color: var(--muted); }
.citem-variant {
  font-size: 11.5px; color: var(--red-2); font-weight: 600;
  background: rgba(224, 20, 50, .1); border-radius: 6px; padding: 1px 7px;
  align-self: flex-start;
}

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.qty button { width: 42px; height: 46px; font-size: 19px; font-weight: 700; color: var(--text-2); transition: background .14s; }
.qty button:hover { background: var(--surface-3); color: #fff; }
.qty input {
  width: 52px; height: 46px; text-align: center; background: transparent;
  border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  font-weight: 800; font-size: 15px; outline: none; -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.pd-buy { display: flex; gap: 10px; flex-wrap: wrap; }
.pd-buy .btn { flex: 1; min-width: 150px; }
.stock-line { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(34,197,94,.16); }
.dot.out { background: var(--red); box-shadow: 0 0 0 3px rgba(224,20,50,.16); }

.prose { color: var(--text-2); font-size: 14.5px; line-height: 1.85; white-space: pre-line; }
.panel {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 20px;
}
.panel h3 { font-size: 16px; margin-bottom: 10px; }

/* ───────── Cart / drawer ───────── */
.overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .62); z-index: 190;
  opacity: 0; pointer-events: none; transition: opacity .25s;
  backdrop-filter: blur(2px);
}
.overlay.on { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw);
  background: var(--bg-2); border-left: 1px solid var(--line); z-index: 200;
  transform: translateX(102%); transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  display: flex; flex-direction: column;
}
.drawer.on { transform: none; }
.drawer-head {
  padding: 15px 16px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.drawer-head h3 { font-size: 16.5px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px 16px; }
.drawer-foot { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }

.citem { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.citem:last-child { border-bottom: 0; }
.citem-img {
  width: 66px; height: 66px; border-radius: 11px; overflow: hidden; flex-shrink: 0;
  background: #fff; border: 1px solid var(--line);
}
.citem-img img { width: 100%; height: 100%; object-fit: cover; }
.citem-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.citem-name {
  font-size: 13.5px; font-weight: 600; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.citem-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qty-mini { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.qty-mini button { width: 30px; height: 30px; font-size: 16px; color: var(--text-2); }
.qty-mini button:hover { color: #fff; }
.qty-mini span { min-width: 28px; text-align: center; font-weight: 800; font-size: 13.5px; }
.citem-price { font-weight: 800; font-size: 14.5px; color: #fff; }
.del-btn { color: var(--muted); font-size: 12px; }
.del-btn:hover { color: var(--red-2); }

.sum-row { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; color: var(--text-2); }
.sum-row.total { font-size: 18px; font-weight: 900; color: #fff; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.sum-row .neg { color: #4ade80; }

.empty { text-align: center; padding: 46px 18px; color: var(--muted); }
.empty .big { font-size: 46px; margin-bottom: 6px; opacity: .55; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 5px; }

/* ───────── Forms ───────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field label .req { color: var(--red-2); }
.input, .field input, .field select, .field textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 11px; padding: 11px 13px; font-size: 15px; outline: none;
  transition: border-color .16s, background .16s;
}
.field textarea { min-height: 84px; resize: vertical; line-height: 1.6; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--red); background: var(--surface-3);
}
.field input.err, .field select.err, .field textarea.err { border-color: var(--red-2); background: rgba(224,20,50,.07); }
.field .hint { font-size: 11.5px; color: var(--muted); }
.field .errmsg { font-size: 11.5px; color: var(--red-2); display: none; }
.field.has-err .errmsg { display: block; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
select.input, .field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2385858f' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px;
}

.opt {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  cursor: pointer; transition: border-color .16s, background .16s;
}
.opt:hover { border-color: #45454f; }
.opt.on { border-color: var(--red); background: rgba(224, 20, 50, .07); }
.opt input { margin-top: 3px; accent-color: var(--red); width: 18px; height: 18px; flex-shrink: 0; }
.opt-b { flex: 1; min-width: 0; }
.opt-b b { font-size: 14.5px; display: block; }
.opt-b span { font-size: 12.5px; color: var(--muted); display: block; line-height: 1.5; }
.opt .amt { font-weight: 800; font-size: 14.5px; white-space: nowrap; }

.checkout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; padding: 20px 0 40px; }
.checkout aside { position: sticky; top: calc(var(--header-h) + 16px); }

/* ───────── Steps ───────── */
.steps { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 18px 0 4px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.step i {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); font-style: normal;
  font-size: 11.5px; font-weight: 800;
}
.step.on { color: #fff; }
.step.on i { background: var(--red); border-color: var(--red); color: #fff; }
.step.done i { background: rgba(34,197,94,.16); border-color: rgba(34,197,94,.4); color: #4ade80; }
.step-line { width: 22px; height: 1px; background: var(--line); }

/* ───────── Payment ───────── */
.pay-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px; display: flex; flex-direction: column; gap: 13px;
}
.pay-head { display: flex; align-items: center; gap: 11px; }
.pay-logo {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 900; font-size: 15px; color: #fff; flex-shrink: 0;
}
.qr-box {
  background: #fff; border-radius: var(--r); padding: 14px; display: flex;
  flex-direction: column; align-items: center; gap: 8px; color: #111;
}
.qr-box .pp-head {
  width: 100%; background: #003d7c; color: #fff; border-radius: 8px;
  padding: 8px; text-align: center; font-weight: 800; font-size: 13px; letter-spacing: .1em;
}
.qr-box svg { width: 100%; max-width: 260px; height: auto; }
.qr-box .amt { font-size: 21px; font-weight: 900; }
.copy-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px;
}
.copy-row .k { font-size: 11.5px; color: var(--muted); display: block; }
.copy-row .v { font-weight: 800; font-size: 15px; letter-spacing: .02em; word-break: break-all; }

.uploader {
  border: 2px dashed var(--line); border-radius: var(--r); padding: 26px 16px;
  text-align: center; cursor: pointer; transition: border-color .16s, background .16s;
  background: var(--surface);
}
.uploader:hover, .uploader.drag { border-color: var(--red); background: rgba(224, 20, 50, .05); }
.uploader .big { font-size: 34px; opacity: .5; }
.slip-preview { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.slip-preview img { width: 100%; max-height: 420px; object-fit: contain; }

/* ───────── Alerts ───────── */
.alert { border-radius: var(--r); padding: 13px 15px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; line-height: 1.6; }
.alert-info { background: rgba(56, 189, 248, .09); border: 1px solid rgba(56, 189, 248, .28); color: #bae6fd; }
.alert-ok { background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .3); color: #bbf7d0; }
.alert-warn { background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .3); color: #fde68a; }
.alert-err { background: rgba(224, 20, 50, .1); border: 1px solid rgba(224, 20, 50, .32); color: #fecaca; }

.pill { font-size: 11.5px; font-weight: 800; padding: 4px 11px; border-radius: 999px; display: inline-block; }

/* ───────── Footer ───────── */
.footer { background: var(--bg-2); border-top: 1px solid var(--line); margin-top: 40px; padding: 34px 0 18px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 26px; }
.footer h4 { font-size: 14px; margin-bottom: 11px; color: #fff; }
.footer li { margin-bottom: 7px; }
.footer a, .footer p, .footer li { color: var(--muted); font-size: 13.5px; }
.footer a:hover { color: var(--red-2); }
.foot-brand { display: flex; gap: 11px; align-items: center; margin-bottom: 12px; }
.foot-brand img { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); }
.foot-bottom {
  border-top: 1px solid var(--line); margin-top: 24px; padding-top: 16px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted);
}

/* ───────── Floating & mobile nav ───────── */
.fab-line {
  position: fixed; right: 15px; bottom: 84px; z-index: 85;
  width: 52px; height: 52px; border-radius: 50%; background: #06C755;
  display: grid; place-items: center; box-shadow: 0 8px 22px rgba(6, 199, 85, .38);
  transition: transform .18s;
}
.fab-line:hover { transform: scale(1.07); }

.mnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 88; display: none;
  background: rgba(12, 12, 15, .96); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.mnav-in { display: grid; grid-template-columns: repeat(5, 1fr); }
.mnav a {
  padding: 8px 2px 7px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10.5px; color: var(--muted); position: relative; font-weight: 600;
}
.mnav a.on { color: var(--red-2); }
.mnav a .badge-count { top: 2px; right: 50%; margin-right: -20px; }

/* ───────── Toast ───────── */
.toast-wrap {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 92px;
  z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: max-content; max-width: 92vw;
}
.toast {
  background: rgba(24, 24, 28, .97); border: 1px solid var(--line);
  border-left: 3px solid var(--ok); color: #fff;
  padding: 11px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow); animation: toastIn .28s cubic-bezier(.2,.8,.3,1);
  display: flex; align-items: center; gap: 9px;
}
.toast.err { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--warn); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }

/* ───────── Skeleton / misc ───────── */
.chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
  padding: 5px 11px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--text-2);
}
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.result-count { font-size: 13px; color: var(--muted); }

.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 520px; }
th, td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--line-soft); }
th { background: var(--surface-2); font-weight: 700; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }

/* ═══════════ RESPONSIVE ═══════════ */

@media (max-width: 1024px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
  .pd { grid-template-columns: 1fr; gap: 24px; }
  .pd-gallery { position: static; }
  .checkout { grid-template-columns: 1fr; }
  .checkout aside { position: static; }
}

@media (max-width: 860px) {
  .hd-search { display: none; }
  .hd-search.open {
    display: block; position: absolute; left: 12px; right: 12px; top: 100%;
    max-width: none; margin: 0; padding: 10px 0 12px; background: var(--bg);
    z-index: 5;
  }
  .header { position: sticky; }
  .header-in { position: relative; }
}

@media (max-width: 760px) {
  :root { --pad: 14px; --header-h: 56px; }
  body { font-size: 14.5px; padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .mnav { display: block; }
  .fab-line { bottom: calc(74px + env(safe-area-inset-bottom)); width: 48px; height: 48px; right: 13px; }
  .toast-wrap { bottom: calc(78px + env(safe-area-inset-bottom)); }

  /* รูปแบนเนอร์เป็นภาพสี่เหลี่ยมจัตุรัส — แสดงเต็มภาพไม่ให้ถูกครอบตัด */
  .slide { grid-template-columns: 1fr; }
  .slide-img { order: -1; min-height: 0; aspect-ratio: 1 / 1; }
  .slide-img img { object-fit: contain; }
  .slide-img::after {
    background: linear-gradient(180deg, transparent 62%, rgba(14, 14, 18, .8) 88%, #0e0e12 100%);
  }
  .slide-txt { padding: 12px 18px 22px; gap: 8px; margin-top: -26px; }
  .slide-txt h2 { font-size: 21px; }
  .slide-txt p { font-size: 13px; }
  .slide-txt .btn { align-self: flex-start; }
  .slider { border-radius: var(--r-lg); }
  .slider-arrow { display: none; }
  .slider-dots { bottom: 10px; }

  .section { padding: 26px 0; }
  .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .trust-item { padding: 11px 12px; gap: 9px; flex-direction: column; align-items: flex-start; }
  .trust-item .ic { width: 32px; height: 32px; border-radius: 9px; }
  .trust-item .ic svg { width: 17px; height: 17px; }
  .trust-item b { font-size: 12.8px; }
  .trust-item span { font-size: 11px; line-height: 1.45; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { border-radius: var(--r); }
  .card-body { padding: 10px 11px 12px; gap: 6px; }
  .card-name { font-size: 13px; min-height: 2.85em; }
  .price { font-size: 16.5px; }
  .card-foot .btn { height: 36px; font-size: 13px; padding: 0 10px; }

  .grid2, .grid3 { grid-template-columns: 1fr; }
  .grid2.keep, .grid3.keep { grid-template-columns: 1fr 1fr; }

  .foot-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer { padding-bottom: 14px; }
  .panel { padding: 16px; border-radius: var(--r); }
  .section-head { margin-bottom: 14px; }
  .specs { grid-template-columns: 1fr 1fr; }
  .pd-buy .btn { min-width: 0; }
  .pd-thumbs button { width: 58px; height: 58px; }
  .steps { gap: 2px; }
  .step span { display: none; }
  .step.on span { display: inline; }
  .table-wrap { border-radius: var(--r-sm); }
}

@media (max-width: 430px) {
  .catnav a { padding: 6px 11px; font-size: 12.5px; }
  .catnav-in { gap: 5px; padding: 7px var(--pad); }
}

@media (max-width: 400px) {
  :root { --pad: 12px; }
  .brand-txt b { font-size: 15.5px; }
  .brand-txt span { font-size: 8.5px; letter-spacing: .1em; }
  .brand img { width: 34px; height: 34px; }
  .grid { gap: 9px; }
  .card-name { font-size: 12.5px; }
  .price { font-size: 15.5px; }
  .card-foot .btn { font-size: 12px; }
  .icon-btn { width: 36px; height: 36px; }
  .specs { grid-template-columns: 1fr; }
  .qty button { width: 38px; }
  .qty input { width: 44px; }
  .slide-txt h2 { font-size: 19px; }
  .pd-pricebox .price { font-size: 27px; }
  .mnav a { font-size: 9.5px; }
}

@media (max-width: 340px) {
  .grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .brand-txt span { display: none; }
}

@media (min-width: 1400px) { :root { --maxw: 1320px; } }

@media print {
  .header, .catnav, .footer, .mnav, .fab-line, .announce, .no-print, .drawer, .overlay { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
