.product-photo-switch { cursor:zoom-in; touch-action:manipulation; }
.product-gallery { position:fixed; inset:0; width:100%; max-width:none; height:100%; height:100dvh; max-height:none; box-sizing:border-box; margin:0; padding:clamp(12px,3vw,36px); border:0; color:#202024; background:rgba(20,20,26,.32); overflow:auto; overscroll-behavior:contain; }
.product-gallery:not([open]) { display:none; }
.product-gallery[open] { display:grid; justify-items:center; align-items:safe center; }
.product-gallery::backdrop { background:rgba(24,24,32,.26); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
.product-gallery[open]:not(:modal) { z-index:10000; backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
.product-gallery-panel { display:flex; flex-direction:column; width:min(100%,1100px); max-height:100%; box-sizing:border-box; border:1px solid rgba(255,255,255,.85); border-radius:26px; background:#fff; box-shadow:0 22px 80px rgba(0,0,0,.18); overflow:hidden; animation:gallery-enter .22s cubic-bezier(.2,.7,.2,1) both; }
.product-gallery-header { display:flex; flex-shrink:0; align-items:center; justify-content:space-between; gap:12px; padding:16px 20px 8px; }
.product-gallery-title { margin:0; font:600 clamp(14px,2vw,18px)/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; overflow-wrap:anywhere; }
.product-gallery button { font-family:inherit; -webkit-tap-highlight-color:transparent; cursor:pointer; }
.product-gallery button:focus-visible { outline:3px solid #0071e3; outline-offset:3px; }
.product-gallery-close { flex:0 0 42px; width:42px; height:42px; padding:0; border:0; border-radius:50%; background:#f1f1f4; color:#343438; font-size:29px; line-height:1; }
.product-gallery-stage { position:relative; flex:1 1 auto; height:min(68vh,700px); height:min(68dvh,700px); min-height:160px; overflow:hidden; background:#fff; touch-action:pan-y pinch-zoom; }
.product-gallery-image { position:absolute; inset:0; display:block; width:100%; height:100%; padding:8px 60px; box-sizing:border-box; object-fit:contain; user-select:none; -webkit-user-drag:none; }
.product-gallery-arrow { position:absolute; top:50%; z-index:2; display:grid; place-items:center; width:44px; height:48px; padding:0 0 4px; border:1px solid #e8e8ed; border-radius:15px; background:rgba(248,248,250,.95); color:#333338; font-size:40px; line-height:1; transform:translateY(-50%); transition:background-color .15s; }
.product-gallery-arrow:hover,.product-gallery-close:hover { background:#e7e7ed; }
.product-gallery-arrow.is-prev { left:12px; }.product-gallery-arrow.is-next { right:12px; }
.product-gallery-status { position:absolute; z-index:3; left:50%; bottom:10px; width:max-content; max-width:calc(100% - 32px); margin:0; padding:7px 12px; border-radius:12px; background:rgba(245,245,248,.96); color:#62626a; font-size:13px; text-align:center; transform:translateX(-50%); pointer-events:none; }
.product-gallery-status:empty { display:none; }
.product-gallery-stage[aria-busy="true"] .product-gallery-status::before { content:""; display:inline-block; width:10px; height:10px; margin-right:8px; border:2px solid #d4d4dc; border-top-color:#55555e; border-radius:50%; vertical-align:-2px; animation:gallery-spin .7s linear infinite; }
.product-gallery-footer { display:grid; flex-shrink:0; justify-items:center; gap:8px; padding:8px 20px 18px; }
.product-gallery-counter { font-size:13px; color:#73737b; font-variant-numeric:tabular-nums; }
.product-gallery-dots { display:flex; flex-wrap:wrap; justify-content:center; gap:7px; }
.product-gallery-dot { width:32px; height:30px; padding:0; border:0; border-radius:10px; background:#f0f0f4; color:#666670; font-size:12px; transition:background-color .15s,color .15s; }
.product-gallery-dot[aria-pressed="true"] { background:#29292e; color:#fff; }
.product-gallery-caption { margin:0; color:#777780; font-size:11px; line-height:1.4; text-align:center; }
.product-gallery.is-closing .product-gallery-panel { animation:gallery-leave .16s ease both; }
.product-gallery [hidden] { display:none!important; }
@keyframes gallery-enter { from { opacity:0; transform:translateY(12px) scale(.975); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes gallery-leave { to { opacity:0; transform:translateY(8px) scale(.98); } }
@keyframes gallery-spin { to { transform:rotate(360deg); } }
@media(max-width:640px) {
 .product-gallery { padding:10px; padding-top:max(10px,env(safe-area-inset-top)); padding-bottom:max(10px,env(safe-area-inset-bottom)); }
 .product-gallery-panel { border-radius:21px; }.product-gallery-header { padding:10px 12px 2px; }
 .product-gallery-stage { height:62vh; height:62dvh; min-height:180px; }
 .product-gallery-image { padding:8px 34px; }.product-gallery-arrow { width:32px; height:42px; font-size:32px; border-radius:11px; }
 .product-gallery-arrow.is-prev { left:2px; }.product-gallery-arrow.is-next { right:2px; }
 .product-gallery::backdrop,.product-gallery[open]:not(:modal) { backdrop-filter:blur(5px); -webkit-backdrop-filter:blur(5px); }
 .product-gallery-footer { padding:6px 12px 14px; }.product-gallery-close { width:38px; height:38px; flex-basis:38px; }
}
@media(prefers-reduced-motion:reduce) { .product-gallery-panel,.product-gallery.is-closing .product-gallery-panel,.product-gallery-stage[aria-busy="true"] .product-gallery-status::before { animation:none; }.product-gallery button { transition:none; } }
