/* Keep the entire product flow inside the theme's 1540px content width. */
body.p-catalog-product:not(.is-admin) #product-form {
  box-sizing: border-box;
  width: calc(100% - 48px);
  max-width: 1540px;
  margin-inline: auto;
}
body.p-catalog-product:not(.is-admin) :is(.flow-product-grid, .flow-product-config, .flow-product-media, .flow-purchase-shell) { min-width: 0; box-sizing: border-box; }
body.p-catalog-product:not(.is-admin) .flow-product-grid { max-width: 100% !important; }
body.p-catalog-product:not(.is-admin) .flow-product-grid > div { min-width: 0; }
body.p-catalog-product:not(.is-admin) .flow-purchase-shell { float: none !important; width: 100% !important; }
body.p-catalog-product:not(.is-admin) .flow-purchase-panel { float: none !important; width: 100% !important; }
body.p-catalog-product:not(.is-admin) .flow-product-config :is(.order-info, .flow-price-tiers, .flow-purchase-panel, .w-product-name) { box-sizing: border-box; max-width: 100% !important; }
body.p-catalog-product:not(.is-admin) .w-product-description > table.wrapper { width: 100%; table-layout: fixed; }
body.p-catalog-product:not(.is-admin) .w-tabs :is(.w-product-description, .w-info-page) { padding: clamp(20px, 2.5vw, 36px); box-sizing: border-box; }
body.p-catalog-product:not(.is-admin) .w-product-description > h3 { margin: 0 0 20px; font-size: 1.25rem; font-weight: 650; }

.site-product-gallery { width: 100%; max-width: 420px; margin: 0 auto 14px; color: #111d3a; }
.site-gallery-stage { position: relative; overflow: hidden; border: 1px solid #e1e7f0; border-radius: 16px; background: #fff; }
.site-gallery-enlarge { display: block; box-sizing: border-box; width: 100%; padding: 12px; border: 0; background: transparent; cursor: zoom-in; touch-action: pan-y; }
.site-product-gallery .site-gallery-image { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 8px; }
.site-gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 44px; height: 44px; padding: 0 0 3px; border: 1px solid #dce3ed; border-radius: 50%; background: rgba(255,255,255,.96); color: #010066; box-shadow: 0 3px 12px #111d3a12; font: 32px/1 Arial, sans-serif; cursor: pointer; }
.site-gallery-arrow.is-prev { left: 8px; }
.site-gallery-arrow.is-next { right: 8px; }
.site-gallery-arrow:hover { background: #f0f8ff; border-color: #01adee; }
.site-gallery-count { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 20px; background: #ffffffeb; color: #43516b; font-size: 13px; pointer-events: none; }
.site-gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 4px; scrollbar-width: thin; }
.site-gallery-thumb { flex: 0 0 64px; box-sizing: border-box; width: 64px; height: 64px; padding: 4px; border: 2px solid #e1e7f0; border-radius: 10px; background: #fff; cursor: pointer; }
.site-gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.site-gallery-thumb[aria-pressed="true"] { border-color: #01adee; background: #f0faff; }
.site-product-gallery button:focus-visible, .site-gallery-zoom button:focus-visible { outline: 3px solid #01adee; outline-offset: 3px; }
.site-gallery-in-native > .main-image-box { display: none !important; }
body.p-catalog-product .fg-launch-img[hidden] { display: none !important; }
.site-gallery-zoom { position: fixed; box-sizing: border-box; width: min(1000px, 94vw); max-width: 94vw; height: min(900px, 92dvh); max-height: 92dvh; margin: auto; padding: 48px; border: 0; border-radius: 18px; background: #fff; overflow: hidden; }
.site-gallery-zoom::backdrop { background: #101a36b8; }
.site-gallery-zoom > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.site-gallery-close { position: absolute; top: 8px; right: 8px; z-index: 1; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #f1f4f9; color: #111d3a; font-size: 30px; cursor: pointer; }
@media(max-width:768px) {
  body.p-catalog-product:not(.is-admin) #product-form { width: calc(100% - 24px); }
  body.p-catalog-product:not(.is-admin) .flow-product-grid.flow-mobile-layout { width: 100% !important; margin-left: 0 !important; }
  .site-gallery-thumb { flex-basis: 56px; width: 56px; height: 56px; }
  .site-gallery-zoom { padding: 48px 12px 16px; }
}
@media(prefers-reduced-motion:reduce) { .site-gallery-thumbs { scroll-behavior: auto; } }
