/* =========================================================
   1LIFE HEALTHY — Main Stylesheet
   Wellness / Supplement Store
   ========================================================= */

/* ---------- 1. Design Tokens ---------- */
:root {
  --primary-green: #5f7f67;
  --primary-green-dark: #47614e;
  --sage-green: #a8bda8;
  --light-sage: #dde6d9;
  --cream: #f7f1e7;
  --warm-white: #fffdf8;
  --accent-orange: #ed7a3a;
  --accent-orange-dark: #d9662a;
  --accent-orange-deep: #bd5420;  /* สำหรับป้าย/ปุ่มตัวอักษรขาวขนาดเล็ก ให้ผ่าน contrast 4.5:1 */
  --text: #20231f;
  --muted: #6c7069;
  --muted-strong: #61655e;  /* ใช้บนพื้นครีม ให้ผ่านเกณฑ์ contrast 4.5:1 */
  --line: #e6e1d5;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(32, 35, 31, .04);
  --shadow-sm: 0 4px 16px rgba(32, 35, 31, .05);
  --shadow-md: 0 10px 30px rgba(32, 35, 31, .07);

  --container: 1240px;
  --header-h: 76px;

  --font: "Kanit", -apple-system, "Segoe UI", sans-serif;
  --t: .25s ease;
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--warm-white);
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }

:focus-visible {
  outline: 3px solid var(--accent-orange);
  outline-offset: 3px;
  border-radius: 6px;
}

.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;
}

/* ---------- 3. Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 16px;
}
.section { padding-block: 64px; position: relative; }
.section--tight { padding-block: 44px; }
.section--cream { background: var(--cream); }
.section--sage { background: var(--light-sage); }

.section-head { max-width: 660px; margin-bottom: 32px; }
.section-head--center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 500; letter-spacing: .03em;
  color: var(--primary-green);
  background: var(--light-sage);
  padding: 6px 14px; border-radius: var(--radius-pill);
  margin-bottom: 14px;
}
.eyebrow svg { width: 16px; height: 16px; stroke: currentColor; flex-shrink: 0; }
.eyebrow span { white-space: nowrap; }
.section-title { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
.section-sub { color: var(--muted); margin-top: 10px; font-size: 1rem; }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  font-weight: 500; font-size: .95rem;
  transition: background var(--t), color var(--t), transform var(--t), box-shadow var(--t);
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent-orange); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--accent-orange-dark); }
.btn--green { background: var(--primary-green); color: #fff; }
.btn--green:hover { background: var(--primary-green-dark); }
.btn--ghost { background: var(--warm-white); color: var(--primary-green); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--light-sage); border-color: var(--sage-green); }
.btn--outline { border: 1.5px solid var(--primary-green); color: var(--primary-green); }
.btn--outline:hover { background: var(--primary-green); color: #fff; }
.btn--sm { padding: 9px 18px; font-size: .86rem; }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; stroke: currentColor; }

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 241, 231, .82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--t), border-color var(--t), background var(--t);
}
.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
  border-color: var(--line);
  background: rgba(255, 253, 248, .92);
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  min-height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand__mark {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--primary-green);
  display: grid; place-items: center; flex-shrink: 0;
}
.brand__mark svg { width: 22px; height: 22px; stroke: var(--cream); }
.brand__logo { height: 38px; width: auto; display: block; }
.brand__logo--footer { height: 44px; }
.brand__mark--img { background: transparent; }
.brand__mark--img img { width: 100%; height: 100%; object-fit: contain; }
.brand__name { font-weight: 600; font-size: 1.06rem; line-height: 1.2; }
.brand__tag { display: block; font-size: .72rem; color: var(--muted); font-weight: 300; }

.main-nav { margin-inline: auto; }
.main-nav ul { display: flex; align-items: center; gap: 2px; }
.main-nav a {
  display: block; padding: 8px 13px; border-radius: var(--radius-pill);
  font-size: .92rem; font-weight: 400; white-space: nowrap;
  transition: background var(--t), color var(--t);
}
.main-nav a:hover { background: var(--light-sage); color: var(--primary-green-dark); }
.main-nav a.is-active { background: var(--primary-green); color: #fff; font-weight: 500; }

.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  transition: background var(--t);
}
.icon-btn:hover { background: var(--light-sage); }
.icon-btn svg { width: 21px; height: 21px; stroke: var(--primary-green-dark); }
.cart-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--accent-orange); color: #fff;
  font-size: .68rem; font-weight: 500; line-height: 19px; text-align: center;
  transform: scale(0); transition: transform var(--t);
}
.cart-badge.is-visible { transform: scale(1); }


.overlay {
  position: fixed; inset: 0; background: rgba(32, 35, 31, .45);
  opacity: 0; visibility: hidden; transition: opacity var(--t), visibility var(--t);
  z-index: 150;
}
.overlay.is-open { opacity: 1; visibility: visible; }
body.is-locked { overflow: hidden; }

/* Search panel */
.search-panel {
  position: fixed; top: 0; left: 0; right: 0; z-index: 210;
  background: var(--warm-white); padding: 18px 0;
  box-shadow: var(--shadow-md);
  transform: translateY(-110%); transition: transform .3s ease;
}
.search-panel.is-open { transform: translateY(0); }
.search-panel form { display: flex; gap: 10px; align-items: center; }
.search-panel input {
  flex: 1; padding: 13px 20px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--cream);
}
.search-results { margin-top: 14px; display: grid; gap: 6px; max-height: 52vh; overflow-y: auto; }
.search-result {
  display: flex; gap: 12px; align-items: center;
  padding: 8px; border-radius: var(--radius-sm); transition: background var(--t);
}
.search-result:hover { background: var(--light-sage); }
.search-result:focus-visible { background: var(--light-sage); outline: 2px solid var(--sage-green); outline-offset: -2px; }
.search-all {
  display: block; text-align: center;
  padding: 10px 12px; margin-top: 4px;
  font-size: .88rem; font-weight: 500; color: var(--primary-green);
  border-top: 1px solid var(--line);
}
.search-all:hover, .search-all:focus-visible { background: var(--light-sage); }
.search-result img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.search-result__name { font-size: .93rem; }
.search-result__cat { font-size: .78rem; color: var(--muted); }

/* ---------- 6. Hero ---------- */
.hero { position: relative; background: var(--cream); padding-block: 28px 0; overflow: hidden; }
.wave + .section { padding-top: 44px; }
.hero > .container { min-height: 52vh; display: flex; flex-direction: column; justify-content: center; }
.hero__content { text-align: center; max-width: 760px; margin-inline: auto; position: relative; z-index: 1; }
.hero__grid { display: grid; gap: 36px; align-items: center; }
.hero__title { font-size: clamp(1.9rem, 4.4vw, 2.9rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.hero__title span { color: var(--primary-green); }
.hero__text { color: var(--muted); margin-top: 18px; max-width: 470px; font-size: 1.02rem; }
.hero__content .hero__text { margin-inline: auto; margin-top: 14px; font-weight: 400; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__points { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 36px; }
.hero__point { display: flex; align-items: center; gap: 10px; font-size: .83rem; line-height: 1.35; }
.hero__point-ic {
  width: 40px; height: 40px; border-radius: 50%; background: var(--light-sage);
  display: grid; place-items: center; flex-shrink: 0;
}
.hero__point-ic svg { width: 19px; height: 19px; stroke: var(--primary-green-dark); }

.hero__media { position: relative; }
/* NOTE: เปลี่ยน src ของ .hero__img เป็นภาพสินค้าจริงภายหลัง */
.hero__img {
  width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 90px var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.hero__float {
  position: absolute; right: 14px; bottom: 16px;
  background: var(--warm-white); border-radius: var(--radius-md);
  padding: 12px 16px; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px; max-width: 80%;
}
.hero__float svg { width: 24px; height: 24px; stroke: var(--primary-green); flex-shrink: 0; }
.hero__float strong { display: block; font-size: .87rem; font-weight: 500; }
.hero__float span { font-size: .76rem; color: var(--muted); }
.hero__badge {
  position: absolute; left: -8px; top: 22px;
  background: var(--primary-green); color: #fff;
  border-radius: var(--radius-md); padding: 10px 15px;
  font-size: .79rem; line-height: 1.35; text-align: center; box-shadow: var(--shadow-md);
}

/* Organic decoration */
.blob { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; }
.blob--1 { width: 340px; height: 340px; background: var(--light-sage); opacity: .55; top: -130px; left: -150px; }
.blob--2 { width: 240px; height: 240px; background: var(--sage-green); opacity: .26; bottom: -90px; right: -80px; }
.hero .container { position: relative; z-index: 1; }

.wave { display: block; width: 100%; height: auto; margin-bottom: -2px; }
.wave--flip { transform: rotate(180deg); margin: -2px 0 0; }

/* ---------- 7. Trust points ---------- */
/* จุดเด่นร้าน — มือถือเป็นแถบเลื่อนแนวนอนเหมือนแถบหมวดหมู่ */
.trust-grid {
  display: flex; flex-wrap: nowrap; gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  margin-inline: -16px; padding-inline: 16px;
  padding-block: 4px;
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%);
}
.trust-grid::-webkit-scrollbar { display: none; }
.hero .trust-grid { margin-top: 36px; }
/* หมวดหมู่ 6 อัน — มือถือเป็นแถบเลื่อนแนวนอน ปัดนิ้วดูได้ */
.cat-chips {
  display: flex; flex-wrap: nowrap;
  gap: 10px;
  margin-top: 40px; position: relative; z-index: 2;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  /* ยืดออกไปชนขอบจอ ให้ป้ายใบสุดท้ายไม่ดูโดนตัดกลางคัน */
  margin-inline: -16px; padding-inline: 16px;
  padding-block: 4px;
  /* ซ่อนแถบเลื่อน แต่ยังเลื่อนได้ */
  scrollbar-width: none; -ms-overflow-style: none;
  /* จางที่ขอบซ้าย-ขวา เป็นสัญญาณว่ายังมีต่อ */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%);
}
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex; align-items: center; gap: 11px;
  min-height: 60px; white-space: nowrap;
  padding: 8px 14px 8px 8px;
  border-radius: var(--radius-pill);
  background: linear-gradient(155deg, #fff 0%, var(--warm-white) 100%);
  font-size: .9rem; font-weight: 500; color: var(--text);
  line-height: 1.35;
  box-shadow: inset 0 0 0 1px rgba(32, 35, 31, .07), 0 3px 10px rgba(71, 97, 78, .07);
  transition: box-shadow var(--t), transform var(--t), background var(--t);
}
.cat-chip:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(95, 127, 103, .28), 0 10px 22px rgba(71, 97, 78, .16);
}
.cat-chip:focus-visible { outline: 2px solid var(--primary-green); outline-offset: 3px; }
.cat-chip__ic {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(155deg, #fff 0%, var(--light-sage) 100%);
  box-shadow: 0 0 0 1px rgba(95, 127, 103, .18);
  display: grid; place-items: center; flex-shrink: 0;
  transition: background var(--t), box-shadow var(--t);
}
.cat-chip__ic svg { width: 21px; height: 21px; stroke: var(--primary-green-dark); fill: none; transition: stroke var(--t); }
.cat-chip:hover .cat-chip__ic { background: var(--primary-green-dark); box-shadow: 0 0 0 1px rgba(95, 127, 103, .3); }
.cat-chip:hover .cat-chip__ic svg { stroke: #fff; }
.trust {
  flex: 0 0 246px;
  scroll-snap-align: start;
  /* ในแถบเลื่อนการ์ดแคบ ถ้าวางไอคอนไว้ซ้ายข้อความจะเหลือที่แค่ราว 150px แล้วตัดบรรทัดเละ
     จึงวางแนวตั้งเพื่อคืนความกว้างเต็มใบให้ข้อความ */
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 20px 18px;
  background: linear-gradient(155deg, #fff 0%, var(--warm-white) 100%);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px rgba(32, 35, 31, .07), 0 3px 10px rgba(71, 97, 78, .07);
  transition: box-shadow var(--t), transform var(--t);
}
.trust:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(95, 127, 103, .26), 0 10px 22px rgba(71, 97, 78, .14); }
.trust__ic {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(155deg, #fff 0%, var(--light-sage) 100%);
  box-shadow: 0 0 0 1px rgba(95, 127, 103, .18);
  display: grid; place-items: center;
  flex-shrink: 0;
  margin-bottom: 14px;
  transition: background var(--t), box-shadow var(--t);
}
.trust__ic svg { width: 22px; height: 22px; stroke: var(--primary-green-dark); fill: none; transition: stroke var(--t); }
.trust:hover .trust__ic { background: var(--primary-green-dark); box-shadow: 0 0 0 1px rgba(95, 127, 103, .3); }
.trust:hover .trust__ic svg { stroke: #fff; }
.trust h3 { font-size: 1rem; margin-bottom: 6px; text-wrap: balance; }
.trust p { font-size: .87rem; color: var(--muted-strong); line-height: 1.7; text-wrap: pretty; }

/* ---------- 8. Category cards ---------- */
.cat-grid { display: grid; gap: 18px; }
.cat-card {
  display: flex; flex-direction: column;
  background: var(--warm-white); border: 1px solid var(--line);
  border-radius: var(--radius-md); overflow: hidden;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--sage-green); }
.cat-card__media { overflow: hidden; aspect-ratio: 16 / 10; background: var(--light-sage); }
.cat-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cat-card:hover .cat-card__media img { transform: scale(1.06); }
.cat-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cat-card__body h3 { font-size: 1.04rem; }
.cat-card__body p { font-size: .86rem; color: var(--muted); flex: 1; }
.cat-card__more {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--primary-green); font-size: .88rem; font-weight: 500; margin-top: 6px;
}
.cat-card__more svg { width: 16px; height: 16px; stroke: currentColor; transition: transform var(--t); }
.cat-card:hover .cat-card__more svg { transform: translateX(4px); }

/* ---------- 9. Promotion banner ---------- */
.promo {
  background: var(--light-sage); border-radius: var(--radius-lg);
  padding: 32px; display: grid; gap: 26px; align-items: center;
  position: relative; overflow: hidden;
}
.promo__text h2 { font-size: clamp(1.5rem, 3.4vw, 2.05rem); text-wrap: balance; }
.promo__text > p { color: var(--muted-strong); margin: 12px 0 0; max-width: 430px; text-wrap: pretty; }
.promo__img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; border-radius: var(--radius-md); }

/* ตัวเลขจริงจากข้อมูลสินค้า — บอกคุณค่าได้ตรงกว่าประโยคชวนเชื่อ */
.promo__stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.promo__stat {
  flex: 1 1 130px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px;
  background: var(--warm-white);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px rgba(32, 35, 31, .06);
}
.promo__stat b { font-size: 1.15rem; font-weight: 600; color: var(--accent-orange-deep); line-height: 1.3; }
.promo__stat span { font-size: .78rem; color: var(--muted-strong); }

/* รูปสินค้าที่ร่วมรายการ ซ้อนเหลื่อมกันแบบกองไพ่ */
.promo__thumbs { display: flex; align-items: center; margin-top: 18px; }
.promo__thumbs img {
  width: 52px; height: 52px;
  object-fit: cover; background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--light-sage), 0 3px 8px rgba(32, 35, 31, .14);
  transition: transform var(--t);
}
.promo__thumbs img + img { margin-left: -14px; }
.promo__thumbs:hover img { transform: translateY(-2px); }
.promo__more {
  margin-left: -14px;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--primary-green-dark); color: #fff;
  font-size: .85rem; font-weight: 500;
  box-shadow: 0 0 0 3px var(--light-sage), 0 3px 8px rgba(32, 35, 31, .14);
}
.promo__cta { margin-top: 22px; }

/* ---------- 10. Why choose us ---------- */
/* ---------- Feature + สไลด์สินค้า ---------- */
.feature-split__main .section-title { text-wrap: balance; letter-spacing: -.01em; }
.feature-split__main .section-sub { max-width: 44ch; text-wrap: pretty; }

.feature-list { display: grid; gap: 20px; margin-top: 34px; }
.feature-item { display: flex; gap: 16px; align-items: flex-start; }

.feature-item__icon {
  position: relative;
  flex-shrink: 0;
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(155deg, #fff 0%, var(--light-sage) 100%);
  border-radius: 50%;
  /* วงแหวนบางรอบไอคอน ให้ดูเป็นเหรียญ ไม่ใช่กล่องสีทึบ */
  box-shadow: 0 0 0 1px rgba(95, 127, 103, .18), 0 4px 10px rgba(71, 97, 78, .10);
  transition: background var(--t), box-shadow var(--t), transform var(--t);
}
.feature-item__icon svg {
  width: 22px; height: 22px;
  stroke: var(--primary-green-dark); fill: none;
  transition: stroke var(--t);
}
/* เส้นบางเชื่อมไอคอนแต่ละข้อ ให้อ่านเป็นลำดับต่อเนื่อง */
.feature-item:not(:last-child) .feature-item__icon::after {
  content: "";
  position: absolute; top: calc(100% + 4px); left: 50%;
  width: 1px; height: 16px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(95, 127, 103, .32), rgba(95, 127, 103, 0));
}
.feature-item:hover .feature-item__icon {
  background: var(--primary-green-dark);
  box-shadow: 0 0 0 1px rgba(95, 127, 103, .3), 0 8px 18px rgba(71, 97, 78, .22);
  transform: translateY(-2px);
}
.feature-item:hover .feature-item__icon svg { stroke: #fff; }

.feature-item h3 { font-size: 1.02rem; color: var(--text); margin-bottom: 4px; }
.feature-item p { font-size: .9rem; color: var(--muted-strong); line-height: 1.75; max-width: 42ch; text-wrap: pretty; }

.feature-split__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 34px; }
.feature-split__link {
  font-size: .9rem; color: var(--primary-green-dark);
  text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: rgba(71, 97, 78, .35);
}
.feature-split__link:hover { text-decoration-color: currentColor; }

.feature-split__side-title {
  font-size: .78rem; font-weight: 500; letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary-green-dark);
  text-align: center;
  margin-bottom: 16px;
}

/* ---------- 11. Reviews ---------- */
.review-grid { display: grid; gap: 18px; }
.review-card {
  background: var(--warm-white); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.review-card__top { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--sage-green); color: #fff;
  display: grid; place-items: center; font-weight: 500; flex-shrink: 0;
}
.review-card__name { font-weight: 500; font-size: .95rem; }
.stars { display: flex; gap: 2px; }
.stars svg { width: 15px; height: 15px; fill: var(--accent-orange); stroke: none; }
.review-card p { font-size: .92rem; color: var(--muted); flex: 1; }
.review-card__product { font-size: .8rem; color: var(--primary-green); border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------- 12. Story banner ---------- */
.story { display: grid; gap: 30px; align-items: center; }

/* รูปวางบนแผ่นรองสีเซจที่เยื้องออกไปเล็กน้อย ให้ดูมีชั้นเชิงแทนรูปสี่เหลี่ยมโดด ๆ */
.story__media { position: relative; margin: 0; }
.story__media::before {
  content: "";
  position: absolute; inset: 14px -14px -14px 14px;
  background: var(--light-sage);
  border-radius: var(--radius-lg);
}
.story__media img {
  position: relative;
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 34px rgba(32, 35, 31, .14);
}
/* ป้ายตัวเลขคร่อมมุมรูป เชื่อมรูปกับเนื้อหาเข้าด้วยกัน */
.story__badge {
  position: absolute; z-index: 1;
  left: 16px; bottom: -18px;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--warm-white);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 24px rgba(32, 35, 31, .16), inset 0 0 0 1px rgba(32, 35, 31, .05);
}
.story__badge b { font-size: 1.6rem; font-weight: 600; color: var(--primary-green-dark); line-height: 1; }
.story__badge span { font-size: .76rem; color: var(--muted-strong); line-height: 1.4; }

/* ฝั่งข้อความใช้แนว editorial ตั้งใจให้ต่างจาก section อื่นที่เป็น ป้ายชิป+รายการติ๊กถูก */
.story__body { position: relative; }

/* ป้ายหัวข้อแบบขีดนำ แทนชิปกลม ๆ ที่ใช้ไปแล้วสามที่ในหน้าเดียว */
.story__label {
  display: flex; align-items: center; gap: 10px;
  font-size: .78rem; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: var(--primary-green-dark);
  margin-bottom: 18px;
}
.story__label::before {
  content: ""; width: 28px; height: 2px; flex-shrink: 0;
  background: var(--accent-orange); border-radius: 2px;
}

/* หัวข้อเป็นคำพูด มีอัญประกาศตัวใหญ่เป็นลายน้ำอยู่ด้านหลัง */
.story__quote {
  position: relative;
  font-size: clamp(1.6rem, 4.2vw, 2.3rem);
  font-weight: 500; line-height: 1.5;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.story__quote::before {
  content: "“";
  position: absolute; left: -.12em; top: -.42em;
  font-size: 3.4em; line-height: 1;
  color: var(--sage-green); opacity: .35;
  pointer-events: none;
}
.story__lead {
  color: var(--muted-strong); margin-top: 16px;
  max-width: 46ch; line-height: 1.85; text-wrap: pretty;
}

/* หลักการ 3 ข้อเป็นเลขลำดับ ไม่ใช่ติ๊กถูก — คนละจังหวะกับ section อื่น */
.story__principles {
  counter-reset: principle;
  display: grid; gap: 0;
  margin: 28px 0 26px;
}
.story__principles li {
  counter-increment: principle;
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: baseline;
  padding: 15px 0;
  font-size: .95rem; color: var(--text); line-height: 1.7;
}
.story__principles li + li { box-shadow: inset 0 1px 0 var(--line); }
.story__principles li::before {
  content: "0" counter(principle);
  font-size: .82rem; font-weight: 600; letter-spacing: .04em;
  color: var(--accent-orange-deep);
  font-variant-numeric: tabular-nums;
}

/* ลงชื่อกับปุ่มอยู่แถวเดียวกัน ปิดท้ายบล็อกเป็นบรรทัดเดียว */
.story__foot {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px 20px;
  margin-top: 30px;
  padding-top: 20px;
  box-shadow: inset 0 1px 0 var(--line);
}

/* บรรทัดลงชื่อ ให้อ่านเหมือนจดหมายจากคนขาย ไม่ใช่ข้อความการตลาด */
.story__sign {
  display: flex; align-items: center; gap: 8px;
  font-size: .84rem; color: var(--muted-strong); white-space: nowrap;
}
.story__sign::before {
  content: ""; width: 16px; height: 1px; flex-shrink: 0;
  background: var(--muted-strong); opacity: .5;
}

/* CTA เป็นลิงก์มีลูกศร ไม่ใช่ปุ่มทึบ เพราะหน้านี้มีปุ่มทึบไปแล้วสามจุด */
.story__cta {
  display: inline-flex; align-items: center; gap: 9px;
  flex-shrink: 0; white-space: nowrap;
  font-size: .92rem; font-weight: 500;
  color: var(--primary-green-dark);
  padding-bottom: 4px;
  box-shadow: inset 0 -2px 0 rgba(71, 97, 78, .3);
  transition: gap var(--t), box-shadow var(--t);
}
.story__cta svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }
.story__cta:hover { gap: 14px; box-shadow: inset 0 -2px 0 var(--primary-green-dark); }
.story__cta:focus-visible { outline: 2px solid var(--primary-green); outline-offset: 4px; }

/* ---------- 13. CTA + Newsletter ---------- */
/* สองกล่องนี้ไม่ได้สำคัญเท่ากัน — LINE คือช่องทางปิดการขายจริง จึงให้เด่นกว่า
   ส่วนรับข่าวสารเป็นทางเลือกรอง ดีไซน์จึงตั้งใจให้ต่างระดับ ไม่ใช่กล่องเหมือนกันสองใบ */
.cta-grid { display: grid; gap: 20px; }

/* ---- กล่องหลัก: LINE ---- */
.cta-line {
  position: relative; overflow: hidden;
  padding: 34px 30px;
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, #5f7f67 0%, var(--primary-green-dark) 100%);
  color: #fff;
  box-shadow: 0 16px 38px rgba(71, 97, 78, .26);
}
/* โลโก้ LINE ตัวใหญ่จาง ๆ เป็นลายน้ำมุมขวา */
.cta-line__mark {
  position: absolute; right: -26px; top: -26px;
  width: 168px; height: 168px;
  color: #fff; opacity: .07;
  pointer-events: none;
}
.cta-line__body { position: relative; }
.cta-line__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .74rem; font-weight: 500; letter-spacing: .07em; text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
  margin-bottom: 12px;
}
.cta-line__eyebrow::before {
  content: ""; width: 20px; height: 2px; border-radius: 2px;
  background: var(--accent-orange);
}
.cta-line h2 { font-size: clamp(1.35rem, 3.2vw, 1.75rem); color: #fff; text-wrap: balance; }
.cta-line p { color: rgba(255, 255, 255, .86); margin-top: 10px; max-width: 42ch; line-height: 1.8; }
.cta-line__btn {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 24px; padding: 13px 24px;
  background: var(--warm-white); color: var(--primary-green-dark);
  font-weight: 500;
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
  transition: transform var(--t), box-shadow var(--t);
}
.cta-line__btn svg { width: 21px; height: 21px; fill: currentColor; }
.cta-line__btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .24); }
.cta-line__btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---- กล่องรอง: รับข่าวสาร ---- */
.form-msg { font-size: .84rem; margin-top: 10px; min-height: 20px; }
.form-msg.is-error { color: #b8422a; }
.form-msg.is-ok { color: var(--primary-green); }

/* ---------- 14. Footer ---------- */
/* พื้นเปลี่ยนเป็นเขียวเข้ม: ของเดิม (--primary-green) ทำให้ตัวอักษรขาวได้ contrast แค่ 3.58:1
   ซึ่งตกเกณฑ์ WCAG มาตั้งแต่ต้น พื้นใหม่ได้ 6.80:1 */
.site-footer {
  position: relative; overflow: hidden;
  background: var(--primary-green-dark);
  color: rgba(255, 255, 255, .88);
  padding-block: 52px 26px;
}
/* ลายน้ำชื่อแบรนด์ตัวยักษ์ วางเต็มความกว้างชิดขอบล่าง
   ใช้ "ตัวอักษร" ไม่ใช่รูป จึงคมทุกความละเอียดและไม่ต้องโหลดไฟล์เพิ่ม */
.footer-big-brand {
  position: absolute; z-index: 0;
  left: 0; right: 0; bottom: -.06em;
  display: flex; justify-content: center; align-items: flex-end;
  line-height: .72;
  overflow: hidden;
  pointer-events: none; user-select: none; -webkit-user-select: none;
}
.footer-big-brand span {
  font-size: clamp(4.2rem, 21vw, 20rem);
  font-weight: 700; letter-spacing: -.03em;
  white-space: nowrap;
  /* ไล่เฉดจากจางบนลงไปจนหายที่ขอบล่าง ตัดด้วย background-clip
     ใช้สีเซจแทนสีขาว เพราะขาวเข้มกว่านี้จะดันคอนทราสต์ตัวหนังสือจริงให้ตก */
  background: linear-gradient(180deg, rgba(168, 189, 168, .16) 0%, rgba(168, 189, 168, .01) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.footer-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.site-footer a:hover { color: #fff; }
.footer-about {
  font-size: .92rem; line-height: 1.8; margin-top: 18px;
  max-width: 54ch; text-wrap: pretty;
}
.footer-line {
  width: 100%; height: 1px; border: 0; margin: 32px 0 28px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3) 18%, rgba(255, 255, 255, .3) 82%, transparent);
}

/* ช่องทางติดต่อ — ไอคอนล้วน ต้องมี aria-label กำกับทุกปุ่ม */
.footer-social { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.footer-social li { margin: 0; }
.footer-social__btn {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26);
  transition: background var(--t), box-shadow var(--t), transform var(--t);
}
/* โลโก้แบรนด์เป็น path ตัน ใช้ fill ไม่ใช่ stroke */
.footer-social__btn svg { width: 20px; height: 20px; fill: #fff; stroke: none; transition: fill var(--t); }
.footer-social__btn--line svg { width: 22px; height: 22px; }
.footer-social__btn:hover {
  background: #fff; transform: translateY(-3px);
  box-shadow: inset 0 0 0 1px #fff, 0 8px 18px rgba(0, 0, 0, .18);
}
.footer-social__btn:hover svg { fill: var(--primary-green-dark); }
.footer-social__btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.footer-bottom {
  margin-top: 34px; padding-top: 0; border: 0;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: .84rem;
}
.footer-bottom ul { display: flex; gap: 10px 22px; flex-wrap: wrap; justify-content: center; }
.footer-bottom li { margin: 0; }
.footer-bottom a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255, 255, 255, .35); }
.footer-bottom a:hover { text-decoration-color: currentColor; }
.footer-bottom p { opacity: .8; }
.footer-note { font-size: .78rem; opacity: .7; margin-top: 16px; max-width: 62ch; line-height: 1.7; }

/* ---------- 15. Cart drawer ---------- */
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 92vw);
  background: var(--warm-white); z-index: 200;
  transform: translateX(100%); transition: transform .3s ease;
  display: flex; flex-direction: column;
  box-shadow: -12px 0 40px rgba(32, 35, 31, .14);
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.cart-drawer__head h2 { font-size: 1.1rem; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 20px; display: grid; gap: 14px; align-content: start; }
.cart-item { display: grid; grid-template-columns: 68px 1fr auto; gap: 12px; align-items: center; }
.cart-item img { width: 68px; height: 68px; object-fit: cover; border-radius: var(--radius-sm); }
.cart-item__name { font-size: .9rem; line-height: 1.4; }
.cart-item__price { font-size: .85rem; color: var(--primary-green); font-weight: 500; }
.qty { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }
.qty button {
  width: 26px; height: 26px; border-radius: 50%; background: var(--light-sage);
  display: grid; place-items: center; font-size: 1rem; line-height: 1; color: var(--primary-green-dark);
  transition: background var(--t);
}
.qty button:hover { background: var(--sage-green); color: #fff; }
.qty span { min-width: 24px; text-align: center; font-size: .88rem; }
.cart-remove { color: var(--muted); font-size: .78rem; text-decoration: underline; align-self: start; }
.cart-remove:hover { color: #b8422a; }
.cart-drawer__foot { border-top: 1px solid var(--line); padding: 18px 20px; display: grid; gap: 12px; }
.cart-sum { display: flex; flex-direction: column; gap: 6px; }
.cart-sum__row { display: flex; justify-content: space-between; font-size: .9rem; color: var(--muted); }
.cart-ship-note { font-size: .82rem; text-align: center; color: var(--accent-orange-dark); background: var(--cream); border-radius: var(--radius-sm); padding: 8px 10px; margin: 0; }
.cart-ship-note.is-free { color: var(--primary-green-dark); background: var(--light-sage); }
.cart-total { display: flex; justify-content: space-between; font-weight: 500; font-size: 1.05rem; border-top: 1px solid var(--line); padding-top: 10px; }
.cart-hint { font-size: .78rem; color: var(--muted); text-align: center; }
.empty-state { text-align: center; color: var(--muted); padding: 46px 16px; font-size: .93rem; }
.empty-state svg { width: 54px; height: 54px; stroke: var(--sage-green); margin: 0 auto 14px; }

/* ---------- 16. Toast ---------- */
.toast-wrap {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 300; display: grid; gap: 8px; width: min(360px, 92vw);
}
.toast {
  background: var(--primary-green); color: #fff;
  padding: 12px 18px; border-radius: var(--radius-pill);
  font-size: .9rem; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px;
  animation: toast-in .3s ease;
}
.toast svg { width: 18px; height: 18px; stroke: #fff; flex-shrink: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- 17. Back to top & sticky mobile CTA ---------- */
.back-to-top {
  position: fixed; right: 16px; bottom: 84px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary-green); display: grid; place-items: center;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transition: opacity var(--t), visibility var(--t);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; }
.back-to-top svg { width: 20px; height: 20px; stroke: #fff; }

/* แถบเมนูล่างจอ (มือถือ) — แคปซูลเรียบ ไม่มีโหนก */
.tabbar {
  position: fixed; z-index: 95;
  left: 14px; right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  height: 70px;
  display: none; align-items: stretch;
  background: var(--warm-white);
  border-radius: 24px;
  box-shadow: 0 10px 26px rgba(32, 35, 31, .18), 0 2px 4px rgba(32, 35, 31, .06),
              inset 0 0 0 1px rgba(32, 35, 31, .05);
}

.tabbar__items { flex: 1; min-width: 0; display: flex; padding: 0 8px; }

.tabbar__item {
  position: relative;
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 2px;
  color: var(--muted-strong);
  transition: color var(--t);
}
.tabbar__ic { display: grid; place-items: center; height: 26px; }
.tabbar__item svg { width: 25px; height: 25px; stroke: currentColor; fill: none; transition: stroke-width var(--t); }
.tabbar__label {
  font-size: .68rem; line-height: 1.25; font-weight: 400;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ช่องที่เลือกอยู่: เขียวเข้ม + ขีดสั้นใต้ป้าย */
.tabbar__item.is-active { color: var(--primary-green-dark); }
.tabbar__item.is-active .tabbar__label { font-weight: 500; }
.tabbar__item.is-active svg { stroke-width: 2.1; }
.tabbar__item.is-active::after {
  content: "";
  position: absolute; bottom: 7px; left: 50%;
  width: 18px; height: 3px; margin-left: -9px;
  background: var(--primary-green-dark);
  border-radius: 3px;
}
.tabbar__item:focus-visible { outline: 2px solid var(--primary-green); outline-offset: -2px; border-radius: 14px; }

/* ---------- 18. Breadcrumb ---------- */
.breadcrumb { padding-top: 18px; font-size: .84rem; color: var(--muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.breadcrumb a:hover { color: var(--primary-green); text-decoration: underline; }
.breadcrumb li[aria-current] { color: var(--text); }
.breadcrumb .sep { opacity: .5; }

/* ---------- 19. Page header ---------- */
.page-head { background: var(--cream); padding-bottom: 44px; }
.page-head h1 { font-size: clamp(1.7rem, 4.4vw, 2.5rem); margin-top: 10px; }
.page-head p { color: var(--muted); max-width: 640px; margin-top: 12px; }

/* ---------- 20. Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Prose (หน้าเนื้อหา: ติดต่อ / เกี่ยวกับเรา / นโยบาย / เงื่อนไข) ---------- */
.prose { max-width: 760px; color: var(--text); font-size: .97rem; line-height: 1.85; }
.prose h2 { font-size: 1.18rem; font-weight: 600; margin: 30px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin-bottom: 14px; }
.prose ul { margin: 0 0 18px; padding-left: 20px; list-style: disc; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--primary-green); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--primary-green-dark); }

/* ---------- ฟอร์มติดต่อ ---------- */
.container--narrow { max-width: 680px; }
.contact-form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .9rem; font-weight: 500; }
.field label span { color: var(--accent-orange-dark); }
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--warm-white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color var(--t);
}
.field textarea { resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--sage-green); }
.field input.is-invalid,
.field textarea.is-invalid { border-color: #b8422a; }


/* การ์ดสไลด์ล้นออกนอกคอลัมน์ได้เต็มใบ คลิปที่ขอบ section เท่านั้น
   ใช้ clip ไม่ใช่ hidden เพื่อไม่ให้กลายเป็น scroll container และไม่กระทบ sticky header */
.feature-section { overflow-x: clip; }

/* ---------- จุดเด่นร้าน: โหมด 3D coverflow (มือถือ) ---------- */
.trust-grid.is-cf {
  display: block; position: relative;
  height: 200px;
  overflow: hidden;
  perspective: 1200px;
  padding: 0; margin-inline: -16px;
  scroll-snap-type: none;
  -webkit-mask-image: none; mask-image: none;
}
.trust-grid.is-cf .trust {
  position: absolute; top: 50%; left: 50%;
  width: 250px; height: 168px;
  margin: -84px 0 0 -125px;
  flex: none;
  justify-content: center;
  cursor: pointer;
  transition: transform .55s cubic-bezier(.25,.8,.25,1), opacity .55s ease,
              filter .45s ease, box-shadow .45s ease;
}
/* ใบข้างเบลอเล็กน้อย ให้ใบกลางเด่นขึ้น — เหมือนสไลด์สินค้า */
.trust-grid.is-cf .trust:not(.is-cf-active) { filter: blur(1.2px) saturate(.9); }
.trust-grid.is-cf .trust.is-cf-active {
  cursor: default;
  box-shadow: inset 0 0 0 1px rgba(95, 127, 103, .26), 0 14px 30px rgba(71, 97, 78, .16);
}
.trust-grid.is-cf .trust:hover { transform: none; }

.trust-dots { display: flex; justify-content: center; gap: 4px; margin-top: 14px; }
.trust-dots button {
  width: 21px; height: 34px; padding: 12.5px 6px;
  border: 0; background: transparent; cursor: pointer;
}
.trust-dots button::before {
  content: ""; display: block;
  width: 9px; height: 9px; border-radius: var(--radius-pill);
  background: var(--sage-green);
  transition: width var(--t), background var(--t);
}
.trust-dots button.is-on { width: 38px; }
.trust-dots button.is-on::before { width: 26px; background: var(--primary-green); }
.trust-dots button:focus-visible { outline: 2px solid var(--primary-green); outline-offset: -8px; border-radius: var(--radius-pill); }

@media (prefers-reduced-motion: reduce) {
  .trust-grid.is-cf .trust { transition: none; }
}


/* จำนวนสินค้าบนการ์ดหมวดหมู่ */
.cat-card__count {
  align-self: flex-start;
  font-size: .76rem; font-weight: 500;
  color: var(--primary-green-dark); background: var(--light-sage);
  padding: 3px 10px; border-radius: var(--radius-pill);
}
.cat-card__count:empty { display: none; }
