/* RCB Jersey 3D preview - scoped to the existing jersey product only. */
.product-card.jersey-3d-card {
  --jersey-rx: 0deg;
  --jersey-ry: 0deg;
  --jersey-mx: 50%;
  --jersey-my: 42%;
  --jersey-z: 0px;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(190px,.42fr) minmax(430px,1.58fr);
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "mark stage"
    "copy stage"
    "end stage";
  gap: 22px 42px;
  align-items: start;
  min-height: clamp(520px,48vw,720px);
  padding: clamp(28px,3vw,46px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at var(--jersey-mx) var(--jersey-my),rgba(236,207,151,.12),transparent 30%),
    linear-gradient(118deg,rgba(64,25,38,.94),rgba(18,22,20,.94) 50%,rgba(14,43,34,.88));
  perspective: 1700px;
  transform: none;
  transition: border-color .28s, box-shadow .35s;
}
.product-card.jersey-3d-card:hover {
  transform: none;
  border-color: rgba(224,190,129,.68);
  box-shadow: 0 35px 100px rgba(0,0,0,.28), inset 0 1px 0 rgba(248,222,177,.05);
}
.product-card.jersey-3d-card:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
}
.product-card.jersey-3d-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(90deg,transparent 0 47%,rgba(222,183,116,.06) 50%,transparent 53%),
    radial-gradient(circle at 77% 14%,rgba(221,181,111,.12),transparent 25%);
}
.product-card.jersey-3d-card::after {
  content: '';
  position: absolute;
  right: -8%;
  top: -18%;
  width: 54%;
  aspect-ratio: 1;
  border: 1px solid rgba(213,177,112,.08);
  border-radius: 50%;
  transform: rotateX(68deg);
  pointer-events: none;
}
.product-card.jersey-3d-card > * { position: relative; z-index: 1; }
.product-card.jersey-3d-card .product-mark {
  grid-area: mark;
  margin: 0;
  width: 82px;
  height: 94px;
  align-self: end;
  background: linear-gradient(150deg,rgba(112,49,60,.88),rgba(19,42,35,.92));
  box-shadow: 0 18px 45px rgba(0,0,0,.24), inset 0 1px 0 rgba(240,207,146,.08);
}
.product-card.jersey-3d-card .product-info { grid-area: copy; align-self: center; }
.product-card.jersey-3d-card .product-info h3 {
  font-size: clamp(38px,4.3vw,66px);
  line-height: .93;
  max-width: 260px;
  margin-top: 14px;
}
.product-card.jersey-3d-card .product-state {
  color: var(--gold-bright);
  margin-top: 16px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}
.product-card.jersey-3d-card .product-end {
  grid-area: end;
  align-self: end;
  justify-self: start;
}
.product-card.jersey-3d-card .product-arrow {
  width: 52px;
  height: 52px;
  background: rgba(17,20,18,.28);
}

.jersey-concept-badge{
  display:inline-flex;
  align-items:center;
  width:max-content;
  margin-top:15px;
  padding:8px 11px;
  border:1px solid rgba(220,184,120,.30);
  color:var(--gold-bright);
  background:rgba(18,20,18,.34);
  font:800 7px/1 var(--body);
  letter-spacing:1.5px;
  text-transform:uppercase;
}

.jersey-3d-stage {
  grid-area: stage;
  display: block;
  position: relative;
  width: 100%;
  max-width: 900px;
  justify-self: end;
  align-self: center;
  aspect-ratio: 1.16;
  perspective: 1400px;
  pointer-events: none;
  transform-style: preserve-3d;
}
.jersey-3d-shell {
  position: absolute;
  inset: 2.5% 2% 3.5%;
  display: block;
  transform-style: preserve-3d;
  transform: rotateX(var(--jersey-rx)) rotateY(var(--jersey-ry)) translate3d(0,0,var(--jersey-z));
  transition: transform .7s cubic-bezier(.18,.74,.2,1), filter .35s;
  will-change: transform;
}
.jersey-3d-shadow {
  position: absolute;
  inset: 11% 4% 4% 7%;
  transform: translate3d(26px,32px,-55px);
  background: rgba(5,7,6,.72);
  filter: blur(28px);
  opacity: .74;
}
.jersey-hero-frame {
  position: absolute;
  inset: 0 0 21.5% 0;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(227,194,135,.55);
  background: #1d1515;
  transform: translateZ(34px);
  box-shadow: 0 25px 65px rgba(0,0,0,.36), inset 0 0 0 1px rgba(255,235,194,.04);
}
.jersey-hero-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(118deg,rgba(255,237,198,.08),transparent 24% 64%,rgba(95,28,42,.15)),
    radial-gradient(circle at var(--jersey-mx) var(--jersey-my),rgba(255,235,190,.20),transparent 24%);
  mix-blend-mode: screen;
  opacity: .72;
}
.jersey-hero-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
  filter: saturate(.94) contrast(1.02) brightness(.96);
  transform: scale(1.004);
}
.jersey-detail-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18.5%;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 8px;
  transform: translateZ(56px);
}
.jersey-detail-tile {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(211,174,109,.38);
  background: rgba(28,16,19,.85);
  box-shadow: 0 15px 35px rgba(0,0,0,.24);
  transform: translateY(0) rotateX(-1.5deg);
  transition: transform .55s cubic-bezier(.18,.74,.2,1),border-color .3s;
}
.jersey-detail-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.92) contrast(1.04);
}
.jersey-3d-card:hover .jersey-detail-tile:nth-child(1) { transform: translate3d(-3px,-3px,8px) rotateY(1.5deg); }
.jersey-3d-card:hover .jersey-detail-tile:nth-child(2) { transform: translate3d(-1px,-6px,15px) rotateY(.5deg); }
.jersey-3d-card:hover .jersey-detail-tile:nth-child(3) { transform: translate3d(1px,-6px,15px) rotateY(-.5deg); }
.jersey-3d-card:hover .jersey-detail-tile:nth-child(4) { transform: translate3d(3px,-3px,8px) rotateY(-1.5deg); }
.jersey-3d-edge {
  position: absolute;
  inset: -5px -6px 20% 6px;
  display: block;
  border-right: 7px solid rgba(61,35,31,.62);
  border-bottom: 7px solid rgba(84,48,36,.48);
  transform: translateZ(4px);
  opacity: .9;
}
.jersey-3d-glint {
  position: absolute;
  inset: 0;
  display: block;
  transform: translateZ(74px);
  background: linear-gradient(112deg,transparent 32%,rgba(255,225,165,.18) 47%,transparent 60%);
  background-size: 210% 100%;
  background-position: calc(100% - var(--jersey-mx)) 0;
  mix-blend-mode: screen;
  opacity: .58;
  pointer-events: none;
}
@media (hover:hover) and (pointer:fine) {
  html:not(.motion-off) .jersey-3d-card.jersey-in-view .jersey-3d-shell { animation: jersey-idle 7.5s ease-in-out infinite; }
  html:not(.motion-off) .jersey-3d-card.jersey-engaged .jersey-3d-shell { animation: none; }
}
@keyframes jersey-idle {
  0%,100% { transform: rotateX(0deg) rotateY(-1.1deg) translate3d(0,0,0); }
  50% { transform: rotateX(-.65deg) rotateY(1.2deg) translate3d(0,-3px,5px); }
}
html.motion-off .jersey-3d-card,
html.motion-off .jersey-3d-shell,
html.motion-off .jersey-detail-tile { transition: none !important; animation: none !important; }
html.motion-off .jersey-3d-shell { transform: none !important; }
html.motion-off .jersey-3d-glint { opacity: .2; }
@media (prefers-reduced-motion:reduce) {
  .jersey-3d-shell,.jersey-detail-tile { transition: none !important; animation: none !important; }
  .jersey-3d-shell { transform: none !important; }
}
@media(max-width:1100px) {
  .product-card.jersey-3d-card {
    grid-template-columns: minmax(170px,.38fr) minmax(390px,1.62fr);
    gap: 20px 28px;
    min-height: 560px;
    padding: 30px;
  }
  .product-card.jersey-3d-card .product-info h3 { font-size: clamp(36px,5vw,54px); }
}
@media(max-width:850px) {
  .product-card.jersey-3d-card {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "mark end"
      "copy copy"
      "stage stage"
      ". .";
    gap: 17px 18px;
    min-height: 0;
    padding: 24px 22px 27px;
  }
  .product-card.jersey-3d-card .product-mark { width: 62px; height: 72px; }
  .product-card.jersey-3d-card .product-info h3 { max-width: none; font-size: clamp(34px,9vw,50px); }
  .product-card.jersey-3d-card .product-end { grid-area: end; justify-self: end; align-self: center; }
  .jersey-3d-stage { max-width: 720px; justify-self: center; margin-top: 4px; }
}
@media(max-width:480px) {
  .product-card.jersey-3d-card { padding: 19px 15px 21px; }
  .product-card.jersey-3d-card .product-info h3 { font-size: clamp(30px,10vw,42px); margin-top: 9px; }
  .product-card.jersey-3d-card .product-state { margin-top: 10px; }
  .product-card.jersey-3d-card .product-mark { width: 54px; height: 64px; }
  .product-card.jersey-3d-card .product-arrow { width: 38px; height: 38px; }
  .jersey-3d-stage { aspect-ratio: 1.1; }
  .jersey-detail-rail { gap: 4px; }
  .jersey-3d-shell { inset: 2% 0 3%; }
}
/* Keep the Jersey layout authoritative over the legacy single-product rule. */
#product-grid .product-card.jersey-3d-card { padding: clamp(28px,3vw,46px); gap: 22px 42px; }
@media(max-width:1100px) { #product-grid .product-card.jersey-3d-card { padding: 30px; gap: 20px 28px; } }
@media(max-width:850px) { #product-grid .product-card.jersey-3d-card { padding: 24px 22px 27px; gap: 17px 18px; } }
@media(max-width:480px) { #product-grid .product-card.jersey-3d-card { padding: 19px 15px 21px; } }

/* v3.12 real GLB viewer — loaded only after the Jersey card is opened. */
.jersey-view-chip{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 14px;border:1px solid rgba(224,190,129,.28);background:rgba(15,20,17,.42);color:var(--gold-bright);font-size:8px;font-weight:800;letter-spacing:1.4px;text-transform:uppercase;white-space:nowrap}
.jersey-model-dialog{width:min(1280px,calc(100vw - 28px));max-height:min(92svh,930px);padding:0;overflow:hidden;border:1px solid rgba(214,179,120,.36);color:var(--text);background:linear-gradient(145deg,#321722 0%,#111d1a 56%,#0c1715 100%);box-shadow:0 46px 180px rgba(0,0,0,.58),inset 0 1px 0 rgba(255,236,197,.04)}
.jersey-model-dialog::backdrop{background:rgba(5,5,8,.82);backdrop-filter:blur(13px)}
.jersey-model-dialog .jersey-model-close{position:absolute;z-index:8;top:12px;right:14px;width:42px;height:42px;border:1px solid rgba(225,190,129,.26);background:rgba(13,18,16,.58);backdrop-filter:blur(12px);color:#f3e5d7;font-size:23px;line-height:1;cursor:pointer}
.jersey-model-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(330px,.7fr);height:min(86svh,850px);min-height:0}
.jersey-model-stage{position:relative;min-width:0;min-height:0;height:100%;overflow:hidden;isolation:isolate;background:radial-gradient(circle at 49% 17%,rgba(235,201,143,.15),transparent 25%),radial-gradient(circle at 50% 80%,rgba(62,127,98,.18),transparent 30%),linear-gradient(140deg,rgba(56,22,34,.9),rgba(11,21,19,.98) 58%,rgba(8,24,20,.99))}
.jersey-model-stage::before{content:'';position:absolute;inset:0;z-index:0;pointer-events:none;background:linear-gradient(90deg,transparent 0 49.8%,rgba(237,200,136,.045) 50%,transparent 50.2%),radial-gradient(circle at 50% 48%,transparent 0 42%,rgba(230,191,126,.075) 42.3%,transparent 42.7%),linear-gradient(180deg,rgba(255,255,255,.015),transparent 32%)}
.jersey-model-stage::after{content:'';position:absolute;width:70%;aspect-ratio:1;left:15%;bottom:-50%;border:1px solid rgba(222,183,116,.13);border-radius:50%;transform:rotateX(72deg);box-shadow:0 0 110px rgba(210,170,104,.05);pointer-events:none}
.jersey-model-stage-head{position:absolute;z-index:5;top:25px;left:28px;display:grid;gap:8px;pointer-events:none}.jersey-model-stage-head strong{font:500 clamp(18px,1.8vw,28px)/1 var(--display);letter-spacing:.05em}.jersey-model-canvas{position:absolute;inset:0;z-index:2;width:100%;height:100%;display:block;cursor:grab;touch-action:none;outline:none}.jersey-model-canvas.is-dragging{cursor:grabbing}.jersey-model-canvas:focus-visible{box-shadow:inset 0 0 0 2px rgba(235,201,143,.58)}
.jersey-model-floor{position:absolute;z-index:1;left:50%;bottom:10.5%;width:min(51%,390px);height:55px;border-radius:50%;transform:translateX(-50%);background:radial-gradient(ellipse,rgba(0,0,0,.58),rgba(0,0,0,.22) 44%,transparent 73%);filter:blur(10px);pointer-events:none}
.jersey-model-drag-cue{position:absolute;z-index:5;left:50%;bottom:24px;transform:translateX(-50%);display:flex;align-items:center;gap:11px;padding:9px 14px;border:1px solid rgba(220,184,119,.16);background:rgba(10,15,14,.44);backdrop-filter:blur(10px);color:#c8b69c;font-size:8px;font-weight:800;letter-spacing:1.6px;white-space:nowrap}.jersey-model-drag-cue svg{width:46px;height:12px;fill:none;stroke:var(--gold);stroke-width:1.1;stroke-linecap:round;stroke-linejoin:round}
.jersey-model-loading{position:absolute;z-index:6;inset:0;display:grid;place-content:center;justify-items:center;gap:13px;padding:24px;text-align:center;background:radial-gradient(circle at 50% 43%,rgba(108,44,59,.26),transparent 34%),rgba(11,15,14,.22);backdrop-filter:blur(4px)}.jersey-model-loading[hidden]{display:none}.jersey-loader-crest{display:grid;place-items:center;width:62px;height:62px;border:1px solid rgba(223,188,126,.32);transform:rotate(45deg);font:800 11px/1 var(--body);letter-spacing:1px;color:var(--gold-bright);background:rgba(31,19,22,.58);box-shadow:0 0 60px rgba(202,157,89,.08)}.jersey-loader-crest i{display:block;font-style:normal;transform:rotate(-45deg)}.jersey-model-load-label{margin-top:9px;font-size:8px;font-weight:800;letter-spacing:1.8px;color:#d7c5ad}.jersey-model-load-bar{width:min(260px,58vw);height:2px;background:rgba(226,193,137,.12);overflow:hidden}.jersey-model-load-bar i{display:block;width:100%;height:100%;transform:scaleX(0);transform-origin:left;background:linear-gradient(90deg,#8b4a58,var(--gold-bright));transition:transform .16s linear}.jersey-model-load-pct{font:600 12px/1 var(--body);letter-spacing:1.6px;color:var(--gold)}
.jersey-model-fallback{position:absolute;z-index:4;inset:82px 28px 42px;display:grid;place-items:center;align-content:center;gap:14px;text-align:center}.jersey-model-fallback[hidden]{display:none}.jersey-model-fallback img{display:block;max-width:min(92%,720px);max-height:62svh;object-fit:contain;border:1px solid rgba(222,183,116,.18)}.jersey-model-fallback span{max-width:440px;font-size:10px;line-height:1.55;letter-spacing:.3px;color:var(--muted)}
.jersey-model-panel{position:relative;z-index:3;display:grid;align-content:start;gap:20px;padding:49px 34px 30px;overflow:auto;border-left:1px solid rgba(214,179,120,.12);background:linear-gradient(180deg,rgba(255,255,255,.015),transparent 60%)}.jersey-model-panel,.jersey-model-dialog{scrollbar-width:thin;scrollbar-color:rgba(217,180,118,.34) transparent}.jersey-model-panel::-webkit-scrollbar,.jersey-model-dialog::-webkit-scrollbar{width:5px;height:5px}.jersey-model-panel::-webkit-scrollbar-track,.jersey-model-dialog::-webkit-scrollbar-track{background:transparent}.jersey-model-panel::-webkit-scrollbar-thumb,.jersey-model-dialog::-webkit-scrollbar-thumb{background:rgba(217,180,118,.3);border-radius:10px}.jersey-model-panel h2{margin:-2px 0 0;font:600 clamp(46px,4.2vw,72px)/.9 var(--display);letter-spacing:-.01em}.jersey-model-panel>p{margin:0;color:#d1c0c3;font-size:12px;line-height:1.75}.jersey-model-views{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.jersey-model-views button{min-height:43px;padding:0 9px;border:1px solid rgba(214,179,120,.18);background:rgba(14,20,18,.47);color:#d7cac6;font-size:8px;font-weight:800;letter-spacing:1.2px;text-transform:uppercase;cursor:pointer;transition:border-color .2s,color .2s,background .2s}.jersey-model-views button:hover,.jersey-model-views button[aria-pressed=true]{border-color:rgba(234,199,139,.63);color:var(--gold-bright);background:rgba(78,31,44,.56)}
.jersey-model-metrics{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid rgba(214,179,120,.13);background:rgba(16,21,19,.34)}.jersey-model-metrics span{display:grid;gap:6px;padding:14px 12px;border-right:1px solid rgba(214,179,120,.1)}.jersey-model-metrics span:last-child{border-right:0}.jersey-model-metrics small{font-size:7px;font-weight:800;letter-spacing:1.35px;color:#9e8d82}.jersey-model-metrics b{font:600 15px/1 var(--display);letter-spacing:.035em;color:#ead8c2}.jersey-model-spec{display:grid;gap:7px;padding:17px 18px;border:1px solid rgba(214,179,120,.13);background:rgba(16,21,19,.38)}.jersey-model-spec span{font-size:8px;letter-spacing:1.5px;color:var(--gold);font-weight:800}.jersey-model-spec strong{font:600 22px/1 var(--display);letter-spacing:.03em}.jersey-model-spec small{font-size:10px;line-height:1.65;color:#aa9e9d}.jersey-model-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.jersey-model-details span{position:relative;overflow:hidden;min-height:118px;border:1px solid rgba(214,179,120,.11);background:#1a1115}.jersey-model-details img{width:100%;height:100%;min-height:118px;display:block;object-fit:cover;filter:saturate(.92) contrast(1.03)}.jersey-model-details b{position:absolute;left:9px;bottom:8px;padding:5px 7px;background:rgba(10,10,12,.72);color:var(--gold-bright);font-size:7px;letter-spacing:1.1px}
html.motion-off .jersey-model-views button{transition:none}.jersey-model-dialog[data-jersey-ready="true"] .jersey-model-stage{box-shadow:inset 0 0 120px rgba(205,164,102,.035)}
@media(prefers-reduced-motion:reduce){.jersey-model-views button,.jersey-model-load-bar i{transition:none}}
@media(max-width:980px){.jersey-model-dialog{overflow:auto}.jersey-model-layout{grid-template-columns:1fr;height:auto;min-height:0}.jersey-model-stage{height:auto;min-height:560px}.jersey-model-panel{border-left:0;border-top:1px solid rgba(214,179,120,.12);overflow:visible}}
@media(max-width:760px){.jersey-view-chip{min-height:29px;padding:0 10px}.jersey-model-dialog{width:calc(100vw - 10px);max-height:95svh}.jersey-model-dialog .jersey-model-close{top:max(9px,env(safe-area-inset-top));right:10px;width:44px;height:44px}.jersey-model-stage{min-height:500px}.jersey-model-stage-head{top:18px;left:18px;gap:5px}.jersey-model-drag-cue{bottom:14px;padding:7px 11px}.jersey-model-panel{padding:28px 18px calc(22px + env(safe-area-inset-bottom));gap:16px}.jersey-model-panel h2{font-size:50px}.jersey-model-views{grid-template-columns:repeat(4,1fr)}.jersey-model-details span,.jersey-model-details img{min-height:102px}.jersey-model-metrics b{font-size:13px}}
@media(max-width:460px){.jersey-model-stage{min-height:430px}.jersey-model-panel h2{font-size:44px}.jersey-model-views{grid-template-columns:repeat(2,1fr)}.jersey-model-details{grid-template-columns:repeat(2,1fr)}.jersey-model-metrics{grid-template-columns:1fr}.jersey-model-metrics span{grid-template-columns:58px 1fr;align-items:center;border-right:0;border-bottom:1px solid rgba(214,179,120,.1);padding:11px 12px}.jersey-model-metrics span:last-child{border-bottom:0}.jersey-model-load-bar{width:min(230px,64vw)}}
