/*
 * Correcciones visuales aplicadas directamente al release de produccion.
 * Se mantienen separadas de los bundles Angular minificados para que el
 * cambio sea auditable y reversible.
 */

/*
 * Tipografia de interfaz: Roobert es la familia canonica del menu y del
 * contenido general. Precio y ubicacion ya la heredaban; se declara aqui de
 * forma explicita para evitar divergencias entre tarjetas, detalle y mapa.
 * Las vistas administrativas que el bundle fijaba a Segoe UI se integran en
 * la misma familia. Se conservan aparte iconos y datos tecnicos monoespaciados.
 */
:is(app-products, app-search, app-product-detail-modal)
  :is(
    .price-inline,
    .price,
    .price-final,
    .pricedark,
    .discount-text,
    .location-header,
    .location-title,
    .location-product,
    .location-code,
    .location-code-value,
    .location-meta,
    .marker-label
  ),
:is(
  .dashboard-page,
  .clients-page,
  .store-settings-page,
  .categories-page,
  .admin-users-page,
  .products-page,
  .home-images-page,
  .orders-page
) {
  font-family: var(
    --ion-font-family,
    "Roobert",
    "Segoe UI",
    "Helvetica",
    "Arial",
    sans-serif
  ) !important;
}

/* Productos: escritorio blanco/negro; la cabecera movil conserva sus reglas. */
@media (min-width: 1024px) {
  app-products .products-desktop-header,
  app-products .desktop-product-toolbar {
    background: #fff !important;
    color: #111 !important;
  }

  app-products .desktop-product-toolbar
    ion-toolbar.product-toolbar.storefront-heading-toolbar {
    --storefront-heading-background: #fff !important;
    --storefront-heading-foreground: #111 !important;
    --background: #fff !important;
    --color: #111 !important;
    --border-color: #e5e7eb !important;
    --ion-toolbar-border-color: #e5e7eb !important;
    background: #fff !important;
    color: #111 !important;
    border-bottom-color: #e5e7eb !important;
    box-shadow: none !important;
  }

  app-products .desktop-product-toolbar
    ion-toolbar.product-toolbar.storefront-heading-toolbar::part(background) {
    background: #fff !important;
  }

  app-products .desktop-product-toolbar
    ion-toolbar.product-toolbar.storefront-heading-toolbar
    :is(
      ion-title,
      ion-button,
      ion-icon,
      .category-button,
      .category-label,
      .category-parent,
      .category-sub,
      .category-sep
    ) {
    --color: #111 !important;
    color: #111 !important;
  }

  app-products .desktop-product-toolbar
    ion-toolbar.product-toolbar.storefront-heading-toolbar
    .category-button
    p,
  app-products .desktop-product-toolbar
    ion-toolbar.product-toolbar.storefront-heading-toolbar
    .category-button:hover
    p {
    color: #111 !important;
  }

  /* Autoscroll de Productos: misma apariencia, apenas más compacto. */
  app-products .desktop-scroll-fab .scroll-btn {
    width: 36px !important;
    height: 36px !important;
  }

  app-products .desktop-scroll-fab .scroll-btn .scroll-icon {
    width: 22px !important;
    height: 22px !important;
  }
}

/* Los titulos de cabecera se muestran en mayusculas sin alterar el texto
 * accesible ni las traducciones almacenadas por Angular. */
ion-toolbar.storefront-heading-toolbar,
ion-toolbar.storefront-heading-toolbar ion-title,
ion-toolbar.storefront-heading-toolbar .category-label,
ion-toolbar.storefront-heading-toolbar .category-parent,
ion-toolbar.storefront-heading-toolbar .category-sub {
  text-transform: uppercase !important;
}

/* Acceso mantiene capitalizacion natural: "Iniciar sesion" y "Registro". */
ion-modal.auth-modal-shell ion-title {
  text-transform: none !important;
}

/* Deseos y carrito/compras mantienen tambien su capitalizacion natural. La
 * excepcion se limita a la cabecera de esos dos modales. */
ion-modal.wishlist-modal-shell ion-header ion-toolbar ion-title,
ion-modal.wishlist-modal-shell ion-header ion-toolbar .modal-title,
ion-modal.cart-modal-shell ion-header ion-toolbar ion-title,
ion-modal.cart-modal-shell ion-header ion-toolbar .modal-title {
  text-transform: none !important;
}

/*
 * Acceso: el bundle pinta todos los campos en rojo desde el primer render.
 * Se recupera un estado neutro y se reserva el rojo para foco o error real
 * despues de la interaccion del usuario.
 */
ion-modal.auth-modal-shell .auth-field ion-item::part(native) {
  border: 1px solid var(--b2b-border, #dfe4ea) !important;
  box-shadow: var(--b2b-shadow-sm, 0 1px 2px rgba(24, 33, 47, 0.06)) !important;
}

ion-modal.auth-modal-shell
  .auth-field
  ion-item:not(.item-has-focus):hover::part(native) {
  border-color: var(--b2b-border-strong, #c8d0da) !important;
}

ion-modal.auth-modal-shell
  .auth-field
  ion-item.item-has-focus::part(native) {
  border-color: var(--b2b-brand, #d91f26) !important;
  box-shadow: 0 0 0 3px var(--b2b-focus, rgba(217, 31, 38, 0.28)) !important;
}

ion-modal.auth-modal-shell
  .auth-field
  ion-item.ion-invalid.ion-touched::part(native),
ion-modal.auth-modal-shell
  form.ng-submitted
  .auth-field
  ion-item.ion-invalid::part(native) {
  border-color: var(--b2b-danger, #b4232a) !important;
}

/* Todas las cabeceras storefront, incluidas las de modal, comparten el mismo
 * tratamiento blanco/negro en escritorio. Movil conserva el tema rojo. */
@media (min-width: 1024px) {
  ion-header.storefront-heading-header,
  ion-toolbar.storefront-heading-toolbar,
  ion-toolbar.modal-heading-toolbar {
    --storefront-heading-background: #fff !important;
    --storefront-heading-foreground: #111 !important;
    --background: #fff !important;
    --color: #111 !important;
    --border-color: #e5e7eb !important;
    --ion-toolbar-border-color: #e5e7eb !important;
    background: #fff !important;
    color: #111 !important;
  }

  ion-toolbar.storefront-heading-toolbar,
  ion-toolbar.modal-heading-toolbar {
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: none !important;
  }

  ion-toolbar.storefront-heading-toolbar::part(background),
  ion-toolbar.modal-heading-toolbar::part(background) {
    background: #fff !important;
  }

  ion-toolbar.storefront-heading-toolbar
    :is(ion-title, ion-button, ion-back-button, ion-icon),
  ion-toolbar.modal-heading-toolbar
    :is(ion-title, ion-button, ion-back-button, ion-icon) {
    --color: #111 !important;
    color: #111 !important;
  }

  ion-toolbar.storefront-heading-toolbar :is(ion-button, ion-back-button),
  ion-toolbar.modal-heading-toolbar :is(ion-button, ion-back-button) {
    --background-hover: rgba(17, 17, 17, 0.07) !important;
    --background-activated: rgba(17, 17, 17, 0.12) !important;
    --background-focused: rgba(17, 17, 17, 0.09) !important;
  }

  ion-toolbar.storefront-heading-toolbar .category-button p,
  ion-toolbar.storefront-heading-toolbar .category-button p:hover,
  ion-toolbar.modal-heading-toolbar .category-button p,
  ion-toolbar.modal-heading-toolbar .category-button p:hover {
    color: #111 !important;
  }
}

/*
 * Cabeceras de modal planas: se eliminan tanto la sombra propia de la toolbar
 * como la imagen de sombra que Ionic dibuja debajo del ion-header.
 */
ion-modal ion-toolbar.modal-heading-toolbar {
  box-shadow: none !important;
}

ion-modal ion-header.storefront-heading-header::after {
  display: none !important;
  height: 0 !important;
  background-image: none !important;
}

/*
 * El contenido principal no debe parecer una ventana o tarjeta dentro de la
 * web. Los radios quedan reservados para tarjetas y controles individuales.
 */
html,
body,
body > app-root > ion-app,
body > app-root > ion-app > ion-router-outlet {
  border-radius: 0 !important;
  box-shadow: none !important;
  clip-path: none !important;
}

app-home app-hero-slider .hero-slider__frame,
app-products .desktop-category-slider,
app-products .desktop-nav-area,
app-products .landing-category-panel {
  border-radius: 0 !important;
}

app-home app-hero-slider .hero-slider__frame,
app-products .desktop-category-slider {
  box-shadow: none !important;
}

/* Espaciado del pie móvil; la cuadrícula de cinco marcas vive en el componente. */
@media (max-width: 767px) {
  app-site-footer .footer-brands-section {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
  }

  app-site-footer .footer-brands-shell {
    padding-right: 1.5rem !important;
    padding-left: 1.5rem !important;
    overflow: hidden !important;
  }

  app-site-footer .footer-brands-shell > .text-textGrey {
    margin-bottom: 1.25rem !important;
    font-size: 1.125rem !important;
    line-height: 1.35 !important;
  }
}

/*
 * El Ferrotools actual es una firma horizontal. Su ancho se limita a la
 * referencia visual comprobada de 125 px y el fondo permanece transparente
 * para heredar exactamente el #f2f3f4 del footer. Su gris original se aclara
 * un 15 % para igualar el tono de las otras marcas sin deformar el logotipo.
 */
app-site-footer .footer-brands-row > img[alt="Ferro Tools"] {
  width: 125px !important;
  height: auto !important;
  max-width: 125px !important;
  max-height: 52px !important;
  background-color: transparent !important;
  filter: brightness(1.15);
}

@media (max-width: 767px) {
  app-site-footer .footer-brands-row > img[alt="Ferro Tools"] {
    width: min(125px, 100%) !important;
    max-width: 100% !important;
    max-height: 44px !important;
  }
}

/* Contacto móvil: QR de WeChat contenidos, centrados y sin deformación. */
@media (max-width: 639px) {
  app-contact .contact-details .grid > div {
    width: min(280px, 100%) !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }

  app-contact
    .contact-details
    .grid
    > div
    > img[src*="assets/images/contact/qr"] {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }

  app-contact img.gf-contact-qr-interactive {
    cursor: zoom-in;
    touch-action: manipulation;
  }

  app-contact img.gf-contact-qr-interactive:focus-visible {
    outline: 3px solid #d91f26;
    outline-offset: 3px;
  }

  app-contact .gf-contact-qr-download {
    display: inline-flex;
  }
}

.gf-contact-qr-download {
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  margin-top: 2px;
  padding: 10px 16px;
  border: 1px solid #d91f26;
  border-radius: 4px;
  background: #d91f26;
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
  touch-action: manipulation;
}

.gf-contact-qr-viewer[hidden] {
  display: none !important;
}

.gf-contact-qr-viewer {
  position: fixed;
  inset: 0;
  z-index: 2147483100;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: max(64px, calc(env(safe-area-inset-top, 0px) + 52px)) 16px
    max(18px, env(safe-area-inset-bottom, 0px));
  overflow: auto;
  overscroll-behavior: contain;
  background: #111;
}

.gf-contact-qr-viewer-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 520px);
  gap: 12px;
}

.gf-contact-qr-viewer-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 190px);
  max-height: calc(100dvh - 190px);
  border: 0;
  background: #fff;
  object-fit: contain;
}

.gf-contact-qr-viewer-label {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.gf-contact-qr-viewer-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: min(100%, 355px);
  min-height: 48px;
  padding: 11px 18px;
  border-radius: 4px;
  background: #d91f26;
  color: #fff !important;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none !important;
  touch-action: manipulation;
}

.gf-contact-qr-viewer-close {
  position: fixed;
  top: max(10px, env(safe-area-inset-top, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font: 300 34px/1 Arial, sans-serif;
  cursor: pointer;
}

body.gf-contact-qr-viewer-open {
  overflow: hidden !important;
}

/* Confirmación accesible al copiar un teléfono desde un equipo sin marcador. */
.gf-tel-copy-feedback {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom, 0px));
  left: 50%;
  z-index: 2147483000;
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  border-radius: 6px;
  background: #18212f;
  box-shadow: 0 8px 24px rgba(24, 33, 47, 0.2);
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.gf-tel-copy-feedback.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .gf-tel-copy-feedback {
    transition: none;
  }
}

/*
 * El hover de la fila no puede simular un favorito activo. Al quitarlo, el
 * puntero sigue sobre la zona ampliada y el bundle intentaba mantener visible
 * el corazon relleno aunque aria-pressed ya fuese false.
 */
app-products .wishlist-btn[aria-pressed="false"] .wishlist-icon-outline,
app-search .wishlist-btn[aria-pressed="false"] .wishlist-icon-outline {
  opacity: 1 !important;
}

app-products .wishlist-btn[aria-pressed="false"] .wishlist-icon-solid,
app-search .wishlist-btn[aria-pressed="false"] .wishlist-icon-solid {
  opacity: 0 !important;
}

app-products .wishlist-btn[aria-pressed="true"] .wishlist-icon-outline,
app-search .wishlist-btn[aria-pressed="true"] .wishlist-icon-outline {
  opacity: 0 !important;
}

app-products .wishlist-btn[aria-pressed="true"] .wishlist-icon-solid,
app-search .wishlist-btn[aria-pressed="true"] .wishlist-icon-solid {
  opacity: 1 !important;
}

/* Selector de audiencia para los banners administrables. */
.gf-banner-variant-panel {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid #dfe4ea;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(24, 33, 47, 0.06);
}

.gf-banner-variant-heading {
  margin-bottom: 10px;
  color: #18212f;
  font-size: 15px;
  font-weight: 600;
}

.gf-banner-variant-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gf-banner-variant-button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #c8d0da;
  border-radius: 8px;
  background: #fff;
  color: #18212f;
  font: inherit;
  cursor: pointer;
}

.gf-banner-variant-button:hover,
.gf-banner-variant-button:focus-visible {
  border-color: #d91f26;
  outline: none;
}

.gf-banner-variant-button.is-active {
  border-color: #d91f26;
  background: #d91f26;
  color: #fff;
}

.gf-banner-variant-help {
  margin: 10px 0 0;
  color: #526071;
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .gf-banner-variant-panel {
    padding: 12px;
  }

  .gf-banner-variant-button {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }
}

/*
 * Tienda B2B: mientras se resuelve la sesion, y para un visitante sin ficha
 * ERP activa, se conserva el catalogo y el acceso a login/registro, pero no
 * aparecen carrito ni controles de compra.
 */
html.storefront-commerce:is(.gf-b2b-access-pending, .gf-b2b-visitor-catalog).storefront-public-route
  :is(
    .header-cart-btn,
    ion-modal.cart-modal-shell,
    .cart-button,
    .quantity-chip,
    .add-pulse,
    .product-item > .quantity,
    .packet-actions .action-buttons,
    .pack-row .pack-actions
  ) {
  display: none !important;
}

html.storefront-commerce:is(.gf-b2b-access-pending, .gf-b2b-visitor-catalog).storefront-public-route
  .packet-actions {
  justify-content: flex-start !important;
}

html.storefront-commerce:is(.gf-b2b-access-pending, .gf-b2b-visitor-catalog).storefront-public-route
  .packet-actions
  .spec-inline {
  flex: 1 1 auto;
}

html.storefront-commerce:is(.gf-b2b-access-pending, .gf-b2b-visitor-catalog).storefront-public-route
  ion-footer.bottom-tabs
  .tabs-row
  > :is(.cart-tab, .order-tab) {
  display: none !important;
}

html.storefront-commerce:is(.gf-b2b-access-pending, .gf-b2b-visitor-catalog).storefront-public-route
  ion-footer.bottom-tabs
  .tabs-row {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

/* Aviso previo del alta: la cuenta web se vincula a un cliente ERP existente. */
.gf-registration-client-notice {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin: 0 0 15px;
  padding: 11px 12px;
  border: 1px solid rgba(217, 31, 38, 0.24);
  border-left: 3px solid var(--b2b-brand, #d91f26);
  border-radius: 8px;
  background: var(--b2b-brand-soft, #fff1f2);
  color: var(--b2b-text, #18212f);
}

.gf-registration-client-notice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--b2b-brand, #d91f26);
  color: #fff;
  font: 600 14px/1 Arial, sans-serif;
}

.gf-registration-client-notice-copy strong {
  display: block;
  margin: 0 0 3px;
  color: var(--b2b-danger, #b4232a);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.035em;
  line-height: 1.3;
}

.gf-registration-client-notice-copy p {
  margin: 0;
  color: var(--b2b-text-secondary, #526071);
  font-size: 13px;
  line-height: 1.4;
}

/* Selector de ficha ERP, visible unicamente despues de verificar el OTP. */
.gf-erp-profile-selector {
  position: fixed;
  inset: 0;
  z-index: 2147483200;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: max(18px, env(safe-area-inset-top, 0px)) 16px
    max(18px, env(safe-area-inset-bottom, 0px));
  overflow: auto;
  overscroll-behavior: contain;
  background: rgba(17, 24, 39, 0.68);
}

.gf-erp-profile-panel {
  width: min(100%, 720px);
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  border: 1px solid var(--b2b-border, #dfe4ea);
  border-radius: 14px;
  background: var(--b2b-surface, #fff);
  box-shadow: 0 28px 80px rgba(24, 33, 47, 0.24);
  color: var(--b2b-text, #18212f);
}

.gf-erp-profile-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 13px 14px 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  background: var(--b2b-brand, #d91f26);
  color: #fff;
}

.gf-erp-profile-eyebrow {
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  opacity: 0.82;
  text-transform: uppercase;
}

.gf-erp-profile-header h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 500;
  line-height: 1.25;
}

.gf-erp-profile-close {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font: 300 31px/1 Arial, sans-serif;
  cursor: pointer;
}

.gf-erp-profile-close:hover,
.gf-erp-profile-close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: 2px solid rgba(255, 255, 255, 0.88);
  outline-offset: 1px;
}

.gf-erp-profile-close:disabled {
  cursor: wait;
  opacity: 0.56;
}

.gf-erp-profile-intro {
  margin: 0;
  padding: 18px 20px 8px;
  color: var(--b2b-text-secondary, #526071);
  font-size: 15px;
  line-height: 1.45;
}

.gf-erp-profile-form {
  padding: 10px 20px 20px;
}

.gf-erp-profile-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gf-erp-profile-choice {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  min-height: 112px;
  padding: 14px 14px 14px 16px;
  border: 1px solid var(--b2b-border, #dfe4ea);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease,
    box-shadow 140ms ease;
}

.gf-erp-profile-choice:hover {
  border-color: var(--b2b-brand, #d91f26);
}

.gf-erp-profile-choice:has(input:checked) {
  border-color: var(--b2b-brand, #d91f26);
  background: var(--b2b-brand-soft, #fff1f2);
  box-shadow: 0 0 0 2px rgba(217, 31, 38, 0.1);
}

.gf-erp-profile-choice:has(input:focus-visible) {
  outline: 3px solid var(--b2b-focus, rgba(217, 31, 38, 0.28));
  outline-offset: 2px;
}

.gf-erp-profile-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.gf-erp-profile-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  color: var(--b2b-text-secondary, #526071);
  font-size: 13px;
  line-height: 1.35;
}

.gf-erp-profile-copy strong {
  overflow-wrap: anywhere;
  color: var(--b2b-text, #18212f);
  font-size: 15px;
  font-weight: 600;
}

.gf-erp-profile-copy span {
  overflow-wrap: anywhere;
}

.gf-erp-profile-marker {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--b2b-border-strong, #c8d0da);
  border-radius: 50%;
  background: #fff;
}

.gf-erp-profile-choice input:checked ~ .gf-erp-profile-marker {
  border-color: var(--b2b-brand, #d91f26);
}

.gf-erp-profile-choice input:checked ~ .gf-erp-profile-marker::after {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--b2b-brand, #d91f26);
  content: '';
}

.gf-erp-profile-status {
  min-height: 21px;
  margin-top: 10px;
  color: var(--b2b-text-secondary, #526071);
  font-size: 13px;
  line-height: 1.4;
}

.gf-erp-profile-status.is-error {
  color: var(--b2b-danger, #b4232a);
}

.gf-erp-profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 2px;
}

.gf-erp-profile-back,
.gf-erp-profile-confirm {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.gf-erp-profile-back {
  border: 1px solid var(--b2b-border-strong, #c8d0da);
  background: #fff;
  color: var(--b2b-text, #18212f);
}

.gf-erp-profile-confirm {
  border: 1px solid var(--b2b-brand, #d91f26);
  background: var(--b2b-brand, #d91f26);
  color: #fff;
}

.gf-erp-profile-confirm:disabled,
.gf-erp-profile-back:disabled {
  cursor: wait;
  opacity: 0.56;
}

.gf-erp-profile-back:focus-visible,
.gf-erp-profile-confirm:focus-visible {
  outline: 3px solid var(--b2b-focus, rgba(217, 31, 38, 0.28));
  outline-offset: 2px;
}

body.gf-erp-profile-selector-open {
  overflow: hidden !important;
}

.gf-enrollment-feedback {
  position: fixed;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  z-index: 2147483190;
  max-width: min(390px, calc(100vw - 36px));
  padding: 11px 14px;
  border-radius: 8px;
  background: var(--b2b-success, #18794e);
  box-shadow: 0 12px 32px rgba(24, 33, 47, 0.2);
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.gf-enrollment-feedback.is-error {
  background: var(--b2b-danger, #b4232a);
}

.gf-enrollment-feedback.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Politica de clientes existentes dentro de Configuracion de tienda. */
.gf-customer-policy-panel {
  margin: 22px 0;
  padding: 20px;
  border: 1px solid var(--b2b-border, #dfe4ea);
  border-radius: 12px;
  background: var(--b2b-surface-muted, #f8fafc);
}

.gf-customer-policy-header {
  margin-bottom: 15px;
}

.gf-customer-policy-eyebrow {
  margin-bottom: 4px;
  color: var(--b2b-brand, #d91f26);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gf-customer-policy-header h2 {
  margin: 0;
  color: var(--b2b-text, #18212f);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}

.gf-customer-policy-header p {
  margin: 6px 0 0;
  color: var(--b2b-text-secondary, #526071);
  font-size: 14px;
  line-height: 1.45;
}

.gf-customer-policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gf-customer-policy-card {
  padding: 15px;
  border: 1px solid var(--b2b-border, #dfe4ea);
  border-radius: 10px;
  background: #fff;
}

.gf-customer-policy-card.is-active {
  border-color: #a7dcb9;
  background: var(--b2b-success-soft, #edf8f3);
}

.gf-customer-policy-card.is-enabled {
  border-color: #f0cf76;
  background: var(--b2b-warning-soft, #fff8e8);
}

.gf-customer-policy-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.gf-customer-policy-card-heading strong {
  color: var(--b2b-text, #18212f);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.gf-customer-policy-status {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef1f5;
  color: var(--b2b-text-secondary, #526071);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.gf-customer-policy-status.is-active {
  background: #dcefe5;
  color: var(--b2b-success, #18794e);
}

.gf-customer-policy-status.is-enabled {
  background: #f7e7b8;
  color: var(--b2b-warning, #925b0a);
}

.gf-customer-policy-card p {
  margin: 9px 0 0;
  color: var(--b2b-text-secondary, #526071);
  font-size: 13px;
  line-height: 1.45;
}

.gf-customer-policy-toggle {
  min-height: 44px;
  margin-top: 13px;
  padding: 9px 14px;
  border: 1px solid var(--b2b-brand, #d91f26);
  border-radius: 8px;
  background: #fff;
  color: var(--b2b-brand, #d91f26);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.gf-customer-policy-toggle:hover,
.gf-customer-policy-toggle:focus-visible {
  background: var(--b2b-brand-soft, #fff1f2);
  outline: 3px solid var(--b2b-focus, rgba(217, 31, 38, 0.28));
  outline-offset: 2px;
}

.gf-customer-policy-toggle:disabled {
  cursor: wait;
  opacity: 0.58;
}

.gf-customer-policy-feedback,
.gf-customer-policy-loading {
  min-height: 20px;
  margin-top: 12px;
  color: var(--b2b-text-secondary, #526071);
  font-size: 13px;
  line-height: 1.4;
}

.gf-customer-policy-feedback.is-error {
  color: var(--b2b-danger, #b4232a);
}

/* Destinatarios privados del email administrativo de pedidos. */
.gf-order-notification-panel {
  margin: 22px 0;
  padding: 20px;
  border: 1px solid var(--b2b-border, #dfe4ea);
  border-radius: 12px;
  background: #fff;
}

.gf-order-notification-header {
  margin-bottom: 15px;
}

.gf-order-notification-eyebrow {
  margin-bottom: 4px;
  color: var(--b2b-brand, #d91f26);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gf-order-notification-header h2 {
  margin: 0;
  color: var(--b2b-text, #18212f);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}

.gf-order-notification-header p {
  margin: 6px 0 0;
  color: var(--b2b-text-secondary, #526071);
  font-size: 14px;
  line-height: 1.45;
}

.gf-order-notification-form {
  display: grid;
  gap: 14px;
}

.gf-order-notification-field {
  display: grid;
  gap: 7px;
}

.gf-order-notification-field label {
  color: var(--b2b-text, #18212f);
  font-size: 14px;
  font-weight: 600;
}

.gf-order-notification-field textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 78px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid var(--b2b-border-strong, #c8d0da);
  border-radius: 8px;
  outline: 0;
  background: #fff;
  color: var(--b2b-text, #18212f);
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.gf-order-notification-field textarea:focus {
  border-color: var(--b2b-brand, #d91f26);
  box-shadow: 0 0 0 3px var(--b2b-focus, rgba(217, 31, 38, 0.2));
}

.gf-order-notification-field textarea:disabled {
  cursor: wait;
  opacity: 0.62;
}

.gf-order-notification-field p,
.gf-order-notification-meta {
  margin: 0;
  color: var(--b2b-text-secondary, #526071);
  font-size: 12px;
  line-height: 1.4;
}

.gf-order-notification-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.gf-order-notification-save {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--b2b-brand, #d91f26);
  border-radius: 8px;
  background: var(--b2b-brand, #d91f26);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.gf-order-notification-save:hover,
.gf-order-notification-save:focus-visible {
  background: #bd1820;
  outline: 3px solid var(--b2b-focus, rgba(217, 31, 38, 0.28));
  outline-offset: 2px;
}

.gf-order-notification-save:disabled {
  cursor: wait;
  opacity: 0.58;
}

.gf-order-notification-feedback,
.gf-order-notification-loading {
  min-height: 20px;
  margin-top: 12px;
  color: var(--b2b-text-secondary, #526071);
  font-size: 13px;
  line-height: 1.4;
}

.gf-order-notification-feedback.is-error,
.gf-order-notification-loading.is-error {
  color: var(--b2b-danger, #b4232a);
}

/* Analitica privada de visitas dentro de la portada del dashboard. */
.gf-visit-analytics-panel {
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 20px;
  padding: 20px;
  border: 1px solid #e3e6eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  color: var(--b2b-text, #18212f);
}

.gf-visit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.gf-visit-heading {
  min-width: 0;
}

.gf-visit-eyebrow {
  margin-bottom: 4px;
  color: var(--b2b-brand, #d91f26);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gf-visit-heading h2 {
  margin: 0;
  color: var(--b2b-text, #18212f);
  font-size: 21px;
  font-weight: 650;
  line-height: 1.25;
}

.gf-visit-heading p {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--b2b-text-secondary, #526071);
  font-size: 13px;
  line-height: 1.45;
}

.gf-visit-controls,
.gf-visit-periods {
  display: flex;
  align-items: center;
  gap: 7px;
}

.gf-visit-controls {
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.gf-visit-period,
.gf-visit-refresh {
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--b2b-border-strong, #c8d0da);
  border-radius: 7px;
  background: #fff;
  color: var(--b2b-text-secondary, #526071);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.gf-visit-period:hover,
.gf-visit-period:focus-visible,
.gf-visit-refresh:hover,
.gf-visit-refresh:focus-visible {
  border-color: var(--b2b-brand, #d91f26);
  outline: 2px solid var(--b2b-focus, rgba(217, 31, 38, 0.2));
  outline-offset: 1px;
}

.gf-visit-period.is-active {
  border-color: var(--b2b-brand, #d91f26);
  background: var(--b2b-brand, #d91f26);
  color: #fff;
}

.gf-visit-refresh {
  color: var(--b2b-brand, #d91f26);
}

.gf-visit-refresh:disabled {
  cursor: wait;
  opacity: 0.55;
}

.gf-visit-status,
.gf-visit-empty {
  padding: 18px;
  border: 1px dashed var(--b2b-border-strong, #c8d0da);
  border-radius: 8px;
  background: var(--b2b-surface-muted, #f8fafc);
  color: var(--b2b-text-secondary, #526071);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.gf-visit-status.is-error {
  border-color: #efc2c5;
  background: #fff5f5;
  color: var(--b2b-danger, #b4232a);
}

.gf-visit-empty {
  margin: 14px 0;
}

.gf-visit-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.gf-visit-kpi {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid #e5e8ed;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}

.gf-visit-kpi-label {
  display: block;
  overflow: hidden;
  color: var(--b2b-text-secondary, #526071);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.035em;
  line-height: 1.25;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.gf-visit-kpi-value {
  display: block;
  margin-top: 7px;
  color: var(--b2b-text, #18212f);
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 700;
  line-height: 1;
}

.gf-visit-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 14px;
  margin-bottom: 14px;
}

.gf-visit-subpanel {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e5e8ed;
  border-radius: 8px;
  background: #fff;
}

.gf-visit-subpanel h3 {
  margin: 0 0 13px;
  color: var(--b2b-text, #18212f);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
}

.gf-visit-chart {
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-height: 190px;
  padding: 8px 2px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.gf-visit-chart-item {
  display: grid;
  flex: 1 0 18px;
  grid-template-rows: 18px 132px 22px;
  min-width: 18px;
  align-items: end;
  text-align: center;
}

.gf-visit-chart-value {
  overflow: hidden;
  color: var(--b2b-text-secondary, #526071);
  font-size: 10px;
  line-height: 1;
  text-overflow: ellipsis;
}

.gf-visit-chart-bar-wrap {
  position: relative;
  display: flex;
  height: 124px;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1px solid #dfe4ea;
}

.gf-visit-chart-bar {
  display: block;
  width: min(100%, 20px);
  height: var(--gf-visit-bar-height, 2px);
  min-height: 2px;
  border-radius: 4px 4px 1px 1px;
  background: linear-gradient(180deg, #ef4b50 0%, var(--b2b-brand, #d91f26) 100%);
}

.gf-visit-chart-label {
  overflow: hidden;
  color: #6b7280;
  font-size: 9px;
  line-height: 22px;
  text-overflow: clip;
  white-space: nowrap;
}

.gf-visit-table-scroll {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.gf-visit-compact-table,
.gf-visit-log-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--b2b-text, #18212f);
  font-size: 12px;
}

.gf-visit-compact-table th,
.gf-visit-compact-table td,
.gf-visit-log-table th,
.gf-visit-log-table td {
  padding: 8px 9px;
  border-bottom: 1px solid #edf0f3;
  text-align: left;
  vertical-align: top;
}

.gf-visit-compact-table th,
.gf-visit-log-table th {
  background: #f7f8fa;
  color: var(--b2b-text-secondary, #526071);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.gf-visit-compact-table th:not(:first-child),
.gf-visit-compact-table td:not(:first-child) {
  text-align: right;
}

.gf-visit-path {
  max-width: 300px;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gf-visit-empty-inline {
  margin: 0;
  padding: 18px 6px;
  color: var(--b2b-text-secondary, #526071);
  font-size: 12px;
  line-height: 1.4;
}

.gf-visit-log {
  margin-bottom: 12px;
}

.gf-visit-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.gf-visit-log-header h3 {
  margin: 0;
}

.gf-visit-page-size {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  color: var(--b2b-text-secondary, #526071);
  font-size: 11px;
  font-weight: 600;
}

.gf-visit-page-size select {
  box-sizing: border-box;
  min-width: 72px;
  min-height: 36px;
  padding: 5px 28px 5px 10px;
  border: 1px solid var(--b2b-border-strong, #c8d0da);
  border-radius: 7px;
  background: #fff;
  color: var(--b2b-text, #18212f);
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.gf-visit-page-size select:focus-visible {
  border-color: var(--b2b-brand, #d91f26);
  outline: 2px solid var(--b2b-focus, rgba(217, 31, 38, 0.2));
  outline-offset: 1px;
}

.gf-visit-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #edf0f3;
}

.gf-visit-pagination-summary,
.gf-visit-page-count {
  color: var(--b2b-text-secondary, #526071);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  white-space: nowrap;
}

.gf-visit-pagination-controls {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.gf-visit-page-button {
  display: inline-flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0 5px;
  border: 1px solid var(--b2b-border-strong, #c8d0da);
  border-radius: 7px;
  background: #fff;
  color: var(--b2b-text-secondary, #526071);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.gf-visit-page-button:hover,
.gf-visit-page-button:focus-visible {
  border-color: var(--b2b-brand, #d91f26);
  color: var(--b2b-brand, #d91f26);
  outline: 2px solid var(--b2b-focus, rgba(217, 31, 38, 0.2));
  outline-offset: 1px;
}

.gf-visit-page-button.is-active {
  border-color: var(--b2b-brand, #d91f26);
  background: var(--b2b-brand, #d91f26);
  color: #fff;
}

.gf-visit-page-button:disabled {
  cursor: default;
  opacity: 0.4;
}

.gf-visit-page-button.is-active:disabled {
  opacity: 1;
}

.gf-visit-log-table {
  min-width: 1120px;
}

.gf-visit-log-table tbody tr:hover {
  background: #fff9f9;
}

.gf-visit-log-table td {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gf-visit-ip {
  color: #9d1720;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 650;
}

.gf-visit-footer {
  color: var(--b2b-text-secondary, #526071);
  font-size: 11px;
  line-height: 1.45;
}

/* Productos: los totales de categoría replican el gris editorial de Inicio y
 * respiran un poco más respecto al nombre, tanto en móvil como en escritorio. */
app-products :is(
  .landing-panel-text,
  .landing-category-text,
  .landing-subcategory-text
) {
  gap: 6px !important;
}

app-products :is(
  .landing-panel-count,
  .landing-category-count,
  .landing-subcategory-count
) {
  color: #777 !important;
  line-height: 1.25 !important;
}

/* Inicio: los textos complementarios de la franja de ventajas comparten la
 * misma jerarquía editorial que los recuentos situados bajo las categorías. */
app-info-icons .info-icon-copy {
  --gf-info-copy-offset: -38px;
  gap: 4px !important;
  text-align: center;
  transform: translateX(var(--gf-info-copy-offset));
}

app-info-icons .info-icon-title {
  font-weight: 500 !important;
  transition: color 0.3s ease;
}

app-info-icons .info-icon-card:hover .info-icon-title {
  color: #ee1d23 !important;
}

app-info-icons .info-icon-subtitle {
  color: #777 !important;
  font-size: 0.85rem !important;
  line-height: 1.1 !important;
}

/* El centro geométrico del espacio restante queda desplazado por el icono.
 * El offset responsive busca el centro óptico y conserva 12 px como mínimo
 * entre el glifo más ancho y el badge en los cambios de una, dos y cuatro
 * columnas. */
@media (max-width: 360px) {
  app-info-icons .info-icon-copy {
    --gf-info-copy-offset: clamp(-37px, calc(136.5px - 50vw), -23.5px);
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  app-info-icons .info-icon-copy {
    --gf-info-copy-offset: clamp(-38px, calc(134.5px - 25vw), -25.5px);
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  app-info-icons .info-icon-copy {
    --gf-info-copy-offset: clamp(-26px, calc(134px - 12.5vw), -6px);
  }
}

@media (min-width: 1280px) {
  app-info-icons .info-icon-copy {
    --gf-info-copy-offset: -26px;
  }
}

@media (max-width: 980px) {
  .gf-visit-header {
    flex-direction: column;
  }

  .gf-visit-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .gf-visit-kpis {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .gf-visit-overview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .gf-visit-analytics-panel {
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 6px;
  }

  .gf-visit-periods {
    display: grid;
    flex: 1 1 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gf-visit-period,
  .gf-visit-refresh {
    min-height: 44px;
  }

  .gf-visit-refresh {
    width: 100%;
  }

  .gf-visit-kpis {
    gap: 8px;
  }

  .gf-visit-kpi {
    padding: 11px;
  }

  .gf-visit-kpi-label {
    white-space: normal;
  }

  .gf-visit-subpanel {
    padding: 12px;
  }

  .gf-visit-log-table {
    min-width: 0;
  }

  .gf-visit-log-table thead {
    display: none;
  }

  .gf-visit-log-table,
  .gf-visit-log-table tbody,
  .gf-visit-log-table tr,
  .gf-visit-log-table td {
    display: block;
    width: 100%;
  }

  .gf-visit-log-table tr {
    box-sizing: border-box;
    margin-bottom: 10px;
    padding: 8px 10px;
    border: 1px solid #e5e8ed;
    border-radius: 7px;
    background: #fff;
  }

  .gf-visit-log-table td {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(92px, 38%) minmax(0, 1fr);
    max-width: none;
    gap: 8px;
    padding: 6px 0;
    white-space: normal;
  }

  .gf-visit-log-table td::before {
    color: var(--b2b-text-secondary, #526071);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
  }

  .gf-visit-log-header,
  .gf-visit-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .gf-visit-page-size {
    justify-content: space-between;
  }

  .gf-visit-page-size select {
    min-height: 44px;
  }

  .gf-visit-pagination-controls {
    justify-content: flex-start;
    padding-bottom: 3px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .gf-visit-page-button {
    flex-basis: 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  .gf-visit-page-count {
    padding-left: 4px;
    line-height: 44px;
  }
}

/*
 * En escritorio, Inicio respeta la proporción nativa 1350 × 500 de sus seis
 * banners. Productos conserva su lienzo panorámico estable, pero `contain`
 * absorbe las pequeñas diferencias de proporción entre sus recursos. Así
 * ambos carruseles muestran la imagen completa, sin cortar arriba ni abajo.
 */
@media (min-width: 1024px) {
  app-home app-hero-slider .hero-slider__frame {
    aspect-ratio: 27 / 10 !important;
  }

  app-home app-hero-slider .hero-slider__image,
  app-products
    .desktop-layout:not(.catalog-listing)
    .desktop-category-slider
    .slide
    img {
    object-fit: contain !important;
    object-position: center center !important;
  }
}

/*
 * Inicio y Productos usan composiciones móviles propias con más información
 * que un banner panorámico. Cada carrusel comparte el mismo lienzo 4:3 hasta
 * el breakpoint que selecciona las variantes de escritorio.
 */
@media (max-width: 1023px) {
  app-hero-slider .hero-slider__frame,
  app-products .desktop-layout:not(.catalog-listing) .desktop-category-slider {
    aspect-ratio: 4 / 3 !important;
  }

  app-hero-slider .hero-slider__track,
  app-hero-slider .hero-slider__slide,
  app-hero-slider .hero-slider__link,
  app-products .desktop-category-slider .slider-track,
  app-products .desktop-category-slider .slide,
  app-products .desktop-category-slider .slide-link {
    height: 100% !important;
  }

  app-hero-slider .hero-slider__image,
  app-products .desktop-category-slider .slide img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }
}

@media (max-width: 640px) {

  .gf-registration-client-notice {
    gap: 9px;
    margin-bottom: 13px;
    padding: 10px 11px;
  }

  .gf-registration-client-notice-copy p {
    font-size: 12.5px;
  }

  .gf-erp-profile-selector {
    align-items: flex-end;
    padding: max(10px, env(safe-area-inset-top, 0px)) 0 0;
  }

  .gf-erp-profile-panel {
    width: 100%;
    max-height: calc(100vh - 10px);
    max-height: calc(100dvh - 10px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 14px 14px 0 0;
  }

  .gf-erp-profile-header {
    min-height: 48px;
    padding: 10px 10px 9px 14px;
  }

  .gf-erp-profile-intro {
    padding: 14px 14px 6px;
    font-size: 14px;
  }

  .gf-erp-profile-form {
    padding: 8px 14px max(14px, env(safe-area-inset-bottom, 0px));
  }

  .gf-erp-profile-choices {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .gf-erp-profile-choice {
    min-height: 94px;
    padding: 12px;
  }

  .gf-erp-profile-actions {
    position: sticky;
    bottom: 0;
    padding-top: 8px;
    background: #fff;
  }

  .gf-erp-profile-back,
  .gf-erp-profile-confirm {
    flex: 1 1 50%;
    min-width: 0;
  }

  .gf-enrollment-feedback {
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    left: 16px;
    max-width: none;
    text-align: center;
  }

  .gf-customer-policy-panel {
    margin: 16px 0;
    padding: 14px;
  }

  .gf-customer-policy-grid {
    grid-template-columns: 1fr;
  }

  .gf-customer-policy-card-heading {
    flex-direction: column;
    gap: 7px;
  }

  .gf-customer-policy-toggle {
    width: 100%;
  }

  .gf-order-notification-panel {
    margin: 16px 0;
    padding: 14px;
  }

  .gf-order-notification-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .gf-order-notification-save {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gf-erp-profile-choice,
  .gf-enrollment-feedback {
    transition: none;
  }
}
