/* Product-only gallery: square edge-to-edge thumbnails; the modal retains the
   full photo. Native app header, demonstration and footer are outside scope. */
body #root .isp-product-gallery{
  --gallery-yellow:var(--accent,#edd444);
  width:min(1700px,100%);margin:0 auto;padding:148px 36px 84px;
  color:var(--white,#f5f4f0);font-family:inherit;
}
body #root .isp-product-gallery-heading{max-width:1000px;margin-bottom:38px;}
body #root .isp-product-gallery-heading h1{
  margin:0;font-size:clamp(48px,7vw,110px);line-height:1;letter-spacing:-.02em;
  text-transform:uppercase;word-break:normal;overflow-wrap:normal;hyphens:none;
}
body #root .isp-product-gallery-heading p{
  max-width:690px;margin:24px 0 0;font-size:16px;line-height:1.65;color:var(--muted2,#b4b4b6);
}
body #root .isp-gallery-filters{display:flex;flex-wrap:wrap;gap:10px;border-block:1px solid var(--border,#292929);padding:22px 0;}
body #root .isp-gallery-filter{
  display:inline-flex;align-items:center;justify-content:center;min-height:44px;
  padding:11px 16px;border:1px solid var(--gallery-yellow);border-radius:0;
  background:transparent;color:var(--gallery-yellow);font:inherit;font-size:14px;
  line-height:1.35;letter-spacing:.06em;text-decoration:none;text-align:center;
  cursor:pointer;touch-action:manipulation;transition:background .18s ease,color .18s ease;
}
body #root .isp-gallery-filter[aria-current="true"],body #root .isp-gallery-filter:hover{background:var(--gallery-yellow);color:#080808;}
body #root .isp-gallery-results{margin:20px 0;font-size:14px;line-height:1.5;color:var(--muted2,#b4b4b6);}
body #root .isp-product-gallery-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;}
body #root .isp-product-gallery-card{min-width:0;border:0;background:#090a0b;}
body #root .isp-product-gallery-open{
  position:relative;display:block;width:100%;aspect-ratio:1;margin:0;padding:0;
  overflow:hidden;border:0;border-radius:0;
  background:linear-gradient(145deg,#353839,#1c1f20 65%,#111314);cursor:zoom-in;touch-action:manipulation;
}
body #root .isp-product-gallery-open img{
  position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;max-height:none;
  object-fit:cover;object-position:center;margin:0;padding:0;transform:none;filter:none;
}
body #root .isp-gallery-filtered-action{display:flex;justify-content:flex-start;margin-top:24px;}
body #root .isp-gallery-filtered-action .isp-gallery-product-link{min-height:48px;min-width:250px;margin:0;padding:12px 18px;}
.isp-gallery-product-link{
  display:inline-flex;align-items:center;justify-content:space-between;gap:15px;
  min-height:44px;margin-top:auto;padding:10px 14px;border:1px solid var(--accent,#edd444);border-radius:0;
  background:transparent;color:var(--accent,#edd444);font:inherit;font-size:14px;line-height:1.4;
  text-decoration:none;text-align:left;cursor:pointer;touch-action:manipulation;
  transition:background .18s ease,color .18s ease;
}
.isp-gallery-product-link svg{display:block;flex:0 0 20px;width:20px;height:20px;}
.isp-gallery-product-link:hover{background:var(--accent,#edd444);color:#080808;}
body #root .isp-product-gallery :is(a,button):focus-visible,
.isp-gallery-modal .isp-gallery-product-link:focus-visible{outline:2px solid var(--white,#f5f4f0);outline-offset:4px;}
@media(max-width:1100px){body #root .isp-product-gallery-grid{grid-template-columns:repeat(4,minmax(0,1fr));}}
@media(max-width:820px){body #root .isp-product-gallery-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:680px){
  body #root .isp-product-gallery{padding:132px 18px 54px;}
  body #root .isp-product-gallery-heading{margin-bottom:28px;}
  body #root .isp-product-gallery-heading h1{font-size:clamp(38px,9vw,54px);}
  body #root .isp-product-gallery-heading p{margin-top:18px;font-size:16px;}
  body #root .isp-gallery-filters{gap:8px;padding-block:18px;}
  body #root .isp-gallery-filter{padding:10px 12px;letter-spacing:.03em;}
  body #root .isp-product-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  body #root .isp-gallery-filtered-action{margin-top:20px;}
  body #root .isp-gallery-filtered-action .isp-gallery-product-link{width:100%;min-width:0;}
}

/* The gallery viewer lives in the browser's modal top layer. */
dialog.isp-gallery-modal{
  position:fixed;inset:0;margin:0;border:0;padding:0;
  width:100%;max-width:none;height:100dvh;max-height:none;
  box-sizing:border-box;overflow:hidden;overscroll-behavior:none;
  background:rgba(6,6,8,.97);color:var(--white,#f5f4f0);
  font-family:inherit;cursor:auto;
}
dialog.isp-gallery-modal[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;}
.isp-gallery-modal::backdrop{background:rgba(0,0,0,.9);}
.isp-gallery-modal .isp-gallery-toolbar{
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  padding:max(16px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) 12px max(24px,env(safe-area-inset-left));
}
.isp-gallery-modal .isp-gallery-counter{
  color:var(--accent,#edd444);font-family:'IBM Plex Mono',monospace;
  font-size:12px;letter-spacing:.16em;line-height:1.4;
}
.isp-gallery-modal .isp-gallery-control{
  display:grid;place-items:center;flex:none;
  width:48px;height:48px;margin:0;padding:0;border:1px solid rgba(237,212,68,.42);
  border-radius:0;color:var(--accent,#edd444);background:rgba(6,6,8,.84);
  cursor:pointer;touch-action:manipulation;
  transition:background .18s ease,border-color .18s ease,transform .18s ease;
}
.isp-gallery-modal .isp-gallery-control:hover{background:rgba(237,212,68,.13);border-color:var(--accent,#edd444);}
.isp-gallery-modal .isp-gallery-control:active{transform:scale(.94);}
.isp-gallery-modal .isp-gallery-control:focus-visible{outline:2px solid var(--white,#f5f4f0);outline-offset:4px;}
.isp-gallery-modal .isp-gallery-stage{
  position:relative;min-width:0;min-height:0;
  display:flex;align-items:center;justify-content:center;
  padding:0 90px;touch-action:pan-y pinch-zoom;overflow:hidden;
  user-select:none;-webkit-user-select:none;
}
.isp-gallery-modal .isp-gallery-photo{
  display:block;max-width:100%;max-height:100%;width:auto;height:auto;
  object-fit:contain;flex:0 1 auto;min-height:0;min-width:0;
  pointer-events:auto;-webkit-user-drag:none;
  animation:isp-gallery-arrive .2s ease-out both;
}
.isp-gallery-modal .isp-gallery-previous,
.isp-gallery-modal .isp-gallery-next{position:absolute;top:calc(50% - 24px);z-index:2;}
.isp-gallery-modal .isp-gallery-previous{left:24px;}
.isp-gallery-modal .isp-gallery-next{right:24px;}
.isp-gallery-modal .isp-gallery-caption{
  display:flex;align-items:center;justify-content:center;flex-wrap:wrap;
  gap:6px 18px;padding:18px max(24px,env(safe-area-inset-right)) max(22px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));
  text-align:center;font-size:15px;line-height:1.4;color:var(--muted2,#b4b4b6);
  overflow-wrap:normal;word-break:normal;hyphens:none;
}
.isp-gallery-modal .isp-gallery-product-link{margin:4px 0 0;}
.isp-gallery-modal .isp-gallery-loading{
  position:absolute;left:50%;bottom:14px;transform:translateX(-50%);
  padding:8px 12px;background:rgba(6,6,8,.85);color:var(--white,#f5f4f0);
  font-size:12px;border-radius:3px;pointer-events:none;
}
.isp-gallery-modal .isp-gallery-error{max-width:32ch;text-align:center;font-size:16px;line-height:1.5;color:var(--muted2,#b4b4b6);}
@keyframes isp-gallery-arrive{from{opacity:.5;transform:translateX(calc(var(--isp-gallery-direction,1)*12px));}to{opacity:1;transform:translateX(0);}}
@media(max-width:680px){
  .isp-gallery-modal .isp-gallery-toolbar{padding: max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 10px max(16px,env(safe-area-inset-left));}
  .isp-gallery-modal .isp-gallery-stage{padding:0 8px;}
  .isp-gallery-modal .isp-gallery-control{width:44px;height:44px;}
  .isp-gallery-modal .isp-gallery-previous,
  .isp-gallery-modal .isp-gallery-next{top:auto;bottom:12px;}
  .isp-gallery-modal .isp-gallery-previous{left:16px;}
  .isp-gallery-modal .isp-gallery-next{right:16px;}
  .isp-gallery-modal .isp-gallery-caption{font-size:13px;gap:5px 12px;padding:14px 22px max(18px,env(safe-area-inset-bottom));}
  .isp-gallery-modal .isp-gallery-product-link{flex-basis:100%;max-width:360px;}
}
@media(prefers-reduced-motion:reduce){
  .isp-gallery-modal .isp-gallery-photo{animation:none;}
  .isp-gallery-modal .isp-gallery-control{transition:none;}
  body #root .isp-gallery-filter,.isp-gallery-product-link{transition:none;}
}
