/* Background starts visually after the white hero and continues through app views. */
body.reference-main{background:#f4f9ff!important}
.reference-main .topbar{background:#fff!important}
.reference-main .app-shell{background:transparent!important}
.reference-main #catalogo{position:relative!important;isolation:isolate;background:linear-gradient(145deg,#fff 0%,#f2f8ff 48%,#eaf4ff 78%,#fff 100%)!important}
.reference-main #catalogo>.catalog-paw-layer{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none;contain:strict}
.reference-main #catalogo>.catalog-paw-layer i{position:absolute;display:block;width:34px;height:34px;background:url('./assets/main-paw.svg') center/contain no-repeat;opacity:.42}
.reference-main #catalogo>.catalog-paw-layer i:nth-child(1){left:5%;top:7%;transform:rotate(-18deg)}
.reference-main #catalogo>.catalog-paw-layer i:nth-child(2){right:7%;top:24%;width:46px;height:46px;transform:rotate(17deg)}
.reference-main #catalogo>.catalog-paw-layer i:nth-child(3){left:3%;top:48%;width:27px;height:27px;transform:rotate(25deg)}
.reference-main #catalogo>.catalog-paw-layer i:nth-child(4){right:4%;top:69%;width:39px;height:39px;transform:rotate(-24deg)}
.reference-main #catalogo>.catalog-paw-layer i:nth-child(5){left:45%;top:91%;width:29px;height:29px;transform:rotate(11deg)}
.reference-main main>#catalogo~.section-card,.reference-main footer{background-color:#f8fbff!important;background-image:linear-gradient(145deg,#fff,#f1f7ff)!important}
.reference-main main>#catalogo~.section-card{border-color:#dceafa!important}

/* Stable compositing for the product feed and fixed purchase dock. */
.reference-main #catalogProducts{contain:layout style!important}
.reference-main #catalogProducts .catalog-product-card{contain:layout paint style!important}
.reference-main #catalogProducts .catalog-product-card,
.reference-main #catalogProducts .catalog-product-card *{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.reference-main #catalogMoreIndicator{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.reference-main .global-cart-dock{transform:translate3d(-50%,0,0)!important;backface-visibility:hidden;contain:layout paint style;will-change:transform}
.reference-main .global-cart-dock.is-hidden{transform:translate3d(-50%,0,0)!important}
html.main-scroll-active .reference-main .global-cart-dock{box-shadow:none!important;transition:none!important}
html.main-scroll-active .reference-main #catalogProducts .catalog-product-card{box-shadow:none!important}
html.main-scroll-active .reference-main #catalogMoreIndicator{visibility:hidden!important}

/* App-like product/category surfaces: immediate paint, opacity-only entrance/exit. */
#galleryModal,#categoryModal{
  opacity:0!important;
  transform:none!important;
  transition:opacity 120ms cubic-bezier(.2,.75,.25,1)!important;
  will-change:opacity;
}
#galleryModal.open,#categoryModal.open{opacity:1!important}
#galleryModal.open.app-closing,#categoryModal.open.app-closing{opacity:0!important;pointer-events:none!important}
#galleryModal .gallery-modal-card,#categoryModal .category-modal-card{
  animation:none!important;
  transition:none!important;
  transform:none!important;
  contain:layout paint style;
}
@media(prefers-reduced-motion:reduce){#galleryModal,#categoryModal{transition:none!important}}
#overlay{
  background:transparent!important;
  opacity:0!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  transition:none!important;
}

/* Immutable dock geometry: opening any app surface must not move it. */
body.reference-main .global-cart-dock,
body.reference-main:has(#galleryModal.open) .global-cart-dock,
body.reference-main:has(#categoryModal.open) .global-cart-dock,
body.reference-main:has(#checkoutModal.open) .global-cart-dock,
body.reference-main:has(#cartDrawer.open) .global-cart-dock,
body.reference-main:has(.modal.open) .global-cart-dock,
body.reference-main:has(.drawer.open) .global-cart-dock{
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  bottom:0!important;
  width:min(800px,calc(100vw - 16px))!important;
  max-width:800px!important;
  transform:translate3d(-50%,0,0)!important;
  padding:8px 20px max(5px,env(safe-area-inset-bottom))!important;
  border:1px solid #dbe8f8!important;
  border-bottom:0!important;
  border-radius:24px 24px 0 0!important;
  background:#fff!important;
  box-shadow:0 16px 42px rgba(31,111,255,.13)!important;
  animation:none!important;
  transition:opacity .18s ease,visibility .18s ease!important;
}
@media(max-width:640px){
  body.reference-main .global-cart-dock,
  body.reference-main:has(#galleryModal.open) .global-cart-dock,
  body.reference-main:has(#categoryModal.open) .global-cart-dock,
  body.reference-main:has(#checkoutModal.open) .global-cart-dock,
  body.reference-main:has(#cartDrawer.open) .global-cart-dock,
  body.reference-main:has(.modal.open) .global-cart-dock,
  body.reference-main:has(.drawer.open) .global-cart-dock{
    width:calc(100vw - 10px)!important;
    max-width:none!important;
    padding:6px 8px max(4px,env(safe-area-inset-bottom))!important;
    border-radius:18px 18px 0 0!important;
  }
}

/* No reserved result column/space until a tracking lookup actually starts. */
#seguimiento:has(#trackingResult.hidden){grid-template-columns:1fr!important;gap:0!important;padding-bottom:18px!important}
#seguimiento #trackingResult.hidden{display:none!important}
#seguimiento:has(#trackingResult.hidden) .tracking-intro{max-width:760px;width:100%;margin:0 auto}

/* Paw-and-sky surface shared by product/category views and the cart. Checkout is untouched. */
#galleryModal,#categoryModal,#cartDrawer{
  background-color:#f4f9ff!important;
  background-image:url('./assets/main-paw.svg'),url('./assets/main-paw.svg'),url('./assets/main-paw.svg'),linear-gradient(145deg,#fff,#eaf4ff 62%,#f8fbff)!important;
  background-repeat:no-repeat!important;
  background-position:7% 18%,92% 48%,18% 86%,center!important;
  background-size:34px,46px,28px,100% 100%!important;
}
#galleryModal .gallery-modal-card,#categoryModal .category-modal-card{background:rgba(255,255,255,.78)!important}
#cartDrawer{inset:0!important;min-height:100dvh!important;height:100dvh!important;padding-bottom:var(--global-dock-space)!important;box-sizing:border-box!important}
#cartDrawer #cartEmpty{min-height:calc(100dvh - var(--global-dock-space) - 100px);display:grid;place-items:center;background:rgba(255,255,255,.56);border-radius:18px}
#cartDrawer #cartEmpty.hidden{display:none!important}

/* Pediboox 28.5 · el wordmark reemplaza al isotipo sin cambiar la altura del encabezado. */
body.reference-main .topbar .brand-main{width:calc(180 * var(--s))!important;height:calc(53 * var(--s))!important;max-width:none!important;justify-content:center!important}
body.reference-main .topbar #brandLogo.brand-logo-wordmark{display:block!important;flex:0 0 calc(180 * var(--s))!important;width:calc(180 * var(--s))!important;height:calc(53 * var(--s))!important;min-width:0!important;max-width:none!important;max-height:none!important;object-fit:contain!important}
