/* ====== หน้ารวมสินค้า + หน้าสินค้า (โครงแบบร้านออนไลน์ทั่วไป ในโทนวาชิ/ซูมิของร้าน) ====== */
.page--shop { padding-top: calc(var(--header-h) + clamp(20px, 3vw, 36px)); }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--ink-mute); margin-bottom: clamp(16px, 2.4vw, 26px); }
.crumbs a:hover { color: var(--ink); }
.crumbs > * + *::before { content: '›'; margin-right: 6px; color: var(--line-strong); }
.crumbs span { color: var(--ink-soft); }

/* ---------- หน้ารวมสินค้า ---------- */
.shop-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.shop-head h1 { font-size: clamp(30px, 4vw, 48px); font-weight: 300; letter-spacing: -0.02em; margin-top: 10px; }
.shop-head h1 .muted { font-size: 0.45em; font-family: var(--font-mono); letter-spacing: 0; }
.shop-sort { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-soft); }
.shop-sort .select { height: 42px; width: auto; min-width: 170px; background-position: calc(100% - 20px) 18px, calc(100% - 15px) 18px; }
.shop-filters { display: grid; gap: 10px; padding: 18px 0 22px; }
.fchips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fchips__label { font-size: 12.5px; color: var(--ink-mute); min-width: 74px; }
.fchips button { height: 36px; padding: 0 16px; border-radius: 18px; font-size: 13.5px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); transition: background-color 0.25s, color 0.25s, box-shadow 0.25s; }
.fchips button:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.fchips button.is-active { background: var(--sumi); color: var(--washi); box-shadow: none; }
.fchips--paper button { font-family: var(--font-mono); font-size: 12.5px; }
@media (max-width: 640px) {
  .fchips { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter); scrollbar-width: none; }
  .fchips::-webkit-scrollbar { display: none; }
  .fchips button, .fchips__label { flex: none; }
  .fchips__label { min-width: 0; margin-right: 4px; }
  .shop-sort { width: 100%; }
  .shop-sort .select { flex: 1; }
}

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: clamp(12px, 1.6vw, 20px); }
@media (max-width: 640px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.pcard { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; transition: border-color 0.3s, box-shadow 0.4s var(--ease), transform 0.4s var(--ease); }
.pcard:hover { border-color: var(--line-strong); box-shadow: 0 18px 40px rgba(25, 24, 21, 0.1); transform: translateY(-3px); }
.pcard.is-skel { min-height: 380px; background: linear-gradient(100deg, var(--paper) 30%, var(--washi) 50%, var(--paper) 70%) 0 0 / 300% 100%; animation: skel 1.4s linear infinite; }
@keyframes skel { to { background-position: -150% 0; } }
.pcard__media { position: relative; aspect-ratio: 1; background: var(--washi-2); overflow: hidden; }
.pcard__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.5s, transform 0.9s var(--ease); }
.pcard:hover .pcard__media img { transform: scale(1.04); }
.pcard__alt { opacity: 0; }
.pcard:hover .pcard__alt { opacity: 1; }
.pcard__noimg { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; color: var(--line-strong); }
.pcard__badge { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 2px; background: var(--shu); color: #fff; font-size: 12px; font-weight: 500; }
.pcard__size { position: absolute; bottom: 10px; right: 10px; padding: 2px 10px; border-radius: 12px; background: rgba(25, 24, 21, 0.78); color: var(--washi); font-family: var(--font-mono); font-size: 12px; }
.pcard__body { display: grid; gap: 6px; padding: 14px 16px 16px; }
.pcard__title { font-family: var(--font-body); font-size: 15px; font-weight: 500; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__sub { font-size: 13px; color: var(--ink-mute); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__fit { font-size: 12.5px; padding: 6px 10px; border-radius: 3px; background: var(--shu-soft); color: var(--shu); }
.pcard__price { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.pcard__price b { font-family: var(--font-mono); font-size: 19px; font-weight: 500; color: var(--shu); white-space: nowrap; }
.pcard__price b span { color: var(--ink-mute); font-weight: 400; margin: 0 1px; }
.pcard__price small { font-size: 12px; color: var(--ink-mute); }
.pcard__deal { font-size: 12.5px; color: var(--ok); }
.pcard__deal--muted { color: var(--ink-mute); }
.pcard__rate { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-soft); }
.pcard__rate b { font-weight: 500; }
.pcard__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; color: var(--ink-mute); padding-top: 8px; border-top: 1px dashed var(--line); margin-top: 2px; }
.pcard__caps { display: inline-flex; gap: 4px; }
.pcard__caps i { width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2); }
@media (max-width: 640px) {
  .pcard__body { padding: 10px 11px 12px; gap: 4px; }
  .pcard__title { font-size: 13.5px; }
  .pcard__sub { display: none; }
  .pcard__price b { font-size: 16px; }
  .pcard__deal, .pcard__meta { font-size: 11.5px; }
}

.shop-help { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: clamp(28px, 4vw, 44px); padding: 20px 24px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.shop-help div { display: grid; gap: 2px; }
.shop-help span { font-size: 13.5px; color: var(--ink-soft); }
.trust { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.trust li { display: grid; gap: 2px; padding: 14px 16px; border-left: 2px solid var(--kraft); background: rgba(250, 247, 241, 0.6); font-size: 13px; color: var(--ink-soft); }
.trust b { color: var(--ink); font-weight: 500; font-size: 14px; }
@media (max-width: 900px) { .trust { grid-template-columns: 1fr 1fr; } }

/* ---------- หน้าสินค้า ---------- */
.pd { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 60px); align-items: start; }
@media (max-width: 900px) { .pd { grid-template-columns: 1fr; } }

.pd__gallery { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 10px; }
@media (max-width: 900px) { .pd__gallery { position: relative; top: 0; margin: 0 calc(-1 * var(--gutter)); } }
.pd__stage { position: relative; border-radius: 4px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
@media (max-width: 900px) { .pd__stage { border-radius: 0; border-width: 1px 0; } }
.pd__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.pd__track::-webkit-scrollbar { display: none; }
.pd__slide { flex: 0 0 100%; margin: 0; aspect-ratio: 1; scroll-snap-align: start; display: grid; place-items: center; }
.pd__slide img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.pd__slide--empty .jp { font-size: 120px; color: var(--line-strong); }
.pd__nav { position: absolute; top: 50%; translate: 0 -50%; width: 42px; height: 42px; border-radius: 50%; background: rgba(250, 247, 241, 0.92); box-shadow: 0 4px 16px rgba(25, 24, 21, 0.15); font-size: 24px; line-height: 1; opacity: 0; transition: opacity 0.3s; }
.pd__stage:hover .pd__nav { opacity: 1; }
.pd__nav--prev { left: 12px; }
.pd__nav--next { right: 12px; }
@media (hover: none) { .pd__nav { display: none; } }
.pd__count { position: absolute; right: 12px; bottom: 12px; padding: 2px 10px; border-radius: 12px; background: rgba(25, 24, 21, 0.7); color: var(--washi); font-family: var(--font-mono); font-size: 12px; }
.pd__badge { position: absolute; top: 12px; left: 12px; padding: 4px 12px; border-radius: 2px; background: var(--shu); color: #fff; font-size: 13px; font-weight: 500; }
.pd__thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
@media (max-width: 900px) { .pd__thumbs { padding: 0 var(--gutter); } }
.pd__thumbs button { flex: 0 0 72px; aspect-ratio: 1; border-radius: 3px; overflow: hidden; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); opacity: 0.65; transition: opacity 0.25s, box-shadow 0.25s; }
.pd__thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.pd__thumbs button:hover { opacity: 1; }
.pd__thumbs button.is-active { opacity: 1; box-shadow: inset 0 0 0 2px var(--sumi); }
.pd__thumbs button.is-active img { padding: 2px; border-radius: 3px; }

.pd__buy { display: grid; gap: 18px; min-width: 0; }
.pd__title { font-family: var(--font-body); font-size: clamp(22px, 2.4vw, 30px); font-weight: 500; line-height: 1.4; letter-spacing: -0.01em; }
.pd__sub { color: var(--ink-soft); font-size: 15px; margin-top: -8px; }
.pd__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ink-mute); }
.pd__meta span + span::before { content: '·'; margin-right: 16px; color: var(--line-strong); }
.pd__price { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 18px 20px; border-radius: 4px; background: var(--paper); border: 1px solid var(--line); }
.pd__unit { display: flex; align-items: baseline; gap: 8px; color: var(--shu); }
.pd__unit .num { font-family: var(--font-mono); font-size: clamp(34px, 4vw, 44px); font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
.pd__unit small { font-size: 14px; color: var(--ink-mute); }
.pd__tier { font-size: 13px; color: var(--ink-mute); }
.tiers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: -8px; }
.tiers button { display: grid; gap: 0; padding: 7px 4px; border-radius: 3px; text-align: center; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.25s, background-color 0.25s; }
.tiers button span { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); }
.tiers button b { font-family: var(--font-mono); font-size: 13.5px; font-weight: 500; }
.tiers button:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.tiers button.is-active { background: var(--shu-soft); box-shadow: inset 0 0 0 1.5px var(--shu); }
.tiers button.is-active b { color: var(--shu); }
@media (max-width: 480px) { .tiers { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; } .tiers button b { font-size: 12px; } }

.pd__opt { display: grid; gap: 10px; }
.pd__label { font-size: 14px; font-weight: 500; }
.pd__label .muted { font-weight: 400; font-size: 12.5px; margin-left: 6px; }
.pd__sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pd__sizes a { display: grid; gap: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); transition: border-color 0.25s, box-shadow 0.25s; }
.pd__sizes a b { font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.2; }
.pd__sizes a small { font-size: 11.5px; color: var(--ink-mute); }
.pd__sizes a:hover { border-color: var(--line-strong); }
.pd__sizes a.is-active { border-color: var(--sumi); box-shadow: inset 0 0 0 1px var(--sumi); }
.pd__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 16px; border-top: 1px solid var(--line); }
.pd__total small { font-size: 12.5px; color: var(--ink-mute); }
.pd__total b { font-family: var(--font-mono); font-size: 24px; font-weight: 500; }
.pd__hint { min-height: 20px; margin-top: -10px; font-size: 13.5px; color: var(--shu); }
.pd__actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; }
.pd__actions .btn { width: 100%; justify-content: center; }
.pd__actions .btn svg:not(.arrow) { width: 20px; height: 20px; }
.pd__trust { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pd__trust li { display: grid; padding: 10px 14px; border-left: 2px solid var(--kraft); background: rgba(250, 247, 241, 0.6); font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }
.pd__trust b { font-size: 13.5px; font-weight: 500; color: var(--ink); }

.pd-info { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 60px); }
@media (max-width: 900px) { .pd-info { grid-template-columns: 1fr; } }
.pd-sec { margin-top: clamp(40px, 6vw, 72px); min-width: 0; }
.pd-info .pd-sec { margin-top: clamp(40px, 6vw, 72px); }
.pd-sec > h2 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 400; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pd-sec > h2 .jp { font-size: 14px; color: var(--ink-mute); }
.pd-sec > h2 small { font-family: var(--font-body); font-size: 12.5px; margin-left: auto; }
.pd-hl { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.pd-hl li { position: relative; padding-left: 26px; font-size: 15px; }
.pd-hl li::before { content: ''; position: absolute; left: 4px; top: 0.62em; width: 10px; height: 6px; border-left: 1.6px solid var(--ok); border-bottom: 1.6px solid var(--ok); rotate: -45deg; }
.pd-desc p { color: var(--ink-soft); font-size: 15px; margin: 0 0 12px; }
.spec { display: grid; grid-template-columns: minmax(130px, auto) 1fr; margin: 0; font-size: 14px; border-top: 1px solid var(--line); }
.spec dt, .spec dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--ink-mute); padding-right: 16px; }
.pt-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.pt { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 13px; min-width: 760px; }
.pt th, .pt td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.pt thead th { font-weight: 400; font-size: 11.5px; color: var(--ink-mute); background: var(--washi); }
.pt th:first-child { text-align: left; position: sticky; left: 0; background: var(--paper); font-weight: 400; color: var(--ink-soft); }
.pt thead th:first-child { background: var(--washi); }
.pt .is-col { background: rgba(176, 54, 31, 0.05); }
.pt tr.is-row td, .pt tr.is-row th { background: rgba(184, 148, 107, 0.14); }
.pt tr.is-row td.is-col { background: var(--shu); color: #fff; font-weight: 500; }

/* แถบสั่งซื้อติดล่าง (มือถือ) */
.pd-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: none; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: rgba(250, 247, 241, 0.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); translate: 0 110%; transition: translate 0.45s var(--ease); }
@media (max-width: 900px) { .pd-bar { display: grid; } }
.pd-bar.is-on { translate: 0 0; }
.pd-bar__price { display: grid; line-height: 1.3; min-width: 0; }
.pd-bar__price b { font-family: var(--font-mono); font-size: 17px; color: var(--shu); font-weight: 500; }
.pd-bar__price small { font-size: 11.5px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-bar .btn { padding: 0 16px; }

/* ซูมเต็มจอ */
.lb { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; background: rgba(25, 24, 21, 0.94); padding: 56px 16px; touch-action: pan-y; }
.lb[hidden] { display: none !important; }
.lb img { max-width: min(1200px, 100%); max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb__close { position: absolute; top: 14px; right: 14px; color: var(--washi); }
.lb__nav { position: absolute; top: 50%; translate: 0 -50%; width: 52px; height: 52px; border-radius: 50%; color: var(--washi); font-size: 34px; line-height: 1; background: rgba(242, 237, 227, 0.08); }
.lb__nav:hover { background: rgba(242, 237, 227, 0.18); }
.lb__nav--prev { left: 14px; }
.lb__nav--next { right: 14px; }
.lb__count { position: absolute; bottom: 18px; left: 50%; translate: -50% 0; color: rgba(242, 237, 227, 0.7); font-family: var(--font-mono); font-size: 13px; }

/* มือถือ: ตัวเลือกฝาเรียง 3 ช่องแบบกะทัดรัด (ตัวช่วยเลือกในหน้าแรกเรียงแนวตั้ง) */
@media (max-width: 480px) {
  .pd .swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .pd .swatches button { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; font-size: 13px; }
  .pd .swatches button i { width: 20px; height: 20px; }
}

/* ตัวเลือกสินค้าทั่วไป */
.vchips { display: flex; flex-wrap: wrap; gap: 8px; }
.vchips button { display: grid; gap: 0; min-width: 96px; padding: 9px 14px; text-align: left; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); font-size: 14px; transition: border-color 0.25s, box-shadow 0.25s; }
.vchips button small { font-family: var(--font-mono); font-size: 12px; color: var(--ink-mute); }
.vchips button:hover { border-color: var(--line-strong); }
.vchips button.is-active { border-color: var(--sumi); box-shadow: inset 0 0 0 1px var(--sumi); }
.pd-info--single { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.pd__rate { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); }
.pd__rate b { font-weight: 500; color: var(--ink); }

/* รีวิวในหน้าสินค้า */
.pd-sec__act { margin-left: auto; }
.rv-none { color: var(--ink-mute); font-size: 14.5px; padding: 8px 0 4px; }
.rv-sum { display: grid; grid-template-columns: auto minmax(0, 360px); gap: clamp(20px, 4vw, 48px); align-items: center; padding: 20px 24px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.rv-sum__avg { display: grid; justify-items: center; gap: 6px; }
.rv-sum__avg b { font-family: var(--font-display); font-size: 52px; font-weight: 300; line-height: 1; }
.rv-sum__avg span { font-size: 12.5px; color: var(--ink-mute); }
.rv-sum__dist { display: grid; gap: 4px; }
.rv-sum__dist button { display: grid; grid-template-columns: 34px 1fr 36px; gap: 10px; align-items: center; font-size: 12.5px; color: var(--ink-soft); border-radius: 2px; padding: 1px 4px; }
.rv-sum__dist button:hover, .rv-sum__dist button.is-active { background: var(--washi); }
.rv-sum__dist i { height: 6px; border-radius: 3px; background: var(--washi-2); overflow: hidden; }
.rv-sum__dist em { display: block; height: 100%; background: #d39b2a; }
.rv-sum__dist span:last-child { text-align: right; font-family: var(--font-mono); }
@media (max-width: 560px) { .rv-sum { grid-template-columns: 1fr; } }
.rv-filters { padding: 16px 0 6px; }
.rv-list { display: grid; }
.rv { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.rv__head { display: flex; gap: 12px; align-items: center; }
.rv__avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--washi-2); color: var(--ink-soft); font-size: 15px; flex: none; }
.rv__who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.rv__badge { font-size: 11.5px; color: var(--ok); }
.rv__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-mute); }
.rv__bought { font-size: 12.5px; color: var(--ink-mute); }
.rv__body { margin: 0; font-size: 15px; line-height: 1.7; }
.rv__imgs { display: flex; flex-wrap: wrap; gap: 8px; }
.rv__imgs button { width: 88px; height: 88px; border-radius: 3px; overflow: hidden; background: var(--washi); cursor: zoom-in; }
.rv__imgs img { width: 100%; height: 100%; object-fit: cover; }
.rv__reply { padding: 12px 16px; border-left: 2px solid var(--kraft); background: rgba(250, 247, 241, 0.7); font-size: 14px; }
.rv__reply b { font-size: 12.5px; font-weight: 500; color: var(--kraft-deep); }
.rv__reply p { margin: 2px 0 0; color: var(--ink-soft); }
.rv-empty { padding: 18px 0; }
.rv-more { padding-top: 18px; text-align: center; }
