:root {
  --blue: #2F9456; --yellow: #F7DA0A; --navy: #12381F;
  --bg: #F5F8F6; --card: #fff; --line: #E1E7EF; --text: #14202E; --muted: #627286;
  --red: #D92D20; --green: #12805C; --radius: 12px;
  --shadow: 0 1px 2px rgba(11,39,66,.06), 0 4px 14px rgba(11,39,66,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 'Noto Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.3; text-wrap: balance; }
h1 { font-size: 26px; font-weight: 800; } h2 { font-size: 21px; font-weight: 700; } h3 { font-size: 16.5px; font-weight: 700; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); } .center { text-align: center; } .r { text-align: right; }
.hide-sm { display: inline-flex; }
.loading, .empty { text-align: center; color: var(--muted); padding: 56px 16px; }
.empty .btn { margin-top: 14px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: 2px; }

/* ปุ่ม */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 18px; font-weight: 700; white-space: nowrap; transition: filter .15s, transform .05s; }
.btn:hover { filter: brightness(.96); } .btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-yellow { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.btn-block { display: flex; width: 100%; } .btn-lg { padding: 13px 22px; font-size: 16px; }
.link { color: var(--blue); font-weight: 600; cursor: pointer; }

/* ส่วนหัว */
.announce { background: var(--navy); color: #fff; text-align: center; font-size: 13.5px; padding: 7px 16px; }
#header { background: #fff; position: sticky; top: 0; z-index: 30; box-shadow: 0 1px 0 var(--line); }
.hd { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.logo { font-weight: 800; font-size: 30px; letter-spacing: -.5px; line-height: 1; flex: none; }
.logo span:first-child { color: var(--blue); } .logo span:last-child { color: var(--yellow); }
.zone-btn { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px 6px 10px; text-align: left; flex: none; color: var(--blue); }
.zone-btn span { display: flex; flex-direction: column; font-weight: 700; font-size: 13.5px; line-height: 1.2; color: var(--text); }
.zone-btn small, .hd-link small { font-weight: 400; font-size: 11px; color: var(--muted); }
.search { flex: 1; display: flex; min-width: 0; background: var(--bg); border-radius: 999px; border: 1.5px solid transparent; }
.search:focus-within { border-color: var(--blue); background: #fff; }
.search input { flex: 1; min-width: 0; border: 0; background: none; padding: 10px 18px; outline: none; }
.search button { border: 0; background: var(--yellow); color: var(--navy); border-radius: 999px; width: 46px; display: grid; place-items: center; margin: 3px; }
.hd-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.hd-link { display: flex; flex-direction: column; font-weight: 700; font-size: 13.5px; line-height: 1.2; }
.cart-btn { position: relative; color: var(--navy); display: grid; place-items: center; width: 42px; height: 42px; }
.cart-btn b { position: absolute; top: 0; right: -4px; background: var(--red); color: #fff; font-size: 11px; min-width: 19px; height: 19px; border-radius: 99px; display: grid; place-items: center; padding: 0 5px; }
.catbar { background: var(--blue); color: #fff; }
.catbar .wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.catbar a { padding: 9px 14px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.catbar a:hover { background: rgba(255,255,255,.16); }

/* หน้าแรก */
.hero { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-top: 18px; }
.hero-slide { border-radius: 16px; color: #fff; padding: 28px; min-height: 150px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; background-size: cover; background-position: center; }
.hero-slide.big { grid-row: span 2; min-height: 300px; padding: 44px; }
.hero-slide h2 { font-size: 22px; font-weight: 800; max-width: 17em; }
.hero-slide.big h2 { font-size: clamp(26px, 3.4vw, 40px); }
.hero-slide p { margin: 0 0 16px; opacity: .92; max-width: 30em; }



.cats { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; margin-top: 18px; }
.cats a { background: #fff; border-radius: var(--radius); padding: 14px 8px; text-align: center; font-weight: 600; font-size: 13.5px; box-shadow: var(--shadow); line-height: 1.35; }
.cats a:hover { color: var(--blue); }
.cats i { display: block; font-style: normal; font-size: 30px; margin-bottom: 4px; }
.sec { padding-top: 26px; padding-bottom: 10px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head h1, .sec-head h2 { margin: 0; } .sec-head a { color: var(--blue); font-weight: 600; white-space: nowrap; }
.crumb { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; } .crumb a:hover { color: var(--blue); }

/* การ์ดสินค้า */
.grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.card-img { position: relative; aspect-ratio: 1; display: block; background: #fff; }
.card-img img, .card-img .ph { width: 100%; height: 100%; object-fit: contain; }
.ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 10px; background: linear-gradient(150deg, hsl(var(--h) 70% 94%), hsl(var(--h) 60% 86%)); color: hsl(var(--h) 45% 28%); width: 100%; height: 100%; }
.ph b { font-size: 15px; } .ph span { font-size: 12px; opacity: .8; }
.badge { position: absolute; top: 8px; left: 8px; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.badge.static { position: static; display: inline-block; margin-bottom: 8px; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.card-name { font-weight: 600; font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.card-name:hover { color: var(--blue); }
.card-pack { color: var(--muted); font-size: 12.5px; }
.card-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.price { font-size: 19px; font-weight: 800; color: var(--navy); line-height: 1.2; } .price small { font-size: 12px; font-weight: 500; color: var(--muted); }
.tier { font-size: 12px; color: var(--red); font-weight: 600; }
.add { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; font-size: 24px; line-height: 1; display: grid; place-items: center; }
.add:hover { filter: brightness(.92); }

/* หน้าสินค้า */
.pd { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 26px; }
.pd-main { background: #fff; border-radius: 16px; aspect-ratio: 1; overflow: hidden; box-shadow: var(--shadow); }
.pd-main img, .pd-main .ph { width: 100%; height: 100%; object-fit: contain; } .pd-main .ph b { font-size: 30px; } .pd-main .ph span { font-size: 16px; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pd-thumbs button { width: 66px; height: 66px; border: 2px solid var(--line); border-radius: 10px; background: #fff; padding: 2px; overflow: hidden; }
.pd-thumbs button.on { border-color: var(--blue); } .pd-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pd-info { background: #fff; border-radius: 16px; padding: 22px; box-shadow: var(--shadow); align-self: start; }
.pd-info h1 { font-size: 23px; }
.pd-price { font-size: 34px; font-weight: 800; color: var(--navy); margin: 8px 0 14px; } .pd-price small { font-size: 15px; font-weight: 500; color: var(--muted); }
.tiers-title { font-weight: 700; margin-bottom: 6px; }
.tiers-row { display: flex; border-radius: 10px; overflow: hidden; border: 1.5px solid var(--line); margin-bottom: 16px; }
.tiers-row div { flex: 1; text-align: center; } .tiers-row span { display: block; background: var(--yellow); font-weight: 700; font-size: 13px; padding: 4px; color: var(--navy); }
.tiers-row .hot span { background: var(--red); color: #fff; } .tiers-row b { display: block; padding: 8px 4px; font-size: 17px; }
.qty-row { display: flex; gap: 12px; margin-bottom: 16px; } .qty-row .btn { flex: 1; }
.qty { display: flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; flex: none; background: #fff; }
.qty button { width: 42px; border: 0; background: var(--bg); font-size: 20px; } .qty input { width: 54px; border: 0; text-align: center; font-weight: 700; outline: none; }
.qty.sm button { width: 32px; height: 34px; } .qty.sm input { width: 42px; }
.ship-box { width: 100%; text-align: left; background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 34px 12px 14px; position: relative; display: block; }
.ship-box b, .ship-box span { display: block; } .ship-box span { color: var(--muted); font-size: 13.5px; } .ship-box i { position: absolute; right: 14px; top: 50%; translate: 0 -50%; font-style: normal; font-size: 22px; color: var(--muted); }
.pd-detail { background: #fff; border-radius: 16px; padding: 22px; box-shadow: var(--shadow); margin: 22px 0; }
.pd-desc { margin-bottom: 18px; overflow-wrap: anywhere; }
.specs div, .kv div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid var(--line); }
dl { margin: 0; } dd { margin: 0; text-align: right; } dt { color: var(--muted); flex: none; }

/* แผง ฟอร์ม ตะกร้า */
.panel { background: #fff; border-radius: 16px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.two.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.narrow { max-width: 460px; } .mid { max-width: 780px; }
label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 12px; }
label input:not([type=checkbox]):not([type=radio]), label select { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-weight: 400; }
label input:focus, label select:focus { border-color: var(--blue); outline: none; }
input[disabled] { background: var(--bg) !important; color: var(--muted); }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; } .check input { margin-top: 4px; accent-color: var(--blue); width: 16px; height: 16px; flex: none; }
.form-err { color: var(--red); font-weight: 600; min-height: 1.2em; margin: 4px 0 10px; }
form h3 { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); } form h3:first-child { margin-top: 0; padding-top: 0; border: 0; }
.note { background: #EEF8F2; border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin: 10px 0; }
.note-ok { background: #E8F6EF; color: #0B5C41; } .note-bad { background: #FDECEA; color: #A1221A; }
/* รถเข็น: ยอดสั่งซื้อขั้นต่ำของพื้นที่จัดส่ง — ยังไม่ถึง (แดง + แถบความคืบหน้า) / ถึงแล้ว (เขียว) */
.minbar { border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; font-size: 13.5px; } .minbar p { margin: 0; font-weight: 600; }
.minbar.need { background: #FDECEA; color: #A1221A; } .minbar.ok { background: #E8F6EF; color: #0B5C41; }
.minbar .bar { height: 5px; border-radius: 99px; background: #fff; margin: 8px 0 6px; overflow: hidden; } .minbar .bar span { display: block; height: 100%; border-radius: 99px; background: #D93A2E; }
.minbar small { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; margin-top: 4px; } .minbar .link { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.btn[aria-disabled=true] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.tabs { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.tabs button { flex: 1; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 11px; font-weight: 700; white-space: nowrap; }
.tabs button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 90px 28px; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.line:first-child { border: 0; padding-top: 0; }
.line-img { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; } .line-img img, .line-img .ph { width: 100%; height: 100%; object-fit: contain; } .line-img .ph b { font-size: 9px; } .line-img .ph span { display: none; }
.line-main a { font-weight: 600; display: block; } .line-main small { color: var(--muted); } .line-main em { color: var(--red); font-style: normal; font-weight: 700; }
.line-total { text-align: right; } .line-x { border: 0; background: none; font-size: 22px; color: var(--muted); line-height: 1; }
.summary { position: sticky; top: 130px; } .summary dl div { display: flex; justify-content: space-between; padding: 6px 0; }
.summary .grand { border-top: 1.5px solid var(--line); margin-top: 6px; padding-top: 12px; font-weight: 800; font-size: 19px; } .summary .grand dt { color: var(--text); }
.mini { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 4px 0; }
.pick { display: flex; gap: 10px; border: 1.5px solid var(--line); border-radius: 10px; padding: 12px; font-weight: 400; cursor: pointer; }
.panel > .lbl { display: block; margin: 14px 0 4px; font-weight: 600; font-size: 14px; } .panel > .pick { margin-bottom: 8px; }
.summary .pick { margin: 6px 0; } .summary .lbl { display: block; margin-top: 12px; font-weight: 600; font-size: 14px; }
.pick:has(input:checked) { border-color: var(--blue); background: #F0F8F3; } .pick input { accent-color: var(--blue); margin-top: 4px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; } .chips label { margin: 0; } .chips input { position: absolute; opacity: 0; }
.chips span { display: block; border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; font-weight: 600; }
.chips input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; } .chips input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); }
/* ป้ายบนปุ่มวิธีชำระ: ค่าส่ง N บาท / ส่งฟรี */
.pay-chips span { display: flex; align-items: center; gap: 8px; } .pay-chips b { font-weight: 600; }
.chip-tag { font-style: normal; font-size: 12px; font-weight: 700; line-height: 1.5; padding: 1px 9px; border-radius: 999px; white-space: nowrap; }
.chip-tag.fee { background: #FEF3D9; color: #8A4F00; } .chip-tag.free { background: #E8F6EF; color: #0B5C41; }
.chips input:checked + span .chip-tag { background: #fff; }
#pay-note { margin: 0 0 4px; } #pay-note[hidden] { display: none; }
.pill { display: inline-block; background: #E9F5EE; color: #1F6B3C; border-radius: 99px; padding: 1px 10px; font-size: 12px; font-weight: 700; vertical-align: middle; }
.pill.warn, .st-pending { background: #E4F3EA; color: #7A5B00; } .st-delivered { background: #E8F6EF; color: #0B5C41; } .st-cancelled { background: #FDECEA; color: #A1221A; }
.addr { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); } .addr small { color: var(--muted); }
details { margin-top: 10px; } details form { margin-top: 12px; } summary { list-style: none; }
.table-wrap { overflow-x: auto; } table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); white-space: nowrap; } th { color: var(--muted); font-size: 13px; border: 0; } th.r, td.r { text-align: right; }

/* Modal / toast / footer */
.modal { position: fixed; inset: 0; background: rgba(11,39,66,.55); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal[hidden], .toast[hidden] { display: none; }
.modal-card { background: #fff; border-radius: 18px; padding: 30px; width: min(480px, 100%); position: relative; text-align: center; }
.modal-card label { text-align: left; } .modal-x { position: absolute; top: 10px; right: 14px; border: 0; background: none; font-size: 30px; line-height: 1; }
.zone-ico { font-size: 34px; margin-bottom: 8px; }
/* ป๊อปอัปพื้นที่จัดส่ง: รหัสไปรษณีย์ → รายการแขวง/ตำบล */
.zone-sub { margin: -4px 0 12px; } .zone-cap { display: block; margin: 12px 0 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.zone-list { max-height: 46vh; overflow-y: auto; margin: 0 -6px; }
.zone-list button { display: grid; grid-template-columns: auto 1fr 18px; column-gap: 8px; align-items: baseline; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.zone-list button:hover, .zone-list button.on { background: #EEF8F2; } .zone-list button span { font-weight: 600; } .zone-list button small { grid-column: 2; color: var(--muted); font-size: 12.5px; }
.zone-list button.on::after { content: ''; grid-column: 3; grid-row: 1 / span 2; align-self: center; width: 7px; height: 13px; border: solid #1AA251; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.toast { position: fixed; bottom: 22px; left: 50%; translate: -50% 0; background: var(--navy); color: #fff; padding: 11px 20px; border-radius: 999px; z-index: 60; max-width: calc(100vw - 32px); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
#footer { margin-top: 40px; color: #fff; font-size: 14.5px; }
.ft-links { background: var(--blue); } .ft-links .wrap { display: flex; justify-content: center; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
.ft-links a { padding: 0 24px; font-weight: 600; line-height: 1.2; border-left: 1px solid rgba(255,255,255,.3); } .ft-links a:first-child { border-left: 0; } .ft-links a:hover { text-decoration: underline; }
.ft-bottom { background: color-mix(in srgb, var(--blue) 80%, #000); } .ft-bottom .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding-top: 13px; padding-bottom: 13px; }
.ft-contact { display: flex; gap: 6px 22px; flex-wrap: wrap; } .ft-contact a:hover { text-decoration: underline; }

@media (max-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cats { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 820px) {
  .hd { flex-wrap: wrap; gap: 10px 12px; } .search { order: 5; flex-basis: 100%; } .hd-actions { margin-left: auto; } .hide-sm { display: none; }
  .logo { font-size: 26px; } .zone-btn small { display: none; }
  .hero { grid-template-columns: 1fr; } .hero-slide.big { min-height: 210px; padding: 26px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pd, .two, .two.even { grid-template-columns: 1fr; } .summary { position: static; } .ft-links a { padding: 4px 14px; } .ft-bottom .wrap { justify-content: center; text-align: center; } .ft-contact { justify-content: center; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .cats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .f2 { grid-template-columns: 1fr; gap: 0; } h1 { font-size: 22px; } .panel, .pd-info, .pd-detail { padding: 16px; }
  .line { grid-template-columns: 52px minmax(0, 1fr) 28px; } .line-img { width: 52px; height: 52px; } .line .qty { grid-column: 2; justify-self: start; } .line-total { grid-column: 2; grid-row: 2; justify-self: end; align-self: center; } .line-x { grid-column: 3; grid-row: 1; }
  .qty-row { flex-wrap: wrap; } .tabs button { flex-basis: 100%; }
}

/* ───────── บล็อกหน้าแรก (page builder) ───────── */
/* แบนเนอร์ทุกชนิดสูงไม่เกินการ์ดสินค้า 1 ใบ (การ์ดสูงราว 380px บนจอใหญ่ / 300px บนมือถือ) */
:root { --banner-max: 340px; }
@media (max-width: 820px) { :root { --banner-max: 260px; } }
.car { position: relative; margin-top: 18px; }
.car-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 16px; scroll-behavior: smooth; }
.car-track::-webkit-scrollbar { display: none; }
.car-slide { flex: 0 0 100%; scroll-snap-align: start; position: relative; aspect-ratio: 4 / 1; min-height: 190px; max-height: var(--banner-max); color: #fff; display: flex; align-items: center; overflow: hidden; }
.car-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.car-slide.has-img.has-text::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,0) 68%); }
.car-text { position: relative; z-index: 1; padding: 0 clamp(22px, 5.5vw, 72px); max-width: 680px; }
.car-text h2 { font-size: clamp(22px, 3.4vw, 40px); font-weight: 800; margin-bottom: .35em; }
.car-text p { margin: 0 0 16px; opacity: .93; font-size: clamp(14px, 1.4vw, 17px); }
.car-nav { position: absolute; top: 50%; translate: 0 -50%; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--navy); font-size: 24px; line-height: 1; z-index: 2; box-shadow: 0 2px 10px rgba(0,0,0,.18); opacity: 0; transition: opacity .15s; }
.car:hover .car-nav, .car-nav:focus-visible { opacity: 1; } .car-nav.prev { left: 28px; } .car-nav.next { right: 28px; }
.car-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.car-dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; padding: 0; background: rgba(255,255,255,.55); transition: width .2s; } .car-dots button.on { width: 24px; background: #fff; }
.blk-image { margin-top: 18px; } .blk-image img { width: 100%; border-radius: 16px; max-height: var(--banner-max); object-fit: cover; }
.blk-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 14px; } .blk-grid img { width: 100%; height: 100%; max-height: var(--banner-max); object-fit: cover; border-radius: 14px; }
.blk-text { margin-top: 26px; } .blk-text h2 { font-size: 24px; font-weight: 800; } .blk-text p { margin: 0; color: var(--muted); max-width: 70ch; display: inline-block; }
.announce.preview { background: var(--yellow); color: var(--navy); font-weight: 700; }
.blk-empty { border: 2px dashed #B9CBDD; border-radius: 16px; background: #F6FBF8; color: var(--muted); min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px; width: 100%; }
/* โหมดฝังในตัวตกแต่งของหลังบ้าน */
.builder .blk { position: relative; cursor: pointer; padding-bottom: 4px; }
.builder .blk::after { content: ''; position: absolute; inset: 8px 4px -2px; border: 2px solid transparent; border-radius: 12px; pointer-events: none; }
.builder .blk:hover::after { border-color: color-mix(in srgb, var(--blue) 45%, transparent); border-style: dashed; }
.builder .blk.sel::after { border-color: var(--blue); }
.blk-tag { display: none; position: absolute; top: 8px; left: 4px; z-index: 5; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 10px 0 10px 0; }
.builder .blk:hover .blk-tag, .builder .blk.sel .blk-tag { display: block; }
.builder .blk * { pointer-events: none; } .builder #header { position: static; }
@media (max-width: 820px) { .car-slide { aspect-ratio: 16 / 9; } .car-nav { display: none; } .blk-grid { grid-template-columns: repeat(min(var(--cols, 2), 2), minmax(0, 1fr)); gap: 10px; } }

/* ───────── สมัครสมาชิก: การ์ดที่อยู่ ───────── */
[hidden] { display: none !important; }
.addr-card { border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px 4px; margin-bottom: 12px; background: #FBFCFE; }
.addr-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.addr-card-head .link { border: 0; background: none; color: var(--red); font-size: 13.5px; }
.addr-use { display: flex; gap: 8px 22px; flex-wrap: wrap; background: #EEF8F2; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.addr-use .check { margin: 0; font-weight: 700; }
form > .chips { margin-bottom: 14px; }

/* ───────── เมนูหมวดหมู่ในส่วนหัว ───────── */

/* ───────── แถบหมวดหมู่: การ์ดรูปสินค้าจริง ───────── */
.cat-strip { margin-top: 26px; }
.cat-title { text-align: center; font-size: 21px; font-weight: 800; margin-bottom: 4px; }
.cat-rail-wrap { position: relative; }
.cat-rail { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: 4px; padding: 14px 4px 12px; align-items: flex-start; }
.cat-rail::-webkit-scrollbar { display: none; }
/* การ์ดโล่ง ไม่มีพื้นหลัง/กรอบ · กว้างคงที่ทุกใบ (รูปจึงเท่ากันเสมอ ไม่ขยายตามความยาวชื่อ) */
.cat-tile { flex: 0 0 92px; width: 92px; min-width: 0; position: relative; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; text-align: center; }
.cat-tile:first-child { margin-left: auto; } .cat-tile:last-child { margin-right: auto; }
.cat-pic { flex: none; width: 100%; aspect-ratio: 1; transition: box-shadow .2s ease; display: grid; place-items: center; } /* ไม่มีสีพื้น: รูปพื้นหลังโปร่งใสจึงกลืนกับหน้าเว็บ */
.cat-pic img { width: 100%; height: 100%; object-fit: contain; transition: scale .35s ease; }
.cat-tile:hover .cat-pic img { scale: 1.08; }
.cat-pic i { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 12px; background: #EEF1F5; color: #8A97A8; font-style: normal; font-size: 11.5px; }
.cat-tile b { display: block; padding: 0 2px; font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--text); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-tile:hover b { color: var(--blue); }
.cat-badge { position: absolute; top: -8px; left: 50%; translate: -50% 0; z-index: 1; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 99px; white-space: nowrap; box-shadow: 0 3px 8px rgba(217,45,32,.3); }
.rail-nav { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; color: var(--navy); font-size: 22px; line-height: 1; box-shadow: 0 4px 14px rgba(11,39,66,.22); }
.rail-nav.prev { left: -10px; } .rail-nav.next { right: -10px; } .rail-nav:hover { color: var(--blue); }
.rail-bar { width: 96px; height: 4px; border-radius: 9px; background: var(--line); margin: 2px auto 0; overflow: hidden; } .rail-bar span { display: block; height: 100%; border-radius: 9px; background: var(--blue); }
@media (max-width: 820px) {
  .cat-rail { gap: 8px; } .cat-tile { flex-basis: 72px; width: 72px; gap: 5px; } .cat-pic i { font-size: 10.5px; border-radius: 10px; }
  .cat-tile b { font-size: 11.5px; } .rail-nav { display: none; } .car-slide img { object-position: 82% 50%; }
}

/* จุดเด่นร้าน: แบ่งช่องเท่ากันตามจำนวนที่ใส่ (2–4 ช่อง) */
@media (min-width: 821px) { }


/* ───────── สินค้าที่ยังไม่มีรูป ───────── */
.ph { background: #EEF1F5; color: #8A97A8; gap: 0; }
.ph span { font-size: 13px; font-weight: 500; opacity: 1; }
.pd-main .ph span { font-size: 16px; }

/* ───────── แบนเนอร์แบบแบ่งครึ่ง: รูปสินค้าซ้าย + ข้อความการตลาดขวา (ขนาดตัวอักษรอิงความกว้างแบนเนอร์) ───────── */
.car-slide { container-type: inline-size; }
.car-slide.split { align-items: stretch; background: var(--panel); }
.car-photo { flex: 0 0 58%; position: relative; -webkit-mask-image: linear-gradient(90deg, #000 84%, transparent); mask-image: linear-gradient(90deg, #000 84%, transparent); }
.car-panel { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2cqw; padding: 0 3.5cqw .6cqw 0; text-align: center; }
.car-hl { position: relative; display: flex; flex-direction: column; line-height: 1.18; }
.hl1 { font-size: 6.4cqw; } .hl2 { font-size: 5cqw; }
.car-badge { position: absolute; top: -1.1cqw; right: -3.4cqw; z-index: 1; font-style: normal; font-family: 'Mitr', sans-serif; font-weight: 600; font-size: 1.7cqw; line-height: 1.5; padding: .1cqw 1.2cqw; border-radius: 99px; rotate: 8deg; white-space: nowrap; background: var(--badge); color: var(--badge-ink, #fff); box-shadow: 0 .3cqw .8cqw rgba(0,0,0,.18); }
.car-strip { font-size: 1.8cqw; line-height: 1.5; padding: .45cqw 2.2cqw .55cqw; white-space: nowrap; background: var(--strip); color: var(--strip-ink); }

/* ธีมครีม-เขียว: ตัวอักษรหัวหนาแบบโปสเตอร์ + แถบลายพู่กัน */
.th-harvest { --panel: #F7EFD9; --badge: #F26A1B; --strip: #1C6E41; --strip-ink: #fff; }
.th-harvest .hl1 { font-family: 'Chonburi', serif; color: #14532D; }
.th-harvest .hl2 { font-family: 'Chonburi', serif; background: linear-gradient(180deg, #37B56C, #1E8A4C); -webkit-background-clip: text; background-clip: text; color: transparent; }
.th-harvest .car-strip { font-family: 'Sriracha', cursive; rotate: -1.5deg; clip-path: polygon(0 22%, 2.5% 2%, 30% 8%, 62% 0, 97% 7%, 100% 34%, 98.5% 96%, 70% 100%, 38% 93%, 4% 100%, 1% 72%); }
/* ธีมเหลือง-กรมท่า: ตัวเอียงหนา มีขอบ สไตล์ป้ายลดราคา */
.th-pop { --panel: #F7DA0A; --badge: #D92D20; --strip: #12381F; --strip-ink: #F7DA0A; }
.th-pop .hl1, .th-pop .hl2 { font-family: 'Kanit', sans-serif; font-style: italic; font-weight: 800; letter-spacing: -.01em; }
.th-pop .hl1 { color: #12381F; }
.th-pop .hl2 { color: #fff; -webkit-text-stroke: .7cqw #12381F; paint-order: stroke fill; text-shadow: .3cqw .35cqw 0 #12381F; }
.th-pop .car-strip { font-family: 'Kanit', sans-serif; font-weight: 600; transform: skewX(-10deg); border-radius: .5cqw; }
/* ธีมกรมท่า-เหลือง: ตัวกลมมน */
.th-night { --panel: #12381F; --badge: #F7DA0A; --badge-ink: #12381F; --strip: #F7DA0A; --strip-ink: #12381F; }
.th-night .hl1 { font-family: 'Mitr', sans-serif; font-weight: 700; color: #fff; } .th-night .hl2 { font-family: 'Mitr', sans-serif; font-weight: 700; color: #F7DA0A; }
.th-night .car-strip { font-family: 'Mitr', sans-serif; font-weight: 600; border-radius: 99px; }
@media (max-width: 820px) {
  .car-photo { flex-basis: 46%; } .car-panel { gap: 2cqw; padding-right: 3cqw; }
  .hl1 { font-size: 8.6cqw; } .hl2 { font-size: 6.8cqw; } .car-badge { font-size: 2.6cqw; right: -2cqw; top: -2.4cqw; } .car-strip { font-size: 2.7cqw; white-space: normal; }
}

/* ───────── แบนเนอร์เป็นรูปอย่างเดียว: แสดงเต็มรูป 4:1 ทุกขนาดจอ ไม่ครอปข้อความในรูป ───────── */
.car-slide { aspect-ratio: 4 / 1; min-height: 0; } /* ไม่ใส่สีพื้น: แบนเนอร์พื้นโปร่งใสต้องเห็นพื้นหลังเว็บ */
.car-slide img { object-position: center; }
@media (max-width: 820px) { .car-slide { aspect-ratio: 4 / 1; } .car-slide img { object-position: center; } .car-track { border-radius: 10px; } .car-dots { bottom: 5px; } .car-dots button { width: 6px; height: 6px; } .car-dots button.on { width: 16px; } }

.pay-text { white-space: pre-line; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 600; cursor: pointer; font: inherit; font-weight: 600; white-space: nowrap; }
@media (max-width: 720px) {
}

/* ราคาตามกลุ่มลูกค้า / ตามปริมาณ */
.pd-was { font-size: 18px; font-weight: 500; color: var(--muted); }
.tier-hint { display: block; width: fit-content; color: #247A45 !important; background: #E4F3EA; border-radius: 6px; padding: 1px 8px; margin-top: 3px; font-weight: 600; }

/* ราคาต่อชิ้นย่อยของสินค้าที่ขายเป็นแพ็ค/ลัง */
.per { font-size: 12.5px; font-weight: 600; color: var(--green); line-height: 1.3; } .pd-per { font-size: 14.5px; margin-top: 2px; } .pd-per b { font-size: 17px; }

/* ตัวเลือกภาษา ไทย / ENG */
.lang { display: flex; flex: none; padding: 3px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; }
.lang button { border: 0; background: none; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
.lang button.on { background: var(--blue); color: #fff; }
/* หน้าหมวดหมู่: เมนูหมวดทางซ้าย + เรียงตาม */
.cat-page { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
.cat-side { position: sticky; top: 90px; } .cat-side h2 { font-size: 19px; margin: 6px 0 12px; }
.cat-side nav { display: grid; gap: 2px; } .cat-side a { padding: 9px 12px; border-radius: 9px; font-weight: 500; }
.cat-side a:hover { background: #fff; color: var(--blue); } .cat-side a.on { background: #fff; color: var(--blue); font-weight: 700; }
.cat-body .sec-head { margin-top: 0; } .cat-body .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sort { display: flex; align-items: center; gap: 6px; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 0 6px 0 14px; font-size: 14px; white-space: nowrap; }
.sort span { color: var(--muted); } .sort select { border: 0; background: none; font: inherit; font-weight: 700; padding: 8px 4px; color: var(--text); cursor: pointer; }
@media (max-width: 1024px) { .cat-body .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cat-page { grid-template-columns: 200px minmax(0, 1fr); gap: 20px; } }
@media (max-width: 820px) {
  .lang { order: 5; } .search { order: 6; flex: 1 1 180px; } .lang button { padding: 5px 9px; font-size: 12.5px; }
  .cat-page { grid-template-columns: minmax(0, 1fr); gap: 12px; } .cat-side { position: static; } .cat-side h2 { display: none; }
  .cat-side nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; } .cat-side a { flex: none; background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13.5px; }
  .cat-side a.on { background: var(--blue); color: #fff; } .cat-body .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-body .sec-head h1 { font-size: 20px; }
}

/* QR พร้อมเพย์ในหน้าสั่งซื้อสำเร็จ */
.pp-box { max-width: 320px; margin: 18px auto; padding: 18px; background: #fff; border-radius: 16px; box-shadow: 0 4px 18px rgba(11,39,66,.08); }
.pp-box h2 { font-size: 17px; margin: 0 0 10px; } .pp-qr svg { display: block; width: 100%; height: auto; }
.pp-box p { display: flex; flex-direction: column; gap: 2px; margin: 10px 0 0; } .pp-box p span { color: var(--muted); } .pp-box p b { font-size: 26px; }

/* ───────── บัญชีของฉัน: เมนูด้านข้าง + สมุดที่อยู่ ───────── */
.acct { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.acct-card { background: #fff; border-radius: var(--radius); padding: 22px 16px; text-align: center; display: grid; gap: 3px; justify-items: center; box-shadow: 0 1px 2px rgba(11,39,66,.06); }
.acct-avatar { width: 72px; height: 72px; border-radius: 50%; background: #E9F5EE; color: var(--blue); display: grid; place-items: center; font-size: 30px; font-weight: 800; margin-bottom: 6px; }
.acct-card b { font-size: 17px; } .acct-card span { color: var(--muted); font-size: 13.5px; word-break: break-all; } .acct-card small { color: #247A45; font-weight: 700; letter-spacing: .3px; } .acct-card i { font-style: normal; }
.acct-nav { display: grid; gap: 2px; margin-top: 14px; }
.acct-nav a, .acct-nav button { display: block; width: 100%; text-align: left; padding: 12px 16px; border: 0; border-radius: 10px; background: none; font: inherit; font-weight: 600; color: #33475B; cursor: pointer; }
.acct-nav a:hover, .acct-nav button:hover { background: #EEF2F7; } .acct-nav a.on { background: #E9F5EE; color: var(--blue); } .acct-nav button { color: var(--muted); }
.acct-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1.5px solid var(--line); } .acct-head h1 { margin: 0; }
.acct-main .panel { margin-bottom: 16px; }
.acct-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.acct-stat { background: #fff; border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 2px; box-shadow: 0 1px 2px rgba(11,39,66,.06); } .acct-stat span { color: var(--muted); font-size: 13px; } .acct-stat b { font-size: 26px; color: var(--navy); }
.form-end { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.addr-more { margin: 6px 0 10px; } .addr-more summary { cursor: pointer; margin-bottom: 8px; }
.abook { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.abook-card { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.abook-card p { margin: 0; } .abook-name { font-size: 16px; font-weight: 600; } .abook-meta { font-size: 14px; }
.abook-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .abook-top b { font-size: 16px; } .abook-acts { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.pill.ship { background: #FCE7E9; color: #247A45; }
.tbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--red); cursor: pointer; }
.abook-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.abook-btns .btn { white-space: normal; line-height: 1.3; padding: 8px 10px; font-size: 13px; background: #EEF8F2; border-color: transparent; } .abook-btns .btn:last-child { background: #FCEEEF; }
.abook-btns .btn:disabled { opacity: .45; cursor: default; }
@media (max-width: 860px) {
  .acct { grid-template-columns: minmax(0, 1fr); gap: 16px; } .acct-nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; margin-top: 10px; }
  .acct-card { grid-template-columns: auto 1fr; justify-items: start; text-align: left; column-gap: 12px; padding: 12px 14px; } .acct-avatar { grid-row: span 3; width: 52px; height: 52px; font-size: 22px; margin: 0; }
  .abook { grid-template-columns: minmax(0, 1fr); } .acct-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* เข้าสู่ระบบ / สมัครสมาชิก: การ์ดสองฝั่ง */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 920px; margin: 8px auto 24px; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); min-height: 460px; }
.auth-side { background: linear-gradient(150deg, var(--blue), #1F6B3C); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 32px; text-align: center; }
.auth-logo { font-weight: 800; font-size: 56px; letter-spacing: -1px; line-height: 1; margin-bottom: 14px; } .auth-logo span:last-child { color: var(--yellow); }
.auth-side b { font-size: 22px; } .auth-side > span { font-size: 16px; opacity: .9; }
.auth-main { padding: 44px 48px; } .auth-main h1 { margin: 0 0 6px; font-size: 26px; } .auth-main form { margin-top: 20px; }
.auth-id { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; background: var(--bg); border-radius: 12px; margin-bottom: 14px; }
.auth-id b { overflow: hidden; text-overflow: ellipsis; } .auth-id .link { background: none; border: 0; cursor: pointer; font: inherit; font-weight: 700; color: var(--blue); }
@media (max-width: 820px) { .auth { grid-template-columns: minmax(0, 1fr); min-height: 0; } .auth-side { padding: 22px; flex-direction: row; flex-wrap: wrap; gap: 4px 10px; } .auth-logo { font-size: 34px; margin: 0; flex-basis: 100%; } .auth-side b { font-size: 16px; } .auth-side > span { font-size: 14px; } .auth-main { padding: 24px 20px; } }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1.5px solid var(--line); margin-bottom: 14px; }
.auth-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1.5px; padding: 10px 6px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.auth-tabs button.on { color: var(--blue); border-bottom-color: var(--blue); }
/* เลือกวิธีรับสินค้า: จัดส่ง / มารับเองที่สาขา */
.fulfil { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--bg); border-radius: 12px; margin-bottom: 14px; }
.fulfil button { border: 0; background: none; border-radius: 9px; padding: 10px 8px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.fulfil button.on { background: #fff; color: var(--blue); box-shadow: 0 1px 4px rgba(11,39,66,.12); }
/* ขั้นตอนสมัครสมาชิก */
.auth-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 10px 0 0; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.auth-steps li { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--bg); }
.auth-steps i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 700; }
.auth-steps li.on { background: var(--blue); color: #fff; font-weight: 700; } .auth-steps li.on i { color: var(--blue); } .auth-steps li.done i { background: var(--blue); color: #fff; }
.auth-main .link { background: none; border: 0; cursor: pointer; font: inherit; font-weight: 700; color: var(--blue); }
/* การ์ดสินค้า: ตัวปรับจำนวนหลังหยิบใส่รถเข็น */
.card-foot { flex-wrap: wrap; } .card-act { flex: none; } .card-act.in, .card-act:has(.card-qty) { flex: 1 0 100%; }
.card-qty { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-qty button { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; font-size: 22px; line-height: 1; display: grid; place-items: center; cursor: pointer; }
.card-qty b { flex: 1; text-align: center; background: var(--bg); border-radius: 10px; padding: 7px 4px; font-variant-numeric: tabular-nums; }
.card-sum { display: block; text-align: center; color: var(--muted); font-size: 12px; margin-top: 4px; }
/* ผลตรวจพื้นที่จัดส่งก่อนสมัครสมาชิก */
.zip-res { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 14px; margin: 18px 0 16px; }
.zip-res b { font-size: 19px; } .zip-res.ok { background: #E8F7EE; color: #0B6B3A; } .zip-res.no { background: #FDECEC; color: #A1241B; }
.auth-main .btn-block + .btn-block { margin-top: 10px; }
/* หน้าเข้าสู่ระบบ / สมัครสมาชิก: การ์ดเดียวตรงกลาง ไม่มีแผงภาพด้านข้าง */
.auth { grid-template-columns: minmax(0, 1fr); max-width: 480px; min-height: 0; } .auth-main { padding: 32px; }
@media (max-width: 820px) { .auth-main { padding: 24px 20px; } }
/* เลือกประเภทผู้ใช้งานในฟอร์มสมัคร */
.auth-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 14px; }
.auth-kind button { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 10px; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; text-align: center; }
.auth-kind button.on { border-color: var(--blue); color: var(--blue); background: #EEF8F2; }
.auth-main .lbl { display: block; font-weight: 600; font-size: 14px; margin-top: 4px; }
.otp-ref { display: block; margin-top: 4px; font-weight: 600; color: var(--text); }
/* หน้าชำระเงินด้วยการโอน: QR ซ้าย · ยอดเงิน ขั้นตอน และแนบสลิป ขวา */
.pay { max-width: 820px; margin: 0 auto; background: #fff; border-radius: 20px; box-shadow: 0 6px 28px rgba(11,39,66,.08); overflow: hidden; }
.pay-head { padding: 22px 28px; background: linear-gradient(135deg, #247A45, #C0424E); color: #fff; }
.pay-head h1 { margin: 0; font-size: 24px; color: #fff; } .pay-head p { margin: 4px 0 0; opacity: .92; font-size: 14.5px; }
.pay-grid { display: grid; grid-template-columns: 300px 1fr; gap: 28px; padding: 28px; align-items: start; }
.pay-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px; border: 1px solid #E3E9F1; border-radius: 16px; background: #F6FBF8; text-align: center; }
.pay-qr .pp-brand { margin: 0; } .pay-qr .pp-qr { width: 100%; background: #fff; border-radius: 10px; padding: 8px; } .pay-qr .pp-any { margin: 0; }
.pay-amt { display: flex; flex-direction: column; } .pay-amt span { color: var(--muted); font-size: 14px; } .pay-amt b { font-size: 38px; line-height: 1.15; color: var(--blue); font-variant-numeric: tabular-nums; }
.pay-sum { margin: 14px 0 0; border-top: 1px solid #E9EEF4; } .pay-sum div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid #E9EEF4; }
.pay-sum dt { color: var(--muted); } .pay-sum dd { margin: 0; font-weight: 600; text-align: right; }
.pay-steps { list-style: none; counter-reset: st; margin: 18px 0; padding: 0; display: grid; gap: 10px; }
.pay-steps li { counter-increment: st; display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.pay-steps li::before { content: counter(st); flex: none; width: 24px; height: 24px; border-radius: 50%; background: #E9F5EE; color: var(--blue); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.pay-drop { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px; border: 2px dashed #F5B7BD; border-radius: 14px; background: #F0F8F3; cursor: pointer; text-align: center; transition: background .15s, border-color .15s; }
.pay-drop:hover { background: #E9F5EE; border-color: var(--blue); } .pay-drop b { font-size: 17px; color: var(--blue); } .pay-drop span { font-size: 13px; color: var(--muted); }
.pay-drop i { display: none; font-style: normal; font-weight: 600; color: var(--blue); } .pay-drop.busy { pointer-events: none; opacity: .8; } .pay-drop.busy b, .pay-drop.busy span { display: none; } .pay-drop.busy i { display: block; padding: 10px 0; }
.pay .form-err { margin-top: 8px; } .pay-back { display: block; margin: 14px auto 0; }
.pay-ok { max-width: 460px; padding: 34px 28px; text-align: center; } .pay-ok h1 { margin: 14px 0 4px; } .pay-no { margin: 0 0 6px; color: var(--muted); } .pay-no b { color: var(--text); }
.pay-ok .pay-qr { margin: 18px auto 10px; max-width: 280px; } .pay-btns { margin: 20px 0 0; }
.pay-check { width: 68px; height: 68px; margin: 0 auto; border-radius: 50%; background: #1AA251; position: relative; }
.pay-check::after { content: ''; position: absolute; left: 24px; top: 15px; width: 16px; height: 30px; border: solid #fff; border-width: 0 5px 5px 0; transform: rotate(45deg); }
@media (max-width: 720px) { .pay { border-radius: 16px; } .pay-head { padding: 18px 20px; } .pay-grid { grid-template-columns: 1fr; gap: 20px; padding: 20px; } .pay-qr { max-width: 300px; margin: 0 auto; width: 100%; } .pay-amt { align-items: center; } .pay-amt b { font-size: 34px; } }
/* ป้ายพร้อมเพย์ใต้ QR (ตัวอักษรล้วน ไม่ใช่โลโก้ทางการ) */
.pp-brand { display: inline-flex; align-items: center; gap: 8px; margin: 10px auto 0; padding: 5px 14px; border: 2px solid #164A2B; border-radius: 6px; color: #164A2B; background: #fff; line-height: 1.1; }
.pp-brand b { font-size: 17px; font-weight: 800; letter-spacing: -.2px; } .pp-brand span { font-size: 12.5px; font-weight: 600; }
.pp-any { display: block; margin-top: 6px; font-size: 12.5px; color: #5B6777; }
.pp-box { text-align: center; }

/* ───────── โลโก้ BiGKET (ภาพตัวอักษร เขียว-เหลือง) · ขนาดตาม font-size ของ .logo ───────── */
.logo, .cd-logo { display: inline-flex; flex-direction: column; align-items: center; gap: .1em; line-height: 1; } /* โลโก้แนวตั้ง: รูปอยู่บน ตัวอักษรอยู่ล่าง */
.logo img, .cd-logo img { display: block; width: auto; flex: none; }
.logo .lg-m, .cd-logo .lg-m { height: 1.5em; } .logo .lg-w, .cd-logo .lg-w { height: 1em; }
.ft .logo-ft .lg-m { height: 1.2em; }

/* ───────── แถบด้านบน: จัดวางใหม่แบบ 2 ชั้น (แถวบนบางสำหรับภาษา · แถวหลัก โลโก้ / พื้นที่จัดส่ง / ค้นหา / บัญชี / รถเข็น) ───────── */
#header { box-shadow: 0 1px 0 var(--line), 0 6px 18px rgba(18,56,31,.05); }
.hd-top .wrap { display: flex; justify-content: flex-end; align-items: center; min-height: 30px; padding-top: 6px; }
.hd-top .lang { border: 0; padding: 0; background: none; gap: 0; }
.hd-top .lang button { padding: 2px 10px; border-radius: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); background: none; }
.hd-top .lang button + button { border-left: 1px solid var(--line); }
.hd-top .lang button.on { background: none; color: var(--blue); font-weight: 800; }
.hd { padding-top: 6px; padding-bottom: 14px; gap: 18px; }
.zone-btn { border-color: #E6D6D8; padding: 7px 14px 7px 11px; }
.zone-btn:hover { border-color: var(--blue); }
/* ช่องค้นหา: ไอคอนค้นหาอยู่ด้านหน้า ตัวช่องเป็นแถบยาวสีอ่อน */
.search { position: relative; background: #F4EEEF; border-radius: 12px; }
.search:focus-within { background: #fff; border-color: var(--blue); }
.search input { padding: 12px 16px 12px 48px; }
.search button { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; margin: 0; background: none; color: var(--navy); }
.search button:hover { color: var(--blue); }
/* บัญชีและรถเข็น */
.hd-actions { gap: 16px; }
.hd-link { color: var(--navy); } .hd-link:hover { color: var(--blue); }
.hd-actions .btn-yellow { background: var(--blue); border-color: var(--blue); color: #fff; border-radius: 10px; }
.hd-actions .btn-yellow:hover { background: #247A45; border-color: #247A45; }
.cart-btn:hover { color: var(--blue); }
@media (max-width: 820px) {
  .hd-top .wrap { min-height: 26px; padding-top: 4px; }
  .hd { padding-top: 4px; padding-bottom: 10px; gap: 10px 12px; }
  .search input { padding: 10px 14px 10px 44px; }
}
@media (max-width: 820px) {
  .hd .logo { order: 1; font-size: 24px; }
  .hd .hd-actions { order: 2; margin-left: auto; }
  .hd .zone-btn { order: 3; flex: none; }
  .hd .search { order: 4; flex: 1 1 0; min-width: 0; }
}
@media (max-width: 420px) { .hd .zone-btn span { font-size: 12.5px; } .hd .zone-btn { padding: 7px 10px 7px 9px; } }
