/* ============================================================
   TripDeDee Shopping — Design System
   Direction: Travel / editorial storytelling · international-professional
   ============================================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Anuphan:wght@500;600;700&family=IBM+Plex+Sans+Thai:wght@300;400;500;600;700&display=swap');

/* ---- Tokens ---- */
:root {
  /* ธีมเดียวกับ tripdedee.com (17 ก.ย. 2569) · น้ำเงินทริปดีดีเป็นสีเด่นสีเดียว เทาเอียงน้ำเงิน */
  --bg:        #F4F7FC;
  --surface:   #ffffff;
  --surface-2: #E8EFFA;
  --ink:       #0A1526;
  --ink-soft:  #3D4B63;
  --muted:     #596984;
  --line:      #DCE4F0;
  --line-2:    #C9D5E6;

  --brand:       #1552B8;  /* น้ำเงินทริปดีดี */
  --brand-dark:  #0C3573;
  --brand-tint:  #E8EFFA;
  --forest:      #0B7A52;  /* ยืนยันแล้ว / ส่งของ */
  --forest-tint: #E4F3EC;
  --gold:        #b8893a;

  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 14px 38px -16px rgba(12,53,115,.22);
  --shadow-sm: 0 4px 14px -6px rgba(12,53,115,.16);
  --maxw:      1200px;

  --font-display: 'Anuphan', 'IBM Plex Sans Thai', sans-serif;
  --font-body:    'IBM Plex Sans Thai', system-ui, -apple-system, sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

/* ---- Layout helpers ---- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: 64px; }
.section-tight { padding-block: 40px; }
@media (max-width: 700px) {
  .wrap { padding-inline: 18px; }
  .section { padding-block: 44px; }
}

.eyebrow {
  font-size: .8rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand);
}
.display {
  font-family: var(--font-display); font-weight: 500;
  line-height: 1.15; letter-spacing: -.01em; color: var(--ink);
}
h1.display { font-size: clamp(2.3rem, 5vw, 4rem); }
h2.display { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3.display { font-size: 1.3rem; }

.section-head { margin-bottom: 30px; }
.section-head .lead { color: var(--ink-soft); max-width: 56ch; margin-top: 10px; }
.section-head--row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
}

.link-more {
  font-weight: 600; color: var(--brand); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.link-more:hover { color: var(--brand-dark); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: .98rem; padding: 13px 26px;
  border-radius: 999px; transition: .18s ease; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }

/* ---- Badges / chips ---- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .74rem; font-weight: 600; padding: 4px 10px;
  border-radius: 999px; letter-spacing: .01em;
}
.badge-ship  { background: var(--forest-tint); color: var(--forest); }
.badge-pickup { background: #efe5d6; color: #8a6536; }
.badge-new   { background: var(--brand-tint);  color: var(--brand-dark); }
.badge-verif { background: #eaf1fb; color: #2c5b9c; }
.badge-sale  { background: #fbe7e3; color: #b23c2a; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: var(--surface);
  font-size: .9rem; font-weight: 500; color: var(--ink-soft);
  transition: .15s ease;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.stars { color: var(--gold); letter-spacing: 1px; font-size: .9rem; }

/* ============================================================
   Announcement bar
   ============================================================ */
.announce {
  background: var(--forest); color: #f3efe6;
  font-size: .82rem; text-align: center; padding: 8px 16px;
  letter-spacing: .01em;
}
.announce strong { color: #fff; font-weight: 600; }

/* ============================================================
   Header
   ============================================================ */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,248,243,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-main {
  display: flex; align-items: center; gap: 26px;
  padding-block: 16px;
}
.brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand .logo { width: 40px; height: 40px; flex-shrink: 0; }
.brand .mark {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.5rem; color: var(--ink); letter-spacing: -.01em;
}
.brand .sub {
  font-size: .72rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--brand);
}

.search {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--line-2);
  border-radius: 999px; padding: 11px 20px; transition: .15s ease;
}
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.search svg { color: var(--muted); flex-shrink: 0; }
.search input { border: none; outline: none; background: none; flex: 1; color: var(--ink); }
.search input::placeholder { color: var(--muted); }

.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.icon-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 999px; color: var(--ink);
  transition: .15s ease;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .count {
  position: absolute; top: 3px; right: 2px;
  background: var(--brand); color: #fff; font-size: .66rem; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.lang {
  font-size: .85rem; font-weight: 600; color: var(--ink-soft);
  padding: 8px 12px; border-radius: 999px;
}
.lang:hover { background: var(--surface-2); }

.header-nav {
  border-top: 1px solid var(--line);
  display: flex; gap: 28px; padding-block: 12px; overflow-x: auto;
}
.header-nav a {
  font-size: .92rem; font-weight: 500; color: var(--ink-soft);
  white-space: nowrap; transition: .15s ease; padding-bottom: 2px;
}
.header-nav a:hover { color: var(--brand); }
.header-nav a.is-active { color: var(--ink); border-bottom: 2px solid var(--brand); }

@media (max-width: 860px) {
  .header-main { gap: 14px; flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; min-height: 560px;
  display: flex; align-items: flex-end;
  background: #2a241d;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .72;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,16,11,.15) 0%, rgba(20,16,11,.82) 88%);
}
.hero-inner { position: relative; z-index: 2; padding-block: 56px; color: #fff; }
.hero h1 { color: #fff; text-wrap: balance; }
.hero .eyebrow { color: #f6c79c; }
.hero p {
  color: #ece6dc; max-width: 50ch; margin-top: 16px; font-size: 1.08rem;
}
.hero-search {
  margin-top: 26px; max-width: 540px;
  display: flex; gap: 8px; background: #fff; border-radius: 999px; padding: 7px 7px 7px 22px;
}
.hero-search input { flex: 1; border: none; outline: none; color: var(--ink); }
.hero-stats {
  display: flex; gap: 32px; margin-top: 30px; flex-wrap: wrap;
}
.hero-stats div { color: #ece6dc; }
.hero-stats b {
  display: block; font-family: var(--font-display);
  font-size: 1.7rem; font-weight: 600; color: #fff;
}
.hero-stats span { font-size: .85rem; }

/* ============================================================
   Region selector
   ============================================================ */
.region-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.region-card {
  position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius);
  overflow: hidden; transition: .2s ease;
}
.region-card img { width: 100%; height: 100%; object-fit: cover; transition: .4s ease; }
.region-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.region-card:hover img { transform: scale(1.06); }
.region-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(20,16,11,.78) 100%);
}
.region-card .label {
  position: absolute; left: 18px; bottom: 16px; z-index: 2; color: #fff;
}
.region-card .label b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; }
.region-card .label span { font-size: .82rem; color: #e7e0d2; display: block; }
@media (max-width: 760px) {
  .region-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Product card + grid
   ============================================================ */
.product-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.product-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .product-grid, .product-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .product-grid, .product-grid--3 { gap: 14px; } }

.scroll-row {
  /* Fixed card width — was `minmax(248px, 1fr)` which stretched each card to
     fill container when there were only 1-2 items, making the image huge on
     desktop when the "จากร้านเดียวกัน" carousel has few sibling products. */
  display: grid; grid-auto-flow: column; grid-auto-columns: 248px;
  gap: 22px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory;
}
.scroll-row > * { scroll-snap-align: start; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: .18s ease; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
/* Square media · was 4/5 (portrait) which cropped horizontal banner artwork
   too aggressively. Square is a better neutral shape for a mixed catalog of
   sponsor stickers + food + apparel. Keep `cover` so real product photos
   still fill the frame edge-to-edge. */
.card-media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: .4s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-media .badge { position: absolute; top: 12px; left: 12px; }
.card-fav {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px; border-radius: 999px;
  background: rgba(255,255,255,.92); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.card-fav:hover { color: var(--brand); }
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-shop {
  font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 4px;
}
.card-name {
  font-weight: 500; color: var(--ink); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-name:hover { color: var(--brand); }
.card-rating { font-size: .8rem; color: var(--ink-soft); display: flex; align-items: center; gap: 5px; }
.card-foot { margin-top: auto; display: flex; align-items: baseline; gap: 8px; padding-top: 6px; }
.card-price { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.card-was { font-size: .85rem; color: var(--muted); text-decoration: line-through; }

/* ============================================================
   Editorial story section
   ============================================================ */
.story-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 24px;
}
.story-head .intro { max-width: 60ch; }
.story-head .intro p { color: var(--ink-soft); margin-top: 8px; }

/* ============================================================
   Shop cards (featured shops)
   ============================================================ */
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) { .shop-grid { grid-template-columns: 1fr; } }
.shop-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: .18s ease;
}
.shop-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.shop-cover { aspect-ratio: 16 / 9; overflow: hidden; }
.shop-cover img { width: 100%; height: 100%; object-fit: cover; }
.shop-card-body { padding: 18px 20px 20px; }
/* Only the avatar circle bleeds into the cover — text stays below the
   image so shop names never rest on top of a photo (Jul 2026 fix). */
.shop-card-top { display: flex; align-items: flex-start; gap: 12px; position: relative; }
.shop-avatar {
  width: 56px; height: 56px; border-radius: 14px; border: 3px solid #fff;
  object-fit: cover; box-shadow: var(--shadow-sm); background: var(--surface-2);
  margin-top: -42px;
  flex: 0 0 auto;
}
.shop-card-top > div { flex: 1; min-width: 0; padding-top: 4px; }
.shop-card h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.shop-card .meta { font-size: .8rem; color: var(--muted); }
.shop-card .story {
  color: var(--ink-soft); font-size: .92rem; margin-top: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis;
}
.shop-card .story-more {
  display: inline-block; margin-top: 6px; font-size: .85rem; font-weight: 600;
  color: var(--brand); text-decoration: none;
}
.shop-card .story-more:hover { text-decoration: underline; }
.shop-card .foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: .85rem; color: var(--ink-soft);
}

/* ============================================================
   Value band
   ============================================================ */
.value-band { background: var(--surface-2); }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 820px) { .value-grid { grid-template-columns: 1fr; } }
.value-item { display: flex; gap: 16px; }
.value-icon {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand); font-size: 1.5rem;
}
.value-item h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 4px; }
.value-item p { font-size: .92rem; color: var(--ink-soft); }

/* ============================================================
   CTA band
   ============================================================ */
.cta-band {
  position: relative; border-radius: 24px; overflow: hidden;
  background: var(--ink); color: #fff; padding: 56px 48px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
}
.cta-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .26; }
.cta-band .ct { position: relative; z-index: 2; }
.cta-band h2 { color: #fff; max-width: 20ch; }
.cta-band p { color: #d8d2c6; margin-top: 10px; max-width: 44ch; }
.cta-band .acts { position: relative; z-index: 2; display: flex; gap: 12px; flex-wrap: wrap; }

/* ============================================================
   Footer
   ============================================================ */
.footer { background: #211f1b; color: #b8b2a5; padding-block: 56px 28px; }
.footer a { color: #b8b2a5; transition: .15s ease; }
.footer a:hover { color: #fff; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px;
  padding-bottom: 36px; border-bottom: 1px solid #3a372f;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
.footer .mark { font-family: var(--font-display); font-size: 1.5rem; color: #fff; font-weight: 600; }
.footer .blurb { margin-top: 12px; font-size: .9rem; max-width: 34ch; }
.footer h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.footer ul { display: flex; flex-direction: column; gap: 9px; font-size: .92rem; }
.footer-bot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 22px; font-size: .85rem; flex-wrap: wrap; gap: 14px;
}
.pay-badges { display: flex; gap: 8px; align-items: center; }
.pay-badges span {
  background: #fff; color: #211f1b; font-size: .68rem; font-weight: 700;
  padding: 4px 9px; border-radius: 6px;
}

/* ============================================================
   Breadcrumb
   ============================================================ */
.crumb { font-size: .85rem; color: var(--muted); padding-block: 18px; display: flex; gap: 8px; }
.crumb a:hover { color: var(--brand); }
.crumb .sep { color: var(--line-2); }

/* ============================================================
   Cart drawer
   ============================================================ */
.drawer-scrim {
  position: fixed; inset: 0; background: rgba(20,16,11,.5);
  opacity: 0; pointer-events: none; transition: .25s ease; z-index: 90;
}
.drawer-scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 420px; max-width: 92vw;
  background: var(--bg); z-index: 95; transform: translateX(100%);
  transition: .28s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column;
  box-shadow: -20px 0 50px -20px rgba(0,0,0,.4);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; border-bottom: 1px solid var(--line);
}
.drawer-head h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 20px 22px; background: var(--surface); }

.mini-line { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.mini-line img { width: 74px; height: 88px; border-radius: 10px; object-fit: cover; }
.mini-line .info { flex: 1; }
.mini-line .nm { font-weight: 500; font-size: .92rem; }
.mini-line .vr { font-size: .8rem; color: var(--muted); }
.mini-line .pr { font-family: var(--font-display); font-weight: 600; margin-top: 4px; }

/* ---- Quantity stepper ---- */
.qty {
  display: inline-flex; align-items: center; border: 1.5px solid var(--line-2);
  border-radius: 999px; overflow: hidden;
}
.qty button { width: 38px; height: 38px; font-size: 1.1rem; color: var(--ink); }
.qty button:hover { background: var(--surface-2); }
.qty span { min-width: 40px; text-align: center; font-weight: 600; }

/* ---- Generic panel ---- */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line-2);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
  outline: none; transition: .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.hr { height: 1px; background: var(--line); border: none; margin-block: 18px; }

.row-between { display: flex; align-items: center; justify-content: space-between; }
.muted { color: var(--muted); }
.soft { color: var(--ink-soft); }
.text-sm { font-size: .88rem; }
.text-xs { font-size: .78rem; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; }
.fw-600 { font-weight: 600; }
.brand-text { color: var(--brand); }

/* ============================================================
   Product detail page
   ============================================================ */
.pdp-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px;
  padding-block: 8px 56px; align-items: start;
}
@media (max-width: 880px) { .pdp-grid { grid-template-columns: 1fr; gap: 24px; } }

/* Gallery: square container with `contain` so wide banners AND tall portraits
   both fit without cropping. Cap height so long stickers/sponsors don't push
   the buy panel below the fold. Padding gives natural letterbox breathing
   room against the neutral background. */
.gallery-main {
  width: 100%; max-width: 520px; aspect-ratio: 1 / 1;
  object-fit: contain; padding: 16px;
  border-radius: var(--radius); background: var(--surface-2);
  display: block;
}
@media (max-width: 880px) {
  .gallery-main { max-width: 100%; aspect-ratio: 1 / 1; padding: 10px; }
}
.thumb-row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumb {
  width: 68px; height: 68px; border-radius: 10px; object-fit: cover;
  cursor: pointer; border: 2px solid transparent; opacity: .65; transition: .15s ease;
  background: var(--surface-2);
}
.thumb:hover { opacity: 1; }
.thumb.is-active { border-color: var(--brand); opacity: 1; }

.pdp-price {
  font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; color: var(--ink);
}
.variant-group { margin-top: 18px; }
.variant-group > .vlabel {
  font-size: .85rem; font-weight: 600; margin-bottom: 8px; display: block;
}
.variant-opts { display: flex; flex-wrap: wrap; gap: 9px; }
.variant-opt {
  padding: 9px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-2); background: var(--surface);
  font-size: .9rem; font-weight: 500; color: var(--ink-soft); transition: .15s ease;
}
.variant-opt:hover { border-color: var(--ink); }
.variant-opt.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.ship-list { display: flex; flex-direction: column; gap: 10px; }
.ship-list li { display: flex; gap: 10px; font-size: .92rem; color: var(--ink-soft); }
.ship-list li b { color: var(--ink); font-weight: 600; }

.review-summary {
  display: grid; grid-template-columns: auto 1fr; gap: 36px; align-items: center;
}
@media (max-width: 600px) { .review-summary { grid-template-columns: 1fr; gap: 16px; } }
.review-big { text-align: center; }
.review-big .num { font-family: var(--font-display); font-size: 3.4rem; font-weight: 600; line-height: 1; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--ink-soft); }
.bar { flex: 1; height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.review-card { padding: 18px 0; border-bottom: 1px solid var(--line); }
.review-card:last-child { border-bottom: none; }
.review-card .rv-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.review-avatar {
  width: 38px; height: 38px; border-radius: 999px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--ink-soft);
}

/* ============================================================
   Browse page
   ============================================================ */
.browse-grid { display: grid; grid-template-columns: 256px 1fr; gap: 36px; }
@media (max-width: 860px) { .browse-grid { grid-template-columns: 1fr; } }
.filters { align-self: start; position: sticky; top: 150px; }
.filter-group { padding: 16px 0; border-bottom: 1px solid var(--line); }
.filter-group:first-child { padding-top: 0; }
.filter-group h4 { font-size: .92rem; font-weight: 600; margin-bottom: 12px; }
.check-row {
  display: flex; align-items: center; gap: 9px; padding: 5px 0;
  font-size: .9rem; color: var(--ink-soft); cursor: pointer;
}
.check-row input { width: 17px; height: 17px; accent-color: var(--brand); }
.check-row .cnt { margin-left: auto; font-size: .8rem; color: var(--muted); }
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.toolbar select {
  padding: 10px 14px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface); font-weight: 500; color: var(--ink);
}
.chip-x {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 999px; background: var(--brand-tint);
  color: var(--brand-dark); font-size: .84rem; font-weight: 500;
}
.chip-x button { color: var(--brand-dark); font-weight: 700; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 40px; }
.pagination a {
  min-width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--line-2); border-radius: 10px; font-weight: 500;
  font-size: .9rem; color: var(--ink-soft); padding: 0 10px;
}
.pagination a:hover { border-color: var(--ink); color: var(--ink); }
.pagination a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ============================================================
   Cart page
   ============================================================ */
.cart-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; padding-bottom: 60px; }
@media (max-width: 860px) { .cart-grid { grid-template-columns: 1fr; } }
.shop-group { margin-bottom: 18px; }
.shop-group-head {
  display: flex; align-items: center; gap: 8px;
  font-size: .9rem; font-weight: 600; color: var(--ink); margin-bottom: 10px;
}
.cart-item {
  display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: none; }
.cart-item img { width: 104px; height: 124px; border-radius: 12px; object-fit: cover; }
.cart-item .ci-info { flex: 1; }
.cart-item .ci-name { font-weight: 500; }
.cart-item .ci-actions { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.link-danger { color: #b23c2a; font-size: .85rem; font-weight: 500; }
.link-danger:hover { text-decoration: underline; }
.summary-sticky { align-self: start; position: sticky; top: 150px; }
.sum-total { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--ink); }

/* ============================================================
   Checkout page
   ============================================================ */
.co-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 36px; padding-bottom: 60px; }
@media (max-width: 860px) { .co-grid { grid-template-columns: 1fr; } }
.co-step { margin-bottom: 20px; }
.co-step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.step-num {
  width: 32px; height: 32px; border-radius: 999px; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;
}
.co-step-head h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.radio-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px;
  border: 1.5px solid var(--line-2); border-radius: var(--radius-sm);
  cursor: pointer; transition: .15s ease; margin-bottom: 10px;
}
.radio-card:hover { border-color: var(--ink); }
.radio-card.is-active { border-color: var(--brand); background: var(--brand-tint); }
.radio-card input { width: 18px; height: 18px; accent-color: var(--brand); margin-top: 2px; }
.radio-card .rc-body { flex: 1; }
.radio-card .rc-title { font-weight: 600; }
.radio-card .rc-note { font-size: .85rem; color: var(--ink-soft); margin-top: 2px; }
.radio-card .rc-price { font-family: var(--font-display); font-weight: 600; }

/* ============================================================
   Order confirmation page
   ============================================================ */
.success-hero { text-align: center; padding-block: 48px 12px; }
.success-check {
  width: 76px; height: 76px; border-radius: 999px; margin: 0 auto 20px;
  background: var(--forest-tint); color: var(--forest);
  display: flex; align-items: center; justify-content: center; font-size: 2.4rem;
}
.order-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; padding-bottom: 30px; }
@media (max-width: 860px) { .order-grid { grid-template-columns: 1fr; } }
.pay-panel { border-color: var(--brand); border-width: 1.5px; }
.qr-flex { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.qr-box {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; box-shadow: var(--shadow-sm);
}
.qr-box img { width: 200px; height: 200px; }
.slip-drop {
  border: 2px dashed var(--line-2); border-radius: var(--radius);
  padding: 26px; text-align: center; margin-top: 16px;
}
.slip-drop img { max-width: 200px; border-radius: 10px; margin: 0 auto; }
.file-btn {
  display: inline-block; position: relative; overflow: hidden;
}
.file-btn input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-step { display: flex; gap: 14px; }
.tl-mark { display: flex; flex-direction: column; align-items: center; }
.tl-dot {
  width: 30px; height: 30px; border-radius: 999px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--muted); font-size: .85rem; font-weight: 700;
  border: 2px solid var(--line-2);
}
.tl-line { width: 2px; flex: 1; background: var(--line-2); min-height: 26px; }
.tl-step:last-child .tl-line { display: none; }
.tl-step.done .tl-dot { background: var(--forest); color: #fff; border-color: var(--forest); }
.tl-step.done .tl-line { background: var(--forest); }
.tl-step.current .tl-dot { background: var(--brand); color: #fff; border-color: var(--brand); }
.tl-body { padding-bottom: 22px; }
.tl-body .tl-title { font-weight: 600; }
.tl-step.pending .tl-body .tl-title { color: var(--muted); }
.tl-body .tl-meta { font-size: .82rem; color: var(--muted); }

/* ---- Empty / loading states ---- */
.empty-state {
  text-align: center; padding: 52px 22px; color: var(--ink-soft);
}
.empty-ic { font-size: 2.6rem; margin-bottom: 10px; }

/* ---- Account menu (header) ---- */
.acct { position: relative; }
.acct-btn {
  display: flex; align-items: center; gap: 7px;
  font-size: .86rem; font-weight: 600; color: var(--ink);
  padding: 7px 13px; border-radius: 999px; border: 1.5px solid var(--line-2);
  background: var(--surface); white-space: nowrap;
}
.acct-btn:hover { border-color: var(--ink); }
.acct-btn img { width: 22px; height: 22px; border-radius: 999px; object-fit: cover; }
.acct-menu {
  position: absolute; top: calc(100% + 8px); right: 0; width: 230px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 8px; display: none; z-index: 60;
}
.acct-menu.open { display: block; }
.acct-menu .am-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.acct-menu .am-name { font-weight: 600; }
.acct-menu .am-email { font-size: .8rem; color: var(--muted); word-break: break-all; }
.acct-menu a, .acct-menu button {
  display: block; width: 100%; text-align: left; padding: 9px 10px;
  border-radius: 8px; font-size: .9rem; color: var(--ink-soft); background: none; border: none;
}
.acct-menu a:hover, .acct-menu button:hover { background: var(--surface-2); color: var(--ink); }


/* ── ร้านทริปดีดีช๊อปปิ้ง: รออนุมัติ / ปิดรับชั่วคราว · แถวร้านค้าตอนค้นหา (17 ก.ย. 2569) ── */
.badge-closed { background: #fdecc8; color: #92400e; }
.by-tdd { font-size: .72em; font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.card-media.is-closed img { filter: saturate(.75); }
.closed-box { background: #fff7e6; border: 1px solid #f5d8a8; border-radius: 14px; padding: 16px 18px; }
.closed-text { color: #92400e; font-weight: 600; }
.shop-row { margin-bottom: 16px; }
.shop-row:empty { display: none; }
.shop-row-title { font-weight: 700; margin-bottom: 8px; }
.shop-row-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.shop-pill { flex: 0 0 auto; width: 250px; display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); text-decoration: none; }
.shop-pill:hover { border-color: var(--brand); }
.shop-pill img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: #f1ece4; flex-shrink: 0; }
.shop-pill-body { display: flex; flex-direction: column; min-width: 0; }
.shop-pill-body b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- เทียบราคาร้านอื่นในทริปดีดี (17 ก.ย. 2569) · แบบ Priceza: ร้าน ราคา ปุ่มไปยังร้านค้า ---- */
.compare-range { margin-top: 6px; font-size: .9rem; color: var(--muted); }
.compare-range span { color: var(--brand); font-weight: 600; }
.compare-jump { color: var(--brand); font-weight: 600; white-space: nowrap; font-size: inherit; padding: 6px 2px; }
.compare { margin-top: 18px; padding: 16px 18px; }
#pdp-compare { scroll-margin-top: 90px; }
.compare h3 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 4px; }
.compare-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.compare h3 + .compare-row { border-top: none; }
.compare-row.is-self { background: var(--brand-tint); border-radius: 12px; padding: 12px; margin: 2px -6px; border-top: none; }
.compare-row .c-logo { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; background: var(--surface-2) center/cover no-repeat; border: 1px solid var(--line); }
.compare-row .c-initial { display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; color: var(--brand); }
.compare-row .c-main { flex: 1; min-width: 0; }
.compare-row .c-shopname { display: block; font-weight: 600; color: var(--ink); }
.compare-row .c-shop { display: block; font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare-row .c-price { text-align: right; flex-shrink: 0; }
.compare-row .c-price b { font-family: var(--font-display); font-size: 1.1rem; }
.compare-row .c-unit { display: block; font-size: .75rem; color: var(--muted); }
.compare-diff { display: inline-block; margin-top: 2px; padding: 1px 8px; border-radius: 8px; font-size: .72rem; font-weight: 600; }
.compare-diff.cheaper { background: var(--forest-tint); color: var(--forest); }
.c-go { flex-shrink: 0; min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 600; font-size: .88rem; white-space: nowrap; }
.c-go:hover { background: var(--brand-dark); }
.c-here { background: transparent; color: var(--brand); padding: 0 6px; }
@media (max-width: 560px) {
  .compare-row { flex-wrap: wrap; }
  .compare-row .c-main { flex-basis: calc(100% - 56px); }
  .compare-row .c-price { margin-left: 56px; text-align: left; flex: 1; }
}

/* ---- กล่องร้านบนหน้าสินค้า · กดเข้าหน้าร้าน (17 ก.ย. 2569) ---- */
a.card-shop:hover { color: var(--brand); }
.pdp-shop { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px 16px; color: var(--ink); }
.pdp-shop:hover { border-color: var(--brand); }
.pdp-shop .c-logo { width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0; background: var(--surface-2) center/cover no-repeat; border: 1px solid var(--line); }
.pdp-shop .c-initial { display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; color: var(--brand); }
.pdp-shop-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pdp-shop-go { flex-shrink: 0; min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 10px; border: 1px solid var(--brand); color: var(--brand); font-weight: 600; font-size: .88rem; }

/* การ์ดสินค้า: บรรทัดชื่อร้านยาวตัดด้วย … · by ทริปดีดีช๊อปปิ้ง ขึ้นบรรทัดของตัวเอง ไม่บีบเป็นสามคอลัมน์ */
.card-shopline { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.card-shopline .card-shop { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 0; }
.card-shopline .by-tdd { font-size: .68rem; color: var(--muted); }

/* ---- หน้าร้าน ตามแบบ 4a (17 ก.ย. 2569) ---- */
.sf-card { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.sf-cover { height: 260px; display: grid; gap: 4px; background: var(--surface-2); }
.sf-cover img { width: 100%; height: 260px; object-fit: cover; }
.sf-cover-3 { grid-template-columns: 2fr 1fr 1fr; }
.sf-cover-2 { grid-template-columns: 1fr 1fr; }
.sf-cover-1 { grid-template-columns: 1fr; }
.sf-cover-0 { height: 120px; background: var(--brand-tint); }
.sf-head { display: flex; gap: 24px; align-items: flex-end; padding: 0 32px 26px; }
.sf-logo { width: 140px; height: 140px; margin-top: -70px; border-radius: 50%; object-fit: cover; background: #fff; border: 5px solid #fff; box-shadow: var(--shadow-sm); flex-shrink: 0; }
.sf-cover-0 + .sf-head .sf-logo { margin-top: -50px; }
.sf-logo-initial { display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 3rem; font-weight: 700; color: var(--brand); background: var(--brand-tint); }
.sf-title { flex: 1; min-width: 0; padding-top: 16px; }
.sf-title h1 { font-family: var(--font-display); font-size: 2.1rem; line-height: 1.2; margin: 6px 0 4px; }
.sf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sf-chip { padding: 3px 10px; border-radius: 8px; background: var(--brand-tint); color: var(--brand); font-size: .8rem; font-weight: 600; }
.sf-chip-ok { background: var(--forest-tint); color: var(--forest); }
.sf-chip-wait { background: #FFF1DC; color: #7a4b00; }
.sf-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .9rem; color: var(--muted); }
.sf-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.sf-share { width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--brand); display: flex; align-items: center; justify-content: center; }
.sf-share.is-done { border-color: var(--forest); color: var(--forest); }
.sf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }
.sf-stat { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line); text-align: left; color: var(--ink); font-weight: 600; min-height: 64px; }
.sf-stat b { font-family: var(--font-display); font-size: 1.8rem; color: var(--brand); }
.sf-stat.is-active { border: 1.5px solid var(--brand); }
.sf-stat-info { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; }
.sf-stat-info small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.sf-body { display: flex; gap: 20px; align-items: flex-start; }
.sf-body #shop-about:empty { display: none; }
.sf-body #shop-about { width: 280px; flex-shrink: 0; }
.sf-about { padding: 20px; }
.sf-about h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 8px; }
.sf-about p { font-size: .95rem; line-height: 1.7; color: var(--ink-soft); }
.sf-main { flex: 1; min-width: 0; }
.sf-listhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sf-listhead h2 { font-size: 1.4rem; }
.sf-sort { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sf-sort button { min-height: 40px; padding: 0 16px; border-radius: 20px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 500; }
.sf-sort button.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.sf-count { font-size: .85rem; color: var(--muted); margin-left: 4px; }
@media (max-width: 800px) {
  .sf-cover, .sf-cover img { height: 180px; }
  .sf-head { flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 18px 20px; }
  .sf-logo { width: 104px; height: 104px; margin-top: -52px; }
  .sf-title { padding-top: 0; }
  .sf-title h1 { font-size: 1.6rem; }
  .sf-body { flex-direction: column; }
  .sf-body #shop-about { width: 100%; }
}

/* แจ้งไม่ให้แสดงร้านรออนุมัติ (17 ก.ย. 2569) */
.removal-wrap { margin-top: 12px; }
.removal-link { font-size: .82rem; color: var(--muted); text-decoration: underline; padding: 8px 0; min-height: 44px; }
.removal-link:hover { color: var(--ink); }
.removal-form { margin-top: 8px; padding: 16px; display: flex; flex-direction: column; gap: 10px; max-width: 460px; background: #fff; }
.removal-form .field { margin: 0; }
.removal-msg { color: #A61B1B; }

/* ล้างตะกร้า · ช่องค้นหาไม่ซ้ำบนหน้าแรก (17 ก.ย. 2569) */
.clear-cart { display: block; margin: 12px auto 0; padding: 10px 12px; min-height: 44px; font-size: .88rem; color: #A61B1B; text-decoration: underline; }
.clear-cart:hover { color: #7f1414; }
.header .search { transition: opacity .15s ease; }
.header.hero-search-visible .search { visibility: hidden; opacity: 0; pointer-events: none; }
.mini-remove { font-size: .8rem; color: var(--muted); text-decoration: underline; padding: 6px 0; }
.mini-remove:hover { color: #A61B1B; }

/* ลูกค้าต่างชาติขอให้ทีมงานช่วยซื้อ · หน้าสินค้าโหมดอังกฤษ (17 ก.ย. 2569) */
.assist-panel { padding: 18px; border-color: var(--brand); background: var(--brand-tint); }
.assist-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 6px; color: var(--brand-dark); }
.assist-steps { margin: 10px 0 14px; padding-left: 20px; color: var(--ink-soft); display: grid; gap: 4px; }
.assist-steps li { list-style: decimal; }
.assist-open { min-height: 48px; white-space: normal; }
.assist-form { margin-top: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 12px; }
.assist-form .field { margin: 0; }
.assist-form .field input, .assist-form .field select, .assist-form .field textarea { min-height: 44px; font-size: 16px; }
.assist-form textarea { resize: vertical; }
.assist-form .btn { min-height: 48px; }
.assist-types { border: none; padding: 0; }
.assist-types legend { font-size: .86rem; font-weight: 600; margin-bottom: 4px; padding: 0; }
.assist-types .check-row { min-height: 44px; }
.assist-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.assist-msg { color: #A61B1B; }
.assist-msg:empty { display: none; }
.assist-done { margin-top: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); outline: none; }
@media (max-width: 560px) { .assist-form .field-row { grid-template-columns: 1fr; gap: 12px; } }
