/* ชุดสีและหน้าตาหน้าร้าน (decisions 3 พ.ย. 2569 · ข้อ 19, 21.7) — โหลดเฉพาะหน้าร้าน หลังบ้านยังใช้ app.css ชุดเดิม
   ตัวอักษรขั้นต่ำ: เนื้อหา 16 px · ข้อความรอง 14 px · ชื่อเมนูล่าง 12 px · ชุดทดสอบตรวจไฟล์นี้ */
@font-face { font-family: 'Noto Sans Thai'; font-weight: 400; font-display: swap; src: url(/assets/s/noto-sans-thai-400.ttf) format('truetype'); }
@font-face { font-family: 'Noto Sans Thai'; font-weight: 500; font-display: swap; src: url(/assets/s/noto-sans-thai-500.ttf) format('truetype'); }
@font-face { font-family: 'Noto Sans Thai'; font-weight: 600; font-display: swap; src: url(/assets/s/noto-sans-thai-600.ttf) format('truetype'); }
@font-face { font-family: 'Noto Sans Thai'; font-weight: 700; font-display: swap; src: url(/assets/s/noto-sans-thai-700.ttf) format('truetype'); }

:root {
  --buy: #B54708; --buy-dark: #8F3806; --decor: #EF7700; --decor-blue: #86BFD9; --sky: #EDF6FA; --cream: #FFF8F1;
  --brand: #B54708; --brand-dark: #8F3806; --brand-tint: #FFF8F1; --promo: #B54708;
  --ink: #233D49; --ink-2: #52636B; --line: #E2E7E8; --line-2: #C3CED3; --ground: #FFFFFF; --mid-bg: #EDF6FA;
  --ok: #22664C; --ok-bg: #E8F4EE; --warn: #8B5012; --warn-bg: #FDF3E4; --bad: #A6342A; --bad-bg: #FBECEA;
  --gutter: 20px; --bnav-h: calc(66px + env(safe-area-inset-bottom));
}
@media (max-width: 369px) { :root { --gutter: 16px; } }
[hidden] { display: none !important; }   /* คลาสที่ตั้ง display เองต้องไม่ทับ hidden */
body { font-family: 'Noto Sans Thai', 'Leelawadee UI', Tahoma, sans-serif; background: #fff; }
h1 { font-size: 26px; } h2 { font-size: 22px; } h3 { font-size: 18px; }

/* ปุ่มซื้อและราคาเป็นส้มทุกร้าน · สีธีม (--accent) ใช้เฉพาะของตกแต่ง */
.btn { background: var(--buy); border-radius: 10px; }
.btn:hover { background: var(--buy-dark); filter: none; }
.btn.ghost { background: #fff; color: var(--buy); border-color: var(--buy); }
.btn.ghost:hover { background: var(--cream); color: var(--buy-dark); }
.btn.grey { background: var(--sky); } .btn.grey:hover { background: #DCEBF2; }
.btn.line, .btn.line:hover { background: #06C755; color: #05341A; }
.btn.danger { background: var(--bad); }
.btn.sm { font-size: 14px; min-height: 44px; }
.price { color: var(--buy); }
.icon-btn { border-color: var(--line); border-radius: 12px; }
.icon-btn.fill { background: #fff; border-color: var(--line); color: var(--ink); }
.badge { background: var(--buy); font-size: 14px; }
.chip, .tag { font-size: 14px; }
.chip.promo { background: var(--buy); }
.banner { font-size: 16px; } .opt { font-size: 16px; } label.field { font-size: 16px; } .check { font-size: 16px; }
.tabs a { font-size: 14px; min-height: 44px; }
.tabs a[aria-current=page] { background: var(--ink); border-color: var(--ink); }
.card { border-radius: 14px; }
.ph { font-size: 14px; background: var(--sky); }
table.t, table.t th { font-size: 14px; }
.stars { color: #C9700A; }

/* ---------- โครงหน้า ---------- */
.store { max-width: none; background: #fff; padding-bottom: 0; }
.store-main { max-width: 640px; margin: 0 auto; }
.store-main.wide { max-width: 1184px; }
.section { padding: 28px var(--gutter) 4px; gap: 14px; }
.section > h1, .section > h2 { margin: 0; }

/* หัวเว็บ */
.store-top { position: static; display: block; padding: 0; background: #fff; border-bottom: 1px solid var(--line); }
.hdr-main { max-width: 1184px; margin: 0 auto; padding: 12px var(--gutter); display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; justify-content: flex-end; }
.store-logo { display: flex; align-items: flex-end; gap: 4px; margin-right: auto; min-height: 44px; text-decoration: none; color: var(--ink); }
.store-logo img { height: 34px; width: auto; max-width: 170px; }
.store-logo .tld { font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.store-logo.name { align-items: center; font-size: 19px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.back-btn { border: 0; }
.store-top .hdr-search { order: 10; flex: 1 1 100%; position: relative; display: flex; }   /* ต้องชนะ .store-top form ของ app.css ไม่อย่างนั้นจอ 430 px ช่องค้นหาถูกบีบ */
.hdr-search svg { position: absolute; left: 14px; top: 13px; color: var(--ink-2); pointer-events: none; }
.hdr-search input { padding-left: 46px; padding-right: 76px; background: #F6F9FA; border: 1px solid var(--line-2); border-radius: 12px; }
.hdr-search button { position: absolute; right: 2px; top: 2px; height: 44px; min-width: 66px; border: 0; border-radius: 10px; background: none; color: var(--ink); font-weight: 500; cursor: pointer; }
.hdr-help { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.25; }
.hdr-help-lead { display: block; }
.hdr-help strong { display: block; text-decoration: underline; color: #047A37; }   /* เขียวเข้ม 5.5:1 บนพื้นขาว (เขียว LINE #06C755 ได้แค่ 2.3:1 ไม่ผ่านข้อ 21.7) · เจ้าของเลือก 5 ธ.ค. 2569 */
.hdr-nav { display: none; }
.dnav { display: none; }
.store[data-bnav~=cart] .hdr-cart, .store[data-bnav~=account] .hdr-account, .store[data-bnav~=categories] .hdr-categories { display: none !important; }
.hdr-added { background: var(--ok-bg); color: var(--ok); padding: 10px var(--gutter); font-weight: 600; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.hdr-added a { color: var(--ok); }
.store-notice { padding: 12px var(--gutter) 0; }
/* มือถือ (เจ้าของสั่ง 5 ธ.ค. 2569 · ทุกหน้าร้าน ทั้ง kosno.shop และร้านตัวแทน): ปุ่มหมวดหมู่เคยตกลงไปใต้ LINE บนมือถือบางรุ่น
   แถวบน = (ปุ่มกลับ) · โลโก้/ชื่อร้าน · ทักไลน์ "ให้เราช่วยคลิก @LINE" · แถวสอง = ปุ่มหมวดหมู่ + ช่องค้นหา
   โลโก้หดได้ (ฐาน 0) ปุ่มไม่หด · ตัวคั่นบรรทัด ::before บังคับให้ปุ่มหมวดหมู่ขึ้นแถวสองเสมอ */
@media (max-width: 767px) {
  .hdr-main .store-logo, .hdr-main .store-logo.name { flex: 1 1 0; min-width: 0; }
  .hdr-main .store-logo:not(.name) { min-height: 0; align-self: center; padding: 13px 0; margin: -13px 0; }   /* โลโก้อยู่กึ่งกลางแถว ระดับเดียวกับปุ่มทักไลน์ (เดิมชิดล่างกล่อง 44px · เจ้าของสั่ง 5 ธ.ค. 2569) */
  .hdr-help { gap: 6px; }
  .hdr-main::before { content: ''; order: 9; flex: 0 0 100%; height: 0; margin-top: -10px; }   /* ขึ้นแถวใหม่ (ลบ row-gap ที่เกินของแถวว่าง) */
  .hdr-main .hdr-categories { order: 9; }
  .store-top .hdr-search { order: 10; flex: 1 1 0; min-width: 0; }
  .store-logo img { height: auto; max-height: 34px; max-width: 100%; min-width: 0; object-fit: contain; object-position: left center; }
  .hdr-help, .store-top .icon-btn { flex: 0 0 auto; }
  .hdr-main { column-gap: 8px; }
}
@media (min-width: 768px) {
  .hdr-main { flex-wrap: nowrap; padding-top: 18px; padding-bottom: 18px; gap: 20px; }
  .store-logo { margin-right: 12px; }
  .store-logo img { height: 40px; max-width: 200px; }
  .store-top .hdr-search { order: 0; flex: 1 1 auto; }
  .hdr-categories { display: none !important; }
  .hdr-nav { display: flex; align-items: center; gap: 18px; max-width: 1184px; margin: 0 auto; padding: 0 var(--gutter); border-top: 1px solid var(--line); }
  .store-top { border-bottom: 1px solid var(--line); }
  .hdr-cat { display: flex; align-items: center; gap: 8px; min-height: 52px; color: var(--ink); text-decoration: none; font-weight: 500; }
  .dnav { display: flex; margin-left: auto; gap: 4px; }
  .dnav a { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 12px; color: var(--ink); text-decoration: none; position: relative; border-bottom: 2px solid transparent; }
  .dnav a[aria-current=page] { color: var(--buy); font-weight: 700; border-bottom-color: var(--buy); }
  .dnav .badge { position: static; border: 0; }
}

/* เมนูล่าง: แสดงทุกหน้า · ปุ่มซื้อและชำระเงินวางเหนือเมนู ไม่ทับกัน */
@media (max-width: 767px) {
  .bnav { padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -2px 12px rgba(35,61,73,.06); }
  .bnav a { font-size: 12px; font-weight: 500; color: var(--ink-2); min-height: 56px; border-radius: 10px; }
  .bnav a[aria-current=page] { color: var(--buy); font-weight: 700; background: var(--cream); }
  .bnav .badge { border-width: 1px; }
  .store.has-bnav { padding-bottom: var(--bnav-h); }
  .store.has-bnav .sticky-bar { bottom: var(--bnav-h); }
  .store.has-bnav.has-sticky { padding-bottom: calc(var(--bnav-h) + 78px); }
  .store.has-bnav ~ .cookie-banner { bottom: calc(var(--bnav-h) + 10px); }
  .store.has-bnav.has-sticky ~ .cookie-banner { bottom: calc(var(--bnav-h) + 88px); }
}
.sticky-bar { box-shadow: 0 -2px 12px rgba(35,61,73,.08); }
.sticky-bar > div { max-width: 1184px; padding: 10px var(--gutter); }
.sticky-bar .btn { min-height: 52px; }
@media (min-width: 768px) {
  .store.has-sticky { padding-bottom: 76px; }
  .sticky-bar > div { justify-content: flex-end; }
  .sticky-bar .btn.grow { flex: 0 0 220px; }
}

/* ท้ายหน้า */
.store-foot { background: var(--ink); color: #E8EEF0; margin-top: 40px; padding: 28px var(--gutter) 32px; font-size: 14px; }
.store-foot > * { display: block; width: 100%; max-width: 1144px; margin-inline: auto; }
.store-foot .row { display: flex; gap: 8px 18px; }

/* หัวข้อส่วน */
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.sec-head .eyebrow, .eyebrow { display: block; font-size: 14px; font-weight: 600; letter-spacing: .12em; color: var(--buy); text-transform: uppercase; }
.sec-head h2 { font-size: 24px; line-height: 1.35; }
.sec-sub { color: var(--ink-2); margin: 2px 0 0; }
.see-all { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; color: var(--buy); text-decoration: none; white-space: nowrap; }
.store-main > .section + .section, .blk + .blk .section.ruled { border-top: 0; }

/* ---------- แบนเนอร์หลัก ---------- */
.hero-slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; background: var(--cream); border-radius: 18px; margin: 16px var(--gutter) 0; }
.hero-slider .slide { flex: 0 0 100%; scroll-snap-align: start; background: none; padding: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: stretch; }
.hero-copy { padding: 22px 16px 22px 18px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; justify-content: center; }
.hero-copy .eyebrow { letter-spacing: .08em; overflow-wrap: anywhere; }
.hero-copy h1, .hero-copy h2 { font-size: 28px; line-height: 1.3; }
.hero-copy h1 em, .hero-copy h2 em { display: block; font-style: normal; color: var(--buy); }
.hero-copy p { color: var(--ink-2); }
.hero-copy .btn { margin-top: 6px; padding: 0 16px; }
.hero-media { position: relative; min-height: 260px; overflow: hidden; }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-mock { position: absolute; right: 8px; bottom: 8px; background: rgba(255,255,255,.92); color: var(--ink); border-radius: 6px; padding: 0 8px; font-size: 14px; }
/* มือถือวางข้อความคู่รูปตามดีไซน์ · จอแคบตัดลูกศรในปุ่มเพื่อให้ปุ่มไม่ล้น */
@media (max-width: 419px) {
  .hero-copy { padding: 18px 10px 18px 14px; }
  .hero-copy .eyebrow { letter-spacing: .04em; line-height: 1.35; }
  .hero-copy h1, .hero-copy h2 { font-size: 24px; }
  .hero-copy .btn { padding: 0 12px; width: 100%; }
  .hero-copy .btn svg { display: none; }
}
@media (min-width: 768px) {
  .hero-slider { margin-top: 28px; }
  .hero-slider .slide { grid-template-columns: minmax(0, 47%) minmax(0, 53%); }
  .hero-copy { padding: 40px; gap: 14px; }
  .hero-copy h1, .hero-copy h2 { font-size: 42px; }
  .hero-media { min-height: 400px; }
}

/* แถบความน่าเชื่อถือ */
.trust { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; margin: 18px var(--gutter) 0; padding: 0 0 20px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
.trust > div { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.trust svg { flex: 0 0 24px; color: var(--ink); margin-top: 2px; }
.trust strong { display: block; line-height: 1.4; }
.trust span span { display: block; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
@media (min-width: 900px) { .trust { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; } .trust > div { padding: 0 20px; border-left: 1px solid var(--line); } .trust > div:first-child { border-left: 0; } }
.fraud-note { margin: 24px var(--gutter) 0; }

/* แถวหมวดสินค้า */
.cat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px; }
@media (min-width: 768px) { .cat-row { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.cat-row a { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.4; min-height: 44px; }
.cat-ico { width: 64px; height: 64px; border-radius: 18px; background: var(--sky); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.cat-row a:nth-child(even) .cat-ico { background: var(--cream); color: var(--buy); }

/* ---------- การ์ดสินค้า ---------- */
.grid2.cards { gap: 22px 12px; }
@media (min-width: 768px) { .store .grid2.cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; } }
@media (min-width: 1100px) { .store .grid2.cards.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 20px; } }
.pcard { background: none; border: 0; border-radius: 0; overflow: visible; display: flex; flex-direction: column; min-width: 0; }
.pcard-link { display: flex; flex-direction: column; gap: 8px; color: var(--ink); text-decoration: none; flex: 1; }
.pcard-link:hover { color: var(--ink); }
.pcard .ph { aspect-ratio: 4 / 5; position: relative; border-radius: 14px; overflow: hidden; }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.pcard .ph .chip { position: absolute; top: 8px; left: 8px; z-index: 1; }
.pcard .body { padding: 0; gap: 2px; }
.pcard .cat { font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.pcard .name { font-size: 16px; line-height: 1.45; height: auto; max-height: 2.9em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pcard .low { font-size: 14px; color: var(--warn); font-weight: 600; }
.pcard-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.pcard .price { font-size: 19px; font-weight: 700; line-height: 1.3; display: block; }
.pcard s { font-size: 14px; color: var(--ink-2); }
.qa-form { margin: 0; flex: 0 0 auto; }
.qa-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid #F0D9C2; border-radius: 10px; background: var(--cream); color: var(--buy); cursor: pointer; text-decoration: none; padding: 0; }
.qa-btn:hover { background: #FCEBD9; color: var(--buy-dark); }

/* หน้าต่างเลือกตัวเลือกจากการ์ด */
.qa-dialog { border: 0; border-radius: 16px; padding: 18px var(--gutter) 20px; width: min(480px, calc(100vw - 24px)); max-height: 86vh; color: var(--ink); }
.qa-dialog::backdrop { background: rgba(35,61,73,.45); }
.qa-head { display: flex; gap: 12px; align-items: flex-start; }
.qa-head img, .qa-head .ph { width: 88px; height: 110px; flex: 0 0 88px; border-radius: 12px; object-fit: cover; }
.qa-close { margin-left: auto; flex: 0 0 44px; width: 44px; height: 44px; border: 0; background: none; font-size: 24px; color: var(--ink); cursor: pointer; }

/* ---------- หน้าสินค้า ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; padding: 14px var(--gutter) 0; font-size: 14px; color: var(--ink-2); }
.crumbs a { color: var(--ink); min-height: 32px; display: inline-flex; align-items: center; }
.pdp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 14px var(--gutter) 0; }
@media (min-width: 900px) { .pdp { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: start; } .pdp .gallery { position: sticky; top: 16px; } }
.gallery { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.g-frame { position: relative; }
.g-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 16px; background: var(--sky); scrollbar-width: none; }
.g-track::-webkit-scrollbar { display: none; }
.g-track figure { flex: 0 0 100%; margin: 0; scroll-snap-align: start; aspect-ratio: 4 / 5; scroll-margin-top: 80px; }
.g-track a { display: block; height: 100%; }
.g-track img { width: 100%; height: 100%; object-fit: contain; }
.g-empty { aspect-ratio: 4 / 3; border-radius: 16px; position: relative; }
.g-empty .chip { position: absolute; top: 12px; left: 12px; }
.g-nav { position: absolute; top: 50%; margin-top: -22px; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.94); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.g-nav.prev { left: 10px; } .g-nav.next { right: 10px; }
.g-nav.next svg { transform: scaleX(-1); }
.g-count { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: rgba(255,255,255,.94); border-radius: 999px; padding: 0 12px; font-size: 14px; }
.g-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.g-thumbs a { flex: 0 0 64px; width: 64px; height: 80px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: var(--sky); }
.g-thumbs a[aria-current=true] { border-color: var(--buy); }
.g-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.buy-box { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.buy-box h1 { font-size: 26px; line-height: 1.35; }
.pdp-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.pdp-price .price { font-size: 30px; font-weight: 700; line-height: 1.25; }
.opt { min-height: 44px; display: inline-flex; align-items: center; border-color: var(--line-2); text-align: left; color: var(--ink); }
.opt:has(input:checked), .opt[aria-pressed=true] { border: 2px solid var(--buy); background: var(--cream); color: var(--buy-dark); font-weight: 600; }
.opt[disabled] { opacity: .45; cursor: not-allowed; }
.opt-group { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.opt-group legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
.qty button { color: var(--ink); }
.info-list { display: flex; flex-direction: column; gap: 8px; }
.info-list .row { flex-wrap: nowrap; align-items: flex-start; }
.info-list svg { flex: 0 0 20px; margin-top: 3px; }
.attrs { margin: 0; display: grid; grid-template-columns: minmax(96px, 34%) minmax(0, 1fr); border-top: 1px solid var(--line); }
.attrs dt, .attrs dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.attrs dt { color: var(--ink-2); font-size: 14px; }
.attrs dd { overflow-wrap: anywhere; }
.pdp-info { display: flex; flex-direction: column; gap: 14px; }
.pdp-info .card { padding: 18px; }

/* รีวิว */
.review-panel { background: var(--sky); border: 0; border-radius: 16px; padding: 18px; }
.review-score { font-size: 34px; line-height: 1; }
.progress { background: #fff; }
.progress > span { background: var(--decor); }
.rate label { width: 48px; height: 48px; border: 1px solid var(--line-2); border-radius: 10px; font-size: 28px; }
.rate { gap: 6px; }
.rate input:checked ~ label, .rate label:hover, .rate label:hover ~ label { color: #C9700A; }

/* รายการและหมวด */
.list-row { min-height: 52px; }
.promo-bar { background: var(--cream); color: var(--buy-dark); padding: 10px var(--gutter); flex-wrap: wrap; gap: 4px 12px; font-size: 14px; }
.photo-wall img { border-radius: 10px; }
.cookie-banner { font-size: 14px; }

/* ---------- รอบ 3: ตะกร้า ชำระเงิน คำสั่งซื้อ บัญชี (เปลี่ยนเฉพาะหน้าตา) ---------- */
.empty { text-align: center; padding: 52px var(--gutter); max-width: 540px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty h1 { font-size: 24px; }
.empty p { color: var(--ink-2); margin: 0; }
.empty .btn { margin-top: 8px; min-width: 200px; }
.empty-icon { width: 84px; height: 84px; border-radius: 50%; background: var(--sky); display: flex; align-items: center; justify-content: center; color: #3C768F; }
.steps { list-style: none; display: flex; justify-content: center; gap: 8px 20px; flex-wrap: wrap; margin: 0; padding: 18px var(--gutter) 0; font-size: 14px; color: var(--ink-2); }
.steps li { display: flex; align-items: center; gap: 6px; }
.step-no { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-weight: 600; background: #fff; }
.steps li[aria-current=step] { color: var(--buy); font-weight: 700; }
.steps li[aria-current=step] .step-no { background: var(--buy); border-color: var(--buy); color: #fff; }
.steps li.done .step-no { background: var(--ok); border-color: var(--ok); color: #fff; }
.co-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px var(--gutter) 0; }
@media (min-width: 900px) { .co-form { grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr); gap: 28px; align-items: start; } .co-side { position: sticky; top: 16px; } }
.co-summary { background: var(--cream); border-color: #EEDFD3; }
.cart-line { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.cart-line:first-of-type { border-top: 0; padding-top: 0; }
.cart-line .grow { flex: 1 1 150px; }
.line-thumb { width: 72px; height: 72px; flex: 0 0 72px; border-radius: 10px; object-fit: cover; }
.list-row .line-thumb { width: 56px; height: 56px; flex-basis: 56px; }
.cart-qty { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.line-remove { width: 44px; height: 44px; border: 0; background: none; color: var(--ink-2); display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 10px; }
.line-remove:hover { background: var(--bad-bg); color: var(--bad); }
.pay-timer { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 4px 12px; text-align: right; line-height: 1.35; }
.pay-timer strong { font-size: 20px; }
.pay-total { font-size: 34px; line-height: 1.2; color: var(--buy); }
.qr-frame { padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; max-width: 100%; }
.qr-frame svg { display: block; max-width: 100%; height: auto; }
.order-status { margin: 14px var(--gutter) 12px; text-align: center; align-items: center; }
.order-body { padding: 0 var(--gutter); }
.order-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.order-card .cart-line { border-top: 0; padding: 4px 0; flex-wrap: nowrap; }
.order-card .price { font-size: 18px; }
.profile { display: flex; align-items: center; gap: 14px; }
.avatar { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 50%; background: var(--sky); display: flex; align-items: center; justify-content: center; color: #3C768F; }
.menu-list { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.menu-list a { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); }
.menu-list a:first-child { border-top: 0; }
.menu-list a span { flex: 1; min-width: 0; }
.menu-list a:hover { background: var(--cream); }
.gate-card { align-items: flex-start; }
.timeline .dot.now { border-color: var(--buy); }
.qr-img { width: 280px; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; image-rendering: pixelated; }
.undo-bar { display: flex; align-items: center; gap: 10px; background: var(--sky); border-radius: 10px; padding: 8px 14px; margin: 0; }
.pay-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--sky); border-radius: 12px; padding: 4px; scroll-margin-top: 12px; }
.pay-tabs a { min-height: 48px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 6px; padding: 4px 8px; border-radius: 9px; text-align: center; color: var(--ink); text-decoration: none; font-weight: 500; line-height: 1.3; }
.pay-tabs a[aria-current=page] { background: #fff; color: var(--buy); font-weight: 700; box-shadow: 0 1px 4px rgba(35,61,73,.12); }
.pay-rec { font-size: 14px; font-weight: 600; color: var(--ok); }
.pay-opt:has(input:checked) { border: 2px solid var(--brand); background: var(--brand-tint); }   /* ตัวเลือกวิธีชำระที่เลือกอยู่ (หน้าสั่งซื้อ) */
.acct-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; }
.acct-list { margin: 0; display: grid; grid-template-columns: minmax(70px, auto) minmax(0, 1fr); gap: 10px 12px; border-top: 1px solid var(--line); padding-top: 12px; align-items: center; }
.acct-list dt { color: var(--ink-2); font-size: 14px; }
.acct-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.acct-list .acct-row { justify-content: space-between; }
.acct-no { font-size: 24px; letter-spacing: .02em; line-height: 1.3; }
.acct-name { font-size: 22px; line-height: 1.35; color: var(--ink); }
@media (max-width: 479px) { .acct-list { grid-template-columns: minmax(0, 1fr); gap: 2px; } .acct-list dd { margin-bottom: 10px; } }

/* ---------- รอบ 4: ร้านตัวแทนและหน้าแพลตฟอร์ม · สีธีมใช้กับรูปปก ป้ายชื่อ และเส้นเน้น ตัวอักษรบนสีธีมใช้ --on-accent (คอนทราสต์ ≥ 4.5) ---------- */
.store-logo.name { gap: 10px; align-items: center; flex: 1 1 170px; min-width: 0; }
@media (max-width: 767px) { .store-logo.name ~ .hdr-help { display: none; } }   /* หัวร้านมีปุ่มทักไลน์อยู่แล้ว ให้ชื่อร้านได้ที่เต็ม */
.shop-avatar { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; background: var(--accent); color: var(--on-accent, #fff); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; overflow: hidden; }
.shop-avatar img { width: 100%; height: 100%; object-fit: cover; max-width: none; }
.shop-id { min-width: 0; display: flex; flex-direction: column; }
.shop-id strong { font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; }
.shop-id .by { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 14px; font-weight: 400; color: var(--ink-2); line-height: 1.35; }
.store-logo .by img { height: 14px; width: auto; }
.foot-logo img { height: 24px; width: auto; background: #fff; border-radius: 6px; padding: 3px 6px; box-sizing: content-box; }
.shop-head { background: #fff; padding: 0 0 16px; }
.shop-cover { height: 132px; background: linear-gradient(120deg, var(--accent), var(--decor-blue)); overflow: hidden; }
.shop-cover img { width: 100%; height: 100%; object-fit: cover; }
.shop-info { padding: 0 var(--gutter); }
.shop-info h1 { font-size: 26px; }
.shop-info .btn { align-self: stretch; }
.shop-logo { background: var(--accent); color: var(--on-accent, #fff); overflow: hidden; }
.shop-logo img { width: 100%; height: 100%; object-fit: cover; max-width: none; }
.shop-verify { display: flex; gap: 6px; align-items: center; min-height: 44px; color: var(--ok); font-weight: 600; font-size: 14px; text-decoration: none; }
.store-top { border-bottom: 3px solid var(--accent); }
@media (min-width: 768px) {
  .shop-head { margin: 20px var(--gutter) 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
  .shop-cover { height: 220px; }
  .shop-info .btn { align-self: flex-start; min-width: 240px; }
  .shop-head + .promo-bar { margin: 12px var(--gutter) 0; border-radius: 10px; }
}
.plat { min-height: 100vh; display: flex; flex-direction: column; }
.plat-top { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; max-width: 1184px; width: 100%; margin: 0 auto; padding: 12px var(--gutter); }
.plat-nav { display: flex; flex-wrap: wrap; gap: 0 14px; margin-left: auto; }
.plat-nav a { min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.plat .page { max-width: 1184px; width: 100%; padding: 8px var(--gutter) 24px; flex: 1; }
.plat-hero { margin: 0; }
.plat-hero .hero-copy .btn { width: auto; }
.plat-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.plat-steps li { display: flex; gap: 10px; align-items: flex-start; }
.plat-steps .step-no { flex: 0 0 32px; width: 32px; height: 32px; background: var(--cream); color: var(--buy); border-color: #F0D9C2; }
.plat-find { display: flex; gap: 10px; max-width: 480px; }
.plat-find input { flex: 1; min-width: 0; }
@media (max-width: 479px) { .plat-hero .slide { grid-template-columns: minmax(0, 1fr); } .plat-hero .hero-media { min-height: 180px; aspect-ratio: 3 / 2; } .plat-hero .hero-copy .btn svg { display: inline; } }

/* ---------- รอบ 5: แบนเนอร์หลายรูป ---------- */
.hero-carousel { margin: 16px var(--gutter) 0; background: var(--cream); border-radius: 18px; overflow: hidden; }
.hero-carousel .hero-slider { margin: 0; border-radius: 0; scrollbar-width: none; }
.hero-carousel .hero-slider::-webkit-scrollbar { display: none; }
.hero-slider .slide.no-media { grid-template-columns: minmax(0, 1fr); }
.hero-media a { display: block; position: absolute; inset: 0; }
.hero-ctl { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-top: 1px solid #F1E4D6; }
.hero-ctl button { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; background: none; border: 0; border-radius: 10px; color: var(--ink); cursor: pointer; }
.hero-ctl > button { border: 1px solid #EBDCCB; background: #fff; }
.hero-ctl .next svg { transform: scaleX(-1); }
.hero-dots { display: flex; flex: 1; min-width: 0; justify-content: flex-start; flex-wrap: wrap; }
.hero-dots button span { width: 10px; height: 10px; border-radius: 999px; background: #A89888; display: block; }
.hero-dots button[aria-current] span { width: 24px; background: var(--buy); }
.hero-count { font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.hero-ctl .i-play { display: none; }
.is-stopped .hero-ctl .i-play { display: block; }
.is-stopped .hero-ctl .i-pause { display: none; }
@media (max-width: 479px) { .hero-count { display: none; } .hero-dots button { min-width: 28px; } }
@media (min-width: 768px) { .hero-carousel { margin-top: 28px; } .hero-carousel .hero-slider { margin: 0; } }

/* ช่องเลือกรูปสลิป: กดได้ทั้งกล่อง ใหญ่พอสำหรับนิ้ว (เจ้าของสั่ง 3 ธ.ค. 2569) */
.slip-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 150px; padding: 20px 16px; text-align: center; border: 2px dashed var(--buy); border-radius: 12px; background: var(--cream); color: var(--buy); cursor: pointer; }
.slip-drop strong { font-size: 1.15rem; }
.slip-drop .muted { color: var(--ink-2); word-break: break-all; }
.slip-drop:focus-within { outline: 3px solid var(--decor-blue); outline-offset: 2px; }
.slip-drop.has-file { border-style: solid; background: #fff; }
.slip-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* ดูรูป QR เต็มจอให้กดค้างบันทึก (iPhone ที่เปิดเมนูแชร์ไม่ได้) */
.img-viewer { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px 16px; background: rgba(255,255,255,.98); text-align: center; }
.img-viewer img { width: min(86vw, 360px); height: auto; -webkit-touch-callout: default; }
.img-viewer p { margin: 0; font-size: 1.05rem; color: var(--ink); }
.img-viewer .btn { max-width: 360px; }

/* แถบแนะนำร้านตัวแทนประจำบน kosno.shop (ข้อ 10.2) */
.home-hint { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 1184px; margin: 12px auto 0; padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--brand-tint, #fff4ec); color: var(--ink); }
.home-hint form { margin: 0; }
.home-hint .btn { white-space: nowrap; }
@media (max-width: 767px) {
  .home-hint { margin: 10px var(--gutter, 16px) 0; }
  .home-hint .grow { flex: 1 1 0; }
  .home-hint form { order: 2; }
  .home-hint .btn { order: 3; flex: 1 1 100%; white-space: normal; }
}

/* วิดีโอในแกลเลอรีสินค้า (4 ธ.ค. 2569) */
.g-video { display: flex; align-items: center; justify-content: center; background: #000; }
.g-video video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.g-thumbs a.is-video { position: relative; }
.g-thumbs a.is-video::after { content: ''; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; filter: drop-shadow(0 0 3px rgba(0,0,0,.6)); }
