/* ============ Shop: collection / product / search / categories ============ */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 16px 0 8px; font-size: 13px; color: var(--muted); }
.crumbs a:hover { color: var(--brand-700); text-decoration: underline; }
.crumbs .icon { font-size: 14px; }
.crumbs [aria-current] { color: var(--ink); }

.tag--soldout { background: #6b7280; }
.tag--pre { background: var(--brand-900); }
.product-card.is-soldout .product-card__media img { filter: grayscale(0.6); opacity: 0.65; }
.btn:disabled { background: #e5e7eb; color: #6b7280; cursor: not-allowed; }
.price--lg ins { font-size: 34px; }
.price--lg del { font-size: 17px; }

/* toolbar (เรียง/กรอง) */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 16px; }
.toolbar__count { color: var(--muted); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 14px; border-radius: var(--r-pill); border: 1.5px solid var(--brand-200); background: #fff;
  font-size: 14px; font-weight: 500; color: var(--brand-900);
}
.chip:hover { background: var(--brand-50); }
.chip[aria-pressed="true"] { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
/* ปุ่ม "โปรโมชั่น" อยู่ปุ่มแรก สีส้มให้ต่างจากปุ่มอื่น (ผู้ใช้ 26 พ.ย. 2026) — ชุดสีทางการไม่มีส้ม ค่านี้ใช้เฉพาะปุ่มนี้ */
.chip--promo { display: inline-flex; align-items: center; gap: 5px; border-color: #f08a24; background: #fff1e2; color: #a84600; font-weight: 600; }
.chip--promo .icon { font-size: 15px; }
.chip--promo:hover { background: #ffe3c4; }
.chip--promo[aria-pressed="true"] { background: #c75a00; border-color: #c75a00; color: #fff; }
.toolbar .select { margin-left: auto; padding: 6px 12px; gap: 6px; font-size: 14px; }
.toolbar .select select { font-size: 14px; }
@media (max-width: 560px) { .toolbar .select { margin-left: 0; width: 100%; } }

.empty { text-align: center; padding: 48px 16px; background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow); }
.empty .icon { font-size: 48px; color: var(--brand-500); margin-bottom: 8px; }
.empty h2 { font-size: 22px; margin-bottom: 6px; }
.empty p { color: var(--muted); margin-bottom: 16px; }
.empty__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* categories page */
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.cat-tile {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 230px; padding: 20px;
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); color: #fff;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-900));
}
.cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(2, 60, 38, 0.88), rgba(2, 60, 38, 0) 70%); }
.cat-tile > div { position: relative; z-index: 1; }
.cat-tile h2 { font-size: 24px; line-height: 1.25; }
.cat-tile p { font-size: 14px; opacity: 0.92; }
.cat-tile__count { display: inline-block; margin-top: 6px; padding: 2px 12px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.22); font-size: 13px; }
.cat-tile--promo { background: linear-gradient(135deg, var(--action), var(--promo)); }
.cat-tile--promo::after { display: none; }
.cat-tile--promo .icon { position: absolute; right: 18px; top: 18px; font-size: 64px; opacity: 0.35; }
.cat-tile:hover { transform: translateY(-2px); transition: transform 0.15s; }
.cat-tile--sub { min-height: 170px; padding: 16px; }
.cat-tile--sub h2 { font-size: 19px; }

/* categories page: 2 แถว (ผลไม้ / ผัก) แถวละ 3 หมวดย่อย — ปรับ 22 ก.ย. 2026 ตามที่ทีมขอ */
.cat-row + .cat-row { margin-top: 28px; }
.cat-row__title { font-size: 20px; font-weight: 700; color: var(--brand-900); margin-bottom: 12px; }

/* กลุ่มสินค้าแยกผลไม้/ผัก บนหน้าดูสินค้าทั้งหมด และหน้าโปรโมชั่น */
.grid-group + .grid-group { margin-top: 28px; }
.grid-group__title { display: flex; align-items: baseline; gap: 8px; font-size: 19px; font-weight: 700; color: var(--brand-900); margin-bottom: 12px; }
.grid-group__title span { font-size: 13px; font-weight: 500; color: var(--muted); }

/* search page */
.search-hero { padding-block: 24px 8px; }
.search-hero h1 { font-size: clamp(24px, 3.6vw, 34px); font-weight: 700; color: var(--brand-900); margin-bottom: 12px; }
.search--lg { max-width: 640px; justify-self: start; margin: 0; }
.search--lg input { font-size: 17px; }
.suggest { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }

/* product detail */
.pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: start; padding-bottom: 16px; }
.pdp__gallery { position: sticky; top: 96px; background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px; }
.pdp__main { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-md); background: #fff; display: grid; place-items: center; }
.pdp__main > img { width: 100%; height: 100%; object-fit: cover; } /* cover ไม่ contain — เหตุผลเดียวกับ .product-card__media (12 ต.ค. 2026) */
.pdp__main .tag { top: 10px; left: 10px; }
.pdp__thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; }
.pdp__thumbs button { flex: none; width: 80px; height: 60px; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.pdp__thumbs button[aria-current="true"] { border-color: var(--brand-600); }
.pdp__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp__info { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 24px; }
.pdp__cat { font-size: 14px; font-weight: 600; color: var(--brand-600); }
.pdp h1 { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.3; font-weight: 700; color: var(--brand-900); }
.pdp__en { color: var(--muted); }
.pdp__price { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 14px 0 8px; }
.pill-off { background: var(--promo); color: #fff; border-radius: var(--r-pill); padding: 2px 12px; font-weight: 700; font-size: 14px; }
.pdp__short { color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.facts li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--r-pill); background: var(--brand-50); border: 1px solid var(--brand-100); font-size: 13.5px; }
.facts .icon { color: var(--brand-600); }
.pdp__buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 18px 0; }
.pdp__buy .stepper button { width: 42px; height: 42px; }
.pdp__buy .btn { flex: 1 1 150px; }
.pdp__deliver { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: var(--brand-50); border: 1px solid var(--brand-100); font-size: 14px; }
.pdp__deliver > p { display: flex; gap: 10px; align-items: flex-start; }
.pdp__deliver .icon { color: var(--brand-600); font-size: 20px; margin-top: 2px; }
.pdp__deliver .btn { white-space: normal; height: auto; min-height: 40px; padding-block: 8px; text-align: center; line-height: 1.35; } /* ข้อความปุ่มยาว (EN) ห้ามดันคอลัมน์จนจอมือถือเลื่อนแนวนอนได้ */
.pdp__zip { display: flex; gap: 8px; margin-top: 4px; }
.pdp__zip .field { flex: 1; min-width: 0; padding-block: 6px; }
.pdp__zip .field input { font-size: 15px; }
.acc { margin-top: 18px; }
.acc details { border-top: 1px solid var(--line); padding: 12px 0; }
.acc summary { display: flex; justify-content: space-between; cursor: pointer; font-weight: 600; list-style: none; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--brand-600); }
.acc details[open] summary::after { content: "−"; }
.acc details > div { padding-top: 10px; color: var(--muted); font-size: 14.5px; }
.spec { width: 100%; border-collapse: collapse; }
.spec th, .spec td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; vertical-align: top; }
.spec th { width: 38%; color: var(--muted); font-weight: 500; }
.spec td { color: var(--ink); }
.related { margin-top: 8px; }
.sticky-buy { display: none; }
.sample-note { margin: 12px 0 0; padding: 8px 12px; border-radius: 10px; background: #fff3cd; color: #7a5200; font-size: 13px; }

@media (max-width: 900px) {
  .pdp { grid-template-columns: minmax(0, 1fr); }
  .pdp__gallery { position: static; }
  .pdp__info { padding: 18px; }
  body[data-page="product"] { padding-bottom: 150px; }
  .sticky-buy {
    position: fixed; left: 0; right: 0; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 55;
    display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #fff;
    border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(2, 60, 38, 0.08);
  }
  .sticky-buy .price { flex: 1; }
  .sticky-buy .price ins { font-size: 22px; }
  .sticky-buy .btn { flex: 1.2; }
}

/* home: แถวสินค้า */
.home-section { margin-bottom: 8px; }
.home-section .grid-products { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.perk { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--r-md); background: var(--brand-50); border: 1px solid var(--brand-100); }
.perk .icon { font-size: 30px; color: var(--brand-600); }
.perk h3 { font-size: 16px; margin-bottom: 2px; }
.perk p { font-size: 13.5px; color: var(--muted); }
@media (max-width: 800px) { .perks { grid-template-columns: minmax(0, 1fr); } }

/* === 2 พ.ย. logo/mascot/hero6/why === */
/* หน้าแรก "ทำไมต้องซื้อกับ Fresh N Go": 4 คอลัมน์ ≥1000 / 2x2 800–999 / 1 คอลัมน์ <800 (แนวนอน) */
.why { margin-top: 12px; }
.why .section-head { margin-bottom: 14px; }
.why__lead { max-width: 680px; font-size: 15px; margin-top: 4px; }
.why__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.why__card { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow); }
.why__icon { width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--brand-100); color: var(--brand-600); display: grid; place-items: center; }
.why__icon .icon { font-size: 26px; }
.why__num { display: block; font-size: 28px; line-height: 1.1; font-weight: 700; color: var(--brand-600); margin-bottom: 2px; }
.why__card h3 { font-size: 17px; line-height: 1.3; font-weight: 700; color: var(--brand-900); margin-bottom: 4px; }
.why__card p { font-size: 14px; line-height: 1.6; color: var(--muted); }
/* การ์ดขนส่งควบคุมอุณหภูมิ: ใช้หิมะวงกลมครีมแทนวงกลมเขียวอ่อน (26 พ.ย.) */
.why__icon--snow { background: none; }
.why__icon .icon.icon-snow { --snow: 48px; }
.why__pills { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.why__pills li { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--brand-50); border: 1px solid var(--brand-100); font-size: 13.5px; color: var(--brand-900); }
.why__pills .icon { font-size: 18px; color: var(--brand-600); }
@media (max-width: 999px) { .why__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 799px) {
  .why__grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .why__card { flex-direction: row; align-items: flex-start; padding: 16px; }
  .why__icon { width: 44px; height: 44px; }
  .why__icon .icon.icon-snow { --snow: 44px; }
  .why__body { min-width: 0; }
}
