
.detail-hero{ padding-top:clamp(2.4rem,5vw,4.8rem); }
.detail-layout{ display:grid; grid-template-columns:minmax(260px,.9fr) minmax(0,1.1fr); gap:clamp(1.4rem,5vw,4rem); align-items:start; }
.detail-layout > *, .detail-grid > *{ min-width:0; }
.detail-summary h1,.detail-panel{ overflow-wrap:anywhere; }
.detail-media{ min-height:clamp(340px,48vw,560px); display:grid; place-items:center; padding:1.4rem; background:#fff; overflow:hidden; }
.detail-media img{ max-width:100%; max-height:520px; width:auto; height:auto; object-fit:contain; mix-blend-mode:multiply; }
.detail-summary h1{ font-size:clamp(2rem,4vw,4.6rem); text-transform:uppercase; max-width:13ch; margin:.5rem 0 1rem; }
.detail-product-code{ margin:.35rem 0 .8rem; color:var(--ink-2,#465a60); font-family:var(--ff-mono); font-size:.7rem; letter-spacing:.04em; }
.detail-subtitle{ color:var(--ink-2,#465a60); font-size:1rem; margin:.35rem 0; }
.detail-variant-fields{ display:grid; gap:.85rem; }
.detail-variant-fields select{ min-height:48px; }
.detail-buybox .shop-add:disabled{ opacity:.5; cursor:not-allowed; }
.prod-buy .add[data-has-variants="true"]{ white-space:normal; line-height:1.25; font-size:.66rem; letter-spacing:.05em; }
.product-detail-copy img{ max-width:100%; height:auto; }
.product-detail-copy table{ display:block; max-width:100%; overflow-x:auto; }
.detail-gallery{ min-width:0; }
.detail-thumbnails{ display:flex; flex-wrap:wrap; gap:.65rem; margin-top:.8rem; }
.detail-thumbnails button{ width:76px; height:76px; padding:.4rem; border:1px solid var(--rule,#d5e0e4); border-radius:var(--r-sm); background:#fff; cursor:pointer; }
.detail-thumbnails button[aria-pressed="true"]{ border:2px solid var(--accent); }
.detail-thumbnails img{ display:block; width:100%; height:100%; object-fit:contain; }
.detail-zoom{ display:grid; place-items:center; width:100%; padding:0; border:0; background:transparent; cursor:zoom-in; min-width:0; }
.detail-lightbox{ width:min(94vw,1100px); max-width:94vw; height:min(90dvh,900px); max-height:90dvh; padding:3.25rem 1rem 4rem; border:0; border-radius:8px; background:#fff; overflow:hidden; }
.detail-lightbox::backdrop{ background:rgba(5,10,12,.85); }
.detail-lightbox > img{ display:block; width:100%; height:100%; max-height:none; max-width:none; object-fit:contain; touch-action:pan-y; }
.lightbox-close,.lightbox-controls button{ display:grid; place-items:center; border:1px solid #c4d3d7; border-radius:3px; background:#f2f7f8; color:#0b1214; min-width:44px; min-height:44px; font:1.5rem Arial,sans-serif; cursor:pointer; }
.lightbox-close{ position:absolute; right:.5rem; top:.5rem; }
.lightbox-controls{ position:absolute; bottom:.65rem; left:1rem; right:1rem; display:flex; align-items:center; justify-content:center; gap:1rem; }
.lightbox-count{ font:.8rem var(--ff-mono); color:#465a60; }
.detail-lightbox [hidden]{ display:none; }
.detail-back{ display:inline-flex; margin-bottom:1.1rem; color:var(--accent,#0E6B75); text-decoration:none; font-size:.72rem; letter-spacing:.12em; text-transform:uppercase; }
.detail-price{ display:flex; flex-wrap:wrap; gap:.8rem; align-items:baseline; margin:1.2rem 0 .4rem; }
.detail-price .price-now{ font-size:clamp(1.25rem,2vw,1.7rem); }
.detail-stock{ color:var(--accent,#0E6B75); font-family:var(--ff-mono); font-size:.75rem; letter-spacing:.12em; text-transform:uppercase; }
.detail-buybox{ margin-top:1.4rem; padding:1rem; display:grid; gap:.85rem; }
.detail-actions{ display:flex; flex-wrap:wrap; gap:.7rem; }
.shop-field{ display:grid; gap:.35rem; }
.shop-field span{ font-family:var(--ff-mono); font-size:.62rem; letter-spacing:.14em; text-transform:uppercase; color:var(--ink-3,#7A8D93); }
.shop-field select,.shop-field input,.checkout-form input,.checkout-form textarea{
  width:100%; border:1px solid var(--rule,#D5E0E4); border-radius:var(--r-sm,2px);
  padding:.78rem .85rem; font:inherit; background:var(--bg-2,#fff); color:var(--ink,#0C1417);
}
.shop-field--qty input{ max-width:8rem; }
.shop-note,.source-line{ color:var(--ink-2,#465A60); font-size:.86rem; line-height:1.55; }
.detail-grid{ display:grid; grid-template-columns:minmax(0,1fr); gap:18px; align-items:start; }
.detail-panel{ border:1px solid var(--rule,#D5E0E4); border-radius:var(--r-md,6px); background:var(--surface,#fff); padding:clamp(1rem,2.5vw,1.6rem); }
.detail-panel h2{ font-size:clamp(1.45rem,2vw,2.2rem); text-transform:uppercase; margin-bottom:1rem; }
.product-detail-copy{ color:var(--ink-2,#465A60); line-height:1.65; white-space:normal; }
.product-detail-copy .description-points{ display:grid; gap:.65rem; margin:.9rem 0 1.25rem; padding-left:1.25rem; }
.product-detail-copy .description-points li{ margin:0; padding-left:.2rem; font:inherit; }
.product-detail-copy .description-points li::marker{ color:var(--accent,#0e6b75); }
.detail-panel .product-detail-copy h3{ margin:1.5rem 0 .65rem; font-family:var(--ff-body,Arial,sans-serif); font-size:clamp(1.05rem,1.8vw,1.3rem); line-height:1.3; font-weight:700; text-transform:none; letter-spacing:normal; }
.product-detail-copy > :first-child{ margin-top:0; }
.product-detail-copy > :last-child{ margin-bottom:0; }
.product-detail-copy > img{ display:block; margin:1rem 0; max-height:480px; object-fit:contain; }
.product-detail-copy p,.product-detail-copy ul,.product-detail-copy ol,.product-detail-copy table{ margin:.9rem 0; }
.product-detail-copy ul,.product-detail-copy ol{ padding-left:1.2rem; }
.product-detail-copy table{ width:100%; border-collapse:collapse; font-size:.9rem; }
.product-detail-copy td,.product-detail-copy th{ border:1px solid var(--rule-soft,#E6EDEF); padding:.55rem .65rem; text-align:left; }
.detail-facts{ display:grid; gap:.65rem; margin:0; }
.detail-facts div{ display:grid; grid-template-columns:1fr; gap:.2rem; border-bottom:1px solid var(--rule-soft,#E6EDEF); padding-bottom:.65rem; }
.detail-facts dt{ font-family:var(--ff-mono); font-size:.62rem; letter-spacing:.13em; text-transform:uppercase; color:var(--ink-3,#7A8D93); }
.detail-facts dd{ margin:0; color:var(--ink,#0C1417); }
.cart-overlay{ position:fixed; inset:0; background:rgba(5,10,12,.38); z-index:180; opacity:0; pointer-events:none; transition:opacity .2s ease; }
.cart-overlay.is-open{ opacity:1; pointer-events:auto; }
.cart-drawer{ position:fixed; right:0; top:0; bottom:0; width:min(440px,100vw); background:var(--surface,#fff); z-index:181; transform:translateX(100%); transition:transform .22s ease; display:flex; flex-direction:column; box-shadow:-24px 0 55px rgba(8,18,22,.18); }
.cart-drawer.is-open{ transform:none; }
.cart-head,.cart-foot{ padding:1rem; border-bottom:1px solid var(--rule,#D5E0E4); display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.cart-foot{ border-top:1px solid var(--rule,#D5E0E4); border-bottom:0; display:grid; }
.cart-items{ padding:1rem; overflow:auto; display:grid; gap:.8rem; }
.cart-item{ display:grid; grid-template-columns:74px minmax(0,1fr); gap:.8rem; border:1px solid var(--rule-soft,#E6EDEF); padding:.65rem; border-radius:var(--r-md,6px); }
.cart-item img{ width:74px; height:74px; object-fit:contain; background:#fff; border:1px solid var(--rule-soft,#E6EDEF); }
.cart-item h3{ font-size:.92rem; line-height:1.25; margin:0 0 .25rem; font-family:var(--ff-body); letter-spacing:0; }
.cart-item h3 a{ color:inherit; text-decoration:none; }
.cart-item-meta{ color:var(--ink-2,#465A60); font-size:.8rem; }
.cart-item-actions{ display:flex; gap:.35rem; align-items:center; margin-top:.45rem; }
.cart-item-actions button{ border:1px solid var(--rule,#D5E0E4); background:var(--bg,#F2F6F8); color:var(--ink,#0C1417); width:44px; height:44px; cursor:pointer; }
.cart-empty{ color:var(--ink-2,#465A60); padding:1rem; }
.cart-total{ display:flex; justify-content:space-between; font-family:var(--ff-display); font-weight:800; font-size:1.3rem; }
.cart-close{ border:1px solid var(--rule,#D5E0E4); background:transparent; cursor:pointer; width:34px; height:34px; }
.checkout-layout{ display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,.72fr); gap:18px; align-items:start; }
.checkout-form{ display:grid; gap:.85rem; }
.checkout-message{ min-height:1.4rem; color:var(--accent,#0E6B75); font-weight:700; }
.checkout-message.is-error{ color:#a33524; }
.checkout-honeypot{ position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.checkout-form button:disabled{ opacity:.65; cursor:wait; }
@media (max-width:880px){ .detail-layout,.detail-grid,.checkout-layout{ grid-template-columns:1fr; } .detail-summary h1{ max-width:none; } }


.toast.shop-success{
  background:#157347;
  color:#fff;
  border-color:#0F5B38;
  box-shadow:0 16px 42px rgba(21,115,71,.28);
}
.toast.shop-success::before{
  content:"";
  width:.62rem; height:.62rem; border-radius:999px;
  display:inline-block; margin-right:.55rem;
  background:#A8F0C6;
  box-shadow:0 0 0 6px rgba(168,240,198,.18);
  vertical-align:middle;
}
.cartbtn{ overflow:visible; }
.cartbtn.is-bumping{
  animation:cartButtonBump .48s cubic-bezier(.2,.9,.2,1);
  border-color:#157347;
  color:#157347;
}
.cartbtn.is-bumping .cnt{
  animation:cartBadgePop .58s cubic-bezier(.2,.9,.2,1);
  background:#157347;
  color:#fff;
}
.cartbtn.is-bumping::after{
  content:attr(data-cart-feedback);
  position:absolute;
  top:calc(100% + 8px);
  right:.25rem;
  min-width:2.15rem;
  text-align:center;
  padding:.38rem .55rem;
  border-radius:999px;
  background:#157347;
  color:#fff;
  font-family:var(--ff-mono);
  font-size:.68rem;
  font-weight:700;
  letter-spacing:.08em;
  box-shadow:0 12px 28px rgba(21,115,71,.28);
  animation:cartFeedbackFloat .95s ease both;
  pointer-events:none;
}
@keyframes cartButtonBump{
  0%{ transform:translateY(0) scale(1); }
  42%{ transform:translateY(-2px) scale(1.035); }
  100%{ transform:translateY(0) scale(1); }
}
@keyframes cartBadgePop{
  0%{ transform:scale(.82); }
  45%{ transform:scale(1.24); }
  100%{ transform:scale(1); }
}
@keyframes cartFeedbackFloat{
  0%{ opacity:0; transform:translateY(-4px) scale(.9); }
  18%{ opacity:1; transform:translateY(0) scale(1); }
  100%{ opacity:0; transform:translateY(16px) scale(.96); }
}
@media (prefers-reduced-motion: reduce){
  .cartbtn.is-bumping,.cartbtn.is-bumping .cnt,.cartbtn.is-bumping::after{ animation:none; }
}


/* Standalone cart page mode: keep the old drawer disabled everywhere. */
.cart-overlay,
.cart-drawer{
  display:none !important;
}


/* Cart button is now a normal link to the standalone cart page. */
a.cartbtn{
  text-decoration:none;
}

.cartbtn.cartbtn--floating{
  position:fixed;
  right:calc(env(safe-area-inset-right, 0px) + clamp(14px, 3vw, 30px));
  top:calc(env(safe-area-inset-top, 0px) + 14px);
  z-index:91;
  min-height:44px;
  border-color:#5FC6D2;
  background:#0B1214;
  color:#5FC6D2;
  box-shadow:0 8px 24px rgba(8,18,22,.2);
}
.cartbtn--floating .cnt{ background:#5FC6D2; color:#0B1214; }
.cartbtn--floating i{ display:inline; }
.cartbtn--floating[hidden]{ display:none; }


.cart-item-actions .cart-remove{
  width:44px;
  height:44px;
  padding:0;
  display:inline-grid;
  place-items:center;
  color:#8D3D1D;
  background:#FFF7F3;
  border-color:#E6C9B8;
}
.cart-item-actions .cart-remove:hover{
  color:#fff;
  background:#B65E2E;
  border-color:#B65E2E;
}
.cart-item-actions .cart-remove svg{
  pointer-events:none;
}


.promo-box{
  display:grid;
  gap:.75rem;
  margin:1rem 0;
  padding:.9rem;
  border:1px solid var(--rule,#D5E0E4);
  border-radius:var(--r-md,6px);
  background:linear-gradient(135deg, var(--accent-bg,#E3F1F2), #fff);
}
.promo-box strong{
  display:block;
  font-family:var(--ff-display);
  font-size:1.02rem;
  text-transform:uppercase;
}
.promo-kicker{
  display:block;
  margin-bottom:.2rem;
  font-family:var(--ff-mono);
  font-size:.6rem;
  letter-spacing:.15em;
  text-transform:uppercase;
  color:var(--accent,#0E6B75);
}
.promo-controls{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  gap:.45rem;
}
.promo-controls input{
  width:100%;
  border:1px solid var(--rule,#D5E0E4);
  border-radius:var(--r-sm,2px);
  padding:.72rem .85rem;
  font:inherit;
  background:#fff;
  color:var(--ink,#0C1417);
}
.promo-clear{
  width:38px;
  border:1px solid var(--rule,#D5E0E4);
  border-radius:var(--r-sm,2px);
  background:#fff;
  color:var(--ink-2,#465A60);
  cursor:pointer;
  font-size:1.25rem;
  line-height:1;
}
.promo-clear:hover{
  border-color:var(--ink,#0C1417);
  color:var(--ink,#0C1417);
}
.promo-message{
  min-height:1.25rem;
  margin:0;
  color:var(--ink-2,#465A60);
  font-size:.84rem;
}
.promo-message.is-ok{ color:#157347; font-weight:700; }
.promo-message.is-bad{ color:#8D3D1D; font-weight:700; }
.cart-summary{
  display:grid;
  gap:.45rem;
  margin-top:.85rem;
}
.cart-summary-row{
  display:flex;
  justify-content:space-between;
  gap:1rem;
  color:var(--ink-2,#465A60);
  font-size:.95rem;
}
.cart-summary-row strong{
  color:var(--ink,#0C1417);
  font-family:var(--ff-display);
  font-weight:800;
}
.cart-summary-row--discount,
.cart-summary-row--discount strong{
  color:#157347;
}
@media (max-width:520px){
  .promo-controls{ grid-template-columns:1fr; }
  .promo-clear{ width:100%; height:38px; }
}


/* Detail layout tuning from browser feedback */
.detail-hero{
  padding-block:clamp(1.1rem,2.6vw,2.4rem) clamp(2rem,5vw,4rem);
}
.detail-hero .wrap{
  max-width:1500px;
}
.detail-layout{
  grid-template-columns:minmax(300px,.95fr) minmax(0,1.05fr);
  gap:clamp(1rem,3vw,2.5rem);
  align-items:start;
}
.product-detail > section:first-child{ padding-top:0; }
.detail-media{
  min-height:clamp(300px,38vw,510px);
  padding:clamp(1rem,2vw,1.4rem);
}
.detail-media img{
  max-height:480px;
}
.detail-summary h1{
  font-size:clamp(1.25rem,1.65vw,2.05rem);
  max-width:none;
}
.detail-buybox{
  max-width:640px;
}
@media (max-width:880px){
  .detail-hero{ padding-top:1rem; }
  .detail-media{ min-height:260px; }
}

.checkout-group{
  border:0;
  padding:0;
  margin:0;
  display:grid;
  gap:.8rem;
}
.checkout-group > [hidden]{ display:none; }
.checkout-group legend{
  margin:0 0 .15rem;
  font-family:var(--ff-display);
  font-weight:800;
  font-size:1.05rem;
  text-transform:uppercase;
  letter-spacing:-.02em;
}
.checkout-two{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.7rem;
}
.checkout-form .check-row{
  display:flex;
  align-items:center;
  gap:.55rem;
  color:var(--ink-2,#465A60);
  font-size:.9rem;
}
.checkout-form .check-row input{
  width:auto;
  min-width:1rem;
  accent-color:var(--accent,#0E6B75);
}
@media (max-width:560px){
  .checkout-two{ grid-template-columns:1fr; }
}
.category-intro.band{ padding-block:clamp(1.5rem, 3vw, 2.5rem); }
.category-intro .category-copy{ display:block; }
.category-intro + .band{ padding-block-start:clamp(1rem, 2vw, 1.75rem); }
.product-detail > section:not(:last-child){ padding-bottom:clamp(1rem, 2vw, 1.5rem); }
.product-detail > section + section{ padding-top:clamp(.75rem, 1.5vw, 1.25rem); }

.prod-fig:has(img){
  grid-template:minmax(0, 1fr) / minmax(0, 1fr);
  padding:1rem;
}
.prod-fig img{ width:100%; height:100%; max-width:none; max-height:none; }
.prod-photo-link{ display:block; width:100%; height:100%; min-width:0; min-height:0; }
.prod-fig .tag{ z-index:1; pointer-events:none; }
.prod-title-link{ text-decoration:none; }
.prod-title-link:hover{ color:var(--accent); text-decoration:underline; }
[data-availability="in_stock"] .stock,
[data-availability="in_stock"] .detail-stock{ color:#14753b; font-weight:700; }
[data-availability="in_stock"] .prod-fig .tag:not(.tag--sale),
[data-availability="in_stock"] .detail-media .tag{ background:#16783d; color:#fff; }
.catalog-stock{ white-space:pre-line; }

.grid.catalog-carousel{
  --visible-cards:3;
  grid-template-columns:none;
  grid-auto-flow:column;
  grid-auto-columns:calc((100% - (var(--visible-cards) - 1) * 14px) / var(--visible-cards));
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  padding-bottom:.6rem;
  overscroll-behavior-inline:contain;
}
.catalog-carousel .prod{ scroll-snap-align:start; }
.catalog-carousel-controls{ display:flex; justify-content:flex-end; gap:.5rem; margin-bottom:.7rem; }
.catalog-carousel-controls .btn{ min-width:44px; min-height:44px; padding:0; font-size:1.25rem; }
.catalog-carousel-controls .carousel-playback{ padding-inline:.8rem; font-size:.65rem; margin-right:auto; }
@media (max-width:1050px){ .grid.catalog-carousel{ --visible-cards:2; } }
@media (max-width:600px){ .grid.catalog-carousel{ --visible-cards:1.12; } }
@media (max-width:1040px){
  .shop-field input,.shop-field select,.checkout-form textarea,.promo-controls input{ font-size:16px; }
}
@media (max-width:760px){
  .product-detail .detail-layout,.product-detail .detail-grid{ grid-template-columns:minmax(0,1fr); }
  .product-detail .detail-media{ min-height:0; }
  .product-detail .detail-media img{ max-height:360px; }
}
