/* =========================================================
   อินทราอะไหล่ยนต์ — Intra Auto Parts
   Theme: dark navy + orange | Font: Kanit / Sarabun
   ========================================================= */

:root {
  --dark: #0e1520;
  --dark-2: #16202f;
  --dark-3: #1d2a3d;
  --accent: #ff6a1f;
  --accent-2: #ff8a3c;
  --accent-dark: #e2531a;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1d2634;
  --muted: #64748b;
  --line: #e4e9f0;
  --green: #16a34a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.16);
  --font-head: "Kanit", "Segoe UI", sans-serif;
  --font-body: "Sarabun", "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.3; font-weight: 600; }

.container { width: min(1180px, 92%); margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-head); font-weight: 500; font-size: 1rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff; box-shadow: 0 8px 22px rgba(255, 106, 31, .35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255, 106, 31, .45); }
.btn-outline { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: var(--dark-3); transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--dark); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-green { background: #22c55e; color: #fff; box-shadow: 0 8px 22px rgba(34, 197, 94, .3); }
.btn-green:hover { background: #16a34a; transform: translateY(-2px); }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--dark); color: #cbd5e1; font-size: .85rem;
  padding: 7px 0; position: relative; z-index: 60;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topbar span { display: inline-flex; align-items: center; gap: 6px; }
.topbar .dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; display: inline-block; }
.topbar a:hover { color: var(--accent-2); }
.topbar-right { display: flex; gap: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 21, 32, .96); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.header-inner { display: flex; align-items: center; gap: 22px; padding: 14px 0; }

.logo { display: flex; align-items: center; gap: 12px; color: #fff; flex-shrink: 0; }
.logo-mark {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-dark));
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; color: #fff;
  box-shadow: 0 6px 18px rgba(255, 106, 31, .4);
}
.logo-text { line-height: 1.15; }
.logo-text strong { font-family: var(--font-head); font-size: 1.15rem; display: block; letter-spacing: .3px; }
.logo-text small { color: #94a3b8; font-size: .78rem; }

.main-nav { margin-inline: auto; }
.main-nav ul { display: flex; gap: 6px; }
.main-nav a {
  color: #cbd5e1; padding: 9px 16px; border-radius: 999px;
  font-family: var(--font-head); font-size: 1rem; transition: .18s;
}
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.main-nav a.active { color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--accent-dark)); }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-search { position: relative; }
.header-search input {
  width: 240px; padding: 10px 14px 10px 40px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .08);
  color: #fff; outline: none; transition: .2s;
}
.header-search input::placeholder { color: #94a3b8; }
.header-search input:focus { border-color: var(--accent); width: 280px; }
.header-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; stroke: #94a3b8; }

.cart-btn {
  position: relative; width: 46px; height: 46px; border-radius: 12px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15);
  display: grid; place-items: center; transition: .2s;
}
.cart-btn:hover { background: var(--accent); border-color: var(--accent); }
.cart-btn svg { width: 21px; height: 21px; stroke: #fff; }
.cart-count {
  position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px;
  background: #ef4444; color: #fff; border-radius: 999px;
  font-size: .72rem; font-weight: 700; display: grid; place-items: center;
  padding-inline: 5px; border: 2px solid var(--dark);
}

.hotline { display: flex; align-items: center; gap: 9px; color: #fff; }
.hotline svg { width: 20px; height: 20px; stroke: var(--accent-2); flex-shrink: 0; }
.hotline small { display: block; color: #94a3b8; font-size: .72rem; line-height: 1.2; }
.hotline strong { font-family: var(--font-head); font-size: .95rem; }

.nav-toggle { display: none; background: none; border: 0; }
.nav-toggle svg { width: 28px; height: 28px; stroke: #fff; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(255, 106, 31, .16), transparent 60%),
    linear-gradient(160deg, #0d1420 0%, #122036 60%, #0d1626 100%);
  color: #fff; overflow: hidden;
}
.hero-inner {
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center;
  gap: 40px; padding: 64px 0 76px;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 106, 31, .14); border: 1px solid rgba(255, 138, 60, .4);
  color: var(--accent-2); padding: 7px 16px; border-radius: 999px;
  font-family: var(--font-head); font-size: .9rem; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); font-weight: 700; letter-spacing: .2px; }
.hero h1 em { font-style: normal; color: transparent; background: linear-gradient(135deg, var(--accent-2), #ffb454); -webkit-background-clip: text; background-clip: text; }
.hero p.lead { color: #b7c2d4; margin: 16px 0 28px; font-size: 1.06rem; max-width: 520px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-trust { display: flex; gap: 26px; margin-top: 36px; flex-wrap: wrap; }
.hero-trust div { display: flex; align-items: center; gap: 10px; }
.hero-trust svg { width: 26px; height: 26px; stroke: var(--accent-2); flex-shrink: 0; }
.hero-trust b { font-family: var(--font-head); display: block; font-size: .98rem; }
.hero-trust small { color: #8fa0b8; font-size: .8rem; }

.hero-art { position: relative; }
.hero-art img {
  width: 100%; height: auto; display: block;
  border-radius: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}

/* ---------- Section base ---------- */
.section { padding: 72px 0; }
.section.alt { background: #fff; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-head .kicker {
  color: var(--accent); font-family: var(--font-head); font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase; font-size: .85rem;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 6px 0 10px; }
.section-head p { color: var(--muted); }

/* ---------- Category cards ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.cat-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); transition: .22s; display: block;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.cat-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.cat-card span {
  display: block; text-align: center; padding: 13px 10px;
  font-family: var(--font-head); font-size: .95rem;
}

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); display: flex; flex-direction: column;
  transition: .22s; position: relative;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product-thumb { position: relative; overflow: hidden; }
.product-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s; }
.product-card:hover .product-thumb img { transform: scale(1.06); }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--dark); color: #fff; font-size: .75rem; font-weight: 600;
  padding: 4px 12px; border-radius: 999px; font-family: var(--font-head);
}
.badge.sale { background: #ef4444; }
.product-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-cat { color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .4px; }
.product-body h3 { font-size: 1.02rem; font-weight: 500; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3em; }
.product-desc { color: var(--muted); font-size: .84rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-brands { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.product-brands i { font-style: normal; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; font-size: .72rem; color: var(--muted); }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; gap: 8px; }
.price { font-family: var(--font-head); font-weight: 700; color: var(--accent-dark); font-size: 1.22rem; }
.price small { font-size: .78rem; font-weight: 500; color: var(--muted); }
.price .old { color: #94a3b8; text-decoration: line-through; font-size: .88rem; font-weight: 400; margin-left: 6px; }
.add-btn {
  border: 0; background: var(--dark); color: #fff; border-radius: 10px;
  padding: 9px 14px; font-family: var(--font-head); font-size: .88rem;
  display: inline-flex; align-items: center; gap: 6px; transition: .2s;
  white-space: nowrap; flex-shrink: 0;
}
.add-btn svg { width: 16px; height: 16px; stroke: #fff; }
.add-btn:hover { background: var(--accent); }
.add-btn.added { background: var(--green); }

.center-cta { text-align: center; margin-top: 40px; }

/* ---------- Features / Why us ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature {
  background: var(--bg); border-radius: var(--radius); padding: 28px 24px;
  border: 1px solid var(--line); transition: .22s;
}
.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow); background: #fff; }
.feature .icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(255, 138, 60, .18), rgba(255, 106, 31, .12));
  margin-bottom: 16px;
}
.feature .icon svg { width: 26px; height: 26px; stroke: var(--accent); }
.feature h3 { font-size: 1.08rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .9rem; }

/* ---------- Check-part banner (ส่งทะเบียนเช็คอะไหล่) ---------- */
.check-banner {
  background: linear-gradient(135deg, var(--dark-2), var(--dark));
  border-radius: 22px; padding: 48px; color: #fff;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
  position: relative; overflow: hidden;
}
.check-banner::after {
  content: ""; position: absolute; right: -80px; top: -80px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 106, 31, .25), transparent 70%);
}
.check-banner h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.check-banner h2 em { font-style: normal; color: var(--accent-2); }
.check-banner p { color: #aebacd; margin-top: 10px; }
.check-steps { display: grid; gap: 14px; margin-top: 24px; }
.check-steps li { display: flex; gap: 12px; align-items: flex-start; color: #cbd5e1; font-size: .95rem; }
.check-steps b { color: #fff; }
.check-steps .num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-dark));
  color: #fff; font-family: var(--font-head); font-weight: 700;
  display: grid; place-items: center; font-size: .9rem;
}
.check-form {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px; padding: 26px; display: grid; gap: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25); position: relative; z-index: 1;
}
.check-form h3 { font-size: 1.15rem; margin-bottom: 2px; }
.check-form input, .check-form select, .check-form textarea {
  width: 100%; padding: 12px 15px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08);
  color: #fff; outline: none; transition: .2s;
  font-family: inherit; font-size: .95rem;
}
.check-form input::placeholder, .check-form textarea::placeholder { color: #8fa0b8; }
.check-form input:focus, .check-form select:focus, .check-form textarea:focus {
  border-color: var(--accent); background: rgba(255, 255, 255, .12);
  box-shadow: 0 0 0 3px rgba(255, 106, 31, .2);
}
/* ยี่ห้อรถ — จัด select ให้เข้าธีม */
.check-form select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 42px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffb454' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.check-form select:invalid { color: #8fa0b8; }        /* ตัวเลือก placeholder */
.check-form select option { background: #122036; color: #fff; }
.check-form .check-success {
  background: rgba(34, 197, 94, .16); border: 1px solid rgba(74, 222, 128, .5); color: #bbf7d0;
}
.check-form .check-note { color: #8fa0b8; font-size: .8rem; line-height: 1.5; }

/* ---------- Brand marquee ---------- */
.brand-strip { background: #fff; border-block: 1px solid var(--line); padding: 26px 0; overflow: hidden; }
.brand-track { display: flex; gap: 60px; width: max-content; animation: scroll 28s linear infinite; }
.brand-strip:hover .brand-track { animation-play-state: paused; }
.brand-track span {
  font-family: var(--font-head); font-weight: 700; font-size: 1.5rem;
  color: #b6c2d2; white-space: nowrap; letter-spacing: .5px; transition: .2s;
}
.brand-track span:hover { color: var(--accent); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Promo strip ---------- */
.promo-strip { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; padding: 18px 0; }
.promo-strip .container { display: flex; justify-content: space-around; align-items: center; gap: 20px; flex-wrap: wrap; }
.promo-strip div { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 500; }
.promo-strip svg { width: 22px; height: 22px; stroke: #fff; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(255, 138, 60, .25), transparent 60%),
    linear-gradient(135deg, #101a2b, #0d1420);
  border-radius: 22px; padding: 52px 48px; color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
}
.cta-banner h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.cta-banner p { color: #aebacd; margin-top: 8px; max-width: 560px; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background:
    radial-gradient(700px 300px at 80% -20%, rgba(255, 106, 31, .18), transparent 60%),
    linear-gradient(160deg, #0d1420, #14233a);
  color: #fff; padding: 56px 0;
}
.breadcrumb { color: #8fa0b8; font-size: .88rem; margin-bottom: 12px; }
.breadcrumb a:hover { color: var(--accent-2); }
.page-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
.page-hero p { color: #b7c2d4; margin-top: 10px; max-width: 640px; }

/* ---------- Catalog / filters ---------- */
.catalog-wrap { display: grid; grid-template-columns: 270px 1fr; gap: 28px; align-items: start; }
.filter-panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; position: sticky; top: 96px; display: grid; gap: 22px;
}
.filter-panel h3 { font-size: 1.05rem; margin-bottom: 4px; }
.filter-group { border-top: 1px solid var(--line); padding-top: 18px; }
.filter-group:first-of-type { border-top: 0; padding-top: 0; }
.filter-group label { display: flex; align-items: center; gap: 10px; padding: 7px 4px; cursor: pointer; border-radius: 8px; font-size: .95rem; }
.filter-group label:hover { background: var(--bg); }
.filter-group input[type="checkbox"], .filter-group input[type="radio"] { accent-color: var(--accent); width: 17px; height: 17px; }
.filter-group select, .filter-search input {
  width: 100%; padding: 10px 13px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); outline: none; transition: .2s;
}
.filter-search { position: relative; }
.filter-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: var(--muted); }
.filter-search input { padding-left: 36px; background: #fff; }
.filter-search input:focus, .filter-group select:focus { border-color: var(--accent); }
.catalog-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 20px; flex-wrap: wrap;
}
.catalog-toolbar .result { color: var(--muted); font-size: .95rem; }
.result b { color: var(--accent-dark); }
.catalog-toolbar select { padding: 9px 13px; border-radius: 10px; border: 1px solid var(--line); background: #fff; outline: none; }
.empty-state {
  grid-column: 1 / -1; text-align: center; padding: 70px 20px; color: var(--muted);
  background: #fff; border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty-state svg { width: 52px; height: 52px; stroke: #cbd5e1; margin: 0 auto 14px; }

/* ---------- Cart drawer ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(10, 15, 25, .55); z-index: 90;
  opacity: 0; visibility: hidden; transition: .25s; backdrop-filter: blur(2px);
}
.overlay.show { opacity: 1; visibility: visible; }
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(420px, 94vw);
  background: #fff; z-index: 100; transform: translateX(105%);
  transition: transform .3s cubic-bezier(.2, .8, .25, 1);
  display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0, 0, 0, .2);
}
.cart-drawer.open { transform: translateX(0); }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.cart-head h3 { font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.cart-head h3 svg { width: 20px; height: 20px; stroke: var(--accent); }
.cart-close { background: var(--bg); border: 0; width: 36px; height: 36px; border-radius: 10px; font-size: 1.1rem; color: var(--muted); transition: .2s; }
.cart-close:hover { background: #fee2e2; color: #ef4444; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 22px; display: grid; gap: 14px; align-content: start; }
.cart-empty { text-align: center; color: var(--muted); padding: 60px 10px; }
.cart-empty svg { width: 56px; height: 56px; stroke: #cbd5e1; margin: 0 auto 16px; }
.cart-item { display: grid; grid-template-columns: 74px 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.cart-item img { width: 74px; height: 58px; object-fit: cover; border-radius: 8px; }
.cart-item h4 { font-size: .9rem; font-weight: 500; line-height: 1.4; }
.cart-item .price { font-size: 1rem; }
.qty { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty button {
  width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); font-weight: 700; color: var(--text); line-height: 1;
}
.qty button:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.qty span { min-width: 22px; text-align: center; font-weight: 600; font-family: var(--font-head); }
.item-remove { background: none; border: 0; color: #cbd5e1; align-self: start; padding: 4px; transition: .2s; }
.item-remove:hover { color: #ef4444; }
.item-remove svg { width: 18px; height: 18px; stroke: currentColor; }
.cart-foot { border-top: 1px solid var(--line); padding: 18px 22px; display: grid; gap: 12px; }
.cart-total { display: flex; justify-content: space-between; align-items: center; }
.cart-total span { color: var(--muted); }
.cart-total b { font-family: var(--font-head); font-size: 1.45rem; color: var(--accent-dark); }
.cart-note { font-size: .8rem; color: var(--muted); text-align: center; }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-bottom: 46px; }
.contact-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; text-align: center; transition: .22s;
}
.contact-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.contact-card .icon {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 138, 60, .16), rgba(255, 106, 31, .1));
  display: grid; place-items: center;
}
.contact-card .icon svg { width: 24px; height: 24px; stroke: var(--accent); }
.contact-card h3 { font-size: 1.02rem; margin-bottom: 4px; }
.contact-card p { color: var(--muted); font-size: .9rem; }
.contact-card a { color: var(--accent-dark); font-weight: 600; font-size: .95rem; word-break: break-all; }
.contact-card a:hover { text-decoration: underline; }

.contact-form-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; display: grid; gap: 16px; }
.contact-form h2 { font-size: 1.4rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; font-family: var(--font-head); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); outline: none; transition: .2s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--accent); background: #fff; }
.form-success {
  display: none; background: #dcfce7; border: 1px solid #86efac; color: #166534;
  padding: 12px 16px; border-radius: 10px; font-size: .92rem;
}
.form-success.show { display: block; }

.map-box { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.map-box iframe { width: 100%; height: 460px; border: 0; display: block; }

/* ---------- About page ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.about-grid img { border-radius: 20px; box-shadow: var(--shadow-lg); }
.about-copy h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 14px; }
.about-copy p { color: var(--muted); margin-bottom: 12px; }
.about-points { display: grid; gap: 12px; margin-top: 18px; }
.about-points li { display: flex; gap: 10px; align-items: flex-start; }
.about-points svg { width: 21px; height: 21px; stroke: var(--green); flex-shrink: 0; margin-top: 3px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  text-align: center; padding: 30px 16px; transition: .22s;
}
.stat:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.stat b { font-family: var(--font-head); font-size: 2.2rem; color: var(--accent-dark); display: block; line-height: 1.2; }
.stat span { color: var(--muted); font-size: .92rem; }

.timeline { position: relative; max-width: 720px; margin-inline: auto; display: grid; gap: 26px; }
.timeline::before { content: ""; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-left: 46px; }
.timeline .dot {
  position: absolute; left: 4px; top: 6px; width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-dark));
  border: 4px solid #fff; box-shadow: 0 0 0 2px var(--accent);
}
.timeline b { font-family: var(--font-head); }
.timeline p { color: var(--muted); font-size: .95rem; }

/* ---------- Gallery (ภาพภายในร้าน — จัดการจากหลังบ้าน) ---------- */
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px; max-width: 980px; margin-inline: auto;
}
.gallery-item {
  margin: 0; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm, 0 2px 10px rgba(15, 23, 42, .05));
  transition: .22s;
}
.gallery-item:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.gallery-item img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
}
.gallery-item figcaption { padding: 12px 14px 14px; }
.gallery-item figcaption b { font-family: var(--font-head); display: block; font-size: .98rem; }
.gallery-item figcaption small { color: var(--muted); display: block; margin-top: 2px; line-height: 1.5; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #9fb0c8; margin-top: 0; }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 34px; padding: 56px 0 40px; }
.footer-main h4 { color: #fff; font-size: 1.05rem; margin-bottom: 16px; }
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { font-size: .92rem; max-width: 300px; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { font-size: .93rem; transition: .18s; display: inline-flex; align-items: center; gap: 7px; }
.footer-links a::before { content: "›"; color: var(--accent); font-weight: 700; }
.footer-links a:hover { color: #fff; padding-left: 4px; }
.footer-contact li { display: flex; gap: 11px; margin-bottom: 13px; font-size: .92rem; align-items: flex-start; }
.footer-contact svg { width: 18px; height: 18px; stroke: var(--accent-2); flex-shrink: 0; margin-top: 3px; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 11px; background: rgba(255, 255, 255, .08);
  display: grid; place-items: center; transition: .2s;
}
.footer-social a:hover { background: var(--accent); transform: translateY(-3px); }
.footer-social svg { width: 19px; height: 19px; stroke: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .09); padding: 18px 0; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .84rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 80px);
  background: var(--dark); color: #fff; padding: 13px 24px; border-radius: 999px;
  font-family: var(--font-head); font-size: .95rem; z-index: 120;
  box-shadow: var(--shadow-lg); opacity: 0; transition: .3s; pointer-events: none;
  display: flex; align-items: center; gap: 9px; max-width: 92vw;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast svg { width: 19px; height: 19px; stroke: #4ade80; flex-shrink: 0; }

/* ---------- Back to top ---------- */
.back-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 80;
  width: 46px; height: 46px; border-radius: 13px; border: 0;
  background: var(--dark); color: #fff; display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: .25s;
  box-shadow: var(--shadow-lg);
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--accent); }
.back-top svg { width: 20px; height: 20px; stroke: #fff; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .hotline { display: none; }
  .check-banner { grid-template-columns: 1fr; padding: 36px 28px; }
  .catalog-wrap { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; padding: 44px 0 56px; text-align: center; gap: 28px; }
  .hero p.lead { margin-inline: auto; }
  .hero-cta, .hero-trust { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-form-wrap { grid-template-columns: 1fr; }

  .nav-toggle { display: block; margin-left: auto; }
  .header-actions { margin-left: 0; }
  .header-inner { flex-wrap: wrap; }
  .header-search { order: 5; width: 100%; }
  .header-search input { width: 100%; }
  .header-search input:focus { width: 100%; }
  .main-nav {
    display: none; order: 6; width: 100%; margin: 0 0 6px;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a { display: block; }
}

@media (max-width: 600px) {
  .section { padding: 52px 0; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-body { padding: 12px; }
  .product-body h3 { font-size: .92rem; }
  .product-foot { flex-direction: column; align-items: stretch; }
  .product-foot .price { text-align: left; }
  .add-btn { justify-content: center; }
  .add-btn { padding: 8px 10px; font-size: .8rem; }
  .price { font-size: 1.05rem; }
  .topbar-right span:last-child { display: none; }
  .cta-banner { padding: 34px 24px; }
  .check-banner { padding: 28px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 26px; padding: 40px 0 28px; }
  .promo-strip .container { justify-content: flex-start; }
  .promo-strip div { font-size: .88rem; }
  /* แกลเลอรีภาพภายในร้านบนจอเล็ก */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 20px);
  width: min(720px, 94vw); z-index: 110;
  background: var(--dark); color: #dbe3ee; border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  padding: 18px 22px; display: flex; gap: 16px; align-items: center;
  opacity: 0; pointer-events: none; transition: .35s;
}
.cookie-banner.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.cookie-banner .cookie-text { flex: 1; font-size: .88rem; line-height: 1.55; }
.cookie-banner .cookie-text b { color: #fff; font-family: var(--font-head); }
.cookie-banner .cookie-text a { color: var(--accent-2); text-decoration: underline; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-actions .btn { padding: 9px 18px; font-size: .88rem; }
@media (max-width: 640px) {
  .cookie-banner { flex-direction: column; text-align: center; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; }
}

/* ---------- ปุ่มใส่ตะกร้าแบบ icon ---------- */
.product-foot .add-btn {
  width: 42px; height: 38px; padding: 0; justify-content: center; flex-shrink: 0;
}
.product-foot .add-btn svg { width: 19px; height: 19px; }

/* ---------- แถบแบรนด์: โลโก้ที่อัปโหลด ---------- */
.brand-track .brand-item {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 400; font-size: 1.1rem; color: #8fa0b8;
}
.brand-track .brand-item img {
  height: 36px; width: auto; max-width: 90px;
  object-fit: contain; filter: grayscale(0.3); opacity: 0.85;
}
.brand-track .brand-item:hover img { filter: none; opacity: 1; }

/* ---------- โลโก้บริษัท ---------- */
.logo-mark img { display: block; border-radius: inherit; }
