/* Angel Fruit — สไตล์กลางของหน้าร้าน */

:root {
  --plum-900: #3B0764;
  --plum-800: #4C1D95;
  --plum:     #5B21B6;
  --plum-600: #7C3AED;
  --plum-300: #C4B5FD;
  --plum-100: #EDE9FE;
  --plum-50:  #F6F3FF;

  --orange:     #F97316;
  --orange-600: #EA580C;
  --orange-100: #FFEDD5;

  --ink:      #2A1B3D;
  --ink-soft: #5C5170;
  --ink-mute: #837A94;

  --cream:  #FFF8F3;
  --paper:  #FFFFFF;
  --line:   #EDE4DC;
  --line-2: #E3D9F2;

  --ok:   #15803D;
  --ok-bg:#DCFCE7;
  --warn: #B45309;
  --warn-bg:#FEF3C7;
  --err:  #B91C1C;
  --err-bg:#FEE2E2;

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(42,27,61,.05), 0 2px 8px rgba(42,27,61,.04);
  --shadow:    0 2px 6px rgba(42,27,61,.06), 0 12px 28px rgba(42,27,61,.07);
  --shadow-lg: 0 6px 16px rgba(42,27,61,.08), 0 24px 56px rgba(42,27,61,.10);

  --wrap: 1200px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "IBM Plex Sans Thai", "Noto Sans Thai", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum); text-decoration: none; }
a:hover { color: var(--plum-600); }

h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(28px, 5.2vw, 52px); }
h2 { font-size: clamp(24px, 3.4vw, 36px); }
h3 { font-size: clamp(18px, 2.2vw, 22px); }
p  { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--plum-600); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
@media (max-width: 480px) { .wrap { width: calc(100% - 24px); } }

.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-tight { padding: clamp(32px, 4.5vw, 56px) 0; }

.eyebrow {
  display: inline-block; font-size: 14px; font-weight: 600; letter-spacing: .06em;
  color: var(--plum-600); text-transform: none; margin-bottom: 10px;
}
.section-head { max-width: 640px; margin-bottom: clamp(24px, 3.5vw, 40px); }
.section-head p { color: var(--ink-soft); margin: 0; }
.lead { font-size: clamp(17px, 2vw, 19px); color: var(--ink-soft); }

/* ---------- ไอคอนเส้น ---------- */
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none;
        stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 28px; height: 28px; }
.icon-sm { width: 16px; height: 16px; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 16px;
  padding: 12px 22px; min-height: 48px;
  border-radius: var(--r-pill); border: 1.5px solid transparent;
  cursor: pointer; text-align: center;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--plum); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--plum-800); color: #fff; box-shadow: var(--shadow); }
.btn-accent { background: var(--orange); color: #fff; box-shadow: var(--shadow-sm); }
.btn-accent:hover { background: var(--orange-600); color: #fff; box-shadow: var(--shadow); }
.btn-ghost { background: var(--paper); color: var(--plum); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--plum-50); color: var(--plum-800); border-color: var(--plum-300); }
.btn-quiet { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn-quiet:hover { background: var(--paper); color: var(--ink); }
.btn-block { width: 100%; }
.btn-lg { font-size: 17px; padding: 15px 30px; min-height: 54px; }
.btn-sm { font-size: 14px; padding: 10px 16px; min-height: 44px; }
.btn:disabled, .btn[aria-disabled="true"] {
  background: #E9E3F2; color: var(--ink-mute); border-color: transparent;
  cursor: not-allowed; transform: none; box-shadow: none;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,248,243,.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); font-size: 18px; min-height: 48px; }
.brand:hover { color: var(--plum); }
.brand img { width: 40px; height: 38px; object-fit: contain; }
.brand-sub { display: block; font-size: 14px; font-weight: 500; color: var(--ink-mute); line-height: 1.4; letter-spacing: .02em; }
/* จอแคบ: ตัดคำโปรยใต้ชื่อออก ไม่งั้นชื่อร้านตกบรรทัดจนหัวเว็บสูงเกิน */
@media (max-width: 620px) { .brand-sub { display: none; } .brand { font-size: 19px; } }

.main-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.main-nav a {
  padding: 9px 14px; border-radius: var(--r-pill); font-size: 15px; font-weight: 500;
  color: var(--ink-soft); transition: background-color .18s ease, color .18s ease;
}
.main-nav a:hover { background: var(--plum-50); color: var(--plum); }
.main-nav a[aria-current="page"] { background: var(--plum-100); color: var(--plum-800); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.cart-btn { position: relative; display: inline-flex; flex: none; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--r-pill); background: var(--plum); color: #fff;
  font-weight: 600; font-size: 15px; border: none; cursor: pointer; min-height: 44px;
  transition: background-color .18s ease, transform .18s ease; }
.cart-btn:hover { background: var(--plum-800); color: #fff; transform: translateY(-1px); }
.cart-count {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: var(--r-pill);
  background: var(--orange); color: #fff; font-size: 14px; font-weight: 700; line-height: 1.4;
  display: inline-flex; align-items: center; justify-content: center;
}
.cart-count:empty, .cart-count[hidden] { display: none; }

.nav-toggle { display: none; flex: none; background: none; border: 1.5px solid var(--line-2); border-radius: var(--r-sm);
  width: 46px; min-width: 46px; height: 46px; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; margin-inline-start: auto; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto; margin: 0; flex-direction: column; gap: 2px;
    background: var(--paper); padding: 12px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .main-nav[hidden] { display: none; }
  .main-nav a { padding: 13px 14px; font-size: 16px; }
  .header-actions { order: 3; }
}

/* ---------- hero ---------- */
.hero { position: relative; width: 100vw; margin-inline: calc(50% - 50vw); overflow: hidden; background: var(--plum-900); }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% center; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(59,7,100,.90) 0%, rgba(76,29,149,.72) 42%, rgba(76,29,149,.15) 78%, rgba(76,29,149,0) 100%);
}
@media (max-width: 760px) {
  .hero::after { background: linear-gradient(180deg, rgba(59,7,100,.86) 0%, rgba(59,7,100,.62) 55%, rgba(59,7,100,.72) 100%); }
  .hero-media img { object-position: 65% center; }
}
.hero-in {
  position: relative; z-index: 2;
  min-height: min(70vh, 560px); display: flex; align-items: center;
  padding: clamp(48px, 8vw, 96px) 0;
}
@media (min-width: 761px) { .hero-in { min-height: min(78vh, 620px); } }
.hero-copy { max-width: 620px; color: #fff; }
.hero-copy .eyebrow { color: var(--plum-300); }
.hero-copy h1 { color: #fff; margin-bottom: .35em; text-wrap: balance; }
.hero-copy p { color: rgba(255,255,255,.88); font-size: clamp(16px, 2vw, 19px); margin-bottom: 1.6em; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; color: rgba(255,255,255,.85); font-size: 14px; line-height: 1.6; }
.hero-trust .icon { width: 17px; height: 17px; color: var(--plum-300); }

/* ---------- แถบจุดเด่น ---------- */
.feature-row { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .feature-row { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.feature {
  background: var(--paper); border-radius: var(--r); padding: 22px 20px;
  border: 1px solid var(--line); transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .icon-lg { color: var(--plum-600); margin-bottom: 12px; }
.feature h3 { font-size: 16px; margin-bottom: 4px; }
.feature p { font-size: 14px; color: var(--ink-soft); margin: 0; line-height: 1.6; }

/* ---------- หมวดหมู่ ---------- */
.cat-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1024px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
.cat-card { display: block; color: inherit; transition: transform .2s ease; }
.cat-card:hover { transform: translateY(-3px); color: inherit; }
.cat-card-media { border-radius: var(--r); overflow: hidden; background: var(--plum-50); aspect-ratio: 1/1; }
.cat-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.cat-card:hover .cat-card-media img { transform: scale(1.04); }
.cat-card h3 { font-size: 15px; margin: 12px 0 2px; }
.cat-card p { font-size: 14px; color: var(--ink-mute); margin: 0; line-height: 1.5; }

/* ---------- ตะแกรงสินค้า (masonry — คงสัดส่วนรูปจริง ไม่ครอป) ---------- */
.product-grid {
  display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start;
}
@media (min-width: 768px) { .product-grid { gap: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.product-card {
  display: block; color: inherit;
  border-radius: var(--r); padding: 8px; background: transparent;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
@media (min-width: 768px) { .product-card { padding: 10px; } }
.product-card:hover { transform: translateY(-3px); background: var(--paper); box-shadow: var(--shadow); color: inherit; }
.product-card-media { position: relative; border-radius: var(--r-sm); overflow: hidden; background: var(--plum-50); }
.product-card-media img { width: 100%; height: auto; }
.product-card h3 { font-size: 15px; margin: 12px 0 2px; line-height: 1.45; }
@media (min-width: 768px) { .product-card h3 { font-size: 16px; } }
.product-card .cat-tag { font-size: 14px; color: var(--ink-mute); line-height: 1.5; }
.product-price { font-weight: 700; color: var(--plum-800); font-size: 16px; margin-top: 6px; }
.product-price .unit { font-weight: 500; font-size: 14px; color: var(--ink-mute); }

.badge {
  position: absolute; top: 8px; inset-inline-start: 8px; z-index: 2;
  background: var(--orange); color: #fff; font-size: 14px; font-weight: 700;
  padding: 3px 12px; line-height: 1.5; border-radius: var(--r-pill); letter-spacing: .01em;
}
.badge-out { background: var(--ink-soft); }

/* ---------- ตัวกรอง ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 24px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chip {
  flex: none; padding: 10px 16px; min-height: 44px; display: inline-flex; align-items: center; border-radius: var(--r-pill); font-size: 14px; font-weight: 500;
  background: var(--paper); border: 1.5px solid var(--line); color: var(--ink-soft); white-space: nowrap;
  transition: all .18s ease;
}
.chip:hover { border-color: var(--plum-300); color: var(--plum); }
.chip[aria-current="true"] { background: var(--plum); border-color: var(--plum); color: #fff; font-weight: 600; }

/* ---------- ฟอร์ม ---------- */
.field { margin-bottom: 16px; }
.field > label, .label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.req { color: var(--err); }
.hint { font-size: 14px; color: var(--ink-mute); margin-top: 5px; line-height: 1.55; }
input[type=radio], input[type=checkbox], input[type=hidden] { font-size: 16px; }
input[type=text], input[type=tel], input[type=email], input[type=number],
input[type=password], input[type=date], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 16px; /* ห้ามต่ำกว่า 16px ไม่งั้น iOS ซูม */
  padding: 12px 14px; min-height: 48px;
  border: 1.5px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--paper); color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C5170' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
  padding-inline-end: 40px;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--plum-600); box-shadow: 0 0 0 3px var(--plum-100);
}
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--err); }
.field-error { font-size: 14px; color: var(--err); margin-top: 5px; display: block; line-height: 1.55; }
.field-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .field-row-2 { grid-template-columns: 1fr 1fr; } .field-row-3 { grid-template-columns: 1fr 1fr 1fr; } }

.radio-cards { display: grid; gap: 10px; }
.radio-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px;
  border: 1.5px solid var(--line-2); border-radius: var(--r); background: var(--paper); cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}
.radio-card:hover { border-color: var(--plum-300); }
.radio-card:has(input:checked) { border-color: var(--plum); background: var(--plum-50); }
.radio-card { position: relative; }
.radio-card input[type=radio] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: pointer; appearance: none; z-index: 1;
}
.radio-card .r-dot {
  margin-top: 3px; width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 2px solid var(--line-2); background: var(--paper);
  transition: border-color .18s ease;
}
.radio-card:has(input:checked) .r-dot { border-color: var(--plum); border-width: 7px; }
.radio-card:has(input:focus-visible) { outline: 3px solid var(--plum-600); outline-offset: 2px; }
.radio-card input[type=checkbox] { width: 24px; height: 24px; min-height: 24px; accent-color: var(--plum); flex: none; margin-top: 2px; }
.radio-card strong { display: block; font-size: 15px; }
.radio-card span { font-size: 14px; color: var(--ink-soft); line-height: 1.55; }

/* ---------- การ์ด/กล่อง ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 28px); }
.card-tight { padding: 18px; border-radius: var(--r); }
.panel { background: var(--plum-50); border-radius: var(--r); padding: 18px; }

.note { display: flex; gap: 10px; padding: 14px 16px; border-radius: var(--r-sm); font-size: 14px; line-height: 1.6; }
.note .icon { margin-top: 2px; }
.note-info { background: var(--plum-50); color: var(--plum-800); }
.note-ok   { background: var(--ok-bg);   color: var(--ok); }
.note-warn { background: var(--warn-bg); color: var(--warn); }
.note-err  { background: var(--err-bg);  color: var(--err); }

/* ---------- ตะกร้า / สรุปยอด ---------- */
.summary-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; font-size: 15px; }
.summary-row dt { color: var(--ink-soft); margin: 0; }
.summary-row dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 500; }
.summary-row.is-discount dd { color: var(--ok); }
.summary-total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  border-top: 1.5px solid var(--line); margin-top: 8px; padding-top: 14px;
}
.summary-total dt { font-weight: 700; font-size: 17px; margin: 0; }
.summary-total dd { font-weight: 700; font-size: 24px; color: var(--plum-800); margin: 0; font-variant-numeric: tabular-nums; }

.line-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line-item:last-child { border-bottom: 0; }
.line-item-media { border-radius: var(--r-sm); overflow: hidden; background: var(--plum-50); aspect-ratio: 1/1; }
.line-item-media img { width: 100%; height: 100%; object-fit: cover; }
.line-item h4 { font-size: 15px; margin: 0 0 2px; line-height: 1.45; }
.line-item .variant { font-size: 14px; color: var(--ink-mute); line-height: 1.55; }
.line-item-price { text-align: end; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line-2); border-radius: var(--r-pill); background: var(--paper); }
.qty button {
  width: 44px; height: 44px; border: 0; background: none; color: var(--plum); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-pill);
}
.qty button:hover { background: var(--plum-50); }
.qty button:disabled { color: var(--ink-mute); cursor: not-allowed; background: none; }
.qty input {
  width: 46px; min-height: 44px; text-align: center; border: 0; background: none; padding: 0;
  font-weight: 600; font-size: 16px; -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- หน้าสินค้า ---------- */
.product-layout { display: grid; gap: clamp(24px, 4vw, 48px); }
/* ช่องของ grid ต้องยอมหดได้ ไม่งั้นแถบรูปย่อยาวๆ จะดันหน้าเว็บจนเลื่อนซ้าย-ขวาได้ */
.product-layout > * { min-width: 0; }
@media (min-width: 900px) { .product-layout { grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); align-items: start; } }
.gallery-main { border-radius: var(--r-lg); overflow: hidden; background: var(--plum-50); }
.gallery-main img { width: 100%; height: auto; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; max-width: 100%; }
.gallery-thumbs button {
  flex: none; width: 68px; height: 68px; padding: 0; border-radius: var(--r-sm); overflow: hidden;
  border: 2px solid transparent; background: var(--plum-50); cursor: pointer;
}
.gallery-thumbs button[aria-current="true"] { border-color: var(--plum); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 900px) { .product-buy { position: sticky; top: calc(var(--header-h) + 20px); } }
.price-now { font-size: clamp(28px, 4vw, 36px); font-weight: 700; color: var(--plum-800); line-height: 1.4; }
.variant-list { display: grid; gap: 8px; margin: 4px 0 20px; }
.variant-opt {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer;
  border: 1.5px solid var(--line-2); border-radius: var(--r); background: var(--paper);
  transition: border-color .18s ease, background-color .18s ease;
}
.variant-opt:hover { border-color: var(--plum-300); }
.variant-opt:has(input:checked) { border-color: var(--plum); background: var(--plum-50); }
.variant-opt { position: relative; }
.variant-opt input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: pointer; appearance: none; z-index: 1;
}
.variant-opt .v-dot {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 2px solid var(--line-2); background: var(--paper); position: relative;
  transition: border-color .18s ease;
}
.variant-opt:has(input:checked) .v-dot { border-color: var(--plum); border-width: 7px; }
.variant-opt:has(input:focus-visible) { outline: 3px solid var(--plum-600); outline-offset: 2px; }
.variant-opt.is-out .v-dot { border-color: var(--line); background: #F1EDF7; }
.variant-opt .v-name { font-weight: 600; flex: 1; }
.variant-opt .v-price { font-weight: 700; color: var(--plum-800); font-variant-numeric: tabular-nums; }
.variant-opt .v-stock { font-size: 14px; color: var(--ink-mute); display: block; font-weight: 400; line-height: 1.5; }
.variant-opt.is-out { opacity: .55; }
.variant-opt.is-out .v-stock { color: var(--err); }

.detail-body { white-space: pre-line; color: var(--ink-soft); line-height: 1.8; }

/* ---------- ไทม์ไลน์สถานะ ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 22px 30px; }
.timeline li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 5px; width: 13px; height: 13px;
  border-radius: 50%; background: var(--paper); border: 2.5px solid var(--plum-300);
}
.timeline li::after {
  content: ""; position: absolute; inset-inline-start: 6px; top: 20px; bottom: 0; width: 2px; background: var(--line-2);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline li.is-done::before { background: var(--plum); border-color: var(--plum); }
.timeline li.is-current::before { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-100); }
.timeline strong { display: block; font-size: 15px; }
.timeline time, .timeline .who { font-size: 14px; color: var(--ink-mute); line-height: 1.55; }

.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; }
.st-pending_payment { background: var(--warn-bg); color: var(--warn); }
.st-pending_review  { background: #DBEAFE; color: #1D4ED8; }
.st-paid            { background: var(--ok-bg); color: var(--ok); }
.st-packing         { background: var(--plum-100); color: var(--plum-800); }
.st-shipped         { background: var(--plum-100); color: var(--plum-800); }
.st-done            { background: var(--ok-bg); color: var(--ok); }
.st-cancelled       { background: #F1EDF7; color: var(--ink-soft); }
.st-refunded        { background: var(--err-bg); color: var(--err); }

/* ---------- QR / ชำระเงิน ---------- */
.pay-grid { display: grid; gap: 24px; }
@media (min-width: 860px) { .pay-grid { grid-template-columns: 320px 1fr; align-items: start; } }
.qr-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; text-align: center; }
.qr-box svg, .qr-box img { width: 100%; max-width: 260px; height: auto; margin-inline: auto; border-radius: var(--r-sm); }
.pay-amount { font-size: clamp(30px, 5vw, 40px); font-weight: 700; color: var(--plum-800); line-height: 1.4; font-variant-numeric: tabular-nums; }
.bank-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.bank-row:last-child { border-bottom: 0; }
.bank-row .acc { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 17px; letter-spacing: .02em; }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 600; min-height: 44px;
  background: var(--plum-50); color: var(--plum); border: 0; border-radius: var(--r-pill);
  padding: 8px 14px; min-height: 40px; cursor: pointer; transition: background-color .18s ease; }
.copy-btn:hover { background: var(--plum-100); }

.dropzone {
  border: 2px dashed var(--plum-300); border-radius: var(--r); background: var(--plum-50);
  padding: 28px 20px; text-align: center; cursor: pointer; transition: background-color .18s ease, border-color .18s ease;
}
.dropzone:hover, .dropzone.is-over { background: var(--plum-100); border-color: var(--plum); }
.dropzone .icon-lg { color: var(--plum-600); margin-bottom: 8px; }
.slip-preview { margin-top: 14px; border-radius: var(--r); overflow: hidden; background: var(--paper); }
.slip-preview img { width: 100%; max-height: 380px; object-fit: contain; }

/* ---------- footer ---------- */
.site-footer { background: var(--plum-900); color: rgba(255,255,255,.78); padding: clamp(40px, 6vw, 64px) 0 100px; margin-top: clamp(48px, 7vw, 88px); }
@media (min-width: 768px) { .site-footer { padding-bottom: 40px; } }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; } }
.site-footer h3 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer a { color: rgba(255,255,255,.78); }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; font-size: 15px; }
.footer-links a { display: flex; align-items: center; min-height: 44px; }
.footer-contact { display: grid; gap: 2px; font-size: 15px; }
.footer-contact a, .footer-contact > span { display: flex; align-items: flex-start; gap: 9px; min-height: 44px; padding-block: 10px; }
.footer-contact .icon { flex: none; }
.footer-contact .icon { margin-top: 3px; color: var(--plum-300); }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); font-size: 14px; color: rgba(255,255,255,.7); line-height: 1.6; }

/* ---------- ปุ่มลอยบนมือถือ ---------- */
.mobile-bar {
  position: fixed; inset-inline: 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);
}
.mobile-bar a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; max-height: 60px; background: var(--paper); font-weight: 600; font-size: 15px; color: var(--ink);
}
.mobile-bar a.is-line { background: #06C755; color: #fff; }
.mobile-bar a.is-call { background: var(--plum); color: #fff; }
@media (min-width: 768px) { .mobile-bar { display: none; } }
body.has-mobile-bar { padding-bottom: 0; }

/* ---------- อนิเมชันตอนเลื่อนถึง ---------- */
.reveal { opacity: 0; transform: translateY(20px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-in { opacity: 1; transform: none; transition: none; }
  .btn:hover, .product-card:hover, .feature:hover, .cat-card:hover { transform: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 767px) {
  .hint a, .lead a, p a, td a, li a, .detail-body a, .panel a {
    display: inline-block; padding-block: 12px; margin-block: -12px; min-height: 46px;
  }
}


/* ---------- แถบโปรโมชั่นหน้าแรก ---------- */
.promo-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .promo-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
.promo-card {
  position: relative; background: var(--paper); border: 1.5px solid var(--line-2);
  border-radius: var(--r); padding: 22px 20px 20px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.promo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--plum-300); }
.promo-tag {
  display: inline-block; background: var(--orange-100); color: var(--orange-600);
  font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: var(--r-pill); margin-bottom: 10px;
}
.promo-card h3 { font-size: 19px; margin: 0 0 4px; color: var(--plum-800); }
.promo-card p { color: var(--ink-soft); margin: 0 0 14px; font-size: 15px; }
.promo-card .copy-btn { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* ---------- อื่นๆ ---------- */
.visually-hidden {
  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; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--plum); color: #fff; padding: 10px 18px; border-radius: 0 0 var(--r-sm) var(--r-sm);
  transition: top .2s ease;
}
.skip-link:focus { top: 0; color: #fff; }
.breadcrumb { font-size: 14px; color: var(--ink-mute); margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 2px; }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--plum); }
.empty-state { text-align: center; padding: clamp(40px, 8vw, 80px) 20px; }
.empty-state .icon-lg { color: var(--plum-300); width: 48px; height: 48px; margin-inline: auto; margin-bottom: 16px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data th, table.data td { text-align: start; padding: 12px 14px; border-bottom: 1px solid var(--line); }
table.data th { font-weight: 600; color: var(--ink-soft); font-size: 14px; line-height: 1.5; white-space: nowrap; background: var(--plum-50); }
table.data td.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.about-gallery { display: grid; gap: 12px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 700px) { .about-gallery { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.about-gallery img { width: 100%; height: auto; }
.video-block { border-radius: var(--r-lg); overflow: hidden; background: #000; max-width: 560px; margin-inline: auto; }
.video-block video { width: 100%; height: auto; display: block; }
.spinner {
  width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; inset-inline: 16px; bottom: 76px; z-index: 90; margin-inline: auto; max-width: 420px;
  background: var(--ink); color: #fff; padding: 14px 18px; border-radius: var(--r);
  box-shadow: var(--shadow-lg); font-size: 15px; display: flex; align-items: center; gap: 10px;
}
@media (min-width: 768px) { .toast { bottom: 24px; } }
.toast[hidden] { display: none; }
