/* ============================================================
   shop.css - /pages/shop «ร้านค้า» (Owner pick: Shop A · ledger rows, 5 Oct 2026). VISUAL ONLY.
   Tokens only (css/tokens.css): white / black. Owner direction: NO brand red in text or icons -
   buttons, price and links are black on white. Mobile and desktop are separate layouts:
     mobile  · rows: cover + details, then price (left) and button (right)
     ≥900px  · three columns: cover | details | price + button
   ============================================================ */

body#shop-page { --shop-chrome: 0px; background: var(--ink); color: var(--text); font-family: var(--thai); }
@media (min-width: 769px) { body#shop-page { --shop-chrome: 52px; } }
@media (min-width: 1024px) { body#shop-page { --shop-chrome: 72px; } }
body#shop-page [hidden] { display: none !important; }

.shop-shell { max-width: 1120px; margin: 0 auto; padding: calc(var(--shop-chrome) + 28px) 16px 72px; }
.shop-hero { padding: 4px 0 20px; }
.shop-hero h1 { margin: 0 0 8px; font: 700 clamp(30px, 7vw, 42px)/1.25 var(--serif); color: var(--heading); }
.shop-hero p { margin: 0; max-width: 60ch; color: var(--muted); line-height: 1.8; }

.shop-cat-title { margin: 28px 0 6px; font: 700 20px/1.4 var(--serif); color: var(--heading); }
.shop-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.shop-item {
  display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px 14px;
  padding: 18px 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--shop-chrome) + 16px);
}
.shop-item.is-target { background: var(--ink-2); box-shadow: -16px 0 0 var(--ink-2), 16px 0 0 var(--ink-2); }
.shop-cover { display: block; width: 100%; height: auto; align-self: start; aspect-ratio: 240 / 340; object-fit: cover;
  border-radius: 3px 7px 7px 3px; background: var(--ink-3); box-shadow: 0 1px 2px rgba(0,0,0,.14), 0 8px 18px -10px rgba(0,0,0,.35); }
.shop-cover-blank { display: grid; place-items: center; align-self: start; aspect-ratio: 240 / 340; border-radius: 3px 7px 7px 3px;
  background: var(--ink-3); color: var(--muted); font: 700 13px/1 var(--ui); }
.shop-title { margin: 0; font: 700 17px/1.45 var(--serif); color: var(--heading); }
.shop-author { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.shop-pay { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.shop-buy { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.shop-price { margin: 0; font: 700 22px/1 var(--ui); color: var(--heading); }
.shop-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 132px; padding: 0 20px;
  border: 1px solid var(--heading); border-radius: 12px; background: var(--heading); color: var(--ink);
  font: 600 15px/1.2 var(--serif); text-decoration: none; cursor: pointer;
}
.shop-btn:hover { background: var(--text); border-color: var(--text); }
.shop-btn:disabled { opacity: .5; cursor: not-allowed; }
.shop-btn-owned { background: var(--ink); color: var(--heading); }
.shop-btn-owned:hover { background: var(--ink-3); border-color: var(--heading); color: var(--heading); }
.shop-btn:focus-visible, .shop-item a:focus-visible { outline: 3px solid var(--heading); outline-offset: 2px; }

.shop-empty { margin: 0; padding: 36px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 16px; line-height: 1.8; }
.shop-notice { margin: 0 0 18px; padding: 14px 18px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--ink-2); color: var(--heading); line-height: 1.7; }
.shop-terms { margin: 26px 0 0; font-size: 13.5px; color: var(--muted); }
.shop-terms a { color: var(--heading); text-decoration: underline; }

@media (min-width: 900px) {
  .shop-item { grid-template-columns: 104px minmax(0, 1fr) 190px; gap: 8px 28px; padding: 24px 0; }
  .shop-title { font-size: 19px; }
  .shop-buy { grid-column: 3; flex-direction: column; align-items: stretch; justify-content: center; text-align: right; margin: 0; }
  .shop-buy .shop-price { margin-bottom: 8px; }
}

/* PREVIEW r9 (owner approved): "coming soon" empty state - hairline card, line icon, quiet badge,
   charcoal primary + outline secondary. Same language as the premium locked states (round 6). */
.shop-soon { position: relative; margin: 8px 0 0; padding: clamp(40px, 6vw, 64px) clamp(22px, 5vw, 56px); text-align: center;
  border: 1px solid var(--line-strong, rgba(26, 26, 26, .14)); border-radius: 20px;
  background: radial-gradient(80% 60% at 50% 0%, rgba(26, 26, 26, .035), rgba(26, 26, 26, 0) 70%), var(--bg-primary, #fff); }
.shop-soon-icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center;
  color: var(--text-primary, #1a1a1a); background: var(--bg-primary, #fff); box-shadow: 0 0 0 1px rgba(26, 26, 26, .12), 0 10px 26px -14px rgba(0, 0, 0, .35); }
.shop-soon-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.shop-soon-badge { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 14px; padding: 3px 11px; border-radius: 999px;
  border: 1px solid rgba(26, 26, 26, .16); font: 500 12px/1.6 'IBM Plex Sans Thai', system-ui, sans-serif; letter-spacing: .04em; color: #3a3532; }
.shop-soon-dot { width: 6px; height: 6px; border-radius: 50%; background: #1a1a1a; }
.shop-soon-title { margin: 0 0 10px; font: 600 clamp(21px, 2.6vw, 26px)/1.4 'IBM Plex Sans Thai', system-ui, sans-serif; color: var(--text-primary, #141210); }
.shop-soon-copy { max-width: 30em; margin: 0 auto; font: 400 16px/1.8 'Sarabun', system-ui, sans-serif; color: var(--muted, #57534e); }
.shop-soon-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 26px 0 0; }
.shop-soon-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 999px;
  border: 1px solid #1a1a1a; color: #1a1a1a; background: transparent; text-decoration: none; font: 600 15px/1 'IBM Plex Sans Thai', system-ui, sans-serif; transition: background .2s, color .2s; }
.shop-soon-btn.is-primary { background: #1a1a1a; color: #fff; }
.shop-soon-btn:hover { background: #1a1a1a; color: #fff; }
.shop-soon-btn.is-primary:hover { background: #333; }
.shop-soon-btn:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 3px; }
@media (max-width: 480px) { .shop-soon-actions { flex-direction: column; } .shop-soon-btn { width: 100%; } }
html.dark-mode .shop-soon { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .14); }
html.dark-mode .shop-soon-icon { background: transparent; color: #f3eee7; box-shadow: 0 0 0 1px rgba(255, 255, 255, .2); }
html.dark-mode .shop-soon-badge { color: rgba(255, 255, 255, .8); border-color: rgba(255, 255, 255, .22); }
html.dark-mode .shop-soon-dot { background: #f3eee7; }
html.dark-mode .shop-soon-btn { border-color: #f3eee7; color: #f3eee7; }
html.dark-mode .shop-soon-btn.is-primary { background: #f3eee7; color: #141210; }
