/* Devonian.sp — ระบบดีไซน์กลาง
   โทน: ดำพรีเมียม + ครีมอบอุ่น  ตามบรีฟลูกค้า
   ฟอนต์: IBM Plex Sans Thai (รองรับไทยจริง ไม่ปล่อย fallback) */

:root {
  --ink:        #14181B;
  --ink-2:      #232B31;
  --cream:      #FBF7F0;
  --cream-2:    #F4EDE1;
  --sand:       #E6DAC5;
  --teal:       #14636D;
  --teal-2:     #0E4A52;
  --teal-soft:  #E7F1F1;
  --muted:      #5E6A71;
  --line:       #E3DBCE;
  --danger:     #A8332B;
  --danger-bg:  #FBEEEC;
  --ok:         #1F6B4A;
  --ok-bg:      #EAF4EE;
  --warn:       #8A5A12;
  --warn-bg:    #FBF1DE;

  --radius:     14px;
  --radius-sm:  10px;
  --shadow:     0 1px 2px rgba(20, 24, 27, .05), 0 6px 18px rgba(20, 24, 27, .06);
  --shadow-lg:  0 2px 6px rgba(20, 24, 27, .07), 0 18px 44px rgba(20, 24, 27, .12);
  --wrap:       1180px;
  --header-h:   64px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'IBM Plex Sans Thai', 'Noto Sans Thai', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;           /* กันเลื่อนซ้ายขวาบนมือถือ */
}

h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 6vw, 52px); }
h2 { font-size: clamp(23px, 4vw, 34px); }
h3 { font-size: clamp(18px, 2.4vw, 22px); }
p  { margin: 0 0 1em; }
a  { color: inherit; }

img, svg, video { max-width: 100%; }
img { height: auto; display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }
.section { padding: 56px 0; }
.section-tight { padding: 36px 0; }
@media (min-width: 768px) { .section { padding: 80px 0; } }

.eyebrow {
  font-size: 14px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--teal); margin: 0 0 10px;
}
.lead { font-size: clamp(17px, 2vw, 19px); color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* ── ปุ่ม ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 16px;
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { background: var(--ink-2); box-shadow: var(--shadow); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-2); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); background: #fff; }
.btn-line { background: #06C755; color: #fff; }
.btn-line:hover { background: #05b04b; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--line); color: var(--muted); border-color: transparent;
  cursor: not-allowed; transform: none; box-shadow: none;
}

/* ── ส่วนหัว ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 247, 240, .92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; gap: 10px; min-height: var(--header-h); }
@media (min-width: 480px) { .header-in { gap: 14px; } }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; flex: 0 0 auto; min-height: 44px; }
.brand img { width: 38px; height: 38px; border-radius: 50%; }
.brand-name { font-size: 16px; letter-spacing: -.01em; }
@media (min-width: 480px) { .brand-name { font-size: 17px; } }
/* คำโปรยใต้ชื่อร้านซ่อนบนจอแคบ เพื่อไม่ให้ส่วนหัวล้นออกนอกจอ */
.brand-sub { display: none; font-size: 14px; font-weight: 500; color: var(--muted); line-height: 1.2; }
@media (min-width: 600px) { .brand-sub { display: block; } }
.nav { display: none; gap: 4px; margin-left: auto; }
@media (min-width: 900px) { .nav { display: flex; } }
.nav a {
  padding: 9px 14px; border-radius: 999px; text-decoration: none;
  font-size: 15.5px; font-weight: 500; color: var(--ink);
}
.nav a:hover { background: var(--cream-2); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--cream); }
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; flex: 0 0 auto; }
@media (min-width: 900px) { .header-actions { margin-left: 8px; } }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; cursor: pointer; color: var(--ink); text-decoration: none;
}
.icon-btn:hover { border-color: var(--ink); }
.cart-count {
  position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px;
  padding: 0 5px; border-radius: 999px; background: var(--teal); color: #fff;
  font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center;
}
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.lang-switch button {
  border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 12px; cursor: pointer; color: var(--muted); min-height: 44px; min-width: 46px;
}
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }

/* เมนูมือถือ */
.menu-toggle { display: inline-flex; }
@media (min-width: 900px) { .menu-toggle { display: none; } }
.mobile-nav { display: none; border-top: 1px solid var(--line); background: var(--cream); }
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block; padding: 15px 18px; text-decoration: none;
  font-weight: 500; border-bottom: 1px solid var(--line);
}

/* ── แบนเนอร์หน้าแรก ── */
.hero { position: relative; background: var(--ink); }
.hero-media { position: relative; height: min(76vh, 620px); }
@media (min-width: 768px) { .hero-media { height: min(76vh, 660px); } }

/* สไลด์แบนเนอร์ — เลื่อนเป็นราง ไม่ใช่จางสลับ ผู้ใช้จะได้รู้ว่ามีหลายภาพให้ปัดดู */
.hero-viewport { position: absolute; inset: 0; overflow: hidden; }
.hero-track {
  display: flex; height: 100%; margin: 0; padding: 0; list-style: none;
  transition: transform .62s cubic-bezier(.4, .01, .2, 1);
  will-change: transform;
}
.hero-track.no-anim { transition: none; }

/* ภาพ ฝ้าดำ และข้อความ อยู่ในสไลด์เดียวกัน จะได้เลื่อนไปพร้อมกันทั้งชุด */
.hero-slide { position: relative; flex: 0 0 100%; height: 100%; }
.hero-slide img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 50%;      /* ค่าเริ่มต้น แต่ละสไลด์ตรึงจุดโฟกัสเองใน index.html */
  pointer-events: none;          /* กันภาพถูกลากตอนปัดนิ้ว */
}
/* ฝ้าดำต้องเข้มพอที่ตัวหนังสือขาวจะอ่านออกบนภาพถ่ายจริงที่สีจัดและลายเยอะ
   จอใหญ่เพิ่มฝ้าจากขอบซ้ายอีกชั้น เพราะข้อความชิดซ้ายแต่ภาพกว้าง */
.hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(20,24,27,.64) 0%, rgba(20,24,27,.52) 42%, rgba(20,24,27,.86) 100%);
}
@media (min-width: 900px) {
  .hero-shade {
    background:
      linear-gradient(90deg, rgba(20,24,27,.55) 0%, rgba(20,24,27,.12) 52%, rgba(20,24,27,0) 72%),
      linear-gradient(180deg, rgba(20,24,27,.52) 0%, rgba(20,24,27,.34) 42%, rgba(20,24,27,.80) 100%);
  }
}
.hero-body {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  color: #fff; padding-bottom: 44px;   /* เว้นที่ให้จุดบอกตำแหน่งด้านล่าง */
  pointer-events: none;                /* ให้คลิกทะลุไปถึงปุ่มสไลด์ ยกเว้นปุ่มในนี้เอง */
}
.hero-body .wrap { width: 100%; }
.hero-body a, .hero-body button { pointer-events: auto; }
.hero-body h1, .hero-body h2 { color: #fff; max-width: 17ch; margin-bottom: .35em; }
.hero-body h2 { font-size: clamp(26px, 5vw, 44px); line-height: 1.18; }
.hero-ico {
  display: inline-flex; margin-bottom: 14px;
  color: rgba(255,255,255,.92);
}
.hero-sub { font-size: clamp(16px, 2.2vw, 20px); color: rgba(255,255,255,.9); max-width: 46ch; margin-bottom: 8px; }
/* บรรทัดขยายความ — เล็กและจางกว่าบรรทัดแรก เพื่อไม่ให้แย่งสายตากับพาดหัว */
.hero-sub2 { font-size: clamp(14.5px, 1.9vw, 17px); color: rgba(255,255,255,.76); max-width: 48ch; margin-bottom: 24px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px; font-size: 14.5px; color: rgba(255,255,255,.88); }
.hero-badges span { display: inline-flex; align-items: center; gap: 7px; }

/* ปุ่มลูกศร — ซ่อนบนมือถือเพราะปัดนิ้วได้อยู่แล้ว และเบียดข้อความบนสไลด์ */
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(20,24,27,.42); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background .2s ease;
}
.hero-arrow:hover { background: rgba(20,24,27,.72); }
.hero-arrow:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hero-prev { left: 14px; }
.hero-next { right: 14px; }
.hero-prev .ico { transform: rotate(180deg); }  /* ไอคอนลูกศรชี้ขวาอยู่แล้ว ปุ่มย้อนกลับจึงกลับด้าน */
@media (min-width: 900px) { .hero-arrow { display: flex; } }

/* จุดบอกตำแหน่งสไลด์ */
.hero-dots {
  position: absolute; left: 0; right: 0; bottom: 16px; z-index: 3;
  display: flex; justify-content: center; gap: 9px;
}
.hero-dots button {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.42);
  transition: width .3s ease, background .3s ease;
}
.hero-dots button[aria-current="true"] { width: 26px; background: #fff; }
.hero-dots button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .hero-track { transition: none; }
  .hero-dots button { transition: none; }
}

/* คลิปในส่วนเกี่ยวกับเรา — คลิปเป็นแนวตั้ง 9:16 ถ้าปล่อยเต็มคอลัมน์จะสูงจนต้องเลื่อนนาน
   จึงล็อกความสูงไว้ที่ 66vh แล้วให้ความกว้างไล่ตามสัดส่วน ไม่ครอปภาพ */
.about-video {
  display: block; width: 100%; height: auto;
  max-width: calc(66vh * 9 / 16); margin-inline: auto;
  border-radius: var(--radius); background: var(--ink);
}

/* แบนเนอร์ที่ลูกค้าออกแบบมา — แสดงเต็มสัดส่วนเดิม ไม่ครอป */
.brand-banner { background: var(--cream-2); padding: 0; }
.brand-banner img { width: 100%; height: auto; }

/* ── การ์ด ── */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease;
}
/* การ์ดสินค้าวางปุ่ม + ทับมุมล่างขวา ลิงก์จึงต้องอยู่ชั้นในไม่ห่อปุ่ม */
.p-card { position: relative; }
.p-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.p-link { text-decoration: none; color: inherit; display: block; }
.p-link:focus-visible { outline: 3px solid var(--teal); outline-offset: -3px; }

/* ── ตารางสินค้า: 2 / 2 / 3 / 4 ตามมาตรฐาน 1Day1Deaw ── */
.grid-products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 768px) { .grid-products { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 1024px) { .grid-products { grid-template-columns: repeat(4, 1fr); gap: 22px; } }

.p-media { aspect-ratio: 1 / 1; background: var(--cream-2); }
.p-media img { width: 100%; height: 100%; object-fit: contain; }
.p-body { padding: 12px 13px 14px; }
.p-cat { font-size: 14px; color: var(--teal); font-weight: 600; margin-bottom: 4px; }
.p-name {
  font-size: 14.5px; font-weight: 600; line-height: 1.45; margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.9em;
}
@media (min-width: 768px) { .p-name { font-size: 15.5px; } }
.p-foot {
  display: flex; align-items: baseline; gap: 4px 8px; flex-wrap: wrap;
  padding-right: 52px;             /* เว้นที่ให้ปุ่ม + ไม่ให้ทับราคา */
  min-height: 44px;
}
.p-price { font-size: 17px; font-weight: 700; }
.p-sold { font-size: 14px; color: var(--muted); }
.p-out { font-size: 14px; font-weight: 600; color: var(--danger); }

/* ปุ่ม + ใส่ตะกร้าจากการ์ดได้เลย ขนาด 44px ตามขั้นต่ำของนิ้วมือ */
.p-add {
  position: absolute; right: 12px; bottom: 12px;
  width: 44px; height: 44px; padding: 0;
  display: grid; place-items: center;
  border: 0; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--teal); color: #fff;
  transition: background .2s ease, transform .15s ease;
}
.p-add:hover { background: var(--teal-2); transform: scale(1.06); }
.p-add:active { transform: scale(.94); }
.p-add:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.p-add[disabled] { background: var(--cream-2); color: var(--muted); cursor: not-allowed; transform: none; }
.p-add .ico { stroke-width: 2.2; }

/* ── แกลเลอรี: 2 / 3 / 3 / 4 ── */
.grid-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 480px) { .grid-gallery { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 1024px) { .grid-gallery { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
/* รูปในแกลเลอรีคงสัดส่วนไฟล์จริง ไม่บังคับให้เท่ากัน ไม่มีกรอบและเงา */
.grid-gallery img { width: 100%; border-radius: var(--radius-sm); }

/* ── ไอคอนจุดเด่น: 2 / 3 / 4 / 4 ── */

/* ── หมวดหมู่ ── */
.grid-cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .grid-cats { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.cat-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  padding: 18px 16px; min-height: 118px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--sand); }
.cat-card .ico { color: var(--teal); }
.cat-card b { font-size: 15px; line-height: 1.4; display: block; }
.cat-card span { font-size: 14px; color: var(--muted); }

/* ── รีวิว ── */
.grid-reviews { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 768px) { .grid-reviews { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.review { padding: 22px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.stars { display: flex; gap: 2px; color: #C99A2E; margin-bottom: 10px; }
.stars .ico { fill: currentColor; }   /* ดาวทึบเต็มดวง ไม่งั้นดูเหมือนยังไม่ได้ให้ดาว */
.review p { font-size: 15.5px; line-height: 1.7; }
.review cite { font-style: normal; font-size: 14px; color: var(--muted); font-weight: 600; }

/* ── แถบส่วนลด / โปรโมชัน ── */
.promo {
  background: var(--ink); color: var(--cream);
  border-radius: var(--radius); padding: 28px 24px;
  display: grid; gap: 18px;
}
@media (min-width: 768px) { .promo { grid-template-columns: 1fr auto; align-items: center; padding: 34px 34px; } }
.promo h2 { color: #fff; margin-bottom: .3em; }
.promo p { color: rgba(251,247,240,.82); margin: 0; }

/* ── ฟอร์ม ── */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; font: inherit;
  font-size: 16px;                 /* ห้ามต่ำกว่า 16px ไม่งั้น iOS จะซูมเอง */
  color: var(--ink); min-height: 48px;
}
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.field-error .input, .field-error .select, .field-error .textarea { border-color: var(--danger); }
.err { display: none; color: var(--danger); font-size: 13.5px; margin-top: 5px; font-weight: 500; }
.field-error .err { display: block; }
.row-2 { display: grid; gap: 0 14px; }
@media (min-width: 640px) { .row-2 { grid-template-columns: 1fr 1fr; } }

.choice {
  display: flex; gap: 12px; align-items: flex-start; padding: 15px 16px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  cursor: pointer; margin-bottom: 10px;
}
.choice:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); }
.choice input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--teal); flex: 0 0 auto; }
.choice b { display: block; font-size: 15.5px; }
.choice span { font-size: 14px; color: var(--muted); }

/* ── แจ้งเตือน ── */
.alert { padding: 14px 16px; border-radius: var(--radius-sm); font-size: 15px; margin-bottom: 16px; border: 1px solid; }
.alert-err  { background: var(--danger-bg); border-color: #E9C6C1; color: var(--danger); }
.alert-ok   { background: var(--ok-bg);     border-color: #C4E0D0; color: var(--ok); }
.alert-warn { background: var(--warn-bg);   border-color: #E9D6AE; color: var(--warn); }
.alert-info { background: var(--teal-soft); border-color: #C3DCDC; color: var(--teal-2); }

/* ── ป้ายสถานะ ── */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px;
  border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.badge-wait { background: var(--warn-bg); color: var(--warn); }
.badge-ok   { background: var(--ok-bg);   color: var(--ok); }
.badge-ship { background: var(--teal-soft); color: var(--teal-2); }
.badge-off  { background: var(--danger-bg); color: var(--danger); }
.badge-new  { background: var(--cream-2); color: var(--muted); }

/* ── ตะกร้า / สรุปยอด ── */
.summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.sum-line { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; font-size: 15.5px; }
.sum-line.total {
  border-top: 1.5px solid var(--ink); margin-top: 10px; padding-top: 14px;
  font-size: 19px; font-weight: 700;
}
.sum-line .neg { color: var(--ok); }

.cart-row { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-row img { width: 84px; height: 84px; object-fit: contain; background: var(--cream-2); border-radius: var(--radius-sm); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.qty button { width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; font-size: 19px; color: var(--ink); }
.qty button:disabled { color: var(--line); cursor: not-allowed; }
.qty input { width: 46px; text-align: center; border: 0; font: inherit; font-size: 16px; padding: 0; background: transparent; }

/* ── หน้าสินค้า ── */
.product-layout { display: grid; gap: 28px; }
@media (min-width: 900px) { .product-layout { grid-template-columns: 1.05fr 1fr; gap: 46px; align-items: start; } }
.gallery-main { aspect-ratio: 1 / 1; background: var(--cream-2); border-radius: var(--radius); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.gallery-thumbs button {
  aspect-ratio: 1/1; padding: 0; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--cream-2); cursor: pointer; overflow: hidden;
}
.gallery-thumbs button[aria-current="true"] { border-color: var(--ink); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.price-big { font-size: clamp(27px, 4vw, 35px); font-weight: 700; }
.desc { white-space: pre-line; font-size: 15.5px; line-height: 1.75; }
.spec { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec th, .spec td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { width: 42%; font-weight: 600; color: var(--muted); }

/* ── ตัวกรอง ── */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip {
  padding: 11px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  font: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer; text-decoration: none; color: inherit;
  min-height: 44px; display: inline-flex; align-items: center;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.searchbar { position: relative; flex: 1 1 240px; min-width: 200px; }
.searchbar .input { padding-left: 42px; }
.searchbar .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* ── ไทม์ไลน์สถานะ ── */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 22px 30px; border-left: 2px solid var(--line); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ''; position: absolute; left: -8px; top: 4px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--line); border: 3px solid var(--cream);
}
.timeline li.done::before { background: var(--teal); }
.timeline b { display: block; font-size: 15.5px; }
.timeline span { font-size: 14px; color: var(--muted); }

/* ── QR / ชำระเงิน ── */
.qr-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; }
.qr-box .qr { width: min(260px, 72vw); margin: 0 auto 14px; }
.pay-amount { font-size: clamp(28px, 6vw, 38px); font-weight: 700; letter-spacing: -.02em; }
.copy-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--cream-2); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 10px; }
.copy-row code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 16px; font-weight: 600; }

/* ── ปุ่มลอยล่างจอ (มือถือ) — ไลน์กับโทรเท่านั้น ── */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.dock a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 56px; background: #fff; text-decoration: none; font-weight: 600; font-size: 15.5px;
}
.dock a.line { background: #06C755; color: #fff; }
@media (min-width: 900px) { .dock { display: none; } }
/* เว้นที่ท้ายหน้าไม่ให้ปุ่มลอยทับเนื้อหา */
body.has-dock { padding-bottom: 56px; }
@media (min-width: 900px) { body.has-dock { padding-bottom: 0; } }

/* ── ส่วนท้าย ── */
.site-footer { background: var(--ink); color: rgba(251,247,240,.76); padding: 48px 0 28px; margin-top: 60px; }
.site-footer a { color: rgba(251,247,240,.76); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 30px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; } }
.site-footer h4 { color: #fff; font-size: 15.5px; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 2px; font-size: 15px; }
/* ลิงก์ในส่วนท้ายต้องแตะได้สะดวกบนมือถือ อย่างน้อย 44px */
.site-footer li a, .site-footer li > span { display: inline-flex; align-items: center; min-height: 44px; }
.footer-bottom {
  border-top: 1px solid rgba(251,247,240,.16); margin-top: 34px; padding-top: 20px;
  font-size: 14px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
}
.social { display: flex; gap: 10px; margin-top: 14px; }
.social a {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(251,247,240,.24);
  display: inline-flex; align-items: center; justify-content: center;
}
.social a:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* ── ตัวช่วยทั่วไป ── */
.stack > * + * { margin-top: 14px; }
.flex { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.between { display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.skeleton { background: linear-gradient(90deg, var(--cream-2) 25%, #EDE5D8 37%, var(--cream-2) 63%);
  background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: var(--radius-sm); }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.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;
}
.skip-link {
  position: absolute; left: 8px; top: 8px; z-index: 100;
  background: var(--ink); color: var(--cream); padding: 12px 18px; border-radius: var(--radius-sm);
  /* ซ่อนแบบไม่ดันความกว้างหน้าเว็บ ต่างจาก left:-9999px ที่ทำให้เลื่อนซ้ายขวาได้ */
  clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap;
}
.skip-link:focus { clip-path: none; width: auto; height: auto; }

/* ── อนิเมชัน: ปรากฏตอนเลื่อนถึง เล่นครั้งเดียว ── */
.reveal { opacity: 0; transform: translateY(20px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
      transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .btn:hover, .p-card:hover, .p-add:hover, .cat-card:hover { transform: none; }
}

@media print {
  .site-header, .site-footer, .dock, .no-print { display: none !important; }
  body { background: #fff; }
}

/* เลย์เอาต์สองคอลัมน์สำหรับส่วนเกี่ยวกับเราและติดต่อ */
@media (min-width: 900px) {
  .about-grid { grid-template-columns: 1fr 1fr; gap: 46px !important; }
}

/* ตะกร้าและ checkout: สองคอลัมน์บนจอใหญ่ */
@media (min-width: 900px) {
  .cart-grid, .checkout-grid { grid-template-columns: 1.5fr 1fr; gap: 40px !important; align-items: start; }
  .checkout-grid .summary { position: sticky; top: calc(var(--header-h) + 18px); }
}
.cart-thumb { width: 84px; height: 84px; background: var(--cream-2); border-radius: var(--radius-sm); }

/* ลิงก์โทร/ไลน์ในการ์ดติดต่อ ต้องแตะได้สะดวกบนมือถือ */
#contact-list a { display: inline-flex; align-items: center; min-height: 44px; }
