/* Concept collection page: filters, grid, card detail sheet and bag sheet. */
#page-title { font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif; font-weight: 400; letter-spacing: -.035em; line-height: 1.02; }
.collection-hero { padding-block: clamp(24px, 3vw, 40px) 24px; }
.collection-hero #page-title { max-width: none; margin-top: 16px; font-size: clamp(38px, 4.4vw, 60px); }
.collection-hero .lede { max-width: 72ch; margin-top: 14px; font-size: 16px; }
.collection { padding-bottom: clamp(56px, 8vw, 96px); }
.collection-page .top { background: #070809f5; border-color: var(--line); }
.collection-page .links a { color: var(--ink); }
.collection-page .links a:is(:hover, [aria-current="page"]) { color: var(--gold-deep); }
.collection-page .menu-panel, .collection-page .eyebrow, .collection-page .sheet-close, .collection-page .bag-list li { background: var(--cream); }
.collection-page .card-stage { border: 1px solid var(--line); background: var(--cream); }
.collection-page .card-stage::before { background: radial-gradient(70% 55% at 50% 38%, #ffffff0a, transparent 70%); }
.collection-page .tag:not(.tag-gem) { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.collection-page .icon-btn:hover { background: #ffffff0a; }
.filters { position: sticky; top: 76px; z-index: 5; display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.filters input, .filters select { background-color: var(--cream); }
.filters select { appearance: auto; background-image: none; }
.count { margin: 18px 4px; color: var(--soft); font-size: 14px; font-weight: 500; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px 18px; }
.grid .card { display: block; }
.grid .tag.tag-gem { width: 50px; height: 46px; padding: 6px 4px 12px; font-size: 6px; top: 10px; left: 10px; }
.grid .tag-gem strong { font-size: 15px; }
.empty { padding: 56px 0; text-align: center; }
.empty p { margin: 12px 0 24px; color: var(--soft); }

/* Card detail */
.collection-page, dialog.detail { --paper: #101214; --cream: #191d21; --ink: #eeeae2; --soft: #b5b1a8; --line: #ffffff24; --gold-deep: #dfbf80; color-scheme: dark; }
.collection-page { --paper: #070809; --cream: #111315; --soft: #a4a7ab; --line: #ffffff18; }
dialog.detail > form[method="dialog"] { position: sticky; top: 0; z-index: 10; display: flex; justify-content: flex-end; min-height: 68px; margin: 0; padding: 12px; background: var(--paper); }
dialog.detail .sheet-close { position: static; flex-shrink: 0; float: none; margin: 0; background: var(--cream); box-shadow: 0 3px 12px #0006; }
dialog.detail .sheet-close:hover { background: #2b3037; }
dialog.detail .pill, .collection-page .pill { background: var(--gold); color: #17120a; }
dialog.detail .pill:hover, .collection-page .pill:hover { background: #d8b674; }
.detail-body { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(20px, 4vw, 48px); padding: clamp(20px, 4vw, 44px); padding-top: clamp(20px, 4vw, 36px); }
.detail-media { display: grid; gap: 14px; align-content: start; }
.detail-stage { position: relative; aspect-ratio: 4 / 4.6; border-radius: 22px; background: radial-gradient(70% 60% at 50% 40%, #ffffff0a, transparent 70%), var(--cream); perspective: 1000px; touch-action: pan-y pinch-zoom; }
.card-surface { position: absolute; inset: 6%; display: flex; align-items: center; justify-content: center; border-radius: 6px; transform: rotateX(var(--card-rx, 0deg)) rotateY(var(--card-ry, 0deg)); transition: transform .25s ease; }
.card-surface img { width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: 6px; filter: drop-shadow(0 26px 28px #0000003d); }
.detail-glint { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; mix-blend-mode: screen; background: radial-gradient(ellipse at var(--card-x, 50%) var(--card-y, 50%), #fff6, transparent 60%); opacity: var(--card-light, 0); transition: opacity .25s ease; }
.side-toggle { display: flex; justify-content: center; gap: 8px; }
.side-toggle button { min-height: 44px; padding: 0 20px; border: 1px solid var(--line); border-radius: 999px; background: var(--cream); color: var(--ink); font: 600 14px var(--font); cursor: pointer; }
.side-toggle button[aria-pressed="true"] { border-color: var(--gold); background: #2b3037; color: var(--ink); }
.photo-controls { display: flex; align-items: center; justify-content: center; gap: 12px; }
.photo-controls button { min-width: 44px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--cream); color: var(--ink); font: 600 14px var(--font); cursor: pointer; }
.photo-controls button:disabled { opacity: .35; cursor: default; }
.photo-controls button:focus-visible, .card-surface:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.detail-stage.is-magnified { touch-action: auto; }
.is-magnified .card-surface { inset: 0; display: block; overflow: auto; overscroll-behavior: contain; border-radius: inherit; transform: none; }
.is-magnified .card-surface img { display: block; width: 250%; max-width: none; max-height: none; height: auto; filter: none; }
.is-magnified .detail-glint { display: none; }
.detail-info { align-self: center; }
.tag-inline { display: inline-block; padding: 5px 12px; border: 1px solid #c9a5634d; border-radius: 999px; background: var(--cream); color: var(--gold-deep); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.detail-info h2 { margin-top: 14px; font-size: clamp(32px, 4vw, 48px); }
.detail-sub { margin-top: 8px; color: var(--soft); }
.detail-price { margin-top: 18px; font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.detail-actions { margin-top: 22px; }
.detail-facts { display: grid; gap: 10px; margin: 26px 0 0; padding: 18px 0; border-block: 1px solid var(--line); font-size: 15px; }
.detail-facts div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; }
.detail-facts dt { color: var(--soft); }
.detail-facts dd { margin: 0; font-weight: 600; }
.detail-facts a { display: inline-block; margin-right: 12px; color: var(--gold-deep); text-decoration: underline; text-underline-offset: 3px; }
.detail-desc { margin-top: 18px; color: var(--soft); line-height: 1.6; }
.detail-note { margin-top: 18px; }
.detail-buy-bar { display: none; }

/* Bag */
dialog.bag { width: min(560px, calc(100% - 24px)); }
.bag-body { padding: clamp(20px, 4vw, 36px); }
.bag-body h2 { font-size: 40px; }
.bag-list { display: grid; gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.bag-list li { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.bag-list img { width: 56px; height: 80px; object-fit: contain; }
.bag-list p { margin-top: 2px; color: var(--soft); font-size: 13px; }
.bag-open { padding: 0; border: 0; background: none; color: var(--ink); font: 600 15px/1.3 var(--font); text-align: left; cursor: pointer; }
.bag-open:hover { text-decoration: underline; }
.bag-side { display: grid; justify-items: end; gap: 4px; }
.bag-remove { min-height: 32px; padding: 0 4px; border: 0; background: none; color: var(--soft); font: 500 13px var(--font); text-decoration: underline; cursor: pointer; }
.bag-empty { margin-top: 18px; color: var(--soft); }
.bag-footer { margin-top: 24px; }
.bag-total { display: flex; justify-content: space-between; margin-bottom: 16px; font-size: 18px; }
.bag-footer .pill { width: 100%; }

@media (max-width: 860px) {
  .filters { grid-template-columns: 1fr 1fr; top: 68px; }
  .filter-search { grid-column: 1 / -1; }
  .detail-body { grid-template-columns: 1fr; }
  .detail-buy-bar:not([hidden]) { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
  .detail-buy-bar strong { font-size: 21px; white-space: nowrap; }
  .detail-buy-bar .pill { min-height: 48px; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 22px 12px; }
  .grid .card-meta { flex-direction: column; gap: 4px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .detail-facts div { grid-template-columns: 100px 1fr; }
}
