/* Zoomag r10 — responsive core reset.
   Fixes the real scaling problem: previous r7-r9 product rules were scoped through
   a nonexistent #product-product wrapper and therefore never matched product.twig.
   r10 uses direct selectors and viewport-relative widths. */

body.zm-storefront-r10 {
  --zm-r10-page: 94vw;
  --zm-r10-inner: 92vw;
  --zm-r10-gap: clamp(24px, 2.2vw, 48px);
  font-size: 17px !important;
}

/* Never let an old balance file shrink the active storefront shell. */
body.zm-storefront-r10,
body.zm-storefront-r10 .zoomag_main_container,
body.zm-storefront-r10 .zoomag_main_content,
body.zm-storefront-r10 main,
body.zm-storefront-r10 #content {
  max-width: none !important;
  transform: none !important;
  zoom: 1 !important;
}

/* ---------- site/header/menu: viewport relative, not fixed max-width islands ---------- */
body.zm-storefront-r10 .zoomag_top_panel > .container,
body.zm-storefront-r10 .zoomag_main_header_block > .container,
body.zm-storefront-r10 .zm-classic-nav__inner,
body.zm-storefront-r10 .zm-classic-nav__desktop-panel-inner {
  width: var(--zm-r10-page) !important;
  max-width: none !important;
  margin-inline: auto !important;
}

@media (min-width: 1200px) {
  body.zm-storefront-r10 .zoomag_header_layout {
    width: 100% !important;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: minmax(0, 34fr) minmax(0, 50fr) minmax(190px, 16fr) !important;
    align-items: center !important;
    gap: clamp(22px, 1.6vw, 36px) !important;
  }
  body.zm-storefront-r10 .zoomag_search_section,
  body.zm-storefront-r10 .zoomag_search_block,
  body.zm-storefront-r10 .zoomag-magic-search,
  body.zm-storefront-r10 .magic-search-input-wrapper {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }
}

/* Keep the source coin close to the logo instead of sending it across the header. */
body.zm-storefront-r10 .zoomag_logo_with_coins {
  --zm-coin-left-stage: clamp(62px, 4.2vw, 92px) !important;
}
body.zm-storefront-r10 .zoomag_logo_with_coins .coin,
body.zm-storefront-r10 .zoomag_logo_with_coins .coin.coin-slide-right {
  animation: zmCoinStayNearLogoR10 180s ease-in-out 5s infinite !important;
}
@keyframes zmCoinStayNearLogoR10 {
  0%,1% { opacity:0; transform:translate3d(0,0,0) scale(.95); }
  2% { opacity:1; transform:translate3d(0,0,0) scale(1); }
  7%,93% { opacity:1; transform:translate3d(calc(var(--zm-coin-left-stage) * -.58),0,0) scale(1); }
  96% { opacity:1; transform:translate3d(calc(var(--zm-coin-left-stage) * -.58),0,0) scale(1); }
  98% { opacity:1; transform:translate3d(0,0,0) scale(1); }
  99%,100% { opacity:0; transform:translate3d(0,0,0) scale(.95); }
}

/* ========================================================================== */
/* PRODUCT PAGE — DIRECT MATCHING SELECTORS                                   */
/* ========================================================================== */
body.zm-storefront-r10 .zoohub-product-showcase {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  transform: none !important;
  zoom: 1 !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-container {
  width: var(--zm-r10-page) !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
  transform: none !important;
  zoom: 1 !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-layout,
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-main {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding-inline: 0 !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-breadcrumb-trail,
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-product-jungle,
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-tabs-savannah,
body.zm-storefront-r10 .zoohub-product-showcase .zm-related-showcase,
body.zm-storefront-r10 .zoohub-product-showcase .product-related {
  width: var(--zm-r10-inner) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* Desktop: proportional columns fill the viewport. */
@media (min-width: 1200px) {
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-product-jungle {
    display: grid !important;
    grid-template-columns: minmax(0, 46fr) minmax(0, 54fr) !important;
    gap: var(--zm-r10-gap) !important;
    align-items: start !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-gallery-den,
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-info-sanctuary {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-gallery-den {
    position: sticky !important;
    top: 84px !important;
    padding: clamp(16px, 1.2vw, 24px) !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-gallery-main,
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-gallery-habitat,
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-image-petting-zone,
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-gallery-featured,
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-image-frame {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-gallery-featured,
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-image-frame {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    aspect-ratio: 1 / 1 !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-gallery-image {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    padding: 0 !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-info-sanctuary {
    padding: clamp(20px, 1.6vw, 34px) !important;
  }
}

/* Laptop desktop stays two-column but without the old 340–390px gallery. */
@media (min-width: 1024px) and (max-width: 1199.98px) {
  body.zm-storefront-r10 { --zm-r10-page: 96vw; --zm-r10-inner: 94vw; --zm-r10-gap: 24px; }
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-product-jungle {
    display: grid !important;
    grid-template-columns: minmax(0, 44fr) minmax(0, 56fr) !important;
    gap: 24px !important;
    align-items: start !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-gallery-den,
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-info-sanctuary {
    width: 100% !important;
    max-width: none !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-gallery-featured,
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-image-frame {
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: 1 / 1 !important;
  }
}

/* Product typography is tied to the visible page, not the old compact r26 values. */
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-product-title {
  font-size: clamp(2.25rem, 2.35vw, 3.35rem) !important;
  line-height: 1.08 !important;
  max-width: 28ch !important;
  margin-bottom: 16px !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-rating-forest,
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-review-link {
  font-size: 14px !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-facts-grid {
  gap: 12px !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-fact-item {
  min-height: 68px !important;
  padding: 12px 14px !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-fact-label {
  font-size: 13px !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-fact-value,
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-stock-text {
  font-size: 16px !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-price-meadow {
  padding: 16px 18px !important;
  margin: 14px 0 !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-price-current {
  font-size: clamp(2.2rem, 2.25vw, 3rem) !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-price-old,
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-price-savings {
  font-size: 13px !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-conversion-trust {
  gap: 10px !important;
  margin-block: 14px !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-conversion-trust__item {
  min-height: 66px !important;
  padding: 11px 12px !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-conversion-trust__text strong {
  font-size: 14px !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-conversion-trust__text small {
  font-size: 12px !important;
}

/* Variants below the photo must visually use the same gallery width. */
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-variant-gallery-host {
  width: 100% !important;
  max-width: none !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-variant-gallery-host .zoohub-variant-switches {
  width: 100% !important;
  max-width: none !important;
  padding: clamp(18px, 1.3vw, 26px) !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-variant-switches__title {
  font-size: 20px !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-variant-chip {
  min-height: 62px !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-variant-chip__label {
  font-size: 14px !important;
}

/* Tabs / rich description follow exactly the same visible width as the hero. */
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-tabs-savannah {
  margin-top: 28px !important;
}
body.zm-storefront-r10 .zoohub-product-showcase .zoohub-tabs-content,
body.zm-storefront-r10 .zoohub-product-showcase [data-zm-product-description] {
  width: 100% !important;
  max-width: none !important;
  font-size: 17px !important;
}

/* ---------- related: 3 large equal cards at desktop ---------- */
@media (min-width: 1200px) {
  body.zm-storefront-r10 .zoohub-product-showcase .zm-related-showcase {
    --zr-visible: 3 !important;
    --zr-gap: clamp(22px, 1.6vw, 32px) !important;
    padding: clamp(26px, 2vw, 38px) !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zm-related-showcase__track {
    align-items: stretch !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zm-related-showcase__slide,
  body.zm-storefront-r10 .zoohub-product-showcase .zm-related-showcase__card-shell,
  body.zm-storefront-r10 .zoohub-product-showcase .zm-related-showcase .petz-product-card {
    height: 100% !important;
    min-height: 100% !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zm-related-showcase .petz-image-section {
    height: clamp(300px, 23vw, 430px) !important;
    padding: 16px 16px 0 !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zm-related-showcase .petz-image-link,
  body.zm-storefront-r10 .zoohub-product-showcase .zm-related-showcase .petz-image-container {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zm-related-showcase .petz-product-image {
    width: auto !important;
    height: auto !important;
    max-width: 94% !important;
    max-height: 94% !important;
    object-fit: contain !important;
    padding: 0 !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zm-related-showcase .petz-content-section {
    padding: 18px 20px 20px !important;
    gap: 12px !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zm-related-showcase .petz-product-name {
    min-height: 4em !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zm-related-showcase .petz-product-name a {
    font-size: 18px !important;
    line-height: 1.3 !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zm-related-showcase .petz-price-main,
  body.zm-storefront-r10 .zoohub-product-showcase .zm-related-showcase .petz-special-price {
    font-size: 25px !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zm-related-showcase .petz-btn.petz-btn-primary {
    min-height: 54px !important;
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  body.zm-storefront-r10 .zoohub-product-showcase .zm-related-showcase {
    --zr-visible: 2 !important;
    --zr-gap: 20px !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zm-related-showcase .petz-image-section {
    height: 300px !important;
  }
}

/* ---------- true mobile: one column, comfortable readable sizes ---------- */
@media (max-width: 1023.98px) {
  body.zm-storefront-r10 { --zm-r10-page: calc(100vw - 24px); --zm-r10-inner: calc(100vw - 24px); }
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-product-jungle {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-gallery-den {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-info-sanctuary {
    width: 100% !important;
    max-width: none !important;
  }
}

@media (max-width: 767.98px) {
  body.zm-storefront-r10 { font-size: 16px !important; --zm-r10-page: calc(100vw - 18px); --zm-r10-inner: calc(100vw - 18px); }
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-product-title {
    font-size: clamp(1.65rem, 7vw, 2.15rem) !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-price-current {
    font-size: clamp(1.8rem, 7vw, 2.35rem) !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-facts-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-conversion-trust {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 480px) {
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-facts-grid,
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-conversion-trust {
    grid-template-columns: 1fr !important;
  }
  body.zm-storefront-r10 .zoohub-product-showcase .zoohub-variant-switches__grid {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.zm-storefront-r10 .zoomag_logo_with_coins .coin.coin-slide-right {
    animation: none !important;
    opacity: 1 !important;
    transform: translate3d(calc(var(--zm-coin-left-stage) * -.35),0,0) scale(1) !important;
  }
}
