/* ==========================================================================
   OVERSOULZ — Premium Streetwear Theme
   ========================================================================== */

/* Anton = หัวเรื่องละติน (ไม่มีสระไทย) → ไทยตกไปใช้ Kanit ซึ่งเป็นฟอนต์ display ไทยจริง ๆ */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Kanit:wght@500;600;700&family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+Thai:wght@300;400;500;600;700&display=swap');

:root {
  /* Black + Off-White + Orange Glow */
  --ink:        #0b0b0b;  /* Obsidian Black — พื้นหลังหลัก */
  --ink-2:      #101010;
  --surface:    #171717;  /* Dark Gray — การ์ด / สินค้า */
  --surface-2:  #1f1f1f;
  --line:       rgba(242,239,232,.10);
  --line-strong:rgba(242,239,232,.20);
  --text:       #f2efe8;  /* Bone White — ตัวหนังสือหลัก */
  --muted:      #777777;  /* Ash Gray — ข้อความรอง */
  --dim:        #5c5c5c;
  --accent:     #ff6a00;  /* Soul Orange — ปุ่ม / highlight / glow */
  --accent-soft:#ff9e3d;
  --accent-2:   #ff3b30;
  --accent-3:   #c24a00;
  --on-accent:  #0b0b0b;  /* ตัวหนังสือบนพื้นส้ม */
  --ok:         #35d07f;
  --warn:       #ffb020;

  --radius:     18px;
  --radius-sm:  10px;
  --shadow:     0 30px 80px -30px rgba(0,0,0,.9);
  --glow:       0 0 0 1px rgba(255,106,0,.30), 0 20px 60px -20px rgba(255,106,0,.45);

  --font:       'Inter', 'Noto Sans Thai', system-ui, -apple-system, sans-serif;
  --display:    'Anton', 'Kanit', 'Noto Sans Thai', sans-serif;

  --ease:       cubic-bezier(.16,1,.3,1);
  --ease-io:    cubic-bezier(.65,0,.35,1);
  --maxw:       1280px;
}

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

/*
 * attribute hidden ของ HTML ตั้ง display:none มาจาก UA stylesheet ซึ่งมี specificity ต่ำมาก
 * คลาสใด ๆ ที่กำหนด display (เช่น .cookie-bar หรือ .stat-grid) จะทับจนซ่อนไม่อยู่
 */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ambient background */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(900px 600px at 12% -5%, rgba(255,106,0,.07), transparent 62%),
    radial-gradient(800px 500px at 92% 8%, rgba(255,106,0,.06), transparent 62%),
    radial-gradient(700px 700px at 50% 105%, rgba(255,106,0,.04), transparent 62%);
  pointer-events: none; z-index: 0;
}
/* film grain */
body::after {
  content: '';
  position: fixed; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: .035; pointer-events: none; z-index: 1;
  animation: grain 8s steps(6) infinite;
}
@keyframes grain {
  0%,100%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)}
  40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-2%)} 80%{transform:translate(3%,3%)}
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/*
 * กันช่องกรอกที่ลืมใส่คลาส .input กลายเป็น "ตัวหนังสือขาวบนพื้นขาว"
 * (color: inherit ด้านบนทำให้สืบทอดสีขาวกระดูกมา แต่พื้นหลังยังเป็นค่า default ของเบราว์เซอร์)
 * ตั้งพื้นหลังเข้มเป็นค่าเริ่มต้นไว้ก่อน ส่วนที่มีสไตล์เฉพาะจะเขียนทับได้ตามปกติ
 */
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color])),
:where(select), :where(textarea) { background-color: var(--surface); }

::selection { background: var(--accent); color: var(--on-accent); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-2); }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 99px; border: 2px solid var(--ink); }
::-webkit-scrollbar-thumb:hover { background: #3d3d3d; }

/* ---------- layout ---------- */
.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; position: relative; z-index: 2; }
.section { padding: 110px 0; position: relative; z-index: 2; }
.section-sm { padding: 64px 0; }
.grid { display: grid; gap: 24px; }
/*
 * ค่าเริ่มต้นของ grid item คือ min-width:auto ทำให้ track แบบ fr ย่อไม่ได้
 * ต่ำกว่าความกว้างขั้นต่ำของเนื้อหาข้างใน (เช่น ตารางที่ตั้ง min-width ไว้)
 * ผลคือคอลัมน์รวมกันเกินกรอบแล้วล้นออกนอกจอ
 */
.grid > *, .cart-layout > *, .admin-split > * { min-width: 0; }

/* สองคอลัมน์ในหลังบ้าน — ยุบเป็นคอลัมน์เดียวเมื่อพื้นที่ไม่พอ */
.admin-split {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 1180px) {
  .admin-split { grid-template-columns: minmax(0, 1fr); }
}
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- typography ---------- */
/*
 * ค่าเริ่มต้นของ .display ตั้งให้ "ปลอดภัยกับภาษาไทย" เพราะหัวเรื่องส่วนใหญ่ในเว็บเป็นไทย
 *  - line-height ต้องมีที่ให้สระบน (ิ ี ้ ๊) และสระล่าง (ุ ู) ไม่ชนบรรทัดบน
 *  - letter-spacing ติดลบทำให้พยัญชนะไทยเบียดกันจนอ่านยาก จึงตั้งเป็น 0
 *  - font-weight 600 เพื่อให้ Kanit (ไทย) หนาสมกับเป็นหัวเรื่อง
 *    ส่วน Anton มีน้ำหนักเดียว (400) จึงใส่ font-synthesis: none กันเบราว์เซอร์ปลอมตัวหนา
 */
.display {
  font-family: var(--display);
  font-weight: 600;
  font-synthesis: none;
  line-height: 1.12;
  letter-spacing: 0;
  text-transform: uppercase;
  margin: 0;
}
h1.display { font-size: clamp(2.6rem, 8vw, 7.5rem); }
h2.display { font-size: clamp(1.9rem, 5vw, 4rem); }
h3.display { font-size: clamp(1.35rem, 2.8vw, 2.1rem); }

/* หัวเรื่องที่เป็นภาษาอังกฤษล้วน ใช้เมตริกแน่น ๆ แบบ Anton ได้เต็มที่ */
.display.en {
  font-weight: 400;
  line-height: .92;
  letter-spacing: -.02em;
}
.display.en.h1, h1.display.en { font-size: clamp(2.8rem, 9vw, 8.5rem); }

.eyebrow {
  font-size: .72rem; letter-spacing: .34em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin: 0 0 18px;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ''; width: 30px; height: 1px; background: currentColor; opacity: .6; }

.lead { color: var(--muted); font-size: 1.05rem; max-width: 60ch; }
.muted { color: var(--muted); }
.dim { color: var(--dim); font-size: .85rem; }

.outline-text {
  -webkit-text-stroke: 1.5px rgba(242,239,232,.35);
  color: transparent;
}
.accent { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--accent); --btn-fg: var(--on-accent);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 30px; border: 0; border-radius: 99px; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 700; font-size: .86rem; letter-spacing: .04em; text-transform: uppercase;
  overflow: hidden; isolation: isolate; white-space: nowrap;
  /*
   * แยกหน้าที่กัน: transform = ยกขึ้น/กดยุบ (hover, active)
   *                translate = เอฟเฟกต์แม่เหล็กตามเมาส์ (สั่งจาก JS)
   * ถ้าใช้ transform ทั้งคู่ inline style จะทับ CSS จนปุ่มกระตุก
   */
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), color .3s,
              translate var(--magnet-speed, .5s) var(--ease);
}
/* ระหว่างเมาส์อยู่บนปุ่ม ให้ขยับตามทันที ไม่ต้องหน่วง ไม่งั้นจะวิ่งไล่เมาส์จนดูสั่น */
[data-magnetic].magnet-on { --magnet-speed: .06s; }
.btn::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: #fff; transform: translateY(101%); border-radius: 50% 50% 0 0;
  transition: transform .55s var(--ease), border-radius .55s var(--ease);
}
.btn:hover { transform: translateY(-3px); box-shadow: var(--glow); }
.btn:hover::after { transform: translateY(0); border-radius: 0; }
.btn:active { transform: translateY(-1px) scale(.985); }
.btn:disabled { opacity: .45; pointer-events: none; }

.btn-ghost { --btn-bg: transparent; --btn-fg: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost::after { background: var(--text); }
.btn-ghost:hover { color: var(--on-accent); box-shadow: inset 0 0 0 1px var(--text); }
.btn-dark  { --btn-bg: #1f1f1f; --btn-fg: var(--text); }
.btn-dark::after { background: var(--accent); }
.btn-dark:hover { color: var(--on-accent); }
.btn-danger { --btn-bg: var(--accent-2); --btn-fg: #fff; }
.btn-sm { padding: 10px 20px; font-size: .72rem; }
.btn-block { width: 100%; }

/* ---------- announcement + header ---------- */
.announce {
  background: var(--accent); color: var(--on-accent); font-size: .76rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; padding: 9px 0; overflow: hidden;
  position: relative; z-index: 60;
}
.announce-track { display: flex; gap: 60px; width: max-content; animation: slide-left 26s linear infinite; }
.announce span { white-space: nowrap; }
@keyframes slide-left { to { transform: translateX(-50%); } }

.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color .4s;
}
/*
 * สำคัญ: วาง backdrop-filter ไว้บน ::before ไม่ใช่บนตัว .site-header
 * เพราะ backdrop-filter/filter/transform บน element ใด จะทำให้ element นั้น
 * กลายเป็น containing block ของลูกที่เป็น position:fixed
 * → เมนูมือถือ (.nav-links) จะยึดกับ header แทน viewport แล้วซ่อนไม่พ้นจอ
 */
.site-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: rgba(11,11,11,.62);
  backdrop-filter: blur(20px) saturate(160%);
  transition: background .4s var(--ease);
}
.site-header.scrolled::before { background: rgba(11,11,11,.92); }
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 20px; }

.logo {
  font-family: var(--display); font-size: 1.55rem; letter-spacing: .04em;
  text-transform: uppercase; display: inline-block; white-space: nowrap;
  line-height: 1;
}
/* SOUL — ส้มทั้งคำ พร้อมไฟลุกเรือง ๆ */
.logo b {
  color: var(--accent); font-weight: inherit;
  text-shadow:
    0 0 7px  rgba(255,106,0,.55),
    0 0 20px rgba(255,106,0,.35),
    0 0 44px rgba(255,138,20,.20);
  animation: soul-burn 4.5s ease-in-out infinite;
  transition: color .4s var(--ease), text-shadow .4s var(--ease);
}
/* เข้าใกล้แล้วไฟแรงขึ้น */
.logo:hover b {
  color: #ff8b2b;
  text-shadow:
    0 0 10px rgba(255,106,0,.80),
    0 0 28px rgba(255,106,0,.55),
    0 0 60px rgba(255,158,61,.38),
    0 0 96px rgba(255,106,0,.22);
}
/* ไฟหายใจช้า ๆ แทรกวูบสั้น ๆ ให้เหมือนเปลวจริง */
@keyframes soul-burn {
  0%, 100% { text-shadow: 0 0 7px rgba(255,106,0,.55), 0 0 20px rgba(255,106,0,.35), 0 0 44px rgba(255,138,20,.20); }
  28%      { text-shadow: 0 0 9px rgba(255,106,0,.72), 0 0 26px rgba(255,106,0,.46), 0 0 56px rgba(255,158,61,.28); }
  34%      { text-shadow: 0 0 6px rgba(255,106,0,.48), 0 0 16px rgba(255,106,0,.28), 0 0 38px rgba(255,138,20,.16); }
  62%      { text-shadow: 0 0 10px rgba(255,106,0,.78), 0 0 30px rgba(255,106,0,.50), 0 0 62px rgba(255,158,61,.30); }
  68%      { text-shadow: 0 0 7px rgba(255,106,0,.52), 0 0 19px rgba(255,106,0,.32), 0 0 42px rgba(255,138,20,.18); }
}
.tagline {
  font-size: .68rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--accent); margin: 8px 0 0; font-weight: 600;
}

.nav-links { display: flex; gap: 34px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  position: relative; font-size: .8rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  transition: color .3s; padding: 6px 0;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); transform-origin: left; }

/* z-index สูงกว่าโอเวอร์เลย์เมนู (40) เพื่อให้ยังกดปุ่มปิดเมนูได้ตอนเมนูเปิดอยู่ */
.nav-actions { display: flex; align-items: center; gap: 8px; position: relative; z-index: 41; }
.icon-btn {
  position: relative; width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 50%; background: transparent; border: 1px solid var(--line);
  cursor: pointer; transition: all .35s var(--ease);
}
.icon-btn:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); transform: translateY(-2px) rotate(-6deg); }
.cart-badge {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--accent-2); color: #fff; border-radius: 99px;
  font-size: .66rem; font-weight: 800; display: grid; place-items: center;
  border: 2px solid var(--ink);
}
.cart-badge.pop { animation: pop .5s var(--ease); }
@keyframes pop { 0%{transform:scale(1)} 40%{transform:scale(1.6)} 100%{transform:scale(1)} }

.burger { display: none; }
.burger .ico-close { display: none; }
.burger.open .ico-menu { display: none; }
.burger.open .ico-close { display: block; }
.burger.open { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Admin โผล่ในเมนูเฉพาะจอเล็ก (จอใหญ่ใช้ปุ่มบน header แทน) */
.nav-admin { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; padding: 90px 0 60px; overflow: hidden; }
.hero-inner { position: relative; z-index: 3; }
.hero h1 { margin-bottom: 22px; }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: block; animation: rise 1.1s var(--ease) backwards; }
.hero h1 .line:nth-child(2) > span { animation-delay: .12s; }
.hero h1 .line:nth-child(3) > span { animation-delay: .24s; }
@keyframes rise { from { transform: translateY(105%) rotate(4deg); } to { transform: translateY(0) rotate(0); } }

.hero-sub { animation: fade-up 1s var(--ease) .45s backwards; }
.hero-cta { animation: fade-up 1s var(--ease) .6s backwards; margin-top: 34px; }
@keyframes fade-up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

.hero-blob {
  position: absolute; right: -6%; top: 50%; translate: 0 -50%;
  width: min(46vw, 620px); aspect-ratio: 1;
  background: conic-gradient(from 0deg, var(--accent-3), rgba(255,158,61,.55), var(--accent-3));
  filter: blur(110px); opacity: .16; border-radius: 45% 55% 52% 48%;
  animation: morph 16s ease-in-out infinite, spin 40s linear infinite;
}
@keyframes morph {
  0%,100% { border-radius: 45% 55% 52% 48%; }
  33% { border-radius: 62% 38% 40% 60%; }
  66% { border-radius: 38% 62% 65% 35%; }
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero-stats { display: flex; gap: 52px; margin-top: 64px; flex-wrap: wrap; animation: fade-up 1s var(--ease) .8s backwards; }
.hero-stats .num { font-family: var(--display); font-size: 2.4rem; line-height: 1; }
.hero-stats .lbl { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); margin-top: 6px; }

.scroll-hint {
  position: absolute; bottom: 34px; left: 50%; translate: -50% 0; z-index: 4;
  font-size: .66rem; letter-spacing: .3em; text-transform: uppercase; color: var(--dim);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-hint i { width: 1px; height: 44px; background: linear-gradient(var(--accent), transparent); animation: drop 1.8s ease-in-out infinite; }
@keyframes drop { 0%{transform:scaleY(0);transform-origin:top} 50%{transform:scaleY(1);transform-origin:top} 51%{transform-origin:bottom} 100%{transform:scaleY(0);transform-origin:bottom} }

/* ---------- marquee ---------- */
.marquee {
  border-block: 1px solid var(--line); padding: 22px 0; overflow: hidden;
  background: linear-gradient(90deg, transparent, rgba(242,239,232,.02), transparent);
  position: relative; z-index: 2;
}
.marquee-track { display: flex; gap: 46px; width: max-content; animation: slide-left 30s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--display); font-size: clamp(1.6rem, 3.6vw, 3rem);
  text-transform: uppercase; white-space: nowrap; color: transparent;
  -webkit-text-stroke: 1px rgba(242,239,232,.28);
  transition: color .4s, -webkit-text-stroke-color .4s;
}
.marquee-track span:hover { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.marquee-track i { color: var(--accent); font-style: normal; font-size: 1.4rem; align-self: center; }

/* ---------- product card ---------- */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 28px; }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .6s var(--ease), border-color .5s, box-shadow .6s var(--ease);
}
.card:hover { transform: translateY(-10px); border-color: var(--line-strong); box-shadow: var(--shadow); }

.card-media {
  position: relative; aspect-ratio: 4/5; overflow: hidden; background: var(--surface-2);
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease), filter .6s;
}
.card:hover .card-media img { transform: scale(1.09); filter: brightness(.78); }
.card-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11,11,11,.88), transparent 55%);
  opacity: 0; transition: opacity .5s;
}
.card:hover .card-media::after { opacity: 1; }

.card-quick {
  position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 3;
  transform: translateY(140%); opacity: 0;
  transition: transform .55s var(--ease), opacity .4s;
}
.card:hover .card-quick { transform: translateY(0); opacity: 1; }

.badge {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  background: var(--accent); color: var(--on-accent); padding: 5px 12px; border-radius: 99px;
  font-size: .64rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}
.badge.sale { background: var(--accent-2); color: #fff; }
.badge.out  { background: #2a2a2a; color: var(--muted); }
.badge.right { left: auto; right: 14px; }

.card-body { padding: 20px; }
.card-cat { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.card-title { font-size: 1rem; font-weight: 700; margin: 8px 0 12px; letter-spacing: .01em; }
.card-title a { background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 1px;
  background-position: 0 100%; background-repeat: no-repeat; transition: background-size .45s var(--ease); }
.card:hover .card-title a { background-size: 100% 1px; }
.price { font-weight: 800; font-size: 1.05rem; letter-spacing: .01em; }
.price del { color: var(--dim); font-weight: 400; font-size: .85rem; margin-left: 8px; }

/* ---------- scroll reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(38px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal="left"]  { transform: translateX(-46px); }
[data-reveal="right"] { transform: translateX(46px); }
[data-reveal="zoom"]  { transform: scale(.92); }
[data-reveal].in { transform: none; }

.stagger > * { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(1){transition-delay:.05s} .stagger.in > *:nth-child(2){transition-delay:.12s}
.stagger.in > *:nth-child(3){transition-delay:.19s} .stagger.in > *:nth-child(4){transition-delay:.26s}
.stagger.in > *:nth-child(5){transition-delay:.33s} .stagger.in > *:nth-child(6){transition-delay:.40s}
.stagger.in > *:nth-child(7){transition-delay:.47s} .stagger.in > *:nth-child(8){transition-delay:.54s}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal], .stagger > * { opacity: 1 !important; transform: none !important; }
}

/* ---------- prose (ย่อหน้าอ่านยาว ปรับมาเพื่อภาษาไทยโดยเฉพาะ) ---------- */
.prose {
  /*
   * ภาษาไทยไม่มีช่องว่างระหว่างคำ ตาจึงหาจุดพักยากกว่าภาษาอังกฤษ
   * ความกว้างบรรทัดจึงต้องสั้นกว่าปกติ และระยะบรรทัดต้องห่างกว่าปกติ
   */
  max-width: 38em;
  margin: 40px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 2;            /* ไทยมีสระบน–ล่าง ต้องการที่หายใจมากกว่าละติน */
  text-wrap: pretty;         /* กันคำโดดเดี่ยวค้างท้ายย่อหน้า */
  overflow-wrap: normal;
  hyphens: none;
}

/*
 * .nb = วลีที่ห้ามตัดกลาง
 * เบราว์เซอร์ตัดบรรทัดภาษาไทยตามพจนานุกรมเป็นหน่วยคำย่อย ได้ผลอย่าง
 * "ของตัว / เอง" หรือ "คา / แรกเตอร์" ซึ่งอ่านแล้วสะดุด
 * (word-break: keep-all ไม่ช่วยกับภาษาไทยใน Chrome จึงต้องใช้ nowrap รายวลี)
 * เมื่อครอบวลีด้วยคลาสนี้ บรรทัดจะขึ้นใหม่ได้เฉพาะ "ระหว่างวลี" ที่เราแบ่งไว้เอง
 */
.nb { white-space: nowrap; }

/* จอแคบมาก วลียาวจะล้นกรอบ จึงยอมให้เบราว์เซอร์ตัดเองตามปกติ */
@media (max-width: 560px) {
  .nb { white-space: normal; }
}
.prose p { margin: 0 0 26px; }
.prose p:last-child { margin-bottom: 0; }
.prose b { color: var(--text); font-weight: 600; }
.prose .brand { color: var(--accent); font-weight: 700; letter-spacing: .02em; white-space: nowrap; }

.prose-lead {
  font-size: 1.22rem;
  line-height: 1.85;
  color: var(--text);
}

/* ประโยคสรุปก่อนเข้าท่อนแถลงการณ์ — เว้นวรรคให้หยุดอ่าน */
.prose-punch {
  margin-top: 34px !important;
  padding-left: 18px;
  border-left: 2px solid var(--accent);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.8;
}

/* ---------- manifesto quote ---------- */
.manifesto {
  margin: 56px 0; padding: 40px 34px; border: 0;
  border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0;
  background: linear-gradient(100deg, rgba(255,106,0,.10), transparent 70%);
  display: grid; gap: 10px;
}
.manifesto span {
  font-family: var(--display); font-weight: 600; font-synthesis: none;
  text-transform: uppercase; letter-spacing: 0;
  font-size: clamp(1.15rem, 2.8vw, 1.9rem); line-height: 1.45;
}
.manifesto span:last-child { color: var(--accent); }
.manifesto i { font-style: normal; }

/* ---------- feature strip ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.feature { background: var(--ink); padding: 40px 28px; transition: background .5s var(--ease); }
.feature:hover { background: var(--surface); }
.feature .ico { font-size: 1.6rem; margin-bottom: 14px; display: block; transition: transform .5s var(--ease); }
.feature:hover .ico { transform: translateY(-5px) scale(1.15); }
.feature h4 { margin: 0 0 6px; font-size: .95rem; letter-spacing: 0; }
.feature p { margin: 0; color: var(--muted); font-size: .86rem; }

/* ---------- category tiles ---------- */
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.cat-tile {
  position: relative; min-height: 260px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); display: flex; align-items: flex-end; padding: 26px;
  background: linear-gradient(150deg, var(--surface-2), var(--ink-2));
  transition: transform .6s var(--ease), border-color .4s;
}
.cat-tile::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(400px 300px at 80% 0%, rgba(255,106,0,.16), transparent 70%);
  opacity: 0; transition: opacity .6s;
}
.cat-tile:hover { transform: translateY(-8px); border-color: var(--accent); }
.cat-tile:hover::before { opacity: 1; }
.cat-tile h3 { position: relative; margin: 0; }
.cat-tile .arrow { position: absolute; top: 24px; right: 24px; font-size: 1.4rem; transition: transform .5s var(--ease); }
.cat-tile:hover .arrow { transform: translate(6px,-6px) rotate(45deg); color: var(--accent); }

/* ---------- product detail ---------- */
.pdp { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: start; }
.gallery { position: sticky; top: 100px; }
.gallery-main {
  aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line); position: relative;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), opacity .35s; }
.gallery-main:hover img { transform: scale(1.06); }

/* ปุ่มเลื่อนรูปซ้าย–ขวา */
.gallery-nav {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 3;
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 50%; cursor: pointer;
  background: rgba(11,11,11,.6); color: var(--text);
  border: 1px solid var(--line-strong); backdrop-filter: blur(10px);
  opacity: 0; transition: all .4s var(--ease);
}
.gallery-nav.prev { left: 16px; transform: translateX(-8px); }
.gallery-nav.next { right: 16px; transform: translateX(8px); }
.gallery-main:hover .gallery-nav,
.gallery-nav:focus-visible { opacity: 1; transform: translateX(0); }
.gallery-nav:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

.gallery-count {
  position: absolute; right: 16px; bottom: 16px; z-index: 3;
  background: rgba(11,11,11,.65); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 99px;
  padding: 5px 14px; font-size: .74rem; letter-spacing: .08em; color: var(--muted);
}
.gallery-count b { color: var(--text); font-weight: 700; }

/* จอสัมผัสไม่มี hover จึงแสดงปุ่มไว้เลย */
@media (hover: none) {
  .gallery-nav { opacity: 1; transform: translateX(0); }
}
.gallery-thumbs { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.gallery-thumbs button {
  width: 74px; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; padding: 0;
  border: 1px solid var(--line); background: var(--surface-2); cursor: pointer;
  transition: all .4s var(--ease); opacity: .6;
}
.gallery-thumbs button:hover, .gallery-thumbs button.active { border-color: var(--accent); opacity: 1; transform: translateY(-3px); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.pdp-title { font-size: clamp(1.9rem, 4vw, 3.2rem); margin: 10px 0 14px; }
.pdp-price { display: flex; align-items: baseline; gap: 14px; margin: 20px 0 28px; }
.pdp-price .now { font-size: 2rem; font-weight: 800; }
.pdp-price del { color: var(--dim); font-size: 1.1rem; }
.pdp-price .off { background: var(--accent-2); color: #fff; padding: 4px 12px; border-radius: 99px; font-size: .72rem; font-weight: 800; }

.opt-label { font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; display: block; }
.sizes { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
/* ซ่อนตาแต่ยังโฟกัสด้วยคีย์บอร์ดได้ (a11y) */
.size-opt { position: relative; display: inline-block; }
.size-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.size-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.size-opt span {
  display: grid; place-items: center; min-width: 56px; height: 50px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer;
  font-weight: 700; font-size: .85rem; letter-spacing: .06em;
  transition: all .35s var(--ease); position: relative; overflow: hidden;
}
.size-opt span::before {
  content: ''; position: absolute; inset: 0; background: var(--accent);
  transform: translateY(100%); transition: transform .4s var(--ease); z-index: -1;
}
.size-opt span { isolation: isolate; }
.size-opt:hover span { border-color: var(--accent); }
.size-opt input:checked + span { border-color: var(--accent); color: var(--on-accent); }
.size-opt input:checked + span::before { transform: translateY(0); }
.size-opt input:disabled + span { opacity: .3; cursor: not-allowed; text-decoration: line-through; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 99px; overflow: hidden; }
.qty button { width: 44px; height: 50px; background: transparent; border: 0; cursor: pointer; font-size: 1.2rem; transition: background .3s, color .3s; }
.qty button:hover { background: var(--accent); color: var(--on-accent); }
.qty input { width: 52px; height: 50px; text-align: center; background: transparent; border: 0; font-weight: 700; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.accordion { border-top: 1px solid var(--line); margin-top: 36px; }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-head {
  width: 100%; background: transparent; border: 0; padding: 20px 0; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: .92rem; letter-spacing: .04em; text-align: left;
  transition: color .3s;
}
.acc-head:hover { color: var(--accent); }
.acc-head i { font-style: normal; transition: transform .45s var(--ease); font-size: 1.2rem; }
.acc-item.open .acc-head i { transform: rotate(45deg); color: var(--accent); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .6s var(--ease); }
.acc-body > div { padding: 0 0 22px; color: var(--muted); font-size: .92rem; }

/* ---------- forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.input, .field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .35s, box-shadow .35s, background .35s;
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--accent); background: var(--surface-2);
  box-shadow: 0 0 0 4px rgba(255,106,0,.14);
}
.field textarea { min-height: 110px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%239a9aa8'%3E%3Cpath d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 42px; }
/*
 * auto-fit = ยุบเหลือคอลัมน์เดียวเองเมื่อพื้นที่ไม่พอ (ดูจากความกว้างจริงของกล่อง ไม่ใช่ขนาดจอ)
 * จำเป็นเพราะฟอร์มบางอันอยู่ในคอลัมน์แคบของหลังบ้าน
 */
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 16px; }
/* input บางชนิด (datetime-local, number) มีความกว้างขั้นต่ำในตัว ต้องปลดเพื่อไม่ให้ดันกรอบล้น */
.field input, .field select, .field textarea, .input { min-width: 0; }
.checkbox { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .9rem; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- panel / table ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.panel + .panel { margin-top: 22px; }
.panel-title { margin: 0 0 20px; font-size: 1.05rem; letter-spacing: .04em; }

.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table.data { width: 100%; border-collapse: collapse; min-width: 620px; }
table.data th, table.data td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: .9rem; vertical-align: middle; }
table.data th { font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
table.data tbody tr { transition: background .3s; }
table.data tbody tr:hover { background: rgba(242,239,232,.03); }
table.data td img { width: 46px; height: 56px; object-fit: cover; border-radius: 8px; }

.pill {
  display: inline-block; padding: 4px 12px; border-radius: 99px;
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: #242424; color: var(--muted);
}
.pill.paid, .pill.completed { background: rgba(53,208,127,.16); color: var(--ok); }
.pill.pending { background: rgba(255,176,32,.16); color: var(--warn); }
.pill.shipped, .pill.packing { background: rgba(255,158,61,.16); color: var(--accent-soft); }
.pill.cancelled, .pill.refunded { background: rgba(255,59,48,.16); color: var(--accent-2); }

/* ---------- cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 34px; align-items: start; }
.cart-item { display: grid; grid-template-columns: 100px 1fr auto; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item img { width: 100px; height: 124px; object-fit: cover; border-radius: var(--radius-sm); }
.summary { position: sticky; top: 100px; }
.sum-row { display: flex; justify-content: space-between; padding: 11px 0; font-size: .94rem; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 18px; font-size: 1.25rem; font-weight: 800; }
.sum-row.discount { color: var(--ok); }

.ship-bar { height: 6px; background: #242424; border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.ship-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-3), var(--accent-soft)); border-radius: 99px; transition: width .8s var(--ease); }

.coupon-row { display: flex; gap: 10px; }
.coupon-row input { flex: 1; text-transform: uppercase; }

.empty { text-align: center; padding: 90px 20px; }
.empty .big { font-size: 4rem; margin-bottom: 18px; opacity: .35; }

/* ---------- steps / timeline ---------- */
.steps { display: flex; gap: 0; margin: 30px 0 40px; flex-wrap: wrap; }
.step { flex: 1; min-width: 120px; position: relative; padding-top: 26px; text-align: center; font-size: .78rem; color: var(--dim); }
.step::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: #242424; }
.step.done::before, .step.active::before { background: var(--accent); }
.step.done, .step.active { color: var(--text); }
.step .n { display: block; font-weight: 800; letter-spacing: .1em; }

/* ---------- toast ---------- */
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 12px; max-width: min(380px, calc(100vw - 44px)); }
.toast {
  background: var(--surface-2); border: 1px solid var(--line-strong); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 15px 18px; box-shadow: var(--shadow);
  font-size: .9rem; animation: toast-in .55s var(--ease);
}
.toast.error { border-left-color: var(--accent-2); }
.toast.leaving { animation: toast-out .4s var(--ease-io) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(60px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(60px) scale(.94); } }

/* ---------- cookie consent ---------- */
.cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  background: rgba(16,16,16,.97);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -20px 60px -20px rgba(0,0,0,.8);
  transform: translateY(100%);
  transition: transform .5s var(--ease);
}
.cookie-bar.in { transform: none; }
.cookie-inner {
  width: min(100% - 40px, var(--maxw)); margin-inline: auto;
  padding: 22px 0; display: grid; gap: 16px;
  grid-template-columns: 1fr auto; align-items: center;
}
.cookie-copy h4 { margin: 0 0 6px; font-size: 1rem; letter-spacing: .02em; }
.cookie-copy p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.7; max-width: 70ch; }
.cookie-copy a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 760px) {
  .cookie-inner { grid-template-columns: 1fr; padding: 18px 0; }
  .cookie-actions { justify-content: stretch; }
  .cookie-actions .btn { flex: 1; }
  .cookie-bar { max-height: 85vh; overflow-y: auto; }
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 80px 0 34px; position: relative; z-index: 2; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 44px; }
.footer-grid h5 { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); margin: 0 0 18px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer-grid a { color: var(--muted); font-size: .9rem; transition: color .3s, padding-left .3s; }
.footer-grid a:hover { color: var(--accent); padding-left: 6px; }
.footer-bottom { margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--dim); }
.pay-badges { display: flex; gap: 8px; align-items: center; }
.pay-badges span { padding: 5px 11px; border: 1px solid var(--line); border-radius: 7px; font-size: .68rem; letter-spacing: .1em; }

.footer-huge {
  font-family: var(--display); font-size: clamp(3.5rem, 17vw, 15rem); line-height: .85;
  text-align: center; color: transparent; -webkit-text-stroke: 1px rgba(242,239,232,.10);
  margin: 60px 0 0; text-transform: uppercase; user-select: none;
}

/* ---------- admin ---------- */
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-side {
  background: var(--ink-2); border-right: 1px solid var(--line);
  padding: 26px 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-side-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 30px; }
.admin-side .logo { font-size: 1.25rem; display: flex; }
.admin-burger { display: none; flex: none; }
.admin-burger .ico-close { display: none; }
.admin-burger.open .ico-menu { display: none; }
.admin-burger.open .ico-close { display: block; }
.admin-burger.open { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.admin-nav-sep { margin-top: 14px; }
.admin-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.admin-nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm);
  color: var(--muted); font-size: .89rem; font-weight: 500; transition: all .3s var(--ease);
}
.admin-nav a:hover { background: var(--surface); color: var(--text); transform: translateX(4px); }
.admin-nav a.active { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.admin-main { padding: 32px 34px 70px; min-width: 0; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.admin-head h1 { font-size: 1.6rem; margin: 0; letter-spacing: -.01em; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; position: relative; overflow: hidden;
  transition: transform .5s var(--ease), border-color .4s;
}
.stat:hover { transform: translateY(-5px); border-color: var(--line-strong); }
.stat::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px;
  background: radial-gradient(circle, rgba(255,106,0,.14), transparent 70%);
}
.stat .lbl { font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); }
.stat .val { font-size: 1.9rem; font-weight: 800; margin-top: 8px; letter-spacing: -.02em; }
.stat .val small { font-size: .95rem; font-weight: 600; color: var(--muted); }

.chart { display: flex; align-items: flex-end; gap: 7px; height: 190px; padding-top: 12px; }
.chart .bar { flex: 1; background: linear-gradient(180deg, var(--accent), rgba(255,106,0,.15)); border-radius: 5px 5px 0 0;
  min-height: 3px; position: relative; transition: filter .3s; animation: grow .9s var(--ease) backwards; transform-origin: bottom; }
.chart .bar:hover { filter: brightness(1.25); }
.chart .bar span { position: absolute; bottom: 100%; left: 50%; translate: -50% -8px; background: var(--surface-2);
  border: 1px solid var(--line-strong); padding: 4px 9px; border-radius: 7px; font-size: .7rem; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .3s; }
.chart .bar:hover span { opacity: 1; }
@keyframes grow { from { transform: scaleY(0); } }

.variant-row { display: grid; grid-template-columns: 1fr 1fr .8fr .8fr 44px; gap: 10px; margin-bottom: 10px; align-items: center; }
.img-tile { position: relative; }
.img-tile img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.img-tile button { position: absolute; top: 7px; right: 7px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(11,11,11,.8); border: 1px solid var(--line-strong); cursor: pointer; }
.img-tile button:hover { background: var(--accent-2); }
.img-cover {
  position: absolute; left: 7px; top: 7px;
  background: var(--accent); color: var(--on-accent);
  padding: 3px 9px; border-radius: 99px;
  font-size: .62rem; font-weight: 800; letter-spacing: .06em;
}
.img-tile .img-make-cover {
  position: absolute; left: 7px; top: 7px; right: auto;
  width: auto; height: auto; padding: 3px 9px; border-radius: 99px;
  font-size: .62rem; font-weight: 700; letter-spacing: .04em;
  opacity: 0; transition: opacity .3s, background .3s;
}
.img-tile:hover .img-make-cover { opacity: 1; }
.img-tile .img-make-cover:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* ---------- misc ---------- */
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 34px; }
.chip {
  padding: 9px 18px; border-radius: 99px; border: 1px solid var(--line-strong);
  font-size: .78rem; letter-spacing: .08em; cursor: pointer; transition: all .35s var(--ease);
  background: transparent; text-transform: uppercase; font-weight: 600;
}
.chip:hover { border-color: var(--accent); transform: translateY(-2px); }
.chip.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

.pager { display: flex; gap: 8px; justify-content: center; margin-top: 50px; }
.pager a, .pager span { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); font-size: .86rem; transition: all .35s var(--ease); }
.pager a:hover { border-color: var(--accent); transform: translateY(-3px); }
.pager .on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }

.progress-bar { position: fixed; top: 0; left: 0; height: 2px; background: var(--accent); z-index: 100; width: 0; }

/* ---------- ตัวหมุนบอกสถานะกำลังทำงาน ---------- */
.spinner {
  display: inline-block; width: 16px; height: 16px; flex: none;
  border: 2px solid rgba(11,11,11,.25); border-top-color: currentColor;
  border-radius: 50%; animation: spin .7s linear infinite;
}
.btn-ghost .spinner { border-color: rgba(242,239,232,.25); border-top-color: currentColor; }

/* ปุ่มที่กำลังรอผลลัพธ์ */
.btn.is-loading { pointer-events: none; opacity: .75; }

/*
 * แถบบางสีส้มวิ่งบนสุด ตอนกดลิงก์ไปหน้าอื่น
 * ช่วยให้รู้ว่าระบบรับคำสั่งแล้ว ระหว่างรอเซิร์ฟเวอร์ตอบกลับ
 */
.nav-loading {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9998;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 40% 100%; background-repeat: no-repeat;
  animation: nav-sweep 1.1s ease-in-out infinite;
}
@keyframes nav-sweep {
  0%   { background-position: -40% 0; }
  100% { background-position: 140% 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }

.cursor-glow {
  position: fixed; width: 420px; height: 420px; border-radius: 50%; pointer-events: none; z-index: 1;
  background: radial-gradient(circle, rgba(255,106,0,.07), transparent 65%);
  transform: translate(-50%,-50%); transition: opacity .5s; will-change: left, top;
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .pdp { grid-template-columns: 1fr; gap: 40px; }
  .gallery, .summary { position: static; }
  .cart-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .admin-shell { grid-template-columns: 1fr; }

  /*
   * จอเล็ก: เปลี่ยนแถบข้างเป็นแถบบนที่กดเปิด-ปิดได้
   * ของเดิมเป็นแถบเลื่อนแนวนอน ซึ่งเห็นแค่ 3–4 เมนูแรก
   * เมนูที่เหลือถูกซ่อนอยู่นอกจอโดยที่ผู้ใช้ไม่รู้ว่าเลื่อนได้
   */
  .admin-side {
    position: sticky; top: 0; z-index: 60;
    height: auto; padding: 14px 18px;
    border-right: 0; border-bottom: 1px solid var(--line);
    background: var(--ink-2);
  }
  .admin-side-head { margin-bottom: 0; }
  .admin-burger { display: grid; }

  .admin-nav {
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height .4s var(--ease), opacity .3s, margin-top .3s var(--ease);
  }
  .admin-nav.open {
    max-height: calc(100vh - 120px); overflow-y: auto;
    opacity: 1; margin-top: 14px;
  }
  /* พื้นที่กดต้องใหญ่พอสำหรับนิ้ว */
  .admin-nav a {
    padding: 15px 16px; font-size: .95rem;
    border-radius: var(--radius-sm);
  }
  .admin-nav a:hover { transform: none; }
  .admin-main { padding: 24px 20px 60px; }
}

/*
 * เมนูมือถือเริ่มที่ 900px ไม่ใช่ 760px
 * เพราะช่วง 760–900 (แท็บเล็ต) ลิงก์เดสก์ท็อปเบียดกันจนตกบรรทัด
 */
@media (max-width: 900px) {
  .nav-links {
    position: fixed; inset: 0; background: rgba(11,11,11,.98); backdrop-filter: blur(20px);
    flex-direction: column; justify-content: center; align-items: center; gap: 24px;
    padding: 90px 20px 40px; margin: 0; overflow-y: auto;
    transform: translateY(-100%); transition: transform .6s var(--ease); z-index: 40;
  }
  .nav-links.open { transform: none; }
  .nav-links a { font-size: 1.35rem; }
  /* โลโก้อยู่เหนือโอเวอร์เลย์ เพื่อให้ยังเห็นแบรนด์และกดกลับหน้าแรกได้ */
  .nav .logo { position: relative; z-index: 41; }
  .nav-admin { display: block; }
  .burger { display: grid; }
  /* ปุ่ม Admin บน header ซ่อนบนจอเล็ก ย้ายไปอยู่ในเมนูแทน */
  .nav-actions > .btn { display: none; }
}

@media (max-width: 760px) {
  .section { padding: 70px 0; }
  .hero { min-height: 84vh; }
  .hero-stats { gap: 30px; }
  .products { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 16px; }
  .card-body { padding: 14px; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .variant-row { grid-template-columns: 1fr 1fr; }
  .cursor-glow { display: none; }
  .cart-item { grid-template-columns: 74px 1fr; }
  .cart-item img { width: 74px; height: 92px; }
}
