/* Maido Stage 5L: product photo zoom with cursor pan fix. */

html body.maido-stage5i-product-page .site-header:not(.site-header--hero) {
  position: sticky;
  top: 0;
  z-index: 1000;
}

html body .maido-stage5i-product-detail.section {
  padding-top: clamp(28px, 4vw, 56px) !important;
  padding-bottom: clamp(34px, 5vw, 64px) !important;
}

html body .maido-stage5i-product-detail .product-detail__grid {
  display: grid !important;
  grid-template-columns: minmax(280px, 500px) minmax(300px, 500px) !important;
  gap: clamp(26px, 4vw, 52px) !important;
  align-items: start !important;
  justify-content: center !important;
  max-width: 1120px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

html body .maido-stage5i-product-detail .gallery {
  width: 100% !important;
  max-width: 500px !important;
  margin: 0 auto !important;
}

html body .maido-stage5i-product-detail .gallery__main-wrap {
  --maido-product-hover-zoom-scale: 2.85;
  position: relative !important;
  width: 100% !important;
  height: clamp(300px, 32vw, 460px) !important;
  min-height: 300px !important;
  max-height: 460px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  border: 1px solid var(--line, #e6e6e6) !important;
  border-radius: clamp(16px, 2vw, 24px) !important;
  background: #fff !important;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .055) !important;
  cursor: zoom-in !important;
  touch-action: manipulation !important;
}

html body .maido-stage5i-product-detail .gallery__main {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  padding: clamp(10px, 1.35vw, 18px) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  transform: scale(1) !important;
  transform-origin: var(--maido-product-hover-zoom-origin, center center) !important;
  transition: transform .08s linear, opacity .14s ease !important;
  will-change: transform !important;
}

html body .maido-stage5i-product-detail .gallery__main.is-zoomed {
  transform: scale(var(--maido-product-hover-zoom-scale, 2.85)) !important;
}

html body .maido-stage5i-product-detail .gallery__zoom-hint {
  position: absolute !important;
  right: 12px !important;
  bottom: 12px !important;
  z-index: 2 !important;
  display: inline-flex !important;
  align-items: center !important;
  min-height: 28px !important;
  padding: 7px 10px !important;
  border-radius: 999px !important;
  background: rgba(8, 19, 35, .78) !important;
  color: #fff !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .02em !important;
  pointer-events: none !important;
  opacity: .88 !important;
  transform: translateY(0) !important;
  transition: opacity .14s ease, transform .14s ease !important;
  backdrop-filter: blur(8px) !important;
}

html body .maido-stage5i-product-detail .gallery__main-wrap.is-zoom-active .gallery__zoom-hint {
  opacity: 0 !important;
  transform: translateY(4px) !important;
}

html body .maido-stage5i-product-detail .gallery__thumbs {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)) !important;
  gap: 10px !important;
  margin-top: 14px !important;
}

html body .maido-stage5i-product-detail .gallery__thumb {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  margin: 0 !important;
  padding: 7px !important;
  border: 2px solid transparent !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .055) !important;
  cursor: pointer !important;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease !important;
}

html body .maido-stage5i-product-detail .gallery__thumb:hover,
html body .maido-stage5i-product-detail .gallery__thumb:focus-visible,
html body .maido-stage5i-product-detail .gallery__thumb.is-active {
  border-color: #006eff !important;
  box-shadow: 0 10px 26px rgba(0, 110, 255, .22) !important;
  transform: translateY(-1px) !important;
  outline: none !important;
}

html body .maido-stage5i-product-detail .gallery__thumb img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}

html body .maido-stage5i-product-detail .product-info {
  max-width: 500px !important;
  position: sticky !important;
  top: 118px !important;
}

html body .maido-stage5i-product-detail .product-info .eyebrow {
  margin-bottom: 8px !important;
}

html body .maido-stage5i-product-detail .product-info h1 {
  font-size: clamp(30px, 3.45vw, 44px) !important;
  line-height: 1.04 !important;
  letter-spacing: -.035em !important;
  margin: 0 0 16px !important;
  max-width: 16ch !important;
}

html body .maido-stage5i-product-detail .price.price--large,
html body .maido-stage5i-product-detail .product-info .price.price--large {
  display: block !important;
  color: #00e676 !important;
  font-size: clamp(28px, 2.7vw, 38px) !important;
  font-weight: 950 !important;
  line-height: 1.05 !important;
  margin: 14px 0 22px !important;
  text-shadow: none !important;
}

html body .maido-stage5i-product-detail .product-actions {
  margin: 22px 0 18px !important;
}

html body .maido-stage5i-product-detail .product-actions .btn {
  min-height: 48px !important;
  padding: 14px 28px !important;
  border-radius: 999px !important;
  background: #006eff !important;
  border-color: #006eff !important;
  color: #fff !important;
  box-shadow: 0 14px 30px rgba(0, 110, 255, .28) !important;
}

html body .maido-stage5i-product-detail .product-actions .btn:hover,
html body .maido-stage5i-product-detail .product-actions .btn:focus-visible {
  background: #0057d8 !important;
  border-color: #0057d8 !important;
  color: #fff !important;
  box-shadow: 0 16px 34px rgba(0, 87, 216, .32) !important;
  transform: translateY(-1px) !important;
}

html body .maido-stage5i-product-detail .spec-list {
  margin: 20px 0 !important;
}

html body .maido-stage5i-product-description {
  padding-top: clamp(34px, 4vw, 58px) !important;
}

.maido-product-lightbox {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 28px !important;
  background: rgba(0, 0, 0, .86) !important;
}

.maido-product-lightbox.is-open {
  display: flex !important;
}

html.maido-product-lightbox-open,
html.maido-product-lightbox-open body {
  overflow: hidden !important;
}

.maido-product-lightbox__button {
  position: absolute !important;
  top: 18px !important;
  right: 18px !important;
  width: 46px !important;
  height: 46px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,.24) !important;
  background: rgba(255,255,255,.12) !important;
  color: #fff !important;
  font-size: 32px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

.maido-product-lightbox__image {
  display: block !important;
  max-width: min(94vw, 1500px) !important;
  max-height: 88vh !important;
  object-fit: contain !important;
  background: #fff !important;
  border-radius: 18px !important;
  box-shadow: 0 28px 80px rgba(0,0,0,.46) !important;
}

@media (max-width: 1100px) {
  html body .maido-stage5i-product-detail .product-detail__grid {
    grid-template-columns: minmax(0, 1fr) !important;
    max-width: 700px !important;
  }
  html body .maido-stage5i-product-detail .gallery,
  html body .maido-stage5i-product-detail .product-info {
    max-width: 650px !important;
  }
  html body .maido-stage5i-product-detail .product-info {
    position: static !important;
  }
  html body .maido-stage5i-product-detail .product-info h1 {
    max-width: none !important;
  }
  html body .maido-stage5i-product-detail .gallery__main-wrap {
    height: min(72vw, 500px) !important;
    max-height: 500px !important;
  }
}

@media (max-width: 640px) {
  html body .maido-stage5i-product-detail.section {
    padding-top: 24px !important;
  }
  html body .maido-stage5i-product-detail .gallery__main-wrap {
    min-height: 255px !important;
    height: min(84vw, 390px) !important;
    max-height: 390px !important;
    border-radius: 18px !important;
  }
  html body .maido-stage5i-product-detail .gallery__zoom-hint {
    display: none !important;
  }
  html body .maido-stage5i-product-detail .gallery__thumbs {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }
  html body .maido-stage5i-product-detail .product-info h1 {
    font-size: clamp(28px, 9vw, 38px) !important;
  }
  html body .maido-stage5i-product-detail .price.price--large {
    font-size: 30px !important;
  }
}

/* Maido hotfix 2026-05-16: product page action buttons side-by-side with calmer, distinct colours. */
html body .maido-stage5i-product-detail .product-actions.maido-cart-actions {
  display: flex !important;
  align-items: flex-end !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin-top: 24px !important;
}

html body .maido-stage5i-product-detail .maido-cart-add-form {
  display: flex !important;
  align-items: flex-end !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  margin: 0 !important;
}

html body .maido-stage5i-product-detail .maido-cart-add-form label {
  margin: 0 !important;
}

html body .maido-stage5i-product-detail .maido-cart-add-form .btn {
  background: #d71920 !important;
  border-color: #d71920 !important;
  color: #fff !important;
  box-shadow: 0 12px 26px rgba(215, 25, 32, .18) !important;
}

html body .maido-stage5i-product-detail .maido-cart-add-form .btn:hover,
html body .maido-stage5i-product-detail .maido-cart-add-form .btn:focus-visible {
  background: #b9141b !important;
  border-color: #b9141b !important;
  color: #fff !important;
  box-shadow: 0 14px 28px rgba(185, 20, 27, .22) !important;
}

html body .maido-stage5i-product-detail .maido-cart-actions > a.btn.btn--ghost {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 48px !important;
  width: auto !important;
  min-width: 156px !important;
  background: #f5efe7 !important;
  border-color: #ddcbbb !important;
  color: #2f2925 !important;
  box-shadow: none !important;
}

html body .maido-stage5i-product-detail .maido-cart-actions > a.btn.btn--ghost:hover,
html body .maido-stage5i-product-detail .maido-cart-actions > a.btn.btn--ghost:focus-visible {
  background: #2f2925 !important;
  border-color: #2f2925 !important;
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(47, 41, 37, .15) !important;
}

html body .maido-stage5i-product-detail .maido-cart-inline-feedback {
  flex: 1 0 100% !important;
  margin-top: 0 !important;
}

@media (max-width: 720px) {
  html body .maido-stage5i-product-detail .product-actions.maido-cart-actions,
  html body .maido-stage5i-product-detail .maido-cart-add-form {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  html body .maido-stage5i-product-detail .maido-cart-add-form .btn,
  html body .maido-stage5i-product-detail .maido-cart-actions > a.btn.btn--ghost {
    width: 100% !important;
  }
}
