/* Product pages keep vertical browser scrolling, anchored zoom badge, and interactive lightbox zoom. */
html{scroll-behavior:auto}
.detail-grid{min-width:0;grid-template-columns:minmax(300px,490px) minmax(0,1fr);gap:40px;align-items:start}
.detail-grid>*{min-width:0}
.detail .image-card{
  position:relative !important;
  top:auto !important;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,#ffffff 0%,#f7fafd 100%) !important;
  border:1px solid #d8e3ee !important;
  border-radius:16px !important;
  padding:24px 24px 56px !important;
  box-shadow:0 10px 28px rgba(17,43,70,.07) !important;
  touch-action:pan-y pinch-zoom;
  cursor:zoom-in;
  transition:border-color .2s ease,box-shadow .2s ease;
}
.detail .image-card:hover{
  border-color:#b3c7db !important;
  box-shadow:0 14px 34px rgba(17,43,70,.11) !important;
}
.detail .image-card>img{
  width:100%;
  height:clamp(280px,38vw,440px);
  object-fit:contain;
  user-select:none;
  -webkit-user-drag:none;
  transition:transform .25s ease;
}
.detail .image-card:hover>img{
  transform:scale(1.03);
}
body .detail .image-card .zoom-hint{
  position:absolute !important;
  right:14px !important;
  bottom:14px !important;
  left:auto !important;
  top:auto !important;
  z-index:3;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:8px 14px;
  border-radius:999px;
  background:rgba(17,43,70,.9);
  color:#ffffff;
  border:1px solid rgba(255,255,255,.22);
  font-size:12.5px;
  font-weight:650;
  letter-spacing:.2px;
  line-height:1.2;
  box-shadow:0 6px 18px rgba(17,43,70,.2);
  pointer-events:none;
  transition:background .18s ease,transform .18s ease;
}
body .detail .image-card .zoom-hint::before{
  content:"";
  width:14px;
  height:14px;
  flex:0 0 14px;
  background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5M11 8v6M8 11h6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5M11 8v6M8 11h6'/%3E%3C/svg%3E") center/contain no-repeat;
}
.detail .image-card:hover .zoom-hint{
  background:#d82c36;
  transform:translateY(-1px);
}
.product-gallery{
  display:flex;
  flex-wrap:wrap;
  max-width:100%;
  gap:10px;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  touch-action:pan-x pan-y pinch-zoom;
  padding:12px 0 4px;
  scrollbar-width:thin;
}
.product-gallery button{
  flex:0 0 74px;
  width:74px;
  height:74px;
  min-height:74px;
  border-radius:12px;
  border:1.5px solid #d5e0eb;
  background:#fff;
  padding:6px;
  transition:border-color .16s ease,transform .16s ease,box-shadow .16s ease;
}
.product-gallery button:hover{
  border-color:#8fabc4;
  transform:translateY(-1px);
}
.product-gallery button[aria-pressed="true"]{
  border:2px solid #d82c36;
  box-shadow:0 0 0 3px rgba(216,44,54,.14);
}
.product-gallery img{object-fit:contain;width:100%;height:100%}

/* Lightbox popup: keep controls anchored to the image card and support 2x interactive zoom */
.detail-lightbox{
  overscroll-behavior:contain;
  background:rgba(5,13,26,.94) !important;
  backdrop-filter:blur(14px) !important;
  -webkit-backdrop-filter:blur(14px) !important;
  padding:18px;
}
.detail-lightbox-inner{
  position:relative !important;
  width:min(960px,94vw) !important;
  max-height:calc(100dvh - 40px) !important;
  overflow:hidden !important;
  background:transparent !important;
  border:0 !important;
  border-radius:18px;
  padding:54px 0 0 !important;
  box-shadow:none !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
}
.detail-lightbox-close,
.detail-lightbox-zoom{
  position:absolute !important;
  top:12px !important;
  z-index:10;
  height:38px;
  border-radius:999px;
  border:1px solid #cfdbe6;
  background:#112b46;
  color:#ffffff;
  font:600 13px/1 system-ui,-apple-system,sans-serif;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:0 14px;
  box-shadow:0 4px 12px rgba(17,43,70,.18);
  transition:background .16s ease,transform .16s ease;
}
.detail-lightbox-close{
  right:12px !important;
  width:38px;
  padding:0;
  font-size:20px;
}
.detail-lightbox-zoom{
  left:12px !important;
}
.detail-lightbox-close:hover,
.detail-lightbox-zoom:hover{
  background:#d82c36;
  border-color:#d82c36;
}
.detail-lightbox-stage{
  width:100%;
  height:min(680px,calc(100dvh - 170px));
  max-height:calc(100dvh - 170px);
  overflow:hidden !important;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#ffffff !important;
  border-radius:18px !important;
  padding:16px !important;
  border:1.5px solid rgba(255,255,255,0.2) !important;
  box-shadow:0 30px 80px rgba(0,0,0,0.6) !important;
  position:relative;
}
.detail-lightbox img{
  display:block;
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  cursor:zoom-in;
  transition:transform .24s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change:transform, transform-origin;
}
.detail-lightbox-inner.is-zoomed .detail-lightbox-stage{
  align-items:center;
  justify-content:center;
}
.detail-lightbox-inner.is-zoomed img{
  cursor:zoom-out;
}
.detail-lightbox-nav{
  display:flex;
  justify-content:center;
  gap:10px;
  margin-top:10px;
}
.detail-lightbox-nav button{
  min-height:36px;
  padding:6px 14px;
  border-radius:8px;
  border:1px solid #cfdbe6;
  background:#f4f7fa;
  color:#112b46;
  font-weight:650;
  font-size:13px;
  cursor:pointer;
}
.detail-lightbox-nav button:hover{
  background:#112b46;
  color:#fff;
}
@media(max-width:850px){
  .detail-grid{grid-template-columns:1fr;gap:24px}
  .detail .image-card{padding:18px 16px 52px !important}
  .detail .image-card>img{height:300px;max-height:50svh}
  body .detail .image-card .zoom-hint{right:12px !important;bottom:12px !important;padding:7px 12px;font-size:12px}
  .nav{backdrop-filter:none}
  .detail-lightbox{backdrop-filter:none;padding:12px}
  .detail-lightbox-inner{padding:54px 12px 14px;border-radius:14px}
  .detail-lightbox-close{position:absolute !important;top:10px !important;right:10px !important}
  .detail-lightbox-zoom{position:absolute !important;top:10px !important;left:10px !important}
}
