/* shop.css — the shopper pages this app serves (piece, booth, saved, alerts,
   gift cards, layaway). Light by default, the shop's own palette. */
:root {
  --ink: #17140E; --ink-2: #3b352b; --muted: #6f675b;
  --cream: #F6F1E5; --paper: #FFFDF8; --line: #E3DCCB; --line-2: #D4CAB3;
  --olive: #333F31; --olive-2: #45543F; --brass: #8A6D34; --brass-2: #C6A15B;
  --good: #2F6B3A; --bad: #9B2C1F;
  --r: 6px; --shadow: 0 1px 2px rgba(23,20,14,.06), 0 8px 24px -12px rgba(23,20,14,.18);
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", serif;
  --sans: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
/* Any class that sets display would otherwise beat the hidden attribute. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body.sp { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brass); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline-width: 3px; outline-style: solid; outline-color: var(--brass); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.sp-skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 50; }
.sp-skip:focus { left: 8px; }
.sp-wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.sp-narrow { max-width: 620px; }
.sp-muted { color: var(--muted); font-weight: 400; }

/* header */
.sp-head { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.sp-head__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.sp-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 1.25rem/1.1 var(--serif); }
.sp-brand img { width: 40px; height: 40px; border-radius: 50%; }
.sp-nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-weight: 500; }
.sp-nav a { color: var(--ink-2); text-decoration: none; padding: 6px 0; }
.sp-nav a:hover { color: var(--brass); }
.sp-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brass); color: #fff; font-size: .75rem; font-weight: 700; }

.sp-main { padding: 20px 0 64px; min-height: 60vh; }
.sp-crumbs { font-size: .9rem; color: var(--muted); margin: 4px 0 18px; }
.sp-crumbs a { color: var(--muted); }

/* type */
.sp-title { font: 600 clamp(2rem, 4.2vw, 2.9rem)/1.08 var(--serif); margin: 0 0 12px; letter-spacing: -.005em; }
.sp-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--brass); margin: 0 0 6px; }
.sp-lede { font-size: 1.1rem; color: var(--ink-2); margin: 0 0 18px; }
.sp-section { margin-top: 48px; }
.sp-section h2, .sp-panel h2 { font: 600 1.7rem/1.2 var(--serif); margin: 0 0 16px; }
.sp-empty { color: var(--muted); background: var(--paper); border: 1px dashed var(--line-2); border-radius: var(--r); padding: 22px; }

/* piece */
.sp-piece__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.sp-gallery__main { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; aspect-ratio: 1 / 1; }
.sp-gallery__main img { width: 100%; height: 100%; object-fit: contain; background: var(--paper); }
.sp-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.sp-thumb { padding: 0; border: 2px solid transparent; border-radius: 4px; background: none; cursor: pointer; width: 68px; height: 68px; overflow: hidden; }
.sp-thumb[aria-pressed="true"] { border-color: var(--brass); }
.sp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sp-price { font: 600 1.9rem/1.2 var(--serif); margin: 0 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sp-price s { color: var(--muted); font-size: 1.3rem; font-weight: 500; }
.sp-sale { background: #FBF3DF; border: 1px solid #EBD9AE; color: #6A4F17; border-radius: var(--r); padding: 8px 12px; font-weight: 600; margin: 0 0 12px; }
.sp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 6px; }
.sp-actions--main .sp-btn { flex: 1 1 150px; }
.sp-note { font-size: .92rem; color: var(--muted); margin: 6px 0; }
.sp-state { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--brass-2); border-radius: var(--r); padding: 14px 16px; margin: 10px 0; }
.sp-state--sold { border-left-color: var(--muted); }
.sp-state--good { border-left-color: var(--good); margin-bottom: 20px; }
.sp-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sp-tool { display: inline-flex; align-items: center; gap: 7px; background: none; border: 1px solid transparent; border-radius: 999px; padding: 8px 14px; font: 600 .95rem var(--sans); color: var(--ink-2); cursor: pointer; }
.sp-tool:hover { background: var(--paper); border-color: var(--line); }
.sp-tool svg, .sp-heart svg, .sp-x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sp-tool[aria-pressed="true"] svg, .sp-heart[aria-pressed="true"] svg { fill: #B23B2E; stroke: #B23B2E; }
.sp-desc p { margin: 0 0 12px; }
.sp-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 18px 0 0; }
.sp-facts div { border-top: 1px solid var(--line); padding-top: 8px; }
.sp-facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.sp-facts dd { margin: 2px 0 0; }

/* buttons */
.sp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px; border-radius: var(--r); border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); font: 700 1rem/1.1 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, transform .15s; }
.sp-btn:hover { background: var(--ink); color: var(--paper); }
.sp-btn:active { transform: translateY(1px); }
.sp-btn--solid { background: var(--olive); border-color: var(--olive); color: #fff; }
.sp-btn--solid:hover { background: var(--ink); border-color: var(--ink); }
.sp-btn--ghost { border-color: var(--line-2); }
.sp-btn--danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.sp-btn--block { width: 100%; margin-top: 8px; }
.sp-btn--sm { min-height: 40px; padding: 8px 14px; font-size: .92rem; }
.sp-btn[disabled] { opacity: .55; cursor: progress; }

/* badges */
.sp-badge { display: inline-block; background: var(--brass-2); color: var(--ink); font: 700 .72rem/1 var(--sans); text-transform: uppercase; letter-spacing: .1em; padding: 5px 8px; border-radius: 3px; }
.sp-badge--sold { background: var(--ink); color: #fff; }
.sp-badge--big { position: absolute; top: 14px; left: 14px; font-size: .85rem; padding: 7px 11px; }

/* grid + cards */
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px 18px; }
.sp-card { position: relative; }
.sp-card__link { display: block; color: var(--ink); text-decoration: none; }
.sp-card__img { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: var(--r); overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
.sp-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.sp-card__link:hover .sp-card__img img { transform: scale(1.035); }
.sp-card__img .sp-badge { position: absolute; top: 10px; left: 10px; }
.sp-card__ph { display: grid; place-items: center; width: 100%; height: 100%; font: 600 3rem var(--serif); color: var(--line-2); }
.sp-card__ph--big { font-size: 6rem; }
.sp-card__t { display: block; font: 600 1.15rem/1.25 var(--serif); margin-top: 10px; }
.sp-card__p { display: block; font-weight: 700; margin-top: 2px; }
.sp-card__p s { color: var(--muted); font-weight: 400; }
.sp-card__m { color: var(--muted); font-weight: 400; font-size: .9rem; }
.sp-heart { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,253,248,.92); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); color: var(--ink); }

/* booth */
.sp-booth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 36px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.sp-booth__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); }
.sp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.sp-tags span { background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font-size: .88rem; }
.sp-links { font-weight: 600; }
.sp-follow { margin-top: 18px; }
.sp-follow label { display: block; font-weight: 600; margin-bottom: 6px; }
.sp-follow__row { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-follow__row input { flex: 1 1 200px; }

/* forms */
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line-2); border-radius: var(--r); padding: 11px 12px; min-height: 48px; width: 100%; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brass); outline-color: var(--brass); }
.sp-field { margin: 0 0 14px; }
.sp-field label { display: block; font-weight: 700; margin-bottom: 5px; }
.sp-hint { font-size: .88rem; color: var(--muted); margin: 6px 0 0; }
.sp-err { color: var(--bad); font-weight: 600; margin: 8px 0; }
.sp-ok { color: var(--good); font-weight: 700; margin: 8px 0 0; }
.sp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; }
.sp-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 22px; margin: 18px 0; }
.sp-panel--quiet { background: transparent; }
.sp-amounts { border: 0; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.sp-amounts legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.sp-chip { position: relative; }
.sp-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sp-chip span { display: inline-flex; align-items: center; min-height: 48px; padding: 10px 18px; border: 1.5px solid var(--line-2); border-radius: var(--r); background: #fff; font-weight: 700; cursor: pointer; }
.sp-chip input:checked + span { border-color: var(--olive); background: var(--olive); color: #fff; }
.sp-chip input:focus-visible + span { outline: 3px solid var(--brass); outline-offset: 2px; }
.sp-other { flex: 1 1 100%; }
.sp-more { margin: 4px 0 12px; }
.sp-more summary { cursor: pointer; font-weight: 600; color: var(--brass); padding: 6px 0; }
.sp-quote { margin: 8px 0; }
.sp-quote dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0; padding: 12px; background: var(--cream); border-radius: var(--r); }
.sp-quote dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.sp-quote .sp-total { font-weight: 700; border-top: 1px solid var(--line-2); padding-top: 6px; }

/* dialogs */
.sp-dlg { border: 0; border-radius: 12px; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); }
.sp-dlg::backdrop { background: rgba(23,20,14,.55); }
.sp-dlg form { padding: 26px 22px 22px; position: relative; }
.sp-dlg h2 { font: 600 1.6rem/1.2 var(--serif); margin: 0 40px 10px 0; }
.sp-x { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.sp-x:hover { background: var(--cream); }
html:not(.motion-off) .sp-dlg[open] { animation: sp-rise .22s ease-out; }
@keyframes sp-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* layaway */
.sp-lay { display: flex; gap: 18px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 16px; flex-wrap: wrap; }
.sp-lay img { width: 120px; height: 120px; object-fit: cover; border-radius: var(--r); }
.sp-lay > div { flex: 1 1 240px; }
.sp-meter { height: 10px; background: var(--cream); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin: 6px 0 10px; }
.sp-meter span { display: block; height: 100%; background: var(--olive); }
.sp-list { list-style: none; padding: 0; margin: 0; }
.sp-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }

.sp-notice { max-width: 640px; padding-top: 30px; }
.sp-confirm { margin-top: 20px; }

/* footer + toast */
.sp-foot { background: var(--olive); color: #E9E4D6; padding: 34px 0 40px; }
.sp-foot a { color: #F1DFB3; }
.sp-foot__in { display: grid; gap: 8px; }
.sp-foot p { margin: 0; }
.sp-foot__small { font-size: .88rem; color: #CFC8B6; }
.sp-motion { background: none; border: 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 0; }
.sp-toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 8px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100vw - 32px); }
.sp-toast.is-on { opacity: 1; transform: translateX(-50%); }

html.motion-off *, html.motion-off *::before, html.motion-off *::after { transition: none !important; animation: none !important; }

@media (max-width: 860px) {
  .sp-piece__grid, .sp-booth { grid-template-columns: 1fr; gap: 22px; }
  .sp-booth { padding: 16px; }
}
@media (max-width: 480px) {
  .sp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .sp-card__t { font-size: 1.02rem; }
  .sp-facts { grid-template-columns: 1fr; }
  .sp-head__in { padding: 8px 0; }
  .sp-brand span { font-size: 1.05rem; }
}

/* offers, bundles, social proof */
.sp-proof { margin: -4px 0 12px; color: var(--muted); font-size: .92rem; }
.sp-proof span { white-space: nowrap; }
.sp-bundle-note { margin: 12px 0; padding: 12px 14px; background: #F3EEDF; border: 1px dashed var(--brass-2); border-radius: var(--r); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.sp-bundle li { align-items: center; gap: 12px; }
.sp-bundle a { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-width: 0; }
.sp-bundle a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-bundle img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; flex: none; }
.sp-bundle li > span { display: flex; align-items: center; gap: 8px; flex: none; }
.sp-bundle s { color: var(--muted); }
.sp-x--sm { position: static; width: 36px; height: 36px; }
