/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 16px; line-height: 1.3; white-space: nowrap;
  transition: background 0.15s, transform 0.12s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand-700); color: #fff; }
.btn--primary:hover { background: var(--brand-900); }
.btn--dark { background: var(--brand-900); color: #fff; }
.btn--dark:hover { background: #011f14; }
.btn--action { background: var(--action); color: #fff; }
.btn--action:hover { background: var(--action-strong); }
.btn--ghost { background: #fff; color: var(--brand-900); border: 1.5px solid var(--brand-200); }
.btn--ghost:hover { background: var(--brand-50); }
.btn--block { display: flex; width: 100%; }
.btn--lg { padding: 14px 24px; font-size: 18px; }
.btn--sm { padding: 7px 18px; font-size: 14px; }

.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--ink); }
.icon-btn:hover { background: var(--brand-100); }

/* ============ Header + Nav ============ */
.site-header {
  background: #fff; border-radius: 0 0 var(--r-lg) var(--r-lg);
  box-shadow: var(--shadow); position: sticky; top: 0; z-index: 40;
}
.site-header__inner {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center; gap: 10px 28px; padding-block: 10px;
}
.logo { flex: none; }
.logo img { height: 44px; width: auto; } /* 2 พ.ย. 2026: โลโก้ text-only ใหม่ (logo-text.png 800x178, 4.49:1) — เดิม 3 มาสคอต ดู data/image-backups-20261102/logo-old.png */

.search {
  display: flex; align-items: center; gap: 8px; max-width: 520px; width: 100%; justify-self: center;
  background: var(--brand-50); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 4px 4px 4px 18px;
}
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 8px 0; font-size: 16px; }
.search input::placeholder { color: var(--muted); }
.search button {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--brand-500); color: #fff; display: grid; place-items: center;
}
.search:focus-within { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }

.nav { display: flex; gap: 4px; }
.nav__item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 12px 4px; font-size: 12px; font-weight: 500; color: var(--brand-700);
  border-bottom: 3px solid transparent; white-space: nowrap;
}
.nav__item .icon { font-size: 22px; }
.nav__badge {
  position: absolute; top: 0; right: 4px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: var(--action); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}
[data-active="home"] [data-nav="home"],
[data-active="categories"] [data-nav="categories"],
[data-active="corporate"] [data-nav="corporate"],
[data-active="cart"] [data-nav="cart"],
[data-active="account"] [data-nav="account"] {
  color: var(--brand-900); font-weight: 600; border-bottom-color: var(--brand-500);
}
.nav__lang { font-family: var(--font); }
.nav__lang .icon { font-size: 20px; }
.nav__lang-pair { display: flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; letter-spacing: .2px; }
.nav__lang-pair i { font-style: normal; opacity: .35; }
.nav__lang-pair b { opacity: .35; font-weight: 700; }
.nav__lang-pair .nav__lang-th { opacity: 1; color: var(--brand-900); }
html[data-lang="en"] .nav__lang-pair .nav__lang-th { opacity: .35; color: inherit; }
html[data-lang="en"] .nav__lang-pair .nav__lang-en { opacity: 1; color: var(--brand-900); }
.tagline {
  font-family: var(--font-script); font-size: 26px; line-height: 1;
  color: var(--brand-600); transform: rotate(-4deg);
}

@media (max-width: 1100px) {
  .tagline { display: none; }
  .site-header__inner { grid-template-columns: auto minmax(0, 1fr) auto; }
}
@media (max-width: 820px) {
  .site-header { position: static; }
  .site-header__inner { grid-template-columns: minmax(0, 1fr); padding-block: 10px 12px; }
  .logo img { height: 38px; }
  .search { max-width: none; }
  .nav {
    position: fixed; inset: auto 0 0 0; z-index: 60; justify-content: space-around; gap: 0;
    background: #fff; border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(2, 60, 38, 0.08);
  }
  .nav__item { flex: 1; padding-inline: 2px; }
  .nav__badge { right: calc(50% - 22px); }
}

/* ============ Section heading ============ */
.section-head { display: flex; align-items: center; gap: 14px; margin: 28px 0 16px; flex-wrap: wrap; }
.section-head__icon { font-size: 40px; color: var(--brand-500); }
.section-head > div { flex: 1 1 220px; min-width: 0; }
.section-head h2 { font-size: var(--fs-h2); line-height: 1.25; font-weight: 700; color: var(--brand-900); }
.section-head p { color: var(--muted); }
.section-head .btn { margin-left: auto; }
@media (max-width: 560px) { .section-head .btn { margin-left: 0; } }

.page-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding-block: 24px 16px; }
.page-title small { display: block; font-size: 14px; color: var(--muted); }
.page-title h1 { font-size: clamp(26px, 4vw, 38px); line-height: 1.25; font-weight: 700; color: var(--brand-900); }
.info-note { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
/* หิมะในวงกลมครีม สีเขียว — ตามไฟล์ที่ผู้ใช้ส่ง 26 พ.ย. 2026 (design/snowflake-20261126/) แทนหิมะสีฟ้าเดิม */
/* ไอคอนหิมะทุกจุด = หิมะเขียวในวงกลมครีม (ผู้ใช้ 26 พ.ย.: "เปลี่ยนทุกไอคอนที่เกี่ยวกับหิมะให้เป็นอันนี้") — ขนาดวงกลมตั้งที่ --snow ของแต่ละจุด */
.icon.icon-snow { --snow: 30px; box-sizing: border-box; width: var(--snow); height: var(--snow); padding: calc(var(--snow) * 0.14); border-radius: 50%; background: #fcf9e1; color: #137645; }

/* ============ Category strip ============ */
.cat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat-mini { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: var(--r-md); padding: 12px; box-shadow: var(--shadow); }
.cat-mini img { width: 96px; height: 84px; object-fit: cover; border-radius: 12px; flex: none; }
.cat-mini h3 { font-size: 16px; font-weight: 600; color: var(--brand-900); }
.cat-mini p { font-size: 13px; color: var(--muted); line-height: 1.4; }
.cat-strip--single { grid-template-columns: minmax(0, 460px); }
@media (max-width: 1000px) { .cat-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .cat-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding: 4px 16px 12px; }
  .cat-mini { min-width: 270px; scroll-snap-align: start; }
}

/* ============ Product card ============ */
.products { background: rgba(255, 255, 255, 0.7); border-radius: var(--r-lg); padding: 8px 16px 24px; margin-bottom: 24px; }
.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 16px; }
.grid-products--row { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
@media (max-width: 400px) { .grid-products--row { grid-template-columns: minmax(0, 1fr); } }

.product-card { position: relative; background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.product-card__media { position: relative; display: block; aspect-ratio: 4 / 3; background: #fff; overflow: hidden; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; } /* cover ไม่ contain — กันรูปสินค้าจริง (อัตราส่วนไม่ตรง 4:3 พอดี) เหลือขอบขาวว่างเวิ้ง เปลี่ยนเมื่อ 12 ต.ค. 2026 */
.product-card__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.product-card__cat { font-size: 13px; font-weight: 600; color: var(--brand-600); }
.product-card__title { font-size: var(--fs-h3); line-height: 1.35; font-weight: 600; }
.product-card__desc { font-size: 13px; color: var(--muted); line-height: 1.45; }
.product-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.product-card .btn { margin-top: 8px; }

.tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 8px;
  border-radius: var(--r-pill); font-size: 13px; font-weight: 600; color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.tag .icon { font-size: 15px; }
.tag--promo { background: var(--promo); }
.tag--best, .tag--pack { background: var(--action); }
.tag--reco { background: var(--brand-600); }

.discount-pill {
  position: absolute; right: 10px; bottom: 10px; padding: 3px 12px; border-radius: var(--r-pill);
  background: var(--promo); color: #fff; font-size: 13px; font-weight: 700;
}
.promo-strip {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-top: 4px;
  background: var(--promo-soft); color: var(--promo); border-radius: 12px; font-size: 13px; font-weight: 600; line-height: 1.3;
}
.promo-strip .icon { font-size: 26px; }

.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price ins { text-decoration: none; font-size: 24px; font-weight: 700; color: var(--promo); line-height: 1.1; }
.price del { font-size: 14px; color: var(--strike); }

/* แถวแนวนอน (หน้าผัก): รูปซ้าย ข้อความขวา */
.product-card--row { display: grid; grid-template-columns: 148px minmax(0, 1fr); column-gap: 12px; padding: 12px; }
.product-card--row .product-card__media { grid-column: 1; grid-row: 1 / span 4; aspect-ratio: 4 / 3; align-self: start; border-radius: 12px; }
.product-card--row .product-card__body { display: contents; }
.product-card--row .product-card__cat,
.product-card--row .product-card__title,
.product-card--row .product-card__desc,
.product-card--row .promo-strip { grid-column: 2; }
.product-card--row .product-card__foot,
.product-card--row .btn { grid-column: 1 / -1; }
.product-card--row .discount-pill { display: none; }
.product-card--row .tag { top: 10px; left: 10px; font-size: 12px; padding: 4px 10px 4px 6px; }

/* ============ Quantity stepper ============ */
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--action); color: var(--action); background: #fff;
}
.stepper button[data-step="1"] { background: var(--action); color: #fff; }
.stepper button:hover { filter: brightness(0.95); }
.stepper__qty { min-width: 30px; text-align: center; font-weight: 600; font-size: 17px; }
.stepper--box { background: var(--brand-100); border-radius: 12px; padding: 3px; }
.stepper--box button { border: 0; border-radius: 9px; background: transparent; color: var(--ink); width: 34px; height: 34px; }
.stepper--box button[data-step="1"] { background: transparent; color: var(--ink); }
.stepper--box button:hover { background: #fff; }

/* ============ Panel / totals / notice ============ */
.panel { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 22px; }
.panel__head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.panel__head > .icon { font-size: 36px; color: var(--brand-500); }
.panel__head h2 { font-size: 22px; font-weight: 700; line-height: 1.25; }
.panel__head p { font-size: 13px; color: var(--muted); }

.totals { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals dt { color: var(--ink); }
.totals dd { font-weight: 500; }
.totals .is-discount { color: var(--promo); }
.totals__grand {
  margin-top: 6px; padding: 12px 14px; border-radius: 12px; background: var(--brand-100);
  font-size: 20px; font-weight: 700; align-items: center;
}
.totals__grand dd { font-size: 26px; font-weight: 700; }

.notice { padding: 8px 12px; border-radius: 10px; font-size: 14px; background: var(--brand-100); color: var(--brand-700); }
.notice--warn { background: var(--action-soft); color: #9a4d00; }

/* ============ Form fields ============ */
.field { display: flex; flex-direction: column; gap: 2px; padding: 8px 14px 8px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.field:focus-within { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--ink); }
.field > span b { color: var(--promo); font-weight: 500; }
.field input, .field select, .field textarea { border: 0; outline: none; background: transparent; font-size: 16px; padding: 2px 0; width: 100%; }
.field input::placeholder, .field textarea::placeholder { color: #a5b0aa; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.check input { width: 18px; height: 18px; accent-color: var(--brand-600); }

.select { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.select .icon { color: var(--brand-600); font-size: 22px; }
.select select { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; font-weight: 500; }
.select:focus-within { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }

/* ============ Trust bar ============ */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; background: rgba(255, 255, 255, 0.75); border-radius: var(--r-md); padding: 16px 8px; text-align: center; }
.trust li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 8px; font-size: 13px; line-height: 1.35; color: var(--ink); }
.trust li + li { border-left: 1px solid var(--line); }
.trust .icon { font-size: 34px; color: var(--brand-600); }
.trust .icon.icon-snow { --snow: 42px; color: #137645; }
@media (max-width: 560px) {
  .trust { grid-template-columns: repeat(2, 1fr); row-gap: 16px; }
  .trust li:nth-child(3) { border-left: 0; }
}

/* ============ Footer ============ */
.site-footer { margin-top: 32px; background: #fff; border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: 0 -2px 12px rgba(2, 60, 38, 0.05); }
.site-footer__inner { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 28px; padding-block: 18px; }
.site-footer__brand strong { display: block; font-size: 16px; line-height: 1.3; }
.site-footer__brand small { color: var(--muted); font-size: 12.5px; }
.social { display: flex; gap: 14px; }
.social a { display: grid; place-items: center; width: 34px; height: 34px; }
.social .brand-icon { width: 28px; height: 28px; }
/* โลโก้ FRECO ASIA (บริษัทแม่ — 20 พ.ย.) ทั้งโลโก้รวมชื่อบริษัท (ผู้ใช้: "แสดงภาพไม่ครบ") สูง 32px ให้สมส่วนกับไอคอนข้างๆ (28px — ผู้ใช้ขอ 20 พ.ย.) · แถวจัดกึ่งกลางแนวตั้ง */
.social { align-items: center; }
.social .social__brand { width: auto; height: auto; }
.social .social__brand img { display: block; width: auto; height: 32px; }
/* มือถือ: แถวโซเชียลขึ้นบรรทัดใหม่ชิดซ้าย — เดิมอยู่ขวาของชื่อร้าน โลโก้ FRECO ไปอยู่ใต้วิดเจ็ตลอยขวาล่าง (คูปอง/LINE) จนมองไม่ครบ */
@media (max-width: 560px) { .site-footer__inner .social { flex-basis: 100%; } }
.footer-links { display: flex; flex-wrap: wrap; margin-left: auto; font-size: 14px; color: var(--brand-700); }
.footer-links a { padding: 2px 16px; }
.footer-links a + a { border-left: 1.5px solid var(--brand-200); }
.footer-links a:hover { text-decoration: underline; }
@media (max-width: 820px) {
  .footer-links { margin-left: 0; width: 100%; }
  .footer-links a { padding: 4px 12px 4px 0; margin-right: 12px; }
}

/* ข้อความช่วยใต้ช่องกรอก/กล่องติ๊ก (checkout อีเมล + ความยินยอม PDPA, 2 พ.ย. 2026) */
.field__help, .check__help { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 400; line-height: 1.5; color: var(--muted); }
