/* ==========================================================================
   Base
   (Inter se autoaloja en typography.css)
   ========================================================================== */
@import url("weu-form-controls.css");
@import url("weu-splide.css");

body.wecomm-jomagrx {
  font-family: var(--weu-font-family-base);
  color: var(--weu-color-dark);
}

/* Evita el scroll horizontal que provocan las secciones full-bleed (100vw).
   Usamos clip en lugar de hidden para no romper position: sticky del header. */
html,
body.wecomm-jomagrx {
  overflow-x: clip;
  max-width: 100%;
}

/* ==========================================================================
   Acentos de marca — azul (#1613a9) y amarillo (#eefd76)
   Utilidades coherentes con texto de contraste automático
   ========================================================================== */
.weu-bg-blue {
  background-color: var(--weu-color-blue);
  color: var(--weu-color-on-blue);
}

.weu-bg-yellow {
  background-color: var(--weu-color-yellow);
  color: var(--weu-color-on-yellow);
}

.weu-text-blue {
  color: var(--weu-color-blue);
}

.weu-text-yellow {
  color: var(--weu-color-yellow);
}

.weu-border-blue {
  border-color: var(--weu-color-blue) !important;
}

.weu-border-yellow {
  border-color: var(--weu-color-yellow) !important;
}

/* Badge / etiqueta destacada amarilla (buena para ofertas) */
.weu-badge-yellow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--weu-color-yellow);
  color: var(--weu-color-on-yellow);
  font-weight: 700;
  border-radius: var(--weu-radius-pill);
  padding: 4px 12px;
  line-height: 1.2;
}

/* Etiquetas de producto (miniatura + ficha): radio píldora canónico */
.wecomm-jomagrx .product-flags .badge,
.wecomm-jomagrx .product-flags .weu-product__discount-badge {
  border-radius: var(--weu-radius-pill);
}

/*
 * Agotado: negro.
 * Hummingbird mete .product-flags .badge:not(.discount) en @layer bs-base con
 * background-color !important; el !important de una capa gana al de fuera.
 * 1) Redefinir --bs-primary* en el propio badge (la regla layered usa esas vars).
 * 2) Repetir el fondo dentro de @layer bs-base para ganar por especificidad/orden.
 */
.wecomm-jomagrx .product-flags .badge.out_of_stock {
  --bs-primary: #0a1210;
  --bs-primary-rgb: 10, 18, 16;
  --bs-bg-opacity: 1;
}

@layer bs-base {
  .wecomm-jomagrx .product-flags .badge.out_of_stock,
  .wecomm-jomagrx .product-miniature .product-flags .badge.out_of_stock,
  body.page-product .weu-product__gallery-item .product-flags .badge.out_of_stock,
  body.page-product .weu-product__gallery-empty .product-flags .badge.out_of_stock {
    background-color: #0a1210 !important;
    border-color: #0a1210 !important;
    color: #fff !important;
  }
}

/* Botones: sistema en weu-buttons.css (Primary / Secondary / Tertiary).
   .weu-btn-blue → Primary; .weu-btn-interfaz → Secondary. */

/* Enlace/realce amarillo (subrayado tipo highlighter) */
.weu-highlight-yellow {
  background: linear-gradient(180deg, transparent 60%, var(--weu-color-yellow) 60%);
  padding: 0 2px;
}

.weu-products-section-title {
  font-size: var(--font-size-lg);
  font-weight: 800;
  line-height: 1.2;
  color: var(--weu-color-black);
  margin-bottom: var(--weu-spacing-sm);
}

.weu-section-subtitle {
  color: rgba(0, 0, 0, 0.6);
  margin-bottom: var(--weu-spacing-md);
}

/* ==========================================================================
   Header
   ========================================================================== */
.wecomm-jomagrx .header-bottom {
  border-bottom: 1px solid var(--weu-color-border);
  background: var(--weu-white);
}

.header-bottom__container {
  max-width: var(--weu-width-container);
}

/* Ancho final desde el primer paint (sin esperar .wecomm-jomagrx vía JS → CLS).
   Debe ganar a Bootstrap @media (min-width: 1400px) { .container { max-width: 1320px } }. */
.container-md,
#wrapper > .breadcrumb__wrapper > .container,
#wrapper > .columns-container.container {
  max-width: var(--weu-width-container);
  width: 100%;
}

@media (min-width: 1400px) {
  .container,
  .container-sm,
  .container-md,
  .container-lg,
  .container-xl,
  .container-xxl,
  #wrapper > .breadcrumb__wrapper > .container,
  #wrapper > .columns-container.container {
    max-width: var(--weu-width-container);
  }
}

/* Migas de pan — 12px, enlaces negros (referencia Joma Sport) */
#wrapper .breadcrumb__wrapper .breadcrumb,
#wrapper .breadcrumb__wrapper .breadcrumb-link,
#wrapper .breadcrumb__wrapper .breadcrumb-item {
  font-size: 12px;
}

#wrapper .breadcrumb__wrapper .breadcrumb-link {
  color: var(--weu-color-black);
  text-decoration: none;
}

#wrapper .breadcrumb__wrapper .breadcrumb-link:hover,
#wrapper .breadcrumb__wrapper .breadcrumb-link:focus {
  color: var(--weu-color-black);
  text-decoration: underline;
}

#wrapper .breadcrumb__wrapper .breadcrumb-item span {
  color: var(--weu-color-black);
}

.wecomm-jomagrx .header-block__action-btn:hover,
.wecomm-jomagrx .header-block__action-btn:focus,
.wecomm-jomagrx .header-block__action-btn:active {
  color: var(--weu-color-dark);
}

/* Menú inline cabecera: anula --bs-link-hover-color (rojo BO) en home/categoría */
#header .weu-header-main .weu-header-inline-menu__link:hover,
#header .weu-header-main .weu-header-inline-menu__link:focus,
#header .weu-header-main .weu-header-inline-menu__link:focus-visible {
  color: var(--weu-color-dark) !important;
  background-color: var(--weu-color-primary-soft);
  text-decoration: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.wecomm-jomagrx .footer__main {
  background: var(--weu-color-dark);
  color: var(--weu-white);
}

.wecomm-jomagrx .footer__main a {
  color: inherit;
}

.wecomm-jomagrx .copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: var(--weu-spacing-sm);
}

.wecomm-jomagrx .footer__main-catalog {
  padding-bottom: var(--weu-spacing-sm);
  margin-bottom: var(--weu-spacing-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* Catálogo, legales y resto de columnas: mismo tamaño/ritmo de enlace. */
.wecomm-jomagrx .footer__main .footer-block__list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 0.875rem;
  line-height: 1.45;
}

.wecomm-jomagrx .footer__main .footer-block__list a {
  display: block;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  line-height: 1.45;
  padding-block: 0; /* anula padding del tema base (.25rem) */
}

.wecomm-jomagrx .footer__main .footer-block__list a:hover,
.wecomm-jomagrx .footer__main .footer-block__list a:focus-visible {
  color: var(--weu-white);
  text-decoration: underline;
}

/* Mismo destacado que el Outlet del megamenú (megamenu.css). */
.wecomm-jomagrx .weu-footer-catalog .footer-block__list a.weu-footer-catalog__link--accent {
  font-weight: 700;
  color: var(--weu-color-error);
}

@media (min-width: 768px) {
  .wecomm-jomagrx .weu-footer-catalog .footer-block__content.collapse {
    display: block;
    height: auto !important;
    visibility: visible;
  }
}

.wecomm-jomagrx .weu-footer-store__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.wecomm-jomagrx .weu-footer-store__address {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0;
  font-style: normal;
}

.wecomm-jomagrx .weu-footer-store__label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.wecomm-jomagrx .weu-footer-store__hours-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0;
}

@media (min-width: 768px) {
  .wecomm-jomagrx .weu-footer-store .footer-block__content.collapse {
    display: block;
    height: auto !important;
    visibility: visible;
  }
}

.wecomm-jomagrx .weu-footer-safe-shopping__icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wecomm-jomagrx .weu-footer-safe-shopping__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 36px;
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: var(--weu-white);
}

.wecomm-jomagrx .weu-footer-safe-shopping__badge img {
  display: block;
  max-width: 100%;
  max-height: 24px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Tira de métodos de pago (producto / carrito / checkout) */
.weu-payment-methods {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.weu-payment-methods__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid var(--weu-border-color, #e5e7eb);
  border-radius: 6px;
  background: var(--weu-white, #fff);
}

.weu-payment-methods__badge img {
  display: block;
  height: 22px;
  width: auto;
  max-width: 46px;
  object-fit: contain;
}

.weu-payment-methods--product {
  margin-top: 0.75rem;
}

@media (min-width: 768px) {
  .wecomm-jomagrx .weu-footer-safe-shopping .footer-block__content.collapse {
    display: block;
    height: auto !important;
    visibility: visible;
  }
}

/* Miniaturas: estilos en listing-miniature.css */

/* ==========================================================================
   Toast lateral legacy — estilos canónicos en weu-toast.css
   ========================================================================== */
#blockcart-modal {
  display: none !important;
}

/* Amazzingfilter — cargar más / anteriores (botón interfaz en .loadMore) */
.wecomm-jomagrx .af.dynamic-loading.prev,
.wecomm-jomagrx .af.dynamic-loading.next {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 0 1rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: center;
  cursor: default;
  clear: both;
}

.wecomm-jomagrx .af.dynamic-loading.next {
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.wecomm-jomagrx .af.dynamic-loading.next .relative-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 2.75rem;
  position: relative;
}

.wecomm-jomagrx .af.dynamic-loading .loading-indicator {
  border-color: var(--weu-color-black, #0a1210);
  border-left-color: transparent;
  opacity: 1;
}

.wecomm-jomagrx .af.dynamic-loading.prev .loadMore,
.wecomm-jomagrx .af.dynamic-loading.next .loadMore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 10px 20px;
  border: none !important;
  border-radius: var(--weu-radius-pill);
  background-color: var(--weu-color-grey);
  color: var(--weu-color-black);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none !important;
  transition: background-color var(--weu-transition), color var(--weu-transition);
}

.wecomm-jomagrx .af.dynamic-loading .loadMore .weu-loadmore__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.wecomm-jomagrx .af.dynamic-loading .loadMore .weu-loadmore__text {
  text-align: center;
}

.wecomm-jomagrx .af.dynamic-loading.prev .loadMore:hover,
.wecomm-jomagrx .af.dynamic-loading.next .loadMore:hover,
.wecomm-jomagrx .af.dynamic-loading.prev .loadMore:focus-visible,
.wecomm-jomagrx .af.dynamic-loading.next .loadMore:focus-visible {
  background-color: var(--weu-color-grey-hover);
  color: var(--weu-color-black);
  border: none !important;
  box-shadow: none !important;
}

.wecomm-jomagrx #products .af.dynamic-loading.prev,
.wecomm-jomagrx #products .af.dynamic-loading.next {
  align-self: center;
}

/* Contador "Mostrando X-Y de Z" oculto (ya hay contador arriba del listado) */
:is(body#category, body#prices-drop, body#new-products, body#best-sales, body#search, body#manufacturer, body#supplier) .dynamic-product-count {
  display: none !important;
}

:is(body#category, body#prices-drop, body#new-products, body#best-sales, body#search, body#manufacturer, body#supplier):has(#amazzing_filter) .pagination__number {
  display: none !important;
}

/* Contadores amazzingfilter — pill gris, texto negro / azul en hover-activo */
:is(body#category, body#prices-drop, body#new-products, body#best-sales, body#search, body#manufacturer, body#supplier) #amazzing_filter .af_filter .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  min-width: 1.6rem;
  padding: 0.12rem 0.42rem;
  border-radius: var(--weu-radius-pill);
  background-color: var(--weu-color-grey);
  font-size: 0.6875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  color: var(--weu-color-black);
  transition: color var(--weu-transition), background-color var(--weu-transition);
}

:is(body#category, body#prices-drop, body#new-products, body#best-sales, body#search, body#manufacturer, body#supplier) #amazzing_filter .af_filter .count::before,
:is(body#category, body#prices-drop, body#new-products, body#best-sales, body#search, body#manufacturer, body#supplier) #amazzing_filter .af_filter .count::after {
  content: none;
}

:is(body#category, body#prices-drop, body#new-products, body#best-sales, body#search, body#manufacturer, body#supplier) #amazzing_filter .af_filter label:hover .count,
:is(body#category, body#prices-drop, body#new-products, body#best-sales, body#search, body#manufacturer, body#supplier) #amazzing_filter .af_filter li.active .count,
:is(body#category, body#prices-drop, body#new-products, body#best-sales, body#search, body#manufacturer, body#supplier) #amazzing_filter .af_filter li.active label .count {
  color: var(--weu-color-blue);
}

:is(body#category, body#prices-drop, body#new-products, body#best-sales, body#search, body#manufacturer, body#supplier) #amazzing_filter.hide-zero-matches .af_filter li.no-matches:not(.active) .count,
:is(body#category, body#prices-drop, body#new-products, body#best-sales, body#search, body#manufacturer, body#supplier) #amazzing_filter.dim-zero-matches .af_filter li.no-matches:not(.active) .count {
  color: var(--weu-color-muted);
  font-weight: 500;
}

/* PVPR — botón info junto al precio tachado */
.weu-pvpr-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 0.875rem;
  height: 0.875rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(0, 0, 0, 0.28);
  font: inherit;
  line-height: 0;
  vertical-align: middle;
  cursor: pointer;
  opacity: 0.85;
  transition: color var(--weu-transition), opacity var(--weu-transition);
}

.weu-pvpr-info__icon {
  display: block;
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

.weu-pvpr-info:hover,
.weu-pvpr-info:focus-visible {
  background: transparent;
  color: rgba(0, 0, 0, 0.45);
  opacity: 1;
}

/* Modales — diseño global Jomagrx */
.wecomm-jomagrx .modal .modal-content {
  border: 0;
  border-radius: var(--weu-radius-default);
  overflow: hidden;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12);
}

.wecomm-jomagrx .modal .modal-header,
.wecomm-jomagrx .modal .weu-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: #f3f7fb;
}

.wecomm-jomagrx .modal .weu-modal__title,
.wecomm-jomagrx .modal .modal-header .modal-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  color: var(--weu-color-black);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.2;
}

.wecomm-jomagrx .modal .weu-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-left: auto;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--weu-radius-default);
  background: #fff;
  color: var(--weu-color-black);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--weu-transition), color var(--weu-transition);
}

.wecomm-jomagrx .modal .weu-modal__close:hover,
.wecomm-jomagrx .modal .weu-modal__close:focus-visible {
  background: var(--weu-color-grey-light);
  color: var(--weu-color-black);
}

.wecomm-jomagrx .modal .modal-header .btn-close {
  display: block;
}

.wecomm-jomagrx .modal .modal-body {
  padding: 1.1rem 1rem 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.72);
}

.weu-pvpr-info-modal .modal-dialog {
  max-width: 34rem;
}
