/* ═══ Customer shop: Newegg-style filter rail + product column, store family tokens ═══ */
.shop { width: min(1360px, calc(100% - 32px)); margin: 0 auto; padding: 8px 0 80px; color: var(--ink); }
.shop-layout { display: grid; grid-template-columns: 244px minmax(0, 1fr); gap: 22px; align-items: start; }

/* Filter toggle (phone/tablet only) */
.shop-filter-toggle { display: none; align-items: center; gap: 8px; margin: 6px 0 14px; padding: 11px 16px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }

/* ── Left rail ── */
/* Freeze the filter rail below the sticky global nav (62px tall). */
.shop-rail { position: sticky; top: 74px; max-height: calc(100vh - 88px); overflow-y: auto; }
.shop-filters { border: 1px solid var(--rule); border-radius: 16px; background: var(--surface); overflow: hidden; }
.shop-facet { padding: 15px 16px; border-bottom: 1px solid var(--rule); }
.shop-facet h3 { margin: 0 0 10px; color: var(--ink); font-size: .74rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
/* Collapsible Sport/Brand — summary is the header with a +/− marker. */
details.shop-facet > summary { display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; color: var(--ink); font-size: .74rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
details.shop-facet > summary::-webkit-details-marker { display: none; }
details.shop-facet > summary::after { content: "+"; font-size: 1.1rem; font-weight: 800; color: var(--muted); line-height: 1; }
details.shop-facet[open] > summary::after { content: "\2212"; }
details.shop-facet[open] > summary { margin-bottom: 10px; }
details.shop-facet > ul { margin-top: 0; }
.shop-facet ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 230px; overflow: auto; }
.shop-facet li a { display: block; padding: 6px 9px; border-radius: 8px; color: var(--muted); font-size: .84rem; font-weight: 650; text-decoration: none; }
.shop-facet li a:hover { color: var(--ink); background: var(--surface-soft); }
.shop-facet li a.on { color: var(--ink); background: var(--photo-well); font-weight: 850; }
.shop-facet select { width: 100%; min-height: 42px; padding: 9px 12px; color: var(--ink); background: var(--photo-well); border: 1px solid var(--rule); border-radius: 10px; font: inherit; font-size: .85rem; cursor: pointer; }
.shop-price { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shop-price label { display: flex; flex-direction: column; gap: 4px; }
.shop-price span { color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.shop-price input { width: 100%; min-height: 40px; padding: 8px 11px; color: var(--ink); background: var(--photo-well); border: 1px solid var(--rule); border-radius: 10px; font: inherit; }
.shop-facet-actions { display: flex; gap: 10px; padding: 15px 16px; }
.shop-apply { flex: 1; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; color: #07152c; background: linear-gradient(135deg, #f5f7f8, #aeb8c1 58%, #eef2f5); font: inherit; font-size: .82rem; font-weight: 1000; text-decoration: none; cursor: pointer; }
[data-theme="dark"] .shop-apply { color: #07152c; }
.shop-reset { min-height: 42px; display: inline-flex; align-items: center; padding: 0 16px; border: 1px solid var(--rule); border-radius: 10px; color: var(--muted); font-size: .82rem; font-weight: 800; text-decoration: none; }
.shop-reset:hover { color: var(--ink); }

/* ── Toolbar ── */
/* Freeze the search/sort toolbar just under the sticky global nav (62px tall). */
.shop-toolbar { position: sticky; top: 62px; z-index: 40; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); box-shadow: 0 10px 24px rgba(0,0,0,.22); }
.shop-within { position: relative; flex: 1; min-width: 200px; display: flex; align-items: center; }
.shop-within i { position: absolute; left: 13px; color: var(--muted); font-size: .82rem; }
.shop-within input { flex: 1; min-width: 0; padding: 9px 14px 9px 34px; color: var(--ink); background: var(--photo-well); border: 1px solid var(--rule); border-radius: 999px 0 0 999px; font: inherit; font-size: .86rem; }
.shop-within button { padding: 0 18px; min-height: 40px; border: 1px solid var(--rule); border-left: 0; border-radius: 0 999px 999px 0; background: var(--photo-well); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
.shop-toolbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.shop-count { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.shop-count b { color: var(--ink); }
.shop-sort select { min-height: 40px; padding: 8px 14px; color: var(--ink); background: var(--photo-well); border: 1px solid var(--rule); border-radius: 999px; font: inherit; font-size: .82rem; cursor: pointer; }
.shop-view { display: flex; overflow: hidden; border: 1px solid var(--rule); border-radius: 999px; }
.shop-view a { padding: 9px 13px; color: var(--muted); text-decoration: none; }
.shop-view a.on { color: var(--ink); background: var(--photo-well); }

/* ── Pager ── */
.shop-pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 16px; }
.shop-pager a, .shop-pager span { min-width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0 8px; border: 1px solid var(--rule); border-radius: 9px; color: var(--muted); font-size: .82rem; font-weight: 800; text-decoration: none; }
.shop-pager a:hover { color: var(--ink); background: var(--surface); }
.shop-pager .cur { color: #07152c; background: linear-gradient(135deg, #f5f7f8, #aeb8c1 58%, #eef2f5); border-color: transparent; }
.shop-pager .off { opacity: .4; }
.shop-pager-of { border: 0; color: var(--muted); font-weight: 650; margin-left: auto; }

/* ── Results: list vs grid ── */
.shop-results.is-list { display: flex; flex-direction: column; gap: 12px; }
/* Every row the same height, and every tile fills its row exactly. Nothing inside
   a tile is allowed to wrap, so tiles come out uniform rather than one tall card
   stretching its neighbours and leaving dead space under their compare row. */
.shop-results.is-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); grid-auto-rows: 1fr; gap: 14px; }
.shop-results.is-grid .shop-card { height: 100%; }
/* The photo well absorbs any slack, so the card art letterboxes instead of the
   tile growing a gap. object-fit: contain keeps the card itself undistorted. */
.shop-results.is-grid .shop-card-media { flex: 1 1 auto; min-height: 0; }

.shop-card { display: flex; flex-direction: column; container-type: inline-size; border: 1px solid var(--rule); border-radius: 16px; background: var(--surface); overflow: hidden; transition: border-color .18s, box-shadow .18s, transform .18s; }
.shop-card:hover { border-color: var(--rule-dark); box-shadow: 0 14px 34px rgba(0,0,0,.18); transform: translateY(-3px); }
.shop-card > .slab { border-radius: 0; }
.shop-card-media { display: grid; place-items: center; padding: 12px; aspect-ratio: 3/4; background: var(--photo-well); text-decoration: none; }
/* The photo is a shared .cp-trigger button; let it fill the media well. */
.shop-card-media .cp-trigger { width: 100%; height: 100%; display: grid; place-items: center; padding: 0; border: 0; background: transparent; }
.shop-card-media img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.shop-card-noimg { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); font-size: 2rem; }
/* Bottom meta: "1993 Donruss #216" on one row; the brand ellipsizes so the row never wraps. */
.shop-card-meta { display: flex; justify-content: center; align-items: baseline; gap: 5px; padding: 9px 12px 0; color: var(--muted); font-size: .76rem; font-weight: 700; white-space: nowrap; }
.shop-card-meta .m-brand { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.shop-card-meta .m-year, .shop-card-meta .m-num { flex: 0 0 auto; }
.shop-card-meta .m-num { color: var(--ink); font-weight: 800; }
/* The info block links through to the card detail page. */
a.shop-card-meta { text-decoration: none; transition: color .15s, background .15s; }
a.shop-card-meta:hover { color: var(--ink); background: rgba(255,255,255,.04); }
a.shop-card-meta:hover .m-go { opacity: 1; transform: translateX(0); }
.shop-card-meta .m-go { display: none; align-items: center; gap: 6px; margin-left: 10px; opacity: 0; transform: translateX(-4px); color: var(--ink); font-size: .8rem; font-weight: 800; transition: opacity .18s, transform .18s; }


/* Footer: price centered, cart-plus on the right (spacer balances it), compare under. */
.shop-card-buy { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; padding: 6px 12px 12px; }
.shop-buy-spacer { grid-column: 1; }
/* The price must never wrap — a second line would make this tile taller than its
   neighbours and stretch the whole row. Long prices step down instead. */
.shop-card-price { grid-column: 2; min-width: 0; text-align: center; white-space: nowrap; font-size: 1.3rem; font-weight: 1000; color: var(--ink); }
.shop-card-price.px-sm { font-size: 1.08rem; }
.shop-card-price.px-xs { font-size: .92rem; }
/* Narrow tiles shrink it further (the card is a size container). */
@container (max-width: 205px) {
    .shop-card-price { font-size: 1.05rem; }
    .shop-card-price.px-sm { font-size: .94rem; }
    .shop-card-price.px-xs { font-size: .82rem; }
}
.shop-card-buy form { grid-column: 3; margin: 0; }
.shop-add-icon { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; color: #07152c; background: linear-gradient(135deg, #f5f7f8, #aeb8c1 58%, #eef2f5); font-size: 1.1rem; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,.18); transition: transform .15s, filter .15s, background .2s; }
.shop-add-icon:hover { transform: translateY(-1px); filter: brightness(1.05); }
/* The added/shake states now come from the shared [data-add-btn] rules in
   storefront.css, so every cart button in the app confirms the same way. */
.shop-compare { grid-column: 1 / -1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; margin-top: 4px; color: var(--muted); font-size: .72rem; font-weight: 700; cursor: pointer; }
.shop-compare input { accent-color: var(--rule-dark); }

/* ── List view — one full-height row: photo · Beckett · info · price · cart ──
   Fixed photo size locks row height; every sibling stretches to that height. */
.shop-results.is-list .shop-card {
    --list-photo-w: 120px;
    --list-photo-h: 160px; /* 3:4 */
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: var(--list-photo-h);
    background: linear-gradient(180deg, var(--surface), var(--surface-soft));
}
.shop-results.is-list .shop-card:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0,0,0,.22); }

/* DOM order is slab → media → meta → buy; reorder into photo-first list flow. */
.shop-results.is-list .shop-card-media { order: 1; }
.shop-results.is-list .shop-card > .slab { order: 2; }
.shop-results.is-list .shop-card-meta { order: 3; }
.shop-results.is-list .shop-card-buy { order: 4; }

/* 1 · photo */
.shop-results.is-list .shop-card-media {
    flex: 0 0 var(--list-photo-w);
    width: var(--list-photo-w);
    height: var(--list-photo-h);
    min-height: var(--list-photo-h);
    max-height: var(--list-photo-h);
    aspect-ratio: auto;
    padding: 8px;
    border-right: 1px solid var(--rule);
    background: var(--photo-well);
}
.shop-results.is-list .shop-card-media img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 2 · Beckett slab — full row height, same as card photo */
.shop-results.is-list .shop-card > .slab {
    flex: 1 1 240px;
    min-width: 200px;
    max-width: 360px;
    height: auto;
    min-height: var(--list-photo-h);
    border-radius: 0;
    box-sizing: border-box;
    /* Extra right padding keeps text clear of the blend-out zone. */
    padding: 15px 96px 15px 20px;
    gap: 0;
    justify-content: space-between;
}
/* Feather the slab's right edge into the info block so they read as one panel. */
.shop-results.is-list .shop-card > .slab::after {
    content: "";
    position: absolute; top: 0; right: 0; bottom: 0; width: 88px; z-index: 3;
    background: linear-gradient(90deg, rgba(20, 34, 61, 0) 0%, var(--surface) 88%);
    pointer-events: none;
}
.shop-results.is-list .shop-card > .slab .slab-player {
    font-size: 1.4rem;
    letter-spacing: -.015em;
    white-space: normal;
    line-height: 1.12;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.shop-results.is-list .shop-card > .slab .slab-set {
    font-size: .82rem;
    letter-spacing: .05em;
    opacity: .9;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.shop-results.is-list .shop-card > .slab .slab-num { font-size: .82rem; opacity: .82; }
.shop-results.is-list .shop-card > .slab .slab-grade b { font-size: 2.5rem; }
.shop-results.is-list .shop-card > .slab .slab-grade small { font-size: .7rem; margin-top: 3px; }
.shop-results.is-list .shop-card > .slab .slab-sub { font-size: 1rem; gap: 5px; }
.shop-results.is-list .shop-card > .slab .slab-sub i { font-size: .68rem; opacity: .72; }
.shop-results.is-list .shop-card > .slab .slab-cert { font-size: .8rem; opacity: .78; }
.shop-results.is-list .shop-card > .slab .slab-bottom { gap: 18px; padding-top: 10px; margin-top: auto; }

/* 3 · set / number info */
.shop-results.is-list .shop-card-meta {
    flex: 1 1 140px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    min-height: var(--list-photo-h);
    padding: 12px 20px;
    /* No border here — the slab feathers straight into this block. */
    font-size: 1.05rem;
    white-space: normal;
}
.shop-results.is-list .shop-card-meta .m-brand { max-width: none; overflow: visible; text-overflow: unset; }
.shop-results.is-list .shop-card-meta .m-go { display: inline-flex; }

/* 4 · price + compare | cart — full height strip */
.shop-results.is-list .shop-card-buy {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(120px, 150px) 88px;
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas:
        ". cart"
        "price cart"
        "compare cart"
        ". cart";
    align-items: center;
    gap: 4px 0;
    min-height: var(--list-photo-h);
    margin: 0;
    padding: 0;
    border-left: 1px solid var(--rule);
}
.shop-results.is-list .shop-buy-spacer { display: none; }
.shop-results.is-list .shop-card-price {
    grid-area: price;
    justify-self: center;
    align-self: end;
    padding: 0;
    font-size: 1.45rem;
    line-height: 1;
}
.shop-results.is-list .shop-compare {
    grid-area: compare;
    justify-self: center;
    align-self: start;
    margin: 0;
    padding: 0;
}
.shop-results.is-list .shop-card-buy form {
    grid-area: cart;
    align-self: stretch;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 0;
    border-left: 1px solid var(--rule);
}
.shop-results.is-list .shop-add-icon { width: 56px; height: 56px; border-radius: 16px; font-size: 1.4rem; }

@media (max-width: 980px) {
    .shop-results.is-list .shop-card {
        --list-photo-w: 104px;
        --list-photo-h: 139px;
    }
    .shop-results.is-list .shop-card-buy { grid-template-columns: minmax(100px, 130px) 76px; }
    .shop-results.is-list .shop-add-icon { width: 50px; height: 50px; font-size: 1.25rem; }
    .shop-results.is-list .shop-card > .slab .slab-grade b { font-size: 1.7rem; }
}
@media (max-width: 720px) {
    .shop-results.is-list .shop-card {
        --list-photo-w: 96px;
        --list-photo-h: 128px;
        flex-wrap: wrap;
    }
    .shop-results.is-list .shop-card-media {
        flex: 0 0 var(--list-photo-w);
        height: auto;
        min-height: calc(var(--list-photo-h) + 72px);
        max-height: none;
        align-self: stretch;
    }
    .shop-results.is-list .shop-card > .slab {
        flex: 1 1 calc(100% - var(--list-photo-w) - 8px);
        max-width: none;
        min-height: var(--list-photo-h);
    }
    /* Stacked layout: slab sits above the info, so drop the side-blend + its padding. */
    .shop-results.is-list .shop-card > .slab { padding: 12px 16px; }
    .shop-results.is-list .shop-card > .slab::after { display: none; }
    .shop-results.is-list .shop-card > .slab .slab-player { font-size: 1.15rem; }
    .shop-results.is-list .shop-card > .slab .slab-grade b { font-size: 2.1rem; }
    .shop-results.is-list .shop-card > .slab .slab-sub { font-size: .86rem; }
    .shop-results.is-list .shop-card-meta {
        flex: 1 1 120px;
        min-height: 56px;
        border-left: 0;
        border-top: 1px solid var(--rule);
        margin-left: var(--list-photo-w);
    }
    .shop-results.is-list .shop-card-buy {
        flex: 1 1 160px;
        min-height: 56px;
        border-top: 1px solid var(--rule);
        grid-template-columns: minmax(0, 1fr) 72px;
        grid-template-rows: auto auto;
        grid-template-areas: "price cart" "compare cart";
    }
}
@media (max-width: 520px) {
    .shop-results.is-list .shop-card {
        --list-photo-w: 88px;
        --list-photo-h: 118px;
    }
    .shop-results.is-list .shop-card-meta,
    .shop-results.is-list .shop-card-buy { margin-left: 0; width: 100%; flex: 1 1 100%; }
    .shop-results.is-list .shop-card-buy form { padding: 10px 14px; }
}

.shop-empty { padding: 60px 24px; text-align: center; border: 1px dashed var(--rule); border-radius: 18px; background: var(--surface); }
.shop-empty-icon { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 16px; background: var(--photo-well); color: var(--muted); font-size: 1.6rem; }
.shop-empty h2 { margin: 0 0 8px; color: var(--ink); }
.shop-empty p { margin: 0 0 18px; color: var(--muted); }

/* ── Compare tray + overlay ── */
/* hidden attribute must beat the flex display on these overlays. */
.shop-compare-tray[hidden], .shop-compare-overlay[hidden] { display: none !important; }
.shop-compare-tray { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 3000; display: flex; align-items: center; gap: 14px; width: min(760px, calc(100% - 28px)); padding: 10px 14px; border: 1px solid var(--rule-dark); border-radius: 16px; background: var(--surface); box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.shop-compare-items { display: flex; gap: 8px; flex: 1; overflow: auto; }
.shop-compare-chip { display: flex; align-items: center; gap: 7px; padding: 5px 8px; border: 1px solid var(--rule); border-radius: 10px; background: var(--photo-well); color: var(--ink); font-size: .74rem; white-space: nowrap; }
.shop-compare-chip img { width: 24px; height: 32px; object-fit: contain; border-radius: 3px; }
.shop-compare-chip button { border: 0; background: none; color: var(--muted); cursor: pointer; }
.shop-compare-actions { display: flex; gap: 10px; }
.shop-compare-clear { min-height: 40px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-weight: 800; cursor: pointer; }
.shop-compare-open { min-height: 40px; padding: 0 18px; border: 0; border-radius: 10px; color: #07152c; background: linear-gradient(135deg, #f5f7f8, #aeb8c1 58%, #eef2f5); font: inherit; font-weight: 1000; cursor: pointer; }
.shop-compare-open:disabled { opacity: .5; cursor: not-allowed; }
.shop-compare-overlay { position: fixed; inset: 0; z-index: 3200; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(3,7,15,.72); backdrop-filter: blur(6px); }
.shop-compare-panel { width: min(900px, 100%); max-height: 88vh; overflow: auto; border: 1px solid var(--rule-dark); border-radius: 18px; background: var(--surface); }
.shop-compare-panel header { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: var(--surface); border-bottom: 1px solid var(--rule); }
.shop-compare-panel h2 { margin: 0; font-size: 1.1rem; }
.shop-compare-x { width: 36px; height: 36px; border: 1px solid var(--rule); border-radius: 50%; background: var(--photo-well); color: var(--muted); cursor: pointer; }
.shop-compare-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 1fr); gap: 0; }
.shop-compare-col { padding: 16px; border-right: 1px solid var(--rule); }
.shop-compare-col:last-child { border-right: 0; }
.shop-compare-col img { width: 100%; height: auto; max-height: 200px; object-fit: contain; border-radius: 8px; background: var(--photo-well); }
.shop-compare-col h3 { margin: 12px 0 8px; font-size: .86rem; line-height: 1.3; }
.shop-compare-col dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; font-size: .78rem; }
.shop-compare-col dt { color: var(--muted); }
.shop-compare-col dd { margin: 0; color: var(--ink); font-weight: 800; text-align: right; }
.shop-compare-col .shop-compare-price { grid-column: 1 / -1; margin-top: 8px; font-size: 1.15rem; font-weight: 1000; }

/* ── Responsive: tablet + phone ── */
@media (max-width: 1024px) {
    .shop-layout { grid-template-columns: 1fr; }
    .shop-filter-toggle { display: inline-flex; }
    .shop-rail { position: static; display: none; }
    .shop[data-filters-open] .shop-rail { display: block; margin-bottom: 16px; }
}
@media (max-width: 620px) {
    .shop-results.is-grid { grid-template-columns: 1fr; }
    .shop-toolbar-right { width: 100%; }
    .shop-within { min-width: 100%; }
    .shop-compare-grid { grid-auto-flow: row; grid-auto-columns: auto; }
}
@media (max-width: 900px) and (orientation: landscape) {
    .shop-results.is-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ═══ Light theme only ══════════════════════════════════════════════════════
   Tiles stay light. To keep them from dissolving into the pale beadboard they get
   a firmer edge and a deeper shadow rather than an inverted fill. */
[data-theme="light"] .shop-card {
    border-color: rgba(19, 36, 68, .26);
    box-shadow: 0 6px 18px rgba(17, 30, 54, .12);
}
[data-theme="light"] .shop-card:hover {
    border-color: rgba(19, 36, 68, .45);
    box-shadow: 0 16px 38px rgba(17, 30, 54, .24);
}

/* ═══ Acrylic slab case ═════════════════════════════════════════════════════
   The complete product tile reads as one encapsulated collectible resting on
   the page. The tilt is intentionally slight so type and photography remain
   crisp; hover lifts the case toward the viewer instead of adding more tilt. */
.shop-results.is-grid {
    perspective: 1400px;
    perspective-origin: 50% 20%;
}

.shop-results.is-grid .shop-card {
    --case-edge: rgba(198, 218, 237, .38);
    --case-highlight: rgba(255, 255, 255, .32);
    --case-mid: rgba(122, 150, 178, .12);
    --case-shadow: rgba(0, 0, 0, .58);
    --case-fastener: rgba(225, 238, 249, .72);
    position: relative;
    padding: 8px;
    border: 1px solid var(--case-edge);
    border-radius: 22px;
    background:
        linear-gradient(145deg, var(--case-highlight), transparent 20% 78%, rgba(5, 12, 22, .28)),
        linear-gradient(180deg, var(--case-mid), rgba(31, 51, 75, .08));
    box-shadow:
        0 30px 38px -25px var(--case-shadow),
        0 12px 22px -14px rgba(0, 0, 0, .72),
        inset 0 1px 0 rgba(255, 255, 255, .42),
        inset 0 -1px 0 rgba(0, 0, 0, .28),
        inset 1px 0 0 rgba(255, 255, 255, .12),
        inset -1px 0 0 rgba(0, 0, 0, .2);
    transform: perspective(1000px) rotateX(1.15deg) translateZ(0);
    transform-origin: 50% 100%;
    transition: border-color .2s, box-shadow .22s, transform .22s, filter .22s;
}

/* Four quiet case fasteners reinforce the physical-slab silhouette. */
.shop-results.is-grid .shop-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 8;
    border-radius: inherit;
    background:
        radial-gradient(circle at 11px 11px, rgba(255,255,255,.9) 0 1px, var(--case-fastener) 1.5px 2.5px, rgba(5,15,28,.46) 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 11px) 11px, rgba(255,255,255,.9) 0 1px, var(--case-fastener) 1.5px 2.5px, rgba(5,15,28,.46) 3px, transparent 4px),
        radial-gradient(circle at 11px calc(100% - 11px), rgba(255,255,255,.9) 0 1px, var(--case-fastener) 1.5px 2.5px, rgba(5,15,28,.46) 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 11px) calc(100% - 11px), rgba(255,255,255,.9) 0 1px, var(--case-fastener) 1.5px 2.5px, rgba(5,15,28,.46) 3px, transparent 4px);
    pointer-events: none;
}

.shop-results.is-grid .shop-card:hover {
    border-color: rgba(222, 237, 250, .62);
    box-shadow:
        0 38px 48px -27px var(--case-shadow),
        0 18px 28px -16px rgba(0, 0, 0, .74),
        inset 0 1px 0 rgba(255, 255, 255, .58),
        inset 0 -1px 0 rgba(0, 0, 0, .25);
    transform: perspective(1000px) rotateX(.2deg) translateY(-5px) translateZ(8px);
    filter: saturate(1.04);
}

.shop-results.is-grid .shop-card > .slab {
    border-radius: 14px 14px 3px 3px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.55),
        inset 0 -1px 0 rgba(0,0,0,.3),
        0 4px 10px rgba(0,0,0,.22);
}

.shop-results.is-grid .slab-grade b {
    font-size: 2.15rem;
}

.shop-results.is-grid .slab-grade small {
    margin-top: 2px;
    font-size: .6rem;
}

.shop-results.is-grid .shop-card-media {
    margin-top: 3px;
    border: 1px solid rgba(188, 211, 232, .2);
    border-radius: 3px 3px 12px 12px;
    box-shadow:
        inset 0 8px 18px rgba(0,0,0,.2),
        inset 0 -1px 0 rgba(255,255,255,.08);
}

.shop-results.is-grid .shop-card-media img {
    filter: saturate(1.05) contrast(1.025);
    box-shadow: 0 8px 16px rgba(0,0,0,.22);
    transition: filter .2s, transform .22s, box-shadow .22s;
}

.shop-results.is-grid .shop-card:hover .shop-card-media img {
    filter: saturate(1.1) contrast(1.035);
    transform: translateY(-1px);
    box-shadow: 0 11px 20px rgba(0,0,0,.28);
}

.shop-results.is-grid .shop-card-meta {
    margin-inline: 5px;
}

.shop-results.is-grid .shop-card-buy {
    margin-inline: 5px;
}

[data-theme="dark"] .shop-results.is-grid .shop-card {
    --case-edge: rgba(165, 195, 222, .42);
    --case-highlight: rgba(225, 239, 251, .24);
    --case-mid: rgba(72, 105, 139, .15);
    --case-shadow: rgba(0, 0, 0, .76);
    --case-fastener: rgba(191, 216, 237, .78);
    background:
        linear-gradient(145deg, rgba(221, 237, 250, .2), transparent 18% 80%, rgba(0, 4, 12, .42)),
        linear-gradient(180deg, rgba(51, 79, 108, .2), rgba(6, 16, 30, .42));
}

[data-theme="dark"] .shop-results.is-grid .shop-card-media {
    background:
        radial-gradient(circle at 50% 8%, rgba(47, 70, 99, .38), transparent 45%),
        #071426;
}

/* Metal plates are brand components, not theme components. Their geometry,
   contrast, and color are deliberately identical in light and dark modes. */
.shop-results.is-grid .slab-gold {
    background: linear-gradient(135deg, #f4dfa2 0%, #d2ad50 33%, #a97a22 56%, #e0c36e 78%, #9b6f1e 100%);
}

.shop-results.is-grid .slab-silver {
    background: linear-gradient(135deg, #f1f4f6 0%, #c8d0d6 34%, #8f9da9 56%, #dce2e6 78%, #929faa 100%);
}

.shop-results.is-grid .slab-bronze {
    background: linear-gradient(135deg, #e2ae7d 0%, #bd7741 34%, #824720 56%, #cb8b56 78%, #7e461f 100%);
}

[data-theme="light"] .shop-results.is-grid .shop-card {
    --case-edge: rgba(78, 108, 137, .38);
    --case-highlight: rgba(255, 255, 255, .92);
    --case-mid: rgba(127, 153, 178, .13);
    --case-shadow: rgba(31, 50, 73, .42);
    --case-fastener: rgba(100, 126, 150, .66);
    background:
        linear-gradient(145deg, rgba(255,255,255,.96), rgba(221,231,239,.48) 22%, rgba(191,207,221,.23) 78%, rgba(122,148,172,.38)),
        rgba(239, 244, 248, .72);
}

[data-theme="light"] .shop-results.is-grid .shop-card-media {
    border-color: rgba(76, 104, 132, .2);
    background:
        radial-gradient(circle at 50% 5%, rgba(255,255,255,.96), transparent 48%),
        linear-gradient(180deg, #e8eef3, #d9e2e9);
}

[data-theme="light"] .shop-results.is-grid .shop-card:hover {
    border-color: rgba(65, 96, 126, .56);
}

@media (prefers-reduced-motion: reduce) {
    .shop-results.is-grid .shop-card,
    .shop-results.is-grid .shop-card:hover {
        transform: none;
        transition: border-color .2s, box-shadow .2s;
    }
}

/* ═══ Full-data slab popover ════════════════════════════════════════════════
   The compact plate may truncate set metadata, but hovering anywhere on the
   plate—or focusing it with a keyboard—reveals the complete unabridged record. */
.shop-card > .slab {
    overflow: visible;
    z-index: 18;
    outline: none;
    cursor: help;
}

.shop-card > .slab:focus-visible {
    outline: 3px solid rgba(113, 180, 241, .9);
    outline-offset: 3px;
}

.shop-card .slab-detail-popover {
    --tip-bg: rgba(5, 15, 29, .97);
    --tip-panel: rgba(255, 255, 255, .065);
    --tip-border: rgba(184, 211, 235, .4);
    --tip-rule: rgba(255, 255, 255, .12);
    --tip-text: #f4f7fa;
    --tip-muted: #aebdca;
    position: absolute;
    top: calc(100% + 10px);
    left: 6px;
    right: 6px;
    z-index: 30;
    display: block;
    padding: 14px;
    border: 1px solid var(--tip-border);
    border-radius: 14px;
    color: var(--tip-text);
    background:
        radial-gradient(circle at 12% 0, rgba(89, 142, 190, .2), transparent 42%),
        var(--tip-bg);
    box-shadow: 0 18px 38px rgba(0,0,0,.52), inset 0 1px 0 rgba(255,255,255,.1);
    backdrop-filter: blur(16px) saturate(1.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-7px) scale(.985);
    transform-origin: 50% 0;
    transition: opacity .16s ease, visibility .16s ease, transform .18s ease;
    pointer-events: none;
}

.shop-card .slab-detail-popover::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 24px;
    width: 11px;
    height: 11px;
    border-top: 1px solid var(--tip-border);
    border-left: 1px solid var(--tip-border);
    background: var(--tip-bg);
    transform: rotate(45deg);
}

.shop-card > .slab:hover .slab-detail-popover,
.shop-card > .slab:focus .slab-detail-popover,
.shop-card > .slab:focus-within .slab-detail-popover,
.shop-card > .slab.detail-open .slab-detail-popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.shop-card > .slab.detail-suppressed .slab-detail-popover {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-7px) scale(.975);
}

.slab-detail-kicker {
    margin: 0 0 5px;
    color: #86c8ff;
    font-size: .51rem;
    font-weight: 950;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.slab-detail-player {
    display: block;
    font-size: clamp(.92rem, 5.2cqi, 1.12rem);
    font-weight: 1000;
    line-height: 1.06;
    letter-spacing: -.015em;
    overflow-wrap: anywhere;
    text-transform: uppercase;
}

.slab-detail-reference {
    margin: 5px 0 11px;
    color: var(--tip-muted);
    font-size: .68rem;
    font-weight: 750;
    line-height: 1.32;
    overflow-wrap: anywhere;
}

.slab-detail-grades {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
}

.slab-detail-grades > div {
    min-width: 0;
    display: grid;
    gap: 2px;
    padding: 7px 8px;
    border: 1px solid var(--tip-rule);
    border-radius: 8px;
    background: var(--tip-panel);
}

.slab-detail-grades .slab-detail-overall,
.slab-detail-grades .slab-detail-no-subgrades {
    grid-column: 1 / -1;
}

.slab-detail-grades dt {
    color: var(--tip-muted);
    font-size: .46rem;
    font-weight: 900;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.slab-detail-grades dd {
    margin: 0;
    font-size: .82rem;
    font-weight: 1000;
    line-height: 1.1;
}

.slab-detail-grades dd small {
    margin-left: 3px;
    color: var(--tip-muted);
    font-size: .47rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.slab-detail-no-subgrades dd {
    font-size: .7rem;
}

.slab-detail-cert {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 10px 0 0;
    padding-top: 9px;
    border-top: 1px solid var(--tip-rule);
    color: var(--tip-muted);
    font-size: .55rem;
    letter-spacing: .035em;
}

.slab-detail-cert span {
    font-weight: 850;
    text-transform: uppercase;
}

.slab-detail-cert b {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--tip-text);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

[data-theme="light"] .shop-card .slab-detail-popover {
    --tip-bg: rgba(247, 250, 252, .985);
    --tip-panel: rgba(26, 52, 78, .055);
    --tip-border: rgba(48, 79, 108, .34);
    --tip-rule: rgba(28, 56, 82, .13);
    --tip-text: #10243a;
    --tip-muted: #536b80;
    background:
        radial-gradient(circle at 12% 0, rgba(99, 156, 205, .16), transparent 42%),
        var(--tip-bg);
    box-shadow: 0 18px 38px rgba(31, 52, 73, .28), inset 0 1px 0 #fff;
}

[data-theme="light"] .slab-detail-kicker {
    color: #21689f;
}

@media (hover: none) {
    .shop-card > .slab {
        cursor: default;
    }
}

/* ═══ Horizontal acrylic slab / list view ══════════════════════════════════
   This is the same collectible object as the portrait tile, rotated into a
   purposeful horizontal presentation—not a table row with decorative cells. */
.shop-results.is-list {
    gap: 14px;
    perspective: 1500px;
    perspective-origin: 50% 20%;
}

.shop-results.is-list .shop-card {
    --list-photo-w: 128px;
    --list-row-h: 184px;
    --case-edge: rgba(84, 112, 139, .4);
    --case-highlight: rgba(255, 255, 255, .9);
    --case-panel: rgba(255, 255, 255, .38);
    --case-rule: rgba(47, 77, 106, .2);
    --case-shadow: rgba(31, 50, 73, .38);
    --case-fastener: rgba(98, 124, 148, .7);
    position: relative;
    display: grid;
    grid-template-columns: var(--list-photo-w) minmax(300px, 340px) minmax(160px, 1fr) 190px;
    grid-template-areas: "photo label meta buy";
    align-items: stretch;
    gap: 8px;
    height: var(--list-row-h);
    min-height: var(--list-row-h);
    padding: 8px;
    overflow: visible;
    border: 1px solid var(--case-edge);
    border-radius: 22px;
    background:
        linear-gradient(145deg, var(--case-highlight), transparent 20% 80%, rgba(105,132,156,.25)),
        rgba(232, 239, 244, .74);
    box-shadow:
        0 26px 34px -25px var(--case-shadow),
        0 10px 20px -15px rgba(30, 49, 69, .38),
        inset 0 1px 0 rgba(255,255,255,.88),
        inset 0 -1px 0 rgba(48,73,96,.2);
    transform: perspective(1200px) rotateX(.55deg) translateZ(0);
    transform-origin: 50% 100%;
    transition: border-color .2s, box-shadow .22s, transform .22s, filter .22s;
}

.shop-results.is-list .shop-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 40;
    border-radius: inherit;
    background:
        radial-gradient(circle at 11px 11px, #fff 0 1px, var(--case-fastener) 1.5px 2.5px, rgba(10,23,37,.42) 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 11px) 11px, #fff 0 1px, var(--case-fastener) 1.5px 2.5px, rgba(10,23,37,.42) 3px, transparent 4px),
        radial-gradient(circle at 11px calc(100% - 11px), #fff 0 1px, var(--case-fastener) 1.5px 2.5px, rgba(10,23,37,.42) 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 11px) calc(100% - 11px), #fff 0 1px, var(--case-fastener) 1.5px 2.5px, rgba(10,23,37,.42) 3px, transparent 4px);
    pointer-events: none;
}

.shop-results.is-list .shop-card:hover {
    z-index: 50;
    border-color: rgba(67, 100, 130, .58);
    box-shadow:
        0 34px 42px -26px var(--case-shadow),
        0 16px 25px -17px rgba(26, 45, 65, .46),
        inset 0 1px 0 rgba(255,255,255,.95);
    transform: perspective(1200px) rotateX(.08deg) translateY(-4px) translateZ(7px);
    filter: saturate(1.025);
}

.shop-results.is-list .shop-card:focus-within {
    z-index: 80;
}

.shop-results.is-list .shop-card-media {
    grid-area: photo;
    order: initial;
    width: auto;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 7px;
    overflow: hidden;
    border: 1px solid var(--case-rule);
    border-radius: 14px;
    background:
        radial-gradient(circle at 50% 5%, rgba(255,255,255,.92), transparent 48%),
        linear-gradient(180deg, #e7edf2, #d7e0e7);
    box-shadow: inset 0 8px 18px rgba(34,55,76,.14), 0 5px 12px rgba(35,52,69,.16);
}

.shop-results.is-list .shop-card-media img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 9px;
    object-fit: contain;
    filter: saturate(1.06) contrast(1.025);
    box-shadow: 0 6px 13px rgba(19,34,49,.22);
}

.shop-results.is-list .shop-card > .slab {
    grid-area: label;
    order: initial;
    flex: none;
    width: auto;
    min-width: 0;
    max-width: none;
    height: auto;
    min-height: 0;
    padding: 15px 18px;
    overflow: visible;
    border-radius: 14px;
    box-sizing: border-box;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.55),
        inset 0 -1px 0 rgba(0,0,0,.3),
        0 5px 12px rgba(34,45,55,.2);
}

.shop-results.is-list .shop-card > .slab::after {
    display: none;
}

.shop-results.is-list .shop-card > .slab .slab-player {
    font-size: 1.32rem;
    line-height: 1.03;
}

.shop-results.is-list .shop-card > .slab .slab-set,
.shop-results.is-list .shop-card > .slab .slab-num {
    font-size: .7rem;
}

.shop-results.is-list .shop-card > .slab .slab-grade b {
    font-size: 2.35rem;
}

.shop-results.is-list .shop-card > .slab .slab-grade small {
    font-size: .62rem;
}

.shop-results.is-list .shop-card > .slab .slab-bottom {
    gap: 6px;
    margin-top: auto;
    padding-top: 9px;
}

.shop-results.is-list .shop-card > .slab .slab-sub {
    min-height: 24px;
    padding-inline: 7px;
    font-size: .8rem;
}

.shop-results.is-list .shop-card > .slab .slab-sub i {
    font-size: .5rem;
}

.shop-results.is-list .shop-card-meta {
    grid-area: meta;
    order: initial;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 18px;
    display: flex;
    align-content: center;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 5px 7px;
    border: 1px solid var(--case-rule);
    border-radius: 14px;
    color: var(--ink);
    background: var(--case-panel);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.48);
    font-size: 1rem;
    line-height: 1.25;
    white-space: normal;
}

.shop-results.is-list .shop-card-meta::before {
    content: "CARD REFERENCE";
    flex: 0 0 100%;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: .55rem;
    font-weight: 950;
    letter-spacing: .13em;
}

.shop-results.is-list .shop-card-meta .m-brand {
    max-width: 100%;
    overflow: visible;
    font-weight: 850;
    text-overflow: unset;
}

.shop-results.is-list .shop-card-meta .m-go {
    flex: 0 0 100%;
    margin: 7px 0 0;
    color: var(--muted);
    font-size: .7rem;
}

.shop-results.is-list .shop-card-buy {
    grid-area: buy;
    order: initial;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr 58px;
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas:
        ". cart"
        "price cart"
        "compare cart"
        ". cart";
    align-items: center;
    gap: 5px 8px;
    border: 1px solid var(--case-rule);
    border-radius: 14px;
    background: var(--case-panel);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.48);
}

.shop-results.is-list .shop-card-price {
    grid-area: price;
    justify-self: center;
    align-self: end;
    padding: 0;
    font-size: 1.42rem;
}

.shop-results.is-list .shop-compare {
    grid-area: compare;
    justify-self: center;
    align-self: start;
}

.shop-results.is-list .shop-card-buy form {
    grid-area: cart;
    align-self: stretch;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
}

.shop-results.is-list .shop-add-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
}

/* The list panel opens sideways across the reference area so it remains inside
   the horizontal case and does not force the row to grow. */
.shop-results.is-list .slab-detail-popover {
    top: 8px;
    left: calc(100% + 12px);
    right: auto;
    width: 300px;
}

.shop-results.is-list .slab-detail-popover::before {
    top: 22px;
    left: -6px;
    border-top: 0;
    border-right: 0;
    border-bottom: 1px solid var(--tip-border);
    border-left: 1px solid var(--tip-border);
}

[data-theme="dark"] .shop-results.is-list .shop-card {
    --case-edge: rgba(160, 190, 217, .4);
    --case-highlight: rgba(220, 236, 249, .19);
    --case-panel: rgba(13, 29, 49, .72);
    --case-rule: rgba(174, 203, 229, .2);
    --case-shadow: rgba(0, 0, 0, .72);
    --case-fastener: rgba(190, 215, 236, .78);
    background:
        linear-gradient(145deg, rgba(220,236,249,.18), transparent 20% 80%, rgba(0,5,14,.4)),
        rgba(7, 19, 35, .78);
}

[data-theme="dark"] .shop-results.is-list .shop-card-media {
    background:
        radial-gradient(circle at 50% 5%, rgba(55,82,111,.4), transparent 48%),
        #071426;
    box-shadow: inset 0 8px 18px rgba(0,0,0,.34), 0 5px 12px rgba(0,0,0,.28);
}

[data-theme="light"] .shop-results.is-list .shop-card {
    --case-edge: rgba(79, 108, 136, .4);
    --case-highlight: rgba(255, 255, 255, .94);
    --case-panel: rgba(255, 255, 255, .42);
    --case-rule: rgba(49, 78, 106, .2);
}

@media (max-width: 1120px) {
    .shop-results.is-list .shop-card {
        --list-photo-w: 116px;
        grid-template-columns: var(--list-photo-w) minmax(270px, 310px) minmax(145px, 1fr) 176px;
    }
    .shop-results.is-list .shop-card > .slab .slab-player { font-size: 1.14rem; }
    .shop-results.is-list .shop-card > .slab .slab-sub { padding-inline: 5px; font-size: .72rem; }
}

@media (max-width: 760px) {
    .shop-results.is-list .shop-card {
        --list-photo-w: 102px;
        --list-row-h: auto;
        grid-template-columns: var(--list-photo-w) minmax(0, 1fr);
        grid-template-rows: 170px auto 76px;
        grid-template-areas:
            "photo label"
            "meta meta"
            "buy buy";
        height: auto;
        min-height: 0;
    }
    .shop-results.is-list .shop-card-media {
        width: auto;
        height: auto;
        min-height: 0;
        max-height: none;
    }
    .shop-results.is-list .shop-card > .slab {
        width: auto;
        min-height: 0;
        padding: 13px 14px;
    }
    .shop-results.is-list .shop-card > .slab .slab-player { font-size: 1.05rem; }
    .shop-results.is-list .shop-card > .slab .slab-grade b { font-size: 1.9rem; }
    .shop-results.is-list .shop-card > .slab .slab-sub { padding-inline: 4px; font-size: .68rem; }
    .shop-results.is-list .shop-card-meta {
        min-height: 62px;
        margin: 0;
        padding: 12px 14px;
    }
    .shop-results.is-list .shop-card-meta::before { margin-bottom: 1px; }
    .shop-results.is-list .shop-card-buy {
        min-height: 68px;
        margin: 0;
        padding: 9px 12px;
        grid-template-columns: 1fr 72px;
        grid-template-rows: auto auto;
        grid-template-areas: "price cart" "compare cart";
    }
    .shop-results.is-list .slab-detail-popover {
        top: calc(100% + 9px);
        left: calc((var(--list-photo-w) + 8px) * -1);
        right: auto;
        width: calc(100% + var(--list-photo-w) + 8px);
    }
    .shop-results.is-list .slab-detail-popover::before {
        top: -6px;
        left: 24px;
        border-top: 1px solid var(--tip-border);
        border-right: 0;
        border-bottom: 0;
        border-left: 1px solid var(--tip-border);
    }
}

@media (prefers-reduced-motion: reduce) {
    .shop-results.is-list .shop-card,
    .shop-results.is-list .shop-card:hover {
        transform: none;
        transition: border-color .2s, box-shadow .2s;
    }
}
