@font-face { font-family: "Bricolage"; src: url(/assets/fonts/bricolage.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(/assets/fonts/atkinson-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(/assets/fonts/atkinson-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #F3F4F7; --surface: #FFFFFF; --ink: #1A1E2B; --ink-2: #5B6272; --line: #DCDFE6;
  --cobalt: #2A44C9; --cobalt-dark: #1F349F; --sun: #FFD94D; --ok: #1F7A4D; --warn: #B4471F;
  --display: "Bricolage", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson", "Segoe UI", system-ui, sans-serif;
  --r: 10px;
}
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--body); }
img { max-width: 100%; display: block; }
a { color: var(--cobalt); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--ink-2); }

/* Header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { font: 700 21px/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -0.02em; white-space: nowrap; }
.search { flex: 1; max-width: 460px; margin-left: auto; }
.search input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; font: inherit; font-size: 15px; background: var(--paper); color: var(--ink); }
.search input:focus { background: var(--surface); border-color: var(--cobalt); outline: none; }
.cart-link { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 4px; }
.cart-count { background: var(--cobalt); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: 12px; padding: 0 6px; }

/* Intro + filters */
.intro { padding: 40px 0 8px; }
.intro h1 { font-size: clamp(34px, 6vw, 60px); font-weight: 750; letter-spacing: -0.035em; }
.intro p { color: var(--ink-2); max-width: 56ch; margin: 10px 0 0; font-size: 17px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; padding: 22px 0 6px; }
.filter { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.filter select { height: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font: inherit; font-size: 15px; color: var(--ink); padding: 0 32px 0 10px; min-width: 150px;
  appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235B6272' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.results-line { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 14px; color: var(--ink-2); font-size: 15px; }
.results-line p { margin: 0; }

/* Binder grid */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px 18px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tile-link { display: block; color: inherit; text-decoration: none; }
.sleeve { position: relative; aspect-ratio: 63 / 88; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: grid; place-items: center; overflow: hidden; }
.sleeve::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,0) 40%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 60%); opacity: .5; }
.sleeve img { width: 100%; height: 100%; object-fit: contain; border-radius: 5px; }
.tile-link:hover .sleeve { border-color: #B9BED0; }
.tile-link:hover .tile-title { text-decoration: underline; text-underline-offset: 3px; }
.noimg { color: var(--ink-2); font-size: 14px; }
.flag { position: absolute; top: 10px; left: 10px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.tile-body { padding: 10px 2px 0; }
.tile-title { font: 600 17px/1.2 var(--display); }
.tile-meta { margin: 3px 0 8px; color: var(--ink-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.price { font: 700 16px/1 var(--display); background: var(--sun); color: var(--ink); padding: 6px 9px 5px; border-radius: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-lg { font-size: 30px; padding: 9px 14px 7px; border-radius: 8px; }
.cond { font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.cond::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9AA0AE; }
.cond-M::before, .cond-NM::before { background: var(--ok); }
.cond-EX::before, .cond-GD::before { background: #8EA623; }
.cond-LP::before { background: #D79A12; }
.cond-PL::before, .cond-PO::before { background: var(--warn); }
.cond-G::before { background: var(--cobalt); }

.empty { text-align: center; padding: 64px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); }
.empty p { margin: 0 0 16px; color: var(--ink-2); font-size: 17px; }
.empty-page { margin-top: 48px; margin-bottom: 64px; } .empty-page h1 { font-size: 34px; margin-bottom: 10px; }
.pager { display: flex; justify-content: center; gap: 20px; align-items: center; margin: 36px 0 0; color: var(--ink-2); }
.pager a { font-weight: 700; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); font: 700 15px/1 var(--body); text-decoration: none; cursor: pointer; }
.btn-main { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.btn-main:hover { background: var(--cobalt-dark); border-color: var(--cobalt-dark); }
.btn-ghost:hover { background: var(--paper); }
.btn[disabled] { background: #C9CDD8; border-color: #C9CDD8; color: #5B6272; cursor: not-allowed; }

/* Detail */
.crumbs { padding: 22px 0 0; font-size: 14px; color: var(--ink-2); } .crumbs a { color: var(--ink-2); }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; padding: 20px 0 56px; align-items: start; }
.gallery { position: sticky; top: 88px; }
.holo { position: relative; max-width: 470px; margin: 0 auto; aspect-ratio: 63 / 88; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); padding: 14px;
  display: grid; place-items: center; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.holo.is-live { transition: transform .08s linear; }
.holo img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.holo-shine { position: absolute; inset: 14px; border-radius: 8px; pointer-events: none; mix-blend-mode: color-dodge; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.55), rgba(255,255,255,0) 42%),
    linear-gradient(115deg, rgba(255,0,140,.0) 20%, rgba(0,200,255,.28) 38%, rgba(255,236,0,.26) 50%, rgba(160,0,255,.24) 62%, rgba(255,0,140,0) 80%);
  background-size: 100% 100%, 240% 240%; background-position: center, var(--bx, 50%) var(--by, 50%); }
.holo.is-live .holo-shine { opacity: .75; }
.thumbs { list-style: none; padding: 0; margin: 16px auto 0; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.thumbs button { width: 64px; aspect-ratio: 63/88; padding: 4px; border: 1.5px solid var(--line); border-radius: 7px; background: var(--surface); cursor: pointer; }
.thumbs button[aria-current="true"] { border-color: var(--cobalt); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.info h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 750; letter-spacing: -0.03em; }
.info-price { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 20px 0 22px; }
.stock { color: var(--ok); font-weight: 700; font-size: 15px; } .stock-off { color: var(--warn); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.added { margin: 12px 0 0; color: var(--ok); font-weight: 700; }
.facts { margin: 28px 0 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-2); } .facts dd { margin: 0; font-weight: 700; }
.hint { color: var(--ink-2); font-size: 15px; margin: 14px 0 0; }
.desc { margin-top: 20px; max-width: 62ch; } .desc p { margin: 0 0 10px; }
.ship { margin: 22px 0 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-size: 15px; color: var(--ink-2); }
.related { padding-bottom: 64px; } .related h2 { font-size: 26px; margin-bottom: 18px; }

/* Cart */
.cart { max-width: 760px; padding: 36px 0 64px; }
.cart h1 { font-size: 40px; letter-spacing: -0.03em; }
.cart-lead { color: var(--ink-2); margin: 10px 0 24px; max-width: 60ch; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; }
.line img { width: 64px; aspect-ratio: 63/88; object-fit: contain; }
.line h3 { font-size: 17px; } .line h3 a { color: var(--ink); text-decoration: none; }
.line p { margin: 3px 0 0; color: var(--ink-2); font-size: 14px; }
.line-end { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.line-gone { opacity: .6; }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; font: inherit; font-size: 14px; cursor: pointer; }
.cart-total { display: flex; justify-content: space-between; align-items: center; padding: 16px 4px; font: 700 20px var(--display); }
.reserve-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: grid; gap: 14px; margin-top: 12px; }
.reserve-form h2 { font-size: 22px; }
.reserve-form label { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.reserve-form input:not([type=checkbox]), .reserve-form textarea { font: inherit; font-weight: 400; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--paper); color: var(--ink); }
.reserve-form input:focus, .reserve-form textarea:focus { outline: 2px solid var(--cobalt); background: var(--surface); }
.reserve-form .check { grid-template-columns: 20px 1fr; align-items: start; font-weight: 400; }
.reserve-form .check input { width: 18px; height: 18px; margin-top: 3px; }
.form-error { color: var(--warn); font-weight: 700; margin: 0; }
.done { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; }
.done h2 { font-size: 28px; margin-bottom: 8px; } .done p { margin: 0 0 16px; color: var(--ink-2); }
.code { font: 700 22px var(--display); background: var(--sun); padding: 4px 10px; border-radius: 6px; color: var(--ink); }

/* Prose + footer */
.prose { max-width: 680px; padding: 40px 0 64px; } .prose h1 { font-size: 40px; margin-bottom: 18px; } .prose h2 { font-size: 22px; margin: 28px 0 8px; } .prose p { margin: 0 0 12px; }
.foot { border-top: 1px solid var(--line); background: var(--surface); margin-top: 24px; }
.foot-in { padding: 28px 0 36px; display: grid; gap: 10px; }
.foot-name { font: 700 18px var(--display); margin: 0; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; } .foot nav a { color: var(--ink); }
.foot-note { color: var(--ink-2); font-size: 13px; margin: 6px 0 0; max-width: 70ch; }

@media (max-width: 820px) {
  .detail { grid-template-columns: 1fr; gap: 28px; }
  .gallery { position: static; }
}
@media (max-width: 640px) {
  .top-in { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 10px; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .cart-link span { display: none; } .cart-link { margin-left: auto; }
  .intro { padding-top: 26px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .filter select { min-width: 130px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .tile-foot { flex-direction: column; align-items: flex-start; gap: 7px; }
  .actions .btn { flex: 1 1 100%; }
  .facts div { grid-template-columns: 110px 1fr; }
}
@media (prefers-reduced-motion: reduce) { .holo, .holo.is-live { transition: none; transform: none !important; } .holo-shine { display: none; } }
