/* ============ Home ============ */
/* hero (รื้อใหม่ 27 ต.ค. 2026 ให้ตรง mockup ทางการ 76–82 ของทีม) — ทุกค่าวัดจากพิกเซลของ mockup 2000px แล้วแปลงเป็น cqw
   (1cqw = 1% ของความกว้าง .hero__slides ซึ่งเป็น container) กรอบอัตราส่วนคงที่ 2000:516 ตาม mockup ทุกภาพ
   → ตำแหน่ง/ขนาดทุกอย่างย่อขยายตามความกว้างจอพร้อมกันหมด ไม่เพี้ยนสัดส่วนที่จอไหนเลย (เดิมใช้ px/clamp + max-height:460 ทำให้สัดส่วนเปลี่ยนตามจอ)
   วิธีคำนวณ: ขนาดตัวอักษรหาจากความกว้างกล่องตัวอักษรใน mockup ÷ ความกว้างของข้อความเดียวกันในฟอนต์ Mitr (วัดด้วย canvas measureText),
   ตำแหน่งบนชดเชยด้วย metric ของ Mitr (ascent 115/descent 42 ต่อ 100px) — ค่ารายบรรทัดอยู่ใน style ของแต่ละ span ใน index.html */
.hero { background: var(--brand-900); overflow: hidden; position: relative; max-width: 1900px; margin-inline: auto; }
.hero__slides { position: relative; width: 100%; aspect-ratio: 2000 / 516; container-type: inline-size; }
.hero__slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 0.6s ease; }
.hero__slide.is-active { opacity: 1; pointer-events: auto; }
.hero__bg { position: absolute; inset: 0; }
/* ภาพเดสก์ท็อป (slideN-full.jpg) ตัดมาจากภาพ mockup ของทีมเองขนาด 2000x516 = อัตราส่วนกรอบพอดี (ข้อความเดิมที่ฝังบนรูปลบด้วย inpaint แล้ว ส่วนที่อยู่ใต้แผง/บับเบิล/ปุ่มถูกของเราทับมิด)
   เพราะภาพครอปเดิม (slideN-bg.jpg) เป็นแค่ส่วนย่อยของภาพต้นฉบับ วางยังไงก็ไม่ได้มุมกล้องเหมือน mockup — มือถือยังใช้ slideN-bg.jpg ผ่าน <picture> */
.hero__bg picture { display: block; width: 100%; height: 100%; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: var(--bg-pos, center center); }
.hero__panel { position: absolute; top: 0; bottom: 0; background: var(--brand-600); }
.hero__slide--s4 .hero__panel { left: 72.35cqw; right: 0; }
.hero__slide--s5 .hero__panel { left: 0; width: 28.4cqw; }
/* สีบับเบิลวัดจาก mockup (#539F61) อ่อนกว่า --brand-600 จริง ไม่ใช่โปร่งใส (สุ่ม 3 จุดบนพื้นหลังต่างกันได้ค่าเดียวกัน) */
.hero__blob { position: absolute; inset: 0; width: 100%; height: 100%; fill: #539f61; }
.hero__text, .hero__copy { position: absolute; inset: 0; margin: 0; }
.hl { position: absolute; left: calc(var(--x) * 1cqw); top: calc(var(--y) * 1cqw); font-size: calc(var(--fs) * 1cqw); font-weight: var(--fw, 700); line-height: 1; white-space: nowrap; color: #fff; }
.hl--c { transform: translateX(-50%); }
.hero__slide--photo .hl { text-shadow: 0 2px 12px rgba(0, 20, 8, 0.45); }
.hero__slide--photo .hl--n, .hero__slide--photo .hl--d { text-shadow: 0 1px 3px rgba(0, 20, 8, 0.75), 0 2px 12px rgba(0, 20, 8, 0.55); } /* บรรทัดเล็กบนรูปถ่ายให้อ่านออก */
/* ปุ่ม "สั่งเลย": แคปซูลเขียวเข้มไม่มีลูกศร มุมล่างซ้ายของ hero
   (29 ต.ค. 2026) mockup วางปุ่มชิด/เลยขอบล่างจนขอบโดนตัด — ทีมขอให้เว้นจากขอบล่าง โดยไม่ขยับข้อความด้านบน
   → ยกปุ่มขึ้นจากขอบ 1.5cqw และย่อปุ่มลงเล็กน้อย (5.25→4.7cqw) ให้ยังไม่ชนบรรทัดล่างสุดของข้อความ (วัดแล้วทุกสไลด์ ดูค่ารายสไลด์ด้านล่าง) */
.hero__btn {
  position: absolute; z-index: 2; left: 5.7cqw; bottom: 1.5cqw; min-width: 12cqw; height: 4.7cqw; padding: 0 1.6cqw;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 999px;
  background: var(--brand-900); color: #fff; font-size: 2.9cqw; font-weight: 600; line-height: 1; white-space: nowrap;
  box-shadow: 0 0.3cqw 1cqw rgba(0, 20, 8, 0.25);
}
html[data-lang="en"] .hero__btn { font-size: 2.2cqw; }
.hero__btn:hover { background: var(--brand-700); }
.hero__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
/* ค่าเฉพาะเดสก์ท็อป (ห้ามหลุดไปมือถือ: กฎรายสไลด์ specificity สูงกว่ากฎมือถือ จะไปทับ left/bottom:auto แล้วดันปุ่มเพี้ยน — บทเรียน 26 ต.ค.)
   สไลด์ 5 ข้อความบรรทัดล่าง ("ไม่ต้องออกไปซื้อเอง") ลงมาถึง ~19.6cqw จากขอบบน (กรอบสูง 25.8cqw) จึงเว้นขอบล่างได้น้อยกว่าสไลด์อื่น */
@media (min-width: 761px) {
  .hero__btn > span { transform: translateY(-0.2cqw); }
  .hero__slide--s4 .hero__btn { left: 6.1cqw; }
  .hero__slide--s5 .hero__btn { left: 6.8cqw; bottom: 1cqw; }
  .hero__slide--s1 { --bg-pos: center 39.3%; }
  /* mockup ไม่มีจุดนำทาง แต่ยังต้องมีให้กดสลับสไลด์ได้ — ย้ายไปมุมขวาล่างซึ่งว่างทุกสไลด์ (ตรงกลางล่างไปเบียดบรรทัด "ติดต่อเรา" ของสไลด์ 3) */
  /* 6 พ.ย.: เดิมกฎนี้แพ้ .hero__dots พื้นฐานที่อยู่ท้ายไฟล์ (specificity เท่ากัน) จุดเลยลอยกลางจอ — เพิ่ม .hero นำหน้า */
  .hero .hero__dots { left: auto; right: 2.5%; transform: none; }
}
.hero__dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; z-index: 2; }
.hero__dots button { width: 8px; height: 8px; padding: 0; border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.55); cursor: pointer; transition: width 0.2s, background 0.2s; }
.hero__dots button.is-active { width: 22px; border-radius: 5px; background: #fff; }

@media (max-width: 760px) {
  /* mockup มีแต่เดสก์ท็อป — มือถือใช้เลย์เอาต์เดียวกันทุกสไลด์: ข้อความเรียงลงมาซ้ายบนบน gradient เขียวเข้ม แล้วปุ่มต่อท้าย */
  .hero__slides { aspect-ratio: auto; min-height: 420px; }
  /* (29 ต.ค.) designer: scrim เดิมทึบเกือบเต็มจอจนมองไม่เห็นรูป → ไล่จากบน (ตรงข้อความ) ลงล่างให้เห็นรูปถ่ายช่วงล่าง */
  .hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 65, 29, 0.9) 0%, rgba(0, 65, 29, 0.7) 50%, rgba(0, 65, 29, 0.35) 100%); }
  .hero__panel, .hero__blob { display: none; }
  .hero__text { position: relative; z-index: 1; inset: auto; padding: 24px 20px 0; }
  .hero__copy { position: static; }
  .hl { position: static; display: block; transform: none; margin-bottom: 6px; font-size: 26px; white-space: normal; text-shadow: 0 2px 12px rgba(0, 20, 8, 0.45); }
  .hl--d { margin-top: 4px; font-size: 15px; }
  .hl--n { font-size: 13px; }
  .hero__slide--s3 .hl--t { display: inline; margin-right: 0.25em; } /* มือถือ: "ลูกค้าองค์กร และ ร้านค้าส่ง" ต่อกันเป็นประโยค ไม่ให้ "และ" ค้างอยู่บรรทัดเดียว */
  /* position:relative + รีเซ็ต left/bottom: ดูบทเรียน 26 ต.ค. 2026 ใน CLAUDE.md (static ถูกพื้นหลังทับ, relative โดน offset ฝั่งเดสก์ท็อปดันไปทับข้อความ) */
  /* ปุ่มเขียวเข้มบนพื้นเขียวเข้มกลืนจนดูไม่ออกว่าเป็นปุ่ม → มือถือใช้พื้นขาว ตัวหนังสือเขียวเข้ม */
  .hero__btn, html[data-lang="en"] .hero__btn { position: relative; left: auto; bottom: auto; z-index: 2; margin: 14px 0 0 20px; min-width: 0; height: 48px; padding: 0 28px; font-size: 18px; background: #fff; color: var(--brand-900); }
  .hero__btn:hover { background: var(--brand-50, #eef7f0); }
  .hero__dots { bottom: 8px; }
}

/* ของตกแต่งตาม mockup: บลอบแดงอ่อนห้อยใต้ขอบ hero (x 781–975 / 2000) และวงกลมเขียวเข้มโผล่จากขอบซ้ายข้างการ์ดผลไม้
   กล่อง .home-deco สูง 0 วางต่อจาก hero ทันที → ลูกๆ อ้างตำแหน่งจากขอบล่าง hero; margin-top เป็น % = % ของ "ความกว้าง" (ไม่ใช่ความสูง) จึงคงสัดส่วนเดียวกับ hero */
.home-deco { position: relative; height: 0; max-width: 1900px; margin-inline: auto; pointer-events: none; }
.home-deco__coral { position: absolute; top: 0; left: 39.05%; width: 9.7%; height: auto; fill: var(--promo); }
@media (max-width: 1024px) { .home-deco, .home-cats__circle { display: none; } }

/* มาสคอตอยู่ "ใน" ขอบการ์ดเสมอ (การ์ดมี overflow:hidden) กันไม่ให้หลุดลอยออกไปนอกกรอบเวลาการ์ดกว้าง/แคบต่างกัน — เคยวางไว้นอกการ์ดแล้วหลุดเฟรมตอนจอกว้าง (12 ต.ค. 2026) */

.home-cats { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
/* วงกลมเขียวเข้มตาม mockup: ชิด "ขอบจอซ้าย" เสมอ (calc 50% - 50vw = ขอบซ้ายจอเมื่อกล่องอยู่กึ่งกลาง) แต่ความสูงผูกกับการ์ด
   (ศูนย์กลางห่างขอบบนการ์ด 280px รัศมี 81px ตาม mockup ที่ถ่ายจอกว้าง ~1300px) — เดิมผูกกับ hero ทำให้จอกว้างลอยไปไกลจากการ์ด */
.home-cats__circle { position: absolute; left: calc(50% - 50vw - 106px); top: 199px; width: 162px; height: 162px; border-radius: 50%; background: var(--brand-900); pointer-events: none; }
/* หัวข้อหมวดหมู่ชิด hero ตาม mockup (ตัวหนังสือห่างขอบล่าง hero ~12px, การ์ดเริ่มที่ ~48px) — แคบกว่า .section-head ทั่วไป */
@media (min-width: 761px) { .home-cats-head { margin: 8px 0 6px; } }
/* การ์ดหมวดหมู่หน้าแรกตาม mockup 27 ต.ค. 2026: พื้นเขียวหลัก ป้ายชื่อใหญ่ซ้าย รูปคอลลาจ (PNG พื้นโปร่งใส) ลอยฝั่งขวา ไม่มี scrim/คำบรรยายอังกฤษใต้ชื่อ
   ตำแหน่งรูป/ป้ายเป็น cqw ของการ์ดเอง (การ์ด = container) วัดจาก mockup: การ์ดผลไม้กว้าง 892px, ผัก 875px ที่ภาพ 2000px */
/* padding ต้องเป็น 0: หน่วย cqw อ้างความกว้าง "content box" ของ container — ถ้ามี padding ค่าที่วัดจากความกว้างการ์ดเต็มจะเพี้ยน (ปุ่มจึงวาง absolute แทน) */
.cat-card {
  position: relative; display: block; min-height: 340px; padding: 0; border-radius: clamp(20px, 2vw, 40px); overflow: hidden;
  background: var(--brand-600); box-shadow: var(--shadow); container-type: inline-size;
}
.cat-card__title { position: absolute; z-index: 1; left: 5.66cqw; top: 21.65cqw; margin: 0; font-size: 7.12cqw; font-weight: 500; line-height: 1; color: #fff; }
.cat-card--veg .cat-card__title { left: 6.23cqw; top: 22.22cqw; }
.cat-card__art { position: absolute; height: auto; max-width: none; }
.cat-card--fruit .cat-card__art { left: 10.5cqw; top: 4.3cqw; width: 91.36cqw; }
.cat-card--veg .cat-card__art { left: -2cqw; top: 1.3cqw; width: 104.69cqw; }
.cat-card .btn { position: absolute; z-index: 1; left: 28px; bottom: 28px; }
@media (max-width: 760px) {
  .home-cats { grid-template-columns: minmax(0, 1fr); }
  .cat-card { min-height: 280px; }
  .cat-card .btn { left: 20px; bottom: 20px; }
}

.help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.help-card { display: flex; align-items: center; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--brand-50); }
.help-card__icon { flex: none; width: 64px; height: 64px; display: grid; place-items: center; }
.help-card__icon .brand-icon { width: 64px; height: 64px; }
.help-card__icon .icon { font-size: 44px; color: var(--brand-600); }
.help-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
@media (max-width: 900px) { .help-grid { grid-template-columns: minmax(0, 1fr); } }

/* ============ Cart ============ */
.cart { padding-block: 24px 24px; }
.cart__head h1 { font-size: clamp(30px, 4.5vw, 44px); line-height: 1.2; font-weight: 700; }
.cart__count { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 18px; color: var(--brand-600); }
.cart__grid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 24px; align-items: start; margin-top: 20px; }
.summary { position: sticky; top: 96px; }
@media (max-width: 960px) { .cart__grid { grid-template-columns: minmax(0, 1fr); } .summary { position: static; } }

.cart-line {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) auto 90px;
  grid-template-areas: "img info act total"; gap: 8px 20px; align-items: center;
  background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow); padding: 14px; margin-bottom: 14px;
}
.cart-line > a:first-child { grid-area: img; }
.cart-line__img { width: 150px; height: 104px; object-fit: cover; border-radius: 10px; } /* cover ไม่ contain — เหตุผลเดียวกับ .product-card__media (12 ต.ค. 2026) */
.cart-line__info h3 a:hover { text-decoration: underline; }
.cart-empty .icon { font-size: 48px; color: var(--brand-500); margin-bottom: 8px; }
.cart-empty h2 { font-size: 22px; margin-bottom: 6px; }
.cart-line__info { grid-area: info; }
.cart-line__brand { font-size: 13px; color: var(--muted); }
.cart-line__info h3 { font-size: 18px; font-weight: 600; line-height: 1.35; }
.cart-line__info .muted { font-size: 14px; }
.cart-line__sale { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 14px; }
.cart-line__sale del { color: var(--strike); }
.cart-line__sale span { background: var(--promo-soft); color: var(--promo); border-radius: var(--r-pill); padding: 0 10px; font-size: 13px; }
.cart-line__actions { grid-area: act; display: flex; align-items: center; gap: 8px; }
.cart-line__total { grid-area: total; text-align: right; font-size: 20px; font-weight: 700; }
.cart-line__total.is-sale { color: var(--promo); }
@media (max-width: 640px) {
  .cart-line { grid-template-columns: 88px minmax(0, 1fr) auto; grid-template-areas: "img info info" "act act total"; gap: 8px 14px; }
  .cart-line__img { width: 88px; height: 72px; }
  .cart-line__total { align-self: center; }
  .cart-line__info h3 { font-size: 16px; }
}
@media (max-width: 400px) {
  .cart-line { grid-template-columns: 88px minmax(0, 1fr); grid-template-areas: "img info" "act act" "total total"; }
  .cart-line__total { text-align: right; }
}
.cart-empty { text-align: center; padding: 48px 16px; background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow); }
.cart-empty p { margin-bottom: 16px; color: var(--muted); }

.delivery { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 0 0 14px; display: grid; gap: 10px; }
.delivery legend { display: flex; align-items: center; gap: 8px; padding: 0 6px; font-weight: 600; }
.delivery legend .icon { color: var(--brand-600); font-size: 26px; }
.delivery .hint { font-size: 12.5px; color: var(--muted); }
.zip { margin-bottom: 14px; }
.zip > label { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 8px; }
.zip > label .icon { color: var(--brand-600); font-size: 24px; }
.zip__row { display: flex; gap: 8px; }
.zip__row .field { flex: 1; min-width: 0; padding-block: 10px; }
.zip .notice { margin-top: 8px; }
/* ขั้นตรวจพื้นที่จัดส่งในตะกร้า (18 พ.ย. — ทีมขอให้เด่น): ยังไม่ผ่าน = กรอบเหลือง · ผ่านแล้ว = กรอบเขียว · ถูกเรียกกลับ = กระพริบ */
.zip--step { padding: 14px; border: 2px solid var(--accent-yellow); border-radius: 14px; background: #fffbea; scroll-margin: 120px; transition: border-color .2s, background-color .2s; }
.zip--step > label { font-size: 17px; margin-bottom: 4px; }
.zip--step .zip__hint { font-size: 13.5px; line-height: 1.5; color: #7a5200; margin-bottom: 10px; }
.zip--step .zip__row .field { background: #fff; }
.zip--step.is-ok { border-color: var(--brand-500); background: var(--brand-50); }
.zip--step.is-ok .zip__hint { display: none; }
.zip--step.is-attn { animation: zip-attn .9s ease-in-out 2; }
@keyframes zip-attn { 0%, 100% { box-shadow: 0 0 0 0 rgba(241, 91, 91, 0); border-color: var(--accent-yellow); } 50% { box-shadow: 0 0 0 6px rgba(241, 91, 91, .25); border-color: var(--promo); } }
@media (prefers-reduced-motion: reduce) { .zip--step.is-attn { animation: none; border-color: var(--promo); } }

/* ============ Checkout ============ */
.checkout-header { background: #fff; box-shadow: var(--shadow); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.checkout-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; }
.steps { display: flex; align-items: center; gap: 8px; }
.steps li { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--muted); }
.steps li + li::before { content: ""; width: 28px; border-top: 2px solid var(--line); margin-right: 4px; }
.steps__n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 600; background: #fff; border: 1.5px solid var(--line); }
.steps .is-done .steps__n { background: var(--strike); border-color: var(--strike); color: #fff; }
.steps .is-current { color: var(--brand-700); font-weight: 600; }
.steps .is-current .steps__n { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.secure { display: flex; align-items: center; gap: 10px; font-size: 12.5px; line-height: 1.35; }
.secure .icon { font-size: 26px; color: var(--brand-600); }
.secure strong { display: block; font-size: 14px; color: var(--brand-700); }
@media (max-width: 820px) {
  .checkout-header__inner { flex-wrap: wrap; }
  .steps { order: 3; width: 100%; justify-content: center; padding-bottom: 4px; }
  .secure span { display: none; }
  .steps li:not(.is-current) > [data-th], .steps li:not(.is-current) > [data-en], .steps li:not(.is-current) > a:not(.steps__n) { display: none; } /* ซ่อนป้ายขั้นที่ไม่ใช่ขั้นปัจจุบันทั้งสองภาษา (เดิม :last-child ซ่อนได้แค่ภาษาอังกฤษ) */
  .steps li + li::before { width: 14px; }
}

.checkout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; padding-block: 20px 8px; }
@media (max-width: 960px) { .checkout { grid-template-columns: minmax(0, 1fr); } }
/* minmax(0,1fr): คอลัมน์เดียวต้องหดได้ — เดิม grid คอลัมน์อัตโนมัติขยายตามเนื้อหา (แถวอีเมล/เบอร์ 2 ช่อง) จนหน้ามือถือ 375 กว้าง 480 (QA 19 พ.ย.) */
.checkout__form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.form-section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.form-section + .form-section { padding-top: 16px; border-top: 1px solid var(--line); }
.form-section > h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 22px; font-weight: 700; }
.form-section > h2 .icon { color: var(--brand-600); font-size: 28px; }
.form-section > h2 small { margin-left: auto; font-size: 13px; font-weight: 400; }
.link { color: var(--brand-700); text-decoration: underline; }

.choice-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.choice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.choice input { margin-top: 4px; accent-color: var(--brand-600); width: 18px; height: 18px; flex: none; }
.choice strong { display: block; font-weight: 500; font-size: 14.5px; }
.choice small { color: var(--muted); font-size: 12.5px; }
.choice:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); box-shadow: 0 0 0 2px var(--brand-100); }
.choice--wide { grid-column: 1 / -1; align-items: center; }
.choice__end { margin-left: auto; display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brand-700); font-size: 18px; }
.choice__end .icon { font-size: 32px; }
.pay-logos { display: flex; gap: 4px; margin-top: 4px; }
.pay-logos i { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.3px; padding: 2px 6px; border-radius: 4px; color: #fff; }
.pay-logos i:nth-child(1) { background: #1a1f71; }
.pay-logos i:nth-child(2) { background: #eb001b; }
.pay-logos i:nth-child(3) { background: #0b7f3e; }
.pay-panel { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1.5px dashed var(--brand-200); border-radius: 12px; background: var(--brand-50); }
.pay-panel > .icon { font-size: 36px; color: var(--brand-700); flex: none; }
/* ช่องเนื้อหาต้องหดได้ (min-width:0) — ไม่งั้นช่องเลือกไฟล์สลิปดันกล่องโอนเงินกว้างเกินจอมือถือ (QA 19 พ.ย.) */
.pay-panel > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pay-panel strong { display: block; }
.pay-panel small { color: var(--muted); }
.pay-panel input[type="file"] { margin-top: 8px; font-size: 14px; max-width: 100%; }

.order-lines { display: grid; gap: 12px; }
.order-line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; background: var(--brand-50); }
.order-line img { width: 64px; height: 56px; object-fit: contain; background: #fff; border-radius: 10px; }
.order-line h3 { font-size: 15px; font-weight: 600; line-height: 1.35; }
.order-line small { color: var(--muted); }
.order-line__price { text-align: right; font-weight: 700; }
.coupon { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; margin-top: 14px; border-radius: 12px; background: var(--brand-50); }
.coupon .field { flex: 1 1 130px; }
.coupon > .icon { color: var(--brand-700); font-size: 26px; }
.coupon strong { white-space: nowrap; }
.coupon .field { flex: 1; min-width: 0; padding-block: 8px; }
.coupon .btn { background: var(--brand-100); color: var(--brand-700); }
.legal { margin-top: 12px; font-size: 12.5px; text-align: center; color: var(--muted); }
.checkout__aside { display: grid; gap: 16px; }

/* หน้าต่างตรวจที่อยู่อีกครั้งก่อนสร้างออเดอร์ (checkout, 27 ต.ค. 2026) */
.review-dialog { width: min(560px, calc(100vw - 32px)); padding: 0; border: none; border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 40, 18, 0.28); color: inherit; }
.review-dialog::backdrop { background: rgba(0, 30, 12, 0.55); }
.review-dialog__body { display: grid; gap: 14px; padding: 24px; }
.review-dialog h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 20px; color: var(--brand-900); }
.review-dialog__list { display: grid; gap: 8px; margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--brand-50, #eef7f0); }
.review-dialog__list > div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; }
.review-dialog__list dt { color: var(--muted, #5b6b60); font-size: 14px; }
.review-dialog__list dd { margin: 0; font-weight: 500; }
.review-dialog__actions { justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 480px) { .review-dialog__list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } .review-dialog__actions .btn { flex: 1 1 100%; } }

/* สไลด์รูปโปรโมชั่นที่แอดมินอัปโหลด (29 ต.ค. 2026) — รูปเดสก์ท็อป 2000×516 = อัตราส่วนกรอบพอดี ไม่ครอป; มือถือใช้รูปแยก 1080×1200 (9:10) */
.hero__slide--image picture, .hero__slide--image img, .hero__img-link { display: block; width: 100%; height: 100%; }
.hero__slide--image img { object-fit: cover; }
/* ปุ่ม "สั่งเลย" บนสไลด์รูป (6 พ.ย. 2026): จอคอมใช้ตำแหน่งเดิมของ .hero__btn (มุมซ้ายล่าง — กรอบ = ทั้งสไลด์)
   มือถือที่มีรูปมือถือ: กรอบ .hero__frame เท่ารูป 1080×1200 จัดกลาง แล้ววางปุ่มเป็น % ของรูป (cqw ของกรอบ) → อยู่ในช่องที่ทีมเว้นไว้ (~500×280 px มุมซ้ายล่างของรูป) ทุกความกว้างจอ
   มือถือที่ไม่มีรูปมือถือ (แสดงรูปจอคอมย่อ): ปุ่มลอยมุมซ้ายล่างของสไลด์ บนพื้นเขียวใต้รูป */
.hero__frame { position: absolute; inset: 0; }
@media (max-width: 760px) {
  .hero__slide--image .hero__frame { inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(100%, 378px); aspect-ratio: 1080 / 1200; container-type: inline-size; }
  .hero__slide--image .hero__frame .hero__btn, html[data-lang="en"] .hero__slide--image .hero__frame .hero__btn { position: absolute; left: 5.4cqw; bottom: 9.6cqw; margin: 0; height: 12.8cqw; padding: 0 7.5cqw; font-size: 4.8cqw; }
  .hero__slide--nomobile .hero__frame { inset: 0; top: 0; left: 0; transform: none; width: auto; aspect-ratio: auto; container-type: normal; }
  .hero__slide--nomobile .hero__frame .hero__btn, html[data-lang="en"] .hero__slide--nomobile .hero__frame .hero__btn { left: 20px; bottom: 36px; height: 48px; padding: 0 28px; font-size: 18px; }
}
/* แถบ "ตัวอย่างแบนเนอร์" (index.html?bnpreview=1 จากหลังบ้าน) — แอดมินเห็นคนเดียว */
.bn-preview-bar { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 16px; background: #fff4d6; border-bottom: 2px solid #e8a33d; color: #5a3b00; font-size: 14px; }
.bn-preview-bar span { flex: 1 1 220px; min-width: 0; }
.bn-preview-bar button { padding: 6px 12px; border: 1px solid #c98a2b; border-radius: 999px; background: #fff; color: #5a3b00; font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 760px) {
  .hero__slide--image { aspect-ratio: auto; }
  /* จอ 500–760px กรอบกว้างกว่ารูปมือถือ 9:10 มาก — แสดงเต็มรูปไม่ครอปข้อความในรูปทิ้ง (เติมพื้นเขียวเข้มรอบๆ) */
  .hero__slide--image img { object-fit: contain; background: var(--brand-900); }
}

/* === 2 พ.ย. logo/mascot/hero6/why === */
/* โลโก้ checkout (text-only 4.49:1): 44px เดสก์ท็อป / 36px มือถือ */
.checkout-header .logo img { height: 44px; width: auto; }
@media (max-width: 820px) { .checkout-header .logo img { height: 36px; } }
/* hero สไลด์ 6: คำเน้น "ครัวคุณ"/"kitchen" สีมะนาว */
.hl .hl-lime { color: var(--accent-lime, #bcd85f); font-weight: inherit; }
/* สไลด์ 6: บรรทัดเล็ก/ท้ายหัวข้อยื่นพ้นขอบก้อนเมฆลงบนสายพาน → ใส่เงาให้อ่านออก (ก้อนเมฆห้ามขยับ) */
.hero__slide--s6 .hl { text-shadow: 0 1px 3px rgba(0, 40, 15, 0.45); }
.hero__slide--s6 .hl--d { text-shadow: 0 1px 3px rgba(0, 20, 8, 0.75), 0 2px 12px rgba(0, 20, 8, 0.55); }

/* === 3 พ.ย. hero สไลด์ 6: บรรทัดเล็กเป็นแคปซูลเขียวเข้ม (อ่านออกบนรูปถ่าย ไม่ต้องพึ่ง text-shadow) — มือถือกลับเป็นข้อความธรรมดา === */
.hl--pill { padding: 0.4em 1em; border-radius: 999px; background: rgba(0, 65, 29, 0.88); text-shadow: none !important; line-height: 1.2; }
@media (max-width: 760px) { .hl--pill { padding: 0; background: none; border-radius: 0; } }
