/* Kardova V42 storefront repair. Scoped after the legacy bundle to avoid global regressions. */
:root { --v42p-panel:#101b2b; --v42p-border:rgba(181,202,233,.24); }
/* Shared page geometry. The collector section inherited margin:20px 0 and was pinned to the viewport edge. */
body:has(.v16-product-detail) .container,
body:has(.shop-section) .container { max-width:1320px; }
body:has(.v16-product-detail) .container.v19-collector-tools,
body:has(.v16-product-detail) .container.v23-condition-teaser,
body:has(.v16-product-detail) .container.v14-product-extras,
body:has(.v16-product-detail) .container.v13-product-discovery { margin-left:auto; margin-right:auto; }
body:has(.v16-product-detail) .container.v19-collector-tools { margin-top:32px; margin-bottom:18px; padding:clamp(20px,3vw,32px); }
body:has(.v16-product-detail) .container.v23-condition-teaser { padding-block:14px 25px; }
/* The first row ends at the purchase decision; additional text spans the page below. */
.v16-product-detail.product-detail { gap:clamp(28px,4vw,60px); align-items:start; padding-bottom:20px; }
.v16-product-detail .product-gallery,.v16-product-detail .product-detail-copy { min-width:0; }
.v16-product-detail .gallery-main { height:auto; min-height:0; aspect-ratio:1.03; max-height:650px; border-radius:12px; }
.v16-product-detail .gallery-main img { max-height:100%; width:auto; height:100%; object-fit:contain; }
.v16-product-detail .product-detail-copy h1 { text-wrap:balance; }
.v16-product-detail .v9-product-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; }
.v16-product-detail .v9-product-actions .btn { min-height:42px; white-space:normal; }
.v16-product-detail .v16-evidence-strip { display:flex; flex-wrap:wrap; align-items:center; }
.v16-product-detail .spec-table strong { min-width:0; overflow-wrap:anywhere; text-align:right; }
.v16-product-detail .buy-area { border-radius:10px; }
.v42p-lower { display:grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap:18px 28px; padding-block:12px 30px; }
.v42p-lower > * { min-width:0; }
.v42p-lower .v15-passport-panel, .v42p-lower .v13-buyer-assurance, .v42p-lower .v20-product-discovery,
.v42p-lower .v16-support-links, .v42p-lower .condition-disclosure { grid-column:1 / -1; margin:0; }
.v42p-lower .v15-passport-panel { padding:clamp(18px,2.5vw,28px); }
.v42p-lower .v13-buyer-assurance { margin:0; }
.v42p-lower .v16-support-links { margin-block:5px 0; }
.v42p-lower .product-shipping-points { grid-column:1; align-self:start; padding:20px; border:1px solid var(--v42p-border); border-radius:10px; background:#0f1a29; }
.v42p-lower .detail-desc { grid-column:2; margin:0; padding:19px 20px; border:1px solid var(--v42p-border); border-radius:10px; background:#101727; }
.v42p-lower .detail-desc h3 { margin-top:0; }
.v42p-photo-notice,.v42p-studio-pending { border:1px solid rgba(218,181,113,.42); border-radius:10px; background:linear-gradient(120deg,#181e29,#1d1923); color:#e8d6bd; padding:16px; line-height:1.6; }
.v42p-photo-notice { display:grid; gap:4px; margin:12px 0 4px; }
.v42p-photo-notice strong { color:#f6d492; }
.v42p-photo-notice span { color:#c9c4cc; font-size:12px; }
.v42p-studio-pending { max-width:100%; font-size:12px; }
.v14-product-extras .v14-product-extras-heading { max-width:900px; }
.v14-product-extras .v14-request-grid > * { min-width:0; }
.v14-product-extras .v14-request-tile summary { overflow-wrap:anywhere; }
/* Related inventory should fill its own row without awkward card widths. */
.similar-section { padding-block:64px 90px; }
.similar-section .product-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,245px),1fr)); }
.similar-section .product-card { max-width:none; }
/* Shop form and catalog: responsive, readable on both Pokemon and Magic. */
.shop-section .shop-toolbar { display:flex; flex-wrap:wrap; align-items:stretch; gap:14px; }
.shop-section .filter-pills { flex-wrap:wrap; gap:7px; }
.shop-section .filter-tools { min-width:min(100%,350px); flex:1; justify-content:flex-end; }
.shop-section .filter-tools .search-wrap { flex:1; min-width:170px; }
.shop-section .filter-tools .search-wrap input { width:100%; min-width:0; }
.shop-section .filter-tools select { max-width:100%; }
.shop-section .v21-filter-drawer { flex-basis:100%; min-width:0; }
.shop-section .kardova-advanced-filters { max-width:100%; }
.shop-section .kardova-advanced-filters > label { min-width:0; }
.shop-section .kardova-advanced-filters input,.shop-section .kardova-advanced-filters select { max-width:100%; }
.shop-section .v18-shop-controls { flex-wrap:wrap; gap:10px; }
.shop-section .v18-shop-presets { flex-wrap:wrap; }
.shop-section .product-grid.shop-products { grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; }
.shop-section .product-card { min-width:0; }
.shop-section .product-name { overflow-wrap:anywhere; }
/* Interactions and reduced motion */
.v16-product-detail :is(button,a):focus-visible,.v42p-lower :is(button,a):focus-visible,.shop-section :is(button,a,input,select):focus-visible { outline:2px solid #ffce7b; outline-offset:3px; }
@media (max-width:1080px) {
 .v16-product-detail.product-detail { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
 .shop-section .product-grid.shop-products { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width:800px) {
 .v16-product-detail.product-detail { grid-template-columns:minmax(0,1fr); gap:24px; }
 .v16-product-detail .gallery-main { max-height:560px; aspect-ratio:1.05; }
 .v42p-lower { grid-template-columns:minmax(0,1fr); padding-top:0; }
 .v42p-lower .v15-passport-panel,.v42p-lower .v13-buyer-assurance,.v42p-lower .v20-product-discovery,.v42p-lower .v16-support-links,.v42p-lower .condition-disclosure,.v42p-lower .product-shipping-points,.v42p-lower .detail-desc { grid-column:1; }
 .shop-section .product-grid.shop-products { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .shop-section .filter-tools { justify-content:stretch; }
}
@media (max-width:540px) {
 .v16-product-detail .gallery-main { aspect-ratio:0.95; max-height:460px; }
 .v16-product-detail .v9-product-actions .btn { flex:1 1 125px; padding-inline:10px; }
 .v42p-lower .v15-passport-panel { grid-template-columns:1fr; }
 .v42p-lower .v13-buyer-assurance { grid-template-columns:1fr; }
 .v42p-lower .v16-support-links { grid-template-columns:1fr; }
 .shop-section .filter-tools { flex-wrap:wrap; }
 .shop-section .filter-tools .search-wrap { flex-basis:100%; }
 .shop-section .product-grid.shop-products { gap:10px; }
 .similar-section .product-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
 .similar-section .product-card .product-name { font-size:clamp(16px,4.5vw,23px); }
 body:has(.v16-product-detail) .container.v19-collector-tools { padding:17px; }
 .v19-collector-tools form { align-items:stretch; }
 .v19-collector-tools form > label { min-width:0; }
}
@media (max-width:370px) { .shop-section .product-grid.shop-products,.similar-section .product-grid { grid-template-columns:minmax(0,1fr); } }
@media (prefers-reduced-motion:reduce) { .v16-product-detail .product-card,.similar-section .product-card,.shop-section .product-card { transition:none; animation:none; } }

/* 42p3: Shop-only layout reconciliation. Keep collector shortcuts within the same centered
   grid as the hero, category lanes and shop controls. The older .v37-lanes has
   margin:20px 0; nesting it inside .container stops it overriding auto centering. */
.v42p-shop-shortcuts { display:flex; align-items:center; justify-content:space-between; gap:12px 20px;
  flex-wrap:wrap; padding-block:18px 4px; }
.v42p-shop-shortcuts-label { color:#d4b783; font-size:10px; letter-spacing:.16em; font-weight:850; }
.v42p-shop-shortcuts .v37-lanes { margin:0; display:flex; gap:9px; justify-content:flex-end; flex-wrap:wrap; }
.v42p-shop-shortcuts .v37-lanes a { min-height:42px; display:inline-flex; align-items:center;
  padding:9px 13px; line-height:1.4; font-size:11px; }
/* The active nav treatment follows the server-rendered category, not pathname alone. */
.site-header .main-nav > a[aria-current="page"] { color:#f9d393; }
.site-header .main-nav > a[aria-current="page"]::after { content:""; position:absolute;
  bottom:-14px; left:0; width:100%; height:2px; background:#e7bc77; }
@media (max-width:970px) {
  .site-header .main-nav > a[aria-current="page"] { border-inline-start:3px solid #e7bc77;
    background:rgba(226,182,102,.10); padding-inline-start:12px; }
  .site-header .main-nav > a[aria-current="page"]::after { display:none; }
}
@media (max-width:640px) {
 .v42p-shop-shortcuts { align-items:stretch; padding-block:12px 4px; }
 .v42p-shop-shortcuts .v37-lanes { justify-content:flex-start; width:100%; }
 .v42p-shop-shortcuts .v37-lanes a { flex:1 1 150px; justify-content:center; text-align:center; }
}

/* Put actual product listings immediately after filters. Secondary research tools are
   preserved (not duplicated) in a native, keyboard-accessible detail panel below results. */
.shop-section .result-count { margin-block:19px 8px; }
.shop-section .product-grid.shop-products { margin-top:6px; }
.v42p-collector-workspace { margin:clamp(28px,4vw,54px) 0 24px; border:1px solid rgba(223,183,112,.4);
  border-radius:12px; background:linear-gradient(145deg,#131f33,#0c1526); overflow:hidden; }
.v42p-collector-workspace>summary { display:flex; justify-content:space-between; align-items:center;
  gap:12px; flex-wrap:wrap; cursor:pointer; padding:17px 20px;
  font-size:12px; letter-spacing:.08em; font-weight:900; color:#f7d89f; }
.v42p-collector-workspace>summary::marker { color:#f7d89f; }
.v42p-collector-workspace>summary small { font-size:11px; color:#c7d2e7; letter-spacing:0; font-weight:500; }
.v42p-collector-workspace[open]>summary { border-bottom:1px solid rgba(223,183,112,.3); }
.v42p-collector-workspace-content { display:grid; gap:16px; padding:18px; }
.v42p-collector-workspace-content > * { min-width:0; max-width:100%; margin-block:0; }
.v42p-collector-workspace :is(summary,a,button,input,select):focus-visible { outline:2px solid #ffce7b; outline-offset:3px; }
@media(max-width:640px) {
 .v42p-collector-workspace>summary { padding:14px; }
 .v42p-collector-workspace-content { padding:12px; }
}

/* V47.2 UX Patch 2: responsive inline price filter feedback. */
.shop-section .v47p2-price-error{grid-column:1/-1;flex-basis:100%;width:100%;margin:4px 0;color:#ffe4ad;font-size:12px;padding:10px 12px;border:1px solid #b77840;border-radius:10px;background:#342219}
.shop-section .v47p2-price-error[hidden]{display:none!important}
