/* Mama Pump — หน้าร้าน (storefront) สาธารณะ
   ⭐ ทุกหน้าในโฟลเดอร์นี้อ้างไฟล์นี้ด้วย path เต็ม (/shop/assets/shop.css) เสมอ
      เพราะหน้าแรกถูกเสิร์ฟทับที่ URL "/" — ลิงก์แบบ relative จะชี้ผิดที่ทั้งหน้า (กับดักเดิมของโปรเจกต์)
   โทนเดียวกับระบบหลังบ้าน (clay/warm) แต่โปร่งกว่า เพราะกลุ่มผู้ใช้คือคุณแม่ที่เพิ่งเจอร้านครั้งแรกบนมือถือ */

:root {
  /* ── โทนแบรนด์ Mama Pump (6 ส.ค. พี่ส่งภาพแบรนด์มา: ลายเส้นน้ำตาล + ครีม + พีช + มินต์) ──
     ⭐ สีทั้งระบบมาจากตัวแปรชุดนี้ที่เดียว — เปลี่ยนโทนทีหลังแก้ตรงนี้จุดเดียว ห้ามฝังสีลงในหน้าใดหน้าหนึ่ง
     ⭐ คู่สีที่เลือกผ่านการวัดค่าคอนทราสต์แล้ว (ตัวอักษรต้องอ่านออกจริง ไม่ใช่แค่ดูน่ารัก):
        ตัวหนังสือหลักบนพื้นครีม = 10.8:1 · ตัวหนังสือขาวบนปุ่มน้ำตาลแบรนด์ = 4.8:1 (ผ่านเกณฑ์ 4.5:1)
        พีช/แซลมอน/มินต์ ใช้เป็นพื้นป้ายเท่านั้น ตัวหนังสือบนป้ายเป็นสีเข้มเสมอ ห้ามใช้ตัวขาว */
  --c-ink: 74 54 44;         /* น้ำตาลเข้ม = ตัวหนังสือหลัก (โทนเดียวกับลายเส้นในโลโก้) */
  --c-muted: 124 101 83;     /* ตัวหนังสือรอง */
  --c-faint: 126 113 103;    /* ตัวหนังสือจาง (เข้มพอให้อ่านออกบนพื้นครีม — 4.5:1) */
  --c-line: 122 90 70;       /* เส้นขอบ (ใช้กับ alpha ต่ำ) */
  --c-surface: 255 249 240;  /* พื้นหน้า = ครีม */
  --c-card: 255 255 255;     /* พื้นการ์ด */
  --c-accent: 139 107 87;    /* น้ำตาลแบรนด์ (ตัวเดียวกับโลโก้ MAMA PUMP) = ปุ่มหลัก ตัวหนังสือขาวอ่านออก */
  --c-peach: 249 201 180;    /* พีช (แก้มหมี) */
  --c-salmon: 240 147 139;   /* ชมพูส้ม (ชุดหมี) */
  --c-mint: 190 227 218;     /* มินต์ (หมวกหมี) */
  --c-cream: 253 240 216;    /* ครีมเข้ม (ตัวหมี) */
  /* สีความหมาย (สถานะ) — ปรับให้เข้าโทนแบรนด์แต่ยังแยกออกจากกันชัด · ตัวหนังสือบนป้ายเป็นสีเข้มเสมอ */
  --c-ok: 45 117 100;        /* เขียวอมมินต์ = ผ่าน/ใช้งาน */
  --c-warn: 144 87 50;      /* ส้มอมน้ำตาล = รอดำเนินการ */
  --c-danger: 178 70 62;     /* แดงอิฐ = ผิดพลาด/ตีกลับ */
  --radius: 1.15rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Anuphan", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: rgb(var(--c-ink));
  background-color: rgb(var(--c-surface));
  background-image:
    radial-gradient(1100px 460px at 92% -6%, rgb(var(--c-peach) / 0.55), transparent 62%),
    radial-gradient(900px 420px at -6% 2%, rgb(var(--c-mint) / 0.42), transparent 58%);
  background-attachment: fixed;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.1rem; }

/* ── หัวเว็บ ─────────────────────────────────────────────────────── */

.topbar {
  background: rgb(var(--c-accent));
  color: #fff;
  font-size: 0.8125rem;
}
.topbar .wrap { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; align-items: center; justify-content: flex-end; padding-top: 0.45rem; padding-bottom: 0.45rem; }
.topbar a { color: #fff; text-decoration: none; opacity: 0.92; white-space: nowrap; }
.topbar a:hover { opacity: 1; text-decoration: underline; }

.site-head { position: sticky; top: 0; z-index: 20; background: rgb(var(--c-card) / 0.94); backdrop-filter: blur(10px); border-bottom: 1px solid rgb(var(--c-line) / 0.10); }
.site-head .wrap { display: flex; align-items: center; gap: 1rem; padding-top: 0.7rem; padding-bottom: 0.7rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; margin-right: auto; }
/* โลโก้จริงของแบรนด์ (ลบพื้นขาวเป็น PNG พื้นใสแล้ว) — หมี + ตัวอักษร MAMA PUMP */
.brand-bear { height: 3rem; width: auto; flex: none; }
.brand-wordmark { height: 1.85rem; width: auto; display: block; }
.brand-mark {
  width: 2.25rem; height: 2.25rem; border-radius: 0.7rem; flex: none;
  background: rgb(var(--c-accent)); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
}
.brand-name { font-family: "Bai Jamjuree", "Anuphan", sans-serif; font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.brand-sub { font-size: 0.75rem; color: rgb(var(--c-muted)); display: block; margin-top: 0.15rem; }

.nav { display: flex; gap: 0.15rem; flex-wrap: wrap; }
.nav a {
  text-decoration: none; padding: 0.45rem 0.7rem; border-radius: 0.55rem;
  font-size: 0.9375rem; color: rgb(var(--c-muted)); white-space: nowrap;
}
.nav a:hover { background: rgb(var(--c-ink) / 0.05); color: rgb(var(--c-ink)); }
.nav a.active { color: rgb(var(--c-ink)); font-weight: 600; background: rgb(var(--c-peach) / 0.45); }

.nav-toggle { display: none; }

/* ── ปุ่ม ────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.65rem 1.15rem; border-radius: 0.85rem; border: 1px solid rgb(var(--c-line) / 0.14);
  background: rgb(var(--c-card)); color: rgb(var(--c-ink)); font: inherit; font-size: 0.9375rem; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: rgb(var(--c-line) / 0.26); }
.btn-primary { background: rgb(var(--c-accent)); border-color: rgb(var(--c-accent)); color: #fff; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-block { width: 100%; }
.btn-sm { padding: 0.42rem 0.75rem; font-size: 0.875rem; }

/* ── hero ────────────────────────────────────────────────────────── */

.hero { padding: 3rem 0 2.25rem; }
.hero h1 {
  font-family: "Bai Jamjuree", "Anuphan", sans-serif;
  font-size: clamp(1.7rem, 4.5vw, 2.6rem); line-height: 1.25; margin: 0 0 0.85rem; letter-spacing: -0.01em;
}
.hero p.lead { font-size: 1.0625rem; color: rgb(var(--c-muted)); margin: 0 0 1.5rem; max-width: 34rem; }
.hero-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; margin-top: 2.5rem; }
.trust-item { background: rgb(var(--c-card)); border: 1px solid rgb(var(--c-line) / 0.08); border-radius: var(--radius); padding: 1rem; }
.trust-item h3 { margin: 0 0 0.25rem; font-size: 0.9375rem; }
.trust-item p { margin: 0; font-size: 0.875rem; color: rgb(var(--c-muted)); }


/* ── แบนเนอร์หน้าแรก (แก้จากหลังบ้าน) ───────────────────────────── */

.hero.has-photo {
  background-size: cover;
  background-position: center;
  position: relative;
  color: #fff;
}
/* ทับด้วยชั้นมืดโปร่ง — รูปที่ร้านอัปมาจะสว่างแค่ไหนก็ตาม ตัวหนังสือต้องอ่านออกเสมอ
   (กับดักเดิม: ตัวขาวบนพื้นสีอ่อน = อ่านไม่ออก และหายตอนสั่งพิมพ์) */
.hero.has-photo::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgb(20 14 12 / 0.78) 0%, rgb(20 14 12 / 0.55) 55%, rgb(20 14 12 / 0.35) 100%);
}
.hero.has-photo > .wrap { position: relative; z-index: 1; }
.hero.has-photo .lead { color: rgb(255 255 255 / 0.92); }
.hero.has-photo .trust-item { background: rgb(255 255 255 / 0.94); color: rgb(var(--c-ink)); }
.hero.has-photo .btn:not(.btn-primary) { background: rgb(255 255 255 / 0.92); border-color: transparent; }

.hero-slide { display: none; }
.hero-slide.active { display: block; animation: heroFade 0.45s ease; }
@keyframes heroFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── ส่วนเนื้อหา ─────────────────────────────────────────────────── */

.section { padding: 2.25rem 0; }
.section-head { margin-bottom: 1.25rem; }
.section-head h2 { font-family: "Bai Jamjuree", "Anuphan", sans-serif; font-size: 1.35rem; margin: 0 0 0.3rem; }
.section-head p { margin: 0; color: rgb(var(--c-muted)); font-size: 0.9375rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; counter-reset: step; }
.step { background: rgb(var(--c-card)); border: 1px solid rgb(var(--c-line) / 0.08); border-radius: var(--radius); padding: 1.1rem; }
.step-no {
  width: 1.75rem; height: 1.75rem; border-radius: 999px; background: rgb(var(--c-accent) / 0.12);
  color: rgb(var(--c-accent)); font-weight: 700; display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; margin-bottom: 0.6rem;
}
.step h3 { margin: 0 0 0.3rem; font-size: 1rem; }
.step p { margin: 0; font-size: 0.9375rem; color: rgb(var(--c-muted)); }

/* ── แท็บหมวด ───────────────────────────────────────────────────── */

.tabs { display: flex; gap: 0.4rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.tab {
  padding: 0.5rem 1rem; border-radius: 999px; border: 1px solid rgb(var(--c-line) / 0.14);
  background: rgb(var(--c-card)); font: inherit; font-size: 0.9375rem; cursor: pointer; white-space: nowrap;
}
.tab.active { background: rgb(var(--c-accent)); color: #fff; border-color: rgb(var(--c-accent)); font-weight: 600; }

/* ── การ์ดสินค้า ─────────────────────────────────────────────────── */

.grid-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; align-items: start; }

.product {
  background: rgb(var(--c-card)); border: 1px solid rgb(var(--c-line) / 0.08); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; height: 100%;
}
.product-photo {
  aspect-ratio: 4 / 3; background: rgb(var(--c-cream) / 0.55);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.product-photo img { width: 100%; height: 100%; object-fit: cover; }
.product-photo .noimg { color: rgb(var(--c-muted)); font-size: 0.875rem; }
.product-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.product-brand { font-size: 0.8125rem; color: rgb(var(--c-muted)); }
.product-name { font-family: "Bai Jamjuree", "Anuphan", sans-serif; font-size: 1.0625rem; font-weight: 700; margin: 0; }
.product-desc { font-size: 0.875rem; color: rgb(var(--c-muted)); margin: 0; }

.pill {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.6rem; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 600; white-space: nowrap; /* ⭐ ป้ายไทยห้ามตกบรรทัด (คำไทยไม่มีเว้นวรรค) */
}
.pill-ok { background: rgb(var(--c-mint) / 0.55); color: rgb(var(--c-ok)); }
.pill-wait { background: rgb(var(--c-peach) / 0.55); color: rgb(var(--c-warn)); }

.price-table { border-top: 1px dashed rgb(var(--c-line) / 0.16); padding-top: 0.6rem; margin-top: auto; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; font-size: 0.9375rem; padding: 0.15rem 0; }
.price-row .label { color: rgb(var(--c-muted)); white-space: nowrap; }
.price-row .value { font-weight: 700; white-space: nowrap; }
.deposit-row { font-size: 0.875rem; color: rgb(var(--c-muted)); display: flex; justify-content: space-between; gap: 0.6rem; }

.product-actions { display: flex; gap: 0.5rem; padding: 0 1rem 1rem; }
.product-actions .btn { flex: 1; }

/* ── ท้ายเว็บ ────────────────────────────────────────────────────── */

.site-foot { margin-top: 3rem; border-top: 1px solid rgb(var(--c-line) / 0.10); background: rgb(var(--c-card) / 0.6); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: space-between; padding-top: 2rem; padding-bottom: 2rem; font-size: 0.9375rem; }
.site-foot h4 { margin: 0 0 0.5rem; font-size: 0.9375rem; }
.site-foot p, .site-foot a { margin: 0.2rem 0; color: rgb(var(--c-muted)); text-decoration: none; display: block; }
.site-foot a:hover { color: rgb(var(--c-ink)); }
.foot-note { border-top: 1px solid rgb(var(--c-line) / 0.08); font-size: 0.8125rem; color: rgb(var(--c-muted)); }
.foot-note .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 0.9rem; padding-bottom: 0.9rem; }

/* ── กล่องข้อความ/สถานะ ─────────────────────────────────────────── */

.note {
  background: rgb(var(--c-card)); border: 1px solid rgb(var(--c-line) / 0.10); border-left: 3px solid rgb(var(--c-accent));
  border-radius: 0.6rem; padding: 0.9rem 1rem; font-size: 0.9375rem; color: rgb(var(--c-muted));
}
.empty { text-align: center; padding: 2.5rem 1rem; color: rgb(var(--c-muted)); }

/* ── มือถือ ─────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .grid-products { grid-template-columns: repeat(2, 1fr); }
  .trust, .steps { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .grid-products { grid-template-columns: 1fr; }
  .brand-bear { height: 2.4rem; }
  .brand-wordmark { height: 1.45rem; }
  .site-head .wrap { flex-wrap: wrap; }
  /* เมนู 4 ลิงก์เป็นตาราง 2×2 ใต้โลโก้ (เดิมเลื่อนข้าง "ติดต่อเรา" โดนตัด + ปุ่มเข้าสู่ระบบหล่นบรรทัด) */
  .site-head .wrap > .btn { order: 2; }
  .nav { order: 3; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem; }
  .nav a { min-height: 44px; display: flex; align-items: center; justify-content: center; }
  /* ไม่มีรูปสินค้า = แถบเตี้ยแทนกรอบ 4:3 ว่างกินครึ่งการ์ด */
  .product-photo:has(.noimg) { aspect-ratio: auto; height: 3rem; }
  .tab { min-height: 44px; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px; }
  .hero { padding: 2rem 0 1.5rem; }
  .hero-actions .btn { flex: 1; }
}
