/* NeoFarma MX · fondo maestro de salud tecnológica */
:root {
  --nf-health-background: url("/assets/neo-futuristic-health-bg.webp?v=neo-health-bg-20261015-1");
}

html {
  min-height: 100%;
  background-color: #eaf8fc !important;
  background-image: var(--nf-health-background) !important;
  background-position: center top !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

body.home-page,
body.catalog-page,
body.customer-page,
body.cart-page,
body.checkout-page,
body.product-page,
body.mayoreo-page {
  min-height: 100vh;
  color-scheme: light !important;
  background-color: #eaf8fc !important;
  background-image: var(--nf-health-background) !important;
  background-position: center top !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

body.home-page::before {
  background-image: none !important;
  opacity: 0 !important;
}

body.home-page .app,
body.catalog-page .app,
body.customer-page .app,
body.cart-page .app,
body.checkout-page .app,
body.product-page .app,
body.mayoreo-page .app {
  min-height: 100vh;
  background: transparent !important;
}

.app-header,
.app-header--neo,
.customer-header--premium {
  background: rgba(255, 255, 255, .72) !important;
  backdrop-filter: blur(14px) saturate(125%) !important;
}

.home-page .neo-premium-sidebar,
.home-page .neo-premium-nav,
.home-page .neo-premium-hero,
.home-page .neo-premium-search,
.home-page .neo-premium-products,
.home-page .neo-premium-benefits article,
.home-page .neo-premium-sidecard,
.home-page .farmi-companion,
.customer-page .farmi-intro,
.customer-page .customer-quick,
.customer-page .customer-results,
.customer-page .customer-help,
body.catalog-page .catalog-intro,
body.cart-page .cart-intro,
body.checkout-page .checkout-intro,
.catalog-master,
.catalog-summary,
.cart-products,
.cart-summary,
.checkout-panel,
.checkout-summary,
.checkout-delivery,
.product-detail,
.product-detail__media,
.product-detail__content,
.mayoreo-hero,
.mayoreo-steps__grid article,
.mayoreo-note,
.mayoreo-catalog-hint,
.wholesale-promo {
  background: rgba(255, 255, 255, .76) !important;
  backdrop-filter: blur(7px) saturate(115%) !important;
}

.home-page .neo-premium-sidebar,
.home-page .neo-premium-nav,
.home-page .neo-premium-sidecard,
.home-page .neo-premium-benefits article,
.customer-page .customer-category-grid button,
.mayoreo-steps__grid article {
  background: rgba(255, 255, 255, .82) !important;
}

.product-card {
  color: #173a4b !important;
  background: rgba(255, 255, 255, .84) !important;
  border-color: rgba(25, 124, 145, .20) !important;
}

.product-card__body {
  background: transparent !important;
}

@media (max-width: 700px) {
  html,
  body.home-page,
  body.catalog-page,
  body.customer-page,
  body.cart-page,
  body.checkout-page,
  body.product-page,
  body.mayoreo-page {
    background-attachment: scroll !important;
    background-position: center top !important;
  }

  .app-header,
  .app-header--neo,
  .customer-header--premium {
    background: rgba(255, 255, 255, .78) !important;
  }

  .home-page .neo-premium-hero,
  body.catalog-page .catalog-intro,
  body.cart-page .cart-intro,
  body.checkout-page .checkout-intro,
  .catalog-master,
  .cart-products,
  .cart-summary,
  .checkout-panel,
  .checkout-summary,
  .product-detail,
  .mayoreo-hero {
    background: rgba(255, 255, 255, .82) !important;
  }
}


/* NeoFarma MX · encabezado con Farmi en moto */
:root {
  --nf-farmi-moto-header: url("/assets/farmi-moto-header-20261015.webp?v=neo-farmi-moto-header-20261015-1");
}

.app-header,
.app-header--neo,
.customer-header--premium,
.home-page .app-header--neo,
.customer-page .customer-header--premium {
  background-color: #eaf8fc !important;
  background-image:
    linear-gradient(90deg, rgba(247, 253, 255, .20), rgba(247, 253, 255, .04) 52%, rgba(247, 253, 255, .08)),
    var(--nf-farmi-moto-header) !important;
  background-size: cover !important;
  background-position: center 18% !important;
  background-repeat: no-repeat !important;
  border-bottom: 1px solid rgba(20, 131, 157, .22) !important;
  box-shadow: 0 8px 28px rgba(19, 83, 101, .12) !important;
  backdrop-filter: blur(14px) saturate(125%) !important;
}

.app-header__bar,
.app-header__bar--home,
.customer-header__bar {
  min-height: 148px !important;
}

.home-page .app-header__bar--home {
  position: relative !important;
  justify-content: flex-end !important;
  min-height: 148px !important;
}

.home-page .app-header__bar--home > .brand.brand--home {
  position: absolute !important;
  z-index: 2 !important;
  top: 50% !important;
  left: 50% !important;
  width: clamp(126px, 17vw, 184px) !important;
  margin: 0 !important;
  padding: 5px 8px !important;
  transform: translate(-50%, -50%) !important;
  justify-content: center !important;
  border: 1px solid rgba(255, 255, 255, .62) !important;
  border-radius: 15px !important;
  background: rgba(255, 255, 255, .58) !important;
  box-shadow: 0 8px 22px rgba(15, 91, 111, .13) !important;
  backdrop-filter: blur(10px) saturate(130%) !important;
}

.home-page .app-header__bar--home > .brand.brand--home img {
  width: 100% !important;
  max-height: 52px !important;
  object-fit: contain !important;
  object-position: center !important;
  filter: drop-shadow(0 3px 8px rgba(11, 72, 92, .18)) !important;
}

.home-page .header-brand-actions {
  position: relative !important;
  z-index: 3 !important;
  margin-left: auto !important;
}

@media (max-width: 760px) {
  .app-header__bar,
  .app-header__bar--home,
  .customer-header__bar,
  .home-page .app-header__bar--home,
  .customer-page .customer-header__bar {
    min-height: 112px !important;
  }

  .home-page .app-header__bar--home {
    width: calc(100% - 20px) !important;
    padding-inline: 8px !important;
  }

  .home-page .app-header__bar--home > .brand.brand--home {
    width: 132px !important;
    padding: 4px 6px !important;
  }

  .home-page .app-header__bar--home > .brand.brand--home img {
    max-height: 43px !important;
  }

  .app-header,
  .app-header--neo,
  .customer-header--premium,
  .home-page .app-header--neo,
  .customer-page .customer-header--premium {
    background-position: center 12% !important;
    background-attachment: scroll !important;
  }
}

@media (max-width: 430px) {
  .home-page .app-header__bar--home > .brand.brand--home {
    width: 122px !important;
  }

  .home-page .app-header__bar--home > .brand.brand--home img {
    max-height: 40px !important;
  }
}



/* Encabezado compacto al desplazarse para que el arte de Farmi no cubra el contenido. */
.home-page .app-header--neo,
.home-page .app-header--neo .app-header__bar--home {
  transition: background-color .22s ease, box-shadow .22s ease, border-color .22s ease, min-height .22s ease, padding .22s ease !important;
}

.home-page .app-header--neo.is-scrolled {
  background-color: rgba(249, 253, 254, .97) !important;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(238, 249, 250, .97)) !important;
  background-position: center !important;
  background-size: cover !important;
  border-bottom-color: rgba(20, 131, 157, .16) !important;
  box-shadow: 0 7px 22px rgba(19, 83, 101, .12) !important;
  backdrop-filter: blur(16px) saturate(145%) !important;
}

.home-page .app-header--neo.is-scrolled .app-header__bar--home {
  min-height: 72px !important;
}

.home-page .app-header--neo.is-scrolled .app-header__bar--home > .brand.brand--home {
  width: clamp(116px, 15vw, 150px) !important;
  padding: 3px 6px !important;
  border-color: rgba(204, 229, 230, .88) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .88) !important;
  box-shadow: 0 3px 11px rgba(15, 91, 111, .08) !important;
  backdrop-filter: blur(8px) !important;
}

.home-page .app-header--neo.is-scrolled .app-header__bar--home > .brand.brand--home img {
  max-height: 39px !important;
}

@media (max-width: 760px) {
  .home-page .app-header--neo.is-scrolled .app-header__bar--home {
    min-height: 64px !important;
    padding-block: 6px !important;
  }

  .home-page .app-header--neo.is-scrolled .app-header__bar--home > .brand.brand--home {
    width: 108px !important;
  }

  .home-page .app-header--neo.is-scrolled .app-header__bar--home > .brand.brand--home img {
    max-height: 34px !important;
  }
}

@media (max-width: 380px) {
  .home-page .app-header--neo.is-scrolled .app-header__bar--home > .brand.brand--home {
    width: 100px !important;
  }

  .home-page .app-header--neo.is-scrolled .app-header__bar--home > .brand.brand--home img {
    max-height: 31px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .app-header--neo,
  .home-page .app-header--neo .app-header__bar--home {
    transition: none !important;
  }
}


/* El acceso al chat vive junto a Farmi IA en la navegación, sin tapar a Farmi en el encabezado. */
.home-page .neo-premium-nav .neo-premium-chat-launch {
  min-height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 0 13px !important;
  border: 1px solid #b9ddd8 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #eff9f7, #e7f5f1) !important;
  color: #126c75 !important;
  font: 700 .72rem "IBM Plex Sans", sans-serif !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(15, 87, 90, .07), inset 0 1px 0 #fff !important;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease !important;
}

.home-page .neo-premium-nav .neo-premium-chat-launch svg {
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 auto !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.home-page .neo-premium-nav .neo-premium-chat-launch:hover {
  transform: translateY(-1px) !important;
  border-color: #8fc9be !important;
  background: linear-gradient(135deg, #e7f7f3, #dff1eb) !important;
  box-shadow: 0 7px 16px rgba(15, 87, 90, .11), inset 0 1px 0 #fff !important;
}

.home-page .neo-premium-nav .neo-premium-chat-launch:focus-visible {
  outline: 3px solid rgba(8, 127, 148, .36) !important;
  outline-offset: 3px !important;
}

@media (max-width: 760px) {
  .home-page .neo-premium-nav .neo-premium-chat-launch {
    min-height: 39px !important;
    padding-inline: 9px !important;
    gap: 5px !important;
    font-size: .64rem !important;
  }

  .home-page .neo-premium-nav .neo-premium-chat-launch svg {
    width: 14px !important;
    height: 14px !important;
  }
}

@media (max-width: 430px) {
  .home-page .neo-premium-nav .neo-premium-chat-launch {
    width: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border-radius: 10px !important;
  }

  .home-page .neo-premium-nav .neo-premium-chat-launch span {
    display: none !important;
  }
}


/* NeoFarma MX · calidad para pantallas 4K y 8K */
@media (min-width: 2560px), (min-width: 1200px) and (min-resolution: 1.5dppx) {
  :root {
    --nf-health-background: url("/assets/neo-futuristic-health-bg-8k.svg?v=neo-health-vector-20261015-1");
  }
}

@media (min-width: 1600px) {
  html { font-size: clamp(16px, .31vw, 24px); }

  .app-header__bar,
  .app-header__bar--home,
  .customer-header__bar,
  .mayoreo-page .app-header__bar {
    width: min(91vw, 1900px) !important;
  }

  .home-page .neo-premium-home {
    width: min(91vw, 1900px) !important;
    grid-template-columns: minmax(220px, clamp(220px, 10vw, 340px)) minmax(0, 1fr) !important;
    gap: clamp(20px, 1.2vw, 34px) !important;
  }

  .home-page .neo-premium-main {
    gap: clamp(22px, 1.25vw, 40px) !important;
  }

  .home-page .neo-premium-hero {
    min-height: clamp(460px, 20vw, 640px) !important;
    padding: clamp(32px, 2.1vw, 76px) !important;
    gap: clamp(24px, 2vw, 58px) !important;
    border-radius: clamp(34px, 2vw, 58px) !important;
  }

  .home-page .neo-premium-hero__content {
    max-width: min(48vw, 1100px) !important;
  }

  .home-page .neo-premium-hero h1 {
    max-width: 1300px !important;
    font-size: clamp(3.5rem, 2.35vw, 6.5rem) !important;
  }

  .home-page .neo-premium-hero__content > p {
    max-width: 900px !important;
    font-size: clamp(1rem, .5vw, 1.25rem) !important;
  }

  .home-page .neo-premium-hero__visual {
    min-height: clamp(380px, 20vw, 620px) !important;
  }

  .home-page .product-grid--home,
  .catalog-page .product-grid--catalog,
  .customer-page .customer-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: clamp(14px, .8vw, 28px) !important;
  }

  .catalog-intro,
  .catalog-master,
  .customer-search,
  .customer-quick,
  .customer-results,
  .customer-help,
  .cart-screen,
  .checkout-screen,
  .product-screen,
  .mayoreo-screen {
    width: min(91vw, 1900px) !important;
  }
}

@media (min-width: 2560px) {
  .app-header__bar,
  .app-header__bar--home,
  .customer-header__bar,
  .mayoreo-page .app-header__bar {
    width: min(90vw, 2800px) !important;
  }

  .home-page .neo-premium-home {
    width: min(90vw, 2800px) !important;
  }

  .home-page .neo-premium-hero {
    min-height: clamp(520px, 21vw, 780px) !important;
  }

  .home-page .product-grid--home,
  .catalog-page .product-grid--catalog,
  .customer-page .customer-product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .catalog-intro,
  .catalog-master,
  .customer-search,
  .customer-quick,
  .customer-results,
  .customer-help,
  .cart-screen,
  .checkout-screen,
  .product-screen,
  .mayoreo-screen {
    width: min(90vw, 2500px) !important;
  }
}

@media (min-width: 3840px) {
  .app-header__bar,
  .app-header__bar--home,
  .customer-header__bar,
  .mayoreo-page .app-header__bar {
    width: min(90vw, 4800px) !important;
  }

  .home-page .neo-premium-home {
    width: min(90vw, 4800px) !important;
  }

  .home-page .neo-premium-hero {
    min-height: clamp(600px, 22vh, 980px) !important;
  }

  .home-page .neo-premium-hero__visual {
    min-height: clamp(560px, 20vh, 900px) !important;
  }

  .home-page .product-grid--home,
  .catalog-page .product-grid--catalog,
  .customer-page .customer-product-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  .catalog-intro,
  .catalog-master,
  .customer-search,
  .customer-quick,
  .customer-results,
  .customer-help,
  .cart-screen,
  .checkout-screen,
  .product-screen,
  .mayoreo-screen {
    width: min(90vw, 4600px) !important;
  }
}



/* Header móvil: logotipo blanco centrado y acciones alineadas a la derecha. */
@media (max-width: 760px) {
  .home-page .app-header--neo {
    width: 100% !important;
    background-size: cover !important;
    background-position: center 12% !important;
    background-repeat: no-repeat !important;
  }

  .home-page .app-header__bar--home {
    position: relative !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding-inline: 12px !important;
  }

  .home-page .app-header__bar--home > .brand.brand--home {
    position: absolute !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 2 !important;
    flex: 0 0 auto !important;
    width: clamp(96px, 28vw, 128px) !important;
    margin: 0 !important;
    background: rgba(255, 255, 255, .84) !important;
  }

  .home-page .header-brand-actions {
    position: relative !important;
    z-index: 3 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
  }

  .home-page .header-brand-actions .install-header {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    justify-content: center !important;
  }

  .home-page .header-brand-actions .header-cart {
    position: relative !important;
    display: flex !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    min-height: 44px !important;
    flex: 0 0 44px !important;
    gap: 0 !important;
    padding: 0 !important;
    justify-content: center !important;
  }

  .home-page .header-brand-actions .header-cart .cart-count {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    z-index: 4 !important;
  }
}
