:root {
  --ink: #3a2a4a;
  --muted: #6b5a7a;
  --line: #e9e1ef;
  --wash: #f8f4fb;
  --magenta: #e040c8;        /* brand accent, decorative */
  --action: #b0189f;         /* accessible button/link magenta */
  --action-dark: #8e1281;
  --sun: #ffcc00;
  --leaf: #2f7a4d;
  --danger: #b3261e;
  --r-photo: 6px;
  --r-pill: 999px;
  --r-box: 12px;
  --wrap: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.55 'Nunito', system-ui, sans-serif; color: var(--ink); background: #fff; }
img { max-width: 100%; display: block; }
a { color: var(--action); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--magenta); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { font-family: 'Pacifico', cursive; font-size: 1.55rem; line-height: 1; color: var(--magenta); text-decoration: none; white-space: nowrap; }
.brand small { display: block; font: 700 .72rem/1.2 'Nunito', sans-serif; color: var(--muted); margin-top: 3px; letter-spacing: .01em; }
.head-search { flex: 1; max-width: 420px; margin-left: auto; position: relative; }
.head-search input { width: 100%; height: 42px; padding: 0 16px 0 40px; border: 1.5px solid var(--line); border-radius: var(--r-pill); background: var(--wash); }
.head-search input:focus { border-color: var(--magenta); outline: none; background: #fff; box-shadow: 0 0 0 3px rgba(224,64,200,.18); }
.head-search svg { position: absolute; left: 14px; top: 11px; width: 20px; height: 20px; color: var(--muted); }
.cart-link { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: var(--r-pill); border: 1.5px solid var(--ink); color: var(--ink); text-decoration: none; font-weight: 800; white-space: nowrap; }
.cart-link:hover { background: var(--ink); color: #fff; }
.cart-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--sun); color: var(--ink); font-size: .8rem; display: none; align-items: center; justify-content: center; }
.cart-count.on { display: inline-flex; }

/* ---------- intro + filters ---------- */
.intro { padding: 36px 0 8px; }
.intro h1 { font: 400 clamp(1.9rem, 4.5vw, 2.9rem)/1.15 'Pacifico', cursive; margin: 0 0 6px; color: var(--ink); }
.intro p { margin: 0; color: var(--muted); max-width: 52ch; }
.filters { display: flex; align-items: center; gap: 12px; padding: 18px 0 8px; }
.chips { display: flex; gap: 8px; overflow-x: auto; flex: 1; padding: 4px 2px 8px; scrollbar-width: thin; }
.chip { flex: none; border: 1.5px solid var(--line); background: #fff; border-radius: var(--r-pill); padding: 5px 14px; font-weight: 700; font-size: .9rem; cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; }
.chip:hover { border-color: var(--magenta); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.sort { flex: none; height: 38px; border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: 0 12px; background: #fff; font-weight: 700; }
.result-count { color: var(--muted); font-size: .9rem; padding: 0 0 14px; min-height: 1.6em; }

/* ---------- grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 32px 22px; padding-bottom: 64px; }
.tile { color: inherit; text-decoration: none; display: block; }
.tile-photo { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-photo); overflow: hidden; background: var(--wash); }
.tile-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease; }
.tile-photo img.alt { opacity: 0; }
.tile:hover .tile-photo img.alt, .tile:focus-visible .tile-photo img.alt { opacity: 1; }
.tile.is-sold .tile-photo img { filter: grayscale(.85) brightness(1.05); }
.badge { white-space: nowrap; position: absolute; left: 10px; bottom: 10px; padding: 3px 12px; border-radius: var(--r-pill); font-weight: 800; font-size: .82rem; background: #fff; color: var(--ink); }
.badge.held { background: var(--sun); }
.tile h2 { font-size: 1rem; font-weight: 700; line-height: 1.35; margin: 12px 0 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile:hover h2 { text-decoration: underline; text-decoration-color: var(--magenta); text-underline-offset: 3px; }
.price { font-weight: 800; }
.tile.is-sold .price { color: var(--muted); text-decoration: line-through; font-weight: 600; }
.empty { grid-column: 1 / -1; padding: 56px 0; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 1.1rem; margin-bottom: 4px; }

/* ---------- item page ---------- */
.item { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; padding: 28px 0 72px; align-items: start; }
.crumbs { padding: 20px 0 0; font-size: .9rem; }
.crumbs a { color: var(--muted); }
.gallery-main { aspect-ratio: 4 / 5; border-radius: var(--r-photo); overflow: hidden; background: var(--wash); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; }
.thumb { flex: none; width: 74px; aspect-ratio: 1; border: 2px solid transparent; border-radius: 4px; padding: 0; background: var(--wash); overflow: hidden; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-current="true"] { border-color: var(--ink); }
.buy { position: sticky; top: 88px; }
.buy h1 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; margin: 0 0 10px; font-weight: 800; }
.buy .price-lg { font-size: 1.7rem; font-weight: 800; margin-bottom: 4px; }
.avail { color: var(--leaf); font-weight: 700; margin: 0 0 18px; }
.avail.warn { color: #8a5a00; }
.avail.sold { color: var(--muted); }
.desc { white-space: pre-line; margin: 22px 0; max-width: 60ch; }
.facts { list-style: none; padding: 16px 0 0; margin: 0 0 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: .95rem; color: var(--muted); }
.facts strong { color: var(--ink); }
.kw { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.kw a { background: var(--wash); border-radius: var(--r-pill); padding: 4px 13px; font-size: .88rem; font-weight: 700; text-decoration: none; color: var(--ink); }
.kw a:hover { background: var(--ink); color: #fff; }

/* ---------- buttons / forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 28px; border: 0; border-radius: var(--r-pill); background: var(--action); color: #fff; font-weight: 800; font-size: 1rem; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--action-dark); }
.btn:disabled { background: #cfc4d8; cursor: not-allowed; }
.btn.block { display: flex; width: 100%; }
.btn.quiet { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.quiet:hover { background: var(--ink); color: #fff; }
.link-btn { background: none; border: 0; padding: 0; color: var(--action); text-decoration: underline; cursor: pointer; font-weight: 700; }
.field { margin-bottom: 14px; }
.field label, .legend { display: block; font-weight: 800; font-size: .92rem; margin-bottom: 5px; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field textarea, .field select, .field input[type=number] {
  width: 100%; min-height: 46px; padding: 9px 13px; border: 1.5px solid #cfc4d8; border-radius: 8px; background: #fff; }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--magenta); outline: none; box-shadow: 0 0 0 3px rgba(224,64,200,.18); }
.hint { color: var(--muted); font-size: .86rem; margin-top: 4px; }
.notice { padding: 12px 14px; border-radius: 8px; background: #fff7d6; border: 1px solid #f1dc84; margin: 0 0 16px; }
.notice.err { background: #fdecea; border-color: #f2b8b5; color: #6e1410; }
.notice.ok { background: #e8f6ee; border-color: #a9d8bb; color: #174a2c; }
.opts { display: grid; gap: 8px; margin-bottom: 14px; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--ink); background: var(--wash); }
.opt input { margin-top: 4px; accent-color: var(--action); }
.opt b { display: block; }
.opt span { color: var(--muted); font-size: .88rem; }
.opt.disabled { opacity: .5; cursor: not-allowed; }

/* ---------- cart ---------- */
.cart { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; padding: 28px 0 72px; align-items: start; }
.cart h1, .page-title { font-size: 1.8rem; margin: 28px 0 0; font-weight: 800; }
.cart-item { display: grid; grid-template-columns: 92px 1fr auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item img { width: 92px; aspect-ratio: 4/5; object-fit: cover; border-radius: 4px; background: var(--wash); }
.cart-item a { color: var(--ink); font-weight: 700; text-decoration: none; }
.cart-item a:hover { text-decoration: underline; }
.summary { border: 1.5px solid var(--line); border-radius: var(--r-box); padding: 22px; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.row.total { border-top: 1.5px solid var(--ink); margin-top: 8px; padding-top: 12px; font-weight: 800; font-size: 1.15rem; }
.badge-fee { background: var(--sun); border-radius: var(--r-pill); font-size: .75rem; font-weight: 800; padding: 1px 8px; margin-left: 6px; }

/* the hold timer: a ring of leaves that falls away as time runs out */
.hold { display: flex; align-items: center; gap: 18px; padding: 16px 0 6px; }
.ring { position: relative; width: 96px; height: 96px; flex: none; }
.ring svg { width: 100%; height: 100%; overflow: visible; }
.leaf { fill: var(--leaf); transition: opacity .6s ease, transform .6s ease; transform-box: fill-box; transform-origin: center; }
.leaf.gone { opacity: 0; transform: translateY(10px) scale(.6); }
.leaf.late { fill: #c4890a; }
.ring-time { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.hold p { margin: 0; color: var(--muted); max-width: 34ch; }
.hold p b { color: var(--ink); }

/* ---------- order page ---------- */
.order { max-width: 680px; margin: 0 auto; padding: 36px 0 80px; }
.order h1 { font-size: 1.9rem; margin: 0 0 6px; font-weight: 800; }
.code { font-family: ui-monospace, Menlo, monospace; font-weight: 700; background: var(--wash); padding: 2px 8px; border-radius: 4px; }
.pay-steps { border: 1.5px solid var(--line); border-radius: var(--r-box); padding: 20px; margin: 20px 0; }

.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: .9rem; }

@media (max-width: 880px) {
  .item, .cart { grid-template-columns: 1fr; gap: 28px; }
  .buy { position: static; }
  .site-head .wrap { flex-wrap: wrap; row-gap: 10px; padding-top: 10px; padding-bottom: 10px; min-height: 0; }
  .brand { margin-right: auto; }
  .head-search { order: 3; flex: 1 0 100%; max-width: none; margin: 0; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
  .gallery-main { aspect-ratio: 1; }
}
@media (max-width: 880px) { .filters { flex-wrap: wrap; } .chips { flex: 1 0 100%; } .sort { margin-left: auto; } }
@media (max-width: 380px) { .grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .001ms !important; animation: none !important; } }
