/* =========================================================
   TOPBAR
   ========================================================= */

.topbar {
  padding: 8px 0;

  color: #fff;
  background: var(--color-primary-dark);

  text-align: center;
  font-size: 0.85rem;
}

.topbar p {
  margin: 0;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;

  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-lg);

  min-height: 82px;
}

.brand-name {
  color: var(--color-primary);
  font-size: 1.25rem;
  font-weight: 850;
  white-space: nowrap;
}

.cart-button,
.header-action-button {
  border: 0;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-button,
.header-action-button {
  min-width: 48px;
  height: 48px;
  padding: 0 11px;

  color: var(--color-primary);
  background: var(--color-surface);

  border-radius: var(--radius-sm);
  cursor: pointer;
}

.header-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-action-button .icon {
  width: 22px;
  height: 22px;
}

#cart-count {
  display: inline-grid;
  place-items: center;

  min-width: 23px;
  height: 23px;
  margin-left: 5px;

  color: #fff;
  background: var(--color-primary);

  border-radius: 50%;
  font-size: 0.75rem;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.main-nav {
  border-top: 1px solid var(--color-border);
}

.nav-inner {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);

  min-height: 44px;
}

.nav-inner a {
  display: flex;
  align-items: center;

  font-size: 0.9rem;
  font-weight: 650;
}

.nav-home {
  justify-content: center;
}

.nav-home .icon {
  width: 20px;
  height: 20px;
}


/* =========================================================
   HERO
   ========================================================= */

.hero-content {
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 580px;

  color: var(--color-text-soft);

  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);

  margin-top: var(--space-lg);
}


/* =========================================================
   BUTTONS
   ========================================================= */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 48px;
  padding: 0 22px;

  border-radius: var(--radius-sm);

  font-weight: 750;

  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.button-primary {
  color: #fff;
  background: var(--color-primary);
}

.button-secondary {
  color: var(--color-primary);
  background: #fff;

  border: 1px solid var(--color-border);
}


/* =========================================================
   BENEFITS
   ========================================================= */

.benefits {
  border-bottom: 1px solid var(--color-border);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.benefits article {
  display: flex;
  flex-direction: column;
  gap: 4px;

  padding: 25px;

  text-align: center;
}

.benefits article + article {
  border-left: 1px solid var(--color-border);
}

.benefits span {
  color: var(--color-text-soft);
  font-size: 0.9rem;
}


/* =========================================================
   CATEGORIES
   ========================================================= */

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.category-card {
  overflow: hidden;

  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);

  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.category-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.category-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;

  transition: transform var(--transition);
}

.category-card:hover .category-image img {
  transform: scale(1.025);
}

.category-card h3 {
  margin: 0;
  padding: 18px;
}


/* =========================================================
   PRODUCTS
   ========================================================= */

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);

  min-height: 100px;
}


/* =========================================================
   CONTACT
   ========================================================= */

.contact {
  color: #fff;
  background: var(--color-primary-dark);
}

.contact .eyebrow {
  color: var(--color-accent);
}

.contact-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
}

.contact p {
  color: rgba(255, 255, 255, 0.78);
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  padding-top: var(--space-xl);

  color: #fff;
  background: #091724;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: var(--space-xl);
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-inner p,
.footer-bottom {
  color: rgba(255, 255, 255, 0.65);
}

.footer-bottom {
  padding-block: var(--space-lg);

  font-size: 0.85rem;
}

.modotech-link {
  color: #fff;
  font-weight: 700;
}


/* =========================================================
   WHATSAPP FLOATING CTA
   ========================================================= */

.whatsapp-button {
  position: fixed;
  right: 40px;
  bottom: 24px;
  z-index: 200;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 52px;
  height: 52px;

  color: inherit;
  text-decoration: none;
}

.whatsapp-icon {
  position: relative;
  z-index: 2;

  display: grid;
  place-items: center;

  width: 52px;
  height: 52px;

  flex: 0 0 52px;

  transition: transform 180ms ease;
}

.whatsapp-icon img {
  display: block;

  width: 48px;
  height: 48px;

  filter:
    invert(67%)
    sepia(74%)
    saturate(1765%)
    hue-rotate(91deg)
    brightness(91%)
    contrast(87%)
    drop-shadow(0 0 0.6px #25d366)
    drop-shadow(0 0 0.6px #25d366);
}

.whatsapp-prompt {
  position: absolute;
  right: 60px;
  z-index: 1;

  display: flex;
  align-items: center;

  width: max-content;
  height: 44px;
  padding: 0 24px 0 16px;

  color: var(--color-text);
  background: #fff;

  border: 1px solid var(--color-border);
  border-radius: 999px;

  box-shadow: var(--shadow-md);

  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;

  opacity: 0;
  visibility: hidden;

  transform: translateX(16px);

  transition:
    opacity 180ms ease,
    visibility 180ms ease,
    transform 220ms ease;
}

@media (hover: hover) and (pointer: fine) {

  .whatsapp-button:hover .whatsapp-prompt,
  .whatsapp-button:focus-visible .whatsapp-prompt {
    opacity: 1;
    visibility: visible;

    transform: translateX(0);
  }

  .whatsapp-button:hover .whatsapp-icon,
  .whatsapp-button:focus-visible .whatsapp-icon {
    transform: scale(1.08);
  }

}

@media (max-width: 600px), (hover: none) {

  .whatsapp-button {
    right: 18px;
    bottom: 18px;

    width: 48px;
    height: 48px;
  }

  .whatsapp-icon {
    width: 48px;
    height: 48px;

    flex-basis: 48px;
  }

  .whatsapp-icon img {
    width: 42px;
    height: 42px;
  }

  .whatsapp-prompt {
    display: none;
  }

}



/* =========================================================
   BRANDS MARQUEE
   ========================================================= */


/* =========================================================
   CATALOG PAGE
   ========================================================= */

.catalog-page {
  background: var(--color-background);
}

.catalog-shop {
  padding-top: 32px;
}


/* Breadcrumb */

.catalog-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;

  margin-bottom: 28px;

  color: var(--color-text-muted);
  font-size: 14px;
}

.catalog-breadcrumb a:hover {
  color: var(--color-primary);
}


/* Header */

.catalog-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;

  margin-bottom: 32px;
}

.catalog-header h1 {
  margin: 4px 0 6px;

  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
}

.catalog-summary {
  margin: 0;
  color: var(--color-text-muted);
}


/* Ordenamiento */

.catalog-sort {
  display: flex;
  align-items: center;
  gap: 10px;

  flex-shrink: 0;
}

.catalog-sort label {
  font-size: 14px;
  font-weight: 700;
}

.catalog-sort select {
  min-height: 44px;
  padding: 0 38px 0 14px;

  color: var(--color-text);
  background: #fff;

  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);

  font: inherit;
}


/* Control responsive de filtros */

.catalog-filter-toggle {
  display: none;
}


/* Layout */

.catalog-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 32px;

  align-items: start;
}


/* Sidebar */

.catalog-filters {
  padding: 22px;

  background: #fff;

  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);

  position: sticky;
  top: 120px;
}

.filter-heading {
  display: flex;
  align-items: center;
  gap: 10px;

  padding-bottom: 16px;
  margin-bottom: 18px;

  border-bottom: 1px solid var(--color-border);
}

.filter-heading img {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  object-fit: contain;
}

.filter-heading h2 {
  margin: 0;
  font-size: 20px;
}


/* Grupos */

.filter-group {
  padding-bottom: 20px;
  margin-bottom: 20px;

  border-bottom: 1px solid var(--color-border);
}

.filter-group h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 9px;

  margin-bottom: 10px;

  font-size: 14px;
  cursor: pointer;
}

.filter-group input[type="radio"] {
  width: 17px;
  height: 17px;
  margin: 0;

  flex: 0 0 17px;

  accent-color: var(--color-primary);
}


/* Contenido */

.catalog-content {
  min-width: 0;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 44px;
  margin-bottom: 16px;

  border-bottom: 1px solid var(--color-border);
}

.catalog-toolbar p {
  margin: 0;
  color: var(--color-text-muted);
}


/* Estado sin productos */

.catalog-empty {
  grid-column: 1 / -1;

  padding: 56px 24px;

  text-align: center;
  color: var(--color-text-muted);

  background: #fff;

  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
}

.catalog-empty p {
  margin: 0;
}


/* Seguridad: los iconos del catálogo nunca usan tamaño intrínseco */

.catalog-page img[src*="/assets/icons/"] {
  max-width: 24px;
  max-height: 24px;
}


/* =========================================================
   ICON SYSTEM
   ========================================================= */

.icon {
  display: block;
  width: 20px;
  height: 20px;

  flex: 0 0 auto;

  object-fit: contain;
}

.icon--sm {
  width: 18px;
  height: 18px;
}

.icon--md {
  width: 22px;
  height: 22px;
}

.icon--lg {
  width: 30px;
  height: 30px;
}

.icon--light {
  filter: brightness(0) invert(1);
}


/* =========================================================
   HEADER ICONS
   ========================================================= */

.cart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}


/* =========================================================
   BENEFIT ICONS
   ========================================================= */

.benefits article {
  align-items: center;
  justify-content: center;
}

.benefit-icon {
  display: grid;
  place-items: center;

  width: 52px;
  height: 52px;
  margin-bottom: 8px;

  color: var(--color-primary);
  background: var(--color-surface);

  border-radius: 50%;
}

.benefit-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}


/* =========================================================
   CONTACT ICONS
   ========================================================= */

.contact-line,
.contact-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-title {
  margin-bottom: 12px;
}

.contact-title .icon,
.contact-line .icon {
  opacity: 0.9;
}




/* Email y enlaces de contacto */

.contact-line a {
  color: inherit;
  text-decoration: none;
}

.contact-line a:hover,
.contact-line a:focus-visible {
  color: #fff;
  text-decoration: underline;
}


/* =========================================================
   STICKY COMMERCIAL BAR + HEADER
   ========================================================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 110;
}

.site-header {
  top: 35px;
}


/* =========================================================
   COMMERCIAL INFORMATION FOOTER
   ========================================================= */

.footer-info {
  padding: 58px 0 48px;

  color: var(--color-text);
  background: #fff;

  border-top: 1px solid var(--color-border);
}

.footer-info-grid {
  display: grid;
  grid-template-columns:
    minmax(260px, 1.5fr)
    minmax(280px, 1.5fr)
    minmax(150px, 0.8fr)
    minmax(180px, 0.9fr);

  gap: 48px;
}

.footer-column {
  min-width: 0;
}

.footer-column h2,
.footer-column h3 {
  margin-top: 0;
}

.footer-column h2 {
  margin-bottom: 16px;

  color: var(--color-primary);
  font-size: 1.45rem;
}

.footer-column h3 {
  margin-bottom: 20px;

  font-size: 1rem;
  font-weight: 800;
}

.footer-description {
  max-width: 390px;
  margin-bottom: 22px;

  color: var(--color-text-soft);
  line-height: 1.7;
}


/* Empresa */

.footer-store-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  color: var(--color-primary);

  font-weight: 750;
}

.footer-store-link:hover {
  text-decoration: underline;
}


/* Contacto */

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;

  margin: 0;
  padding: 0;

  list-style: none;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 11px;

  color: var(--color-text-soft);
  line-height: 1.55;
}

.footer-contact-list .icon {
  margin-top: 3px;
  opacity: 0.75;
}

.footer-contact-list a {
  color: inherit;
}

.footer-contact-list a:hover,
.footer-contact-list a:focus-visible {
  color: var(--color-primary);
  text-decoration: underline;
}


/* Navegación */

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-links a {
  color: var(--color-text-soft);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--color-primary);
}


/* =========================================================
   LEGAL FOOTER
   ========================================================= */

.site-footer {
  padding: 0;

  color: rgba(255, 255, 255, 0.72);
  background: #091724;
}

.site-footer .footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  padding-block: 20px;

  font-size: 0.82rem;
}

.site-footer .footer-bottom p {
  margin: 0;
}

.modotech-link {
  color: #fff;
  font-weight: 700;
}


/* =========================================================
   BRANDS - COMPACT CORPORATE SECTION
   ========================================================= */

/* =========================================================
   HERO CAROUSEL
   Carrusel fotográfico responsive
   ========================================================= */

.hero-carousel {
  position: relative;
  isolation: isolate;

  display: block;
  min-height: 0;

  overflow: hidden;

  background: #dce9ee;
}




/* Slides */

.hero-slides {
  display: grid;
}

.hero-slide {
  position: relative;
  z-index: 1;

  grid-area: 1 / 1;

  display: flex;
  align-items: center;

  min-height: 420px;

  overflow: hidden;

  background-color: #dce9ee;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;

  opacity: 0;
  visibility: hidden;

  pointer-events: none;

  transition:
    opacity 450ms ease,
    visibility 450ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;

  pointer-events: auto;
}

.hero-slide--general {
  background-image: url("/assets/hero/general.webp");
}

.hero-slide--bano {
  background-image: url("/assets/hero/bano.webp");
}

.hero-slide--cocina {
  background-image: url("/assets/hero/cocina.webp");
}


/*
 * Gradiente de contraste para mantener legible
 * el contenido sobre las fotografías.
 */

.hero-slide::after {
  content: "";

  position: absolute;
  inset: 0;
  z-index: -1;

  pointer-events: none;

  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.96) 0%,
      rgba(255, 255, 255, 0.92) 32%,
      rgba(255, 255, 255, 0.78) 50%,
      rgba(255, 255, 255, 0.34) 68%,
      rgba(255, 255, 255, 0) 86%
    );
}


/* Contenido */

.hero-slide .hero-content {
  position: relative;
  z-index: 2;

  width: 100%;

  padding-left: 90px;
  padding-right: 90px;
}

.hero-slide .hero-copy {
  max-width: 620px;
  color: #0d2a40;
}

.hero-slide h1,
.hero-slide h2 {
  max-width: 620px;

  margin-top: 10px;
  margin-bottom: 18px;

  font-family: "Fira Sans", sans-serif;
  font-size: clamp(2.8rem, 4.4vw, 4rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-slide .hero-copy > p:not(.eyebrow) {
  max-width: 570px;
  min-height: 3em;

  color: #0d2a40;
}


@media (max-width: 600px) {

  .hero-slide .hero-copy > p:not(.eyebrow) {
    min-height: 0;
  }

}


/* Controles */

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 10;

  display: grid;
  place-items: center;

  width: 46px;
  height: 46px;
  padding: 0;

  background: rgba(255, 255, 255, 0.88);

  border: 1px solid var(--color-border);
  border-radius: 50%;

  box-shadow: var(--shadow-sm);

  cursor: pointer;

  transform: translateY(-50%);

  transition:
    opacity 220ms ease,
    visibility 220ms ease,
    background var(--transition),
    transform var(--transition);
}

.hero-control:hover,
.hero-control:focus-visible {
  background: #fff;

  transform: translateY(-50%) scale(1.05);
}

.hero-control img {
  width: 20px;
  height: 20px;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}


/* Indicadores */

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 10;

  display: flex;
  align-items: center;
  gap: 9px;

  transform: translateX(-50%);
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;

  background: rgba(13, 42, 64, 0.30);

  border: 0;
  border-radius: 50%;

  cursor: pointer;

  transition:
    width var(--transition),
    background var(--transition);
}

.hero-dot.is-active {
  width: 25px;

  background: var(--color-primary);

  border-radius: 999px;
}


/* Desktop con mouse */

@media (hover: hover) and (pointer: fine) {

  .hero-control {
    opacity: 0;
    visibility: hidden;
  }

  .hero-carousel:hover .hero-control,
  .hero-carousel:focus-within .hero-control {
    opacity: 1;
    visibility: visible;
  }

}


/* Tablet */

@media (max-width: 900px) {

  .hero-slide {
    min-height: 400px;
  }

  .hero-slide .hero-content {
    padding-left: 64px;
    padding-right: 64px;
  }

  .hero-control {
    width: 40px;
    height: 40px;
  }

  .hero-prev {
    left: 12px;
  }

  .hero-next {
    right: 12px;
  }

}


/* Mobile */

@media (max-width: 600px) {

  .hero-slide {
    min-height: 380px;
  }

  .hero-slide::after {
    background:
      linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.86) 0%,
        rgba(255, 255, 255, 0.68) 62%,
        rgba(255, 255, 255, 0.25) 100%
      );
  }

  .hero-slide .hero-content {
    padding-left: 44px;
    padding-right: 44px;
  }

  .hero-slide h1,
  .hero-slide h2 {
    font-size: clamp(2.35rem, 11vw, 3.15rem);
  }

  .hero-control {
    width: 34px;
    height: 34px;

    opacity: 1;
    visibility: visible;
  }

  .hero-control img {
    width: 16px;
    height: 16px;
  }

  .hero-prev {
    left: 7px;
  }

  .hero-next {
    right: 7px;
  }

}


/* Accesibilidad */

@media (prefers-reduced-motion: reduce) {

  .hero-slide {
    transition: none;
  }

}

/* =========================================================
   UI REFINEMENT - PILLS + FLOATING WHATSAPP
   ========================================================= */


/* ---------------------------------------------------------
   Botones tipo píldora
   --------------------------------------------------------- */

.button {
  border-radius: 999px;
  padding-left: 26px;
  padding-right: 26px;
}


/* Botones del hero */

.hero-actions .button {
  min-height: 48px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0 28px;

  border-radius: 999px;
}


/* =========================================================
   BRANDS - FULL WIDTH MARQUEE
   ========================================================= */

/*
 * La sección de marcas puede tener título contenido,
 * pero las cintas atraviesan todo el viewport.
 */

/* =========================================================
   BRANDS MARQUEE
   Dos filas continuas en sentidos opuestos.

   app.js mantiene cuatro grupos idénticos por track
   (1 original + 3 clones). Por eso cada animación recorre
   exactamente el 25% del track para producir un loop continuo.
   ========================================================= */

.brands {
  overflow: hidden;
  padding-top: 28px;
  padding-bottom: 28px;
}


/* Título */

.brands .section-heading {
  margin: 0 0 12px;
  text-align: left;
}

.brands .section-heading > div {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;

  width: 100%;
  gap: 10px;
}

.brands .section-heading .eyebrow,
.brands .section-heading h2 {
  margin: 0;
}


/* Ventana edge-to-edge */

.brands-marquee {
  position: relative;

  display: flex;
  flex-direction: column;

  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  gap: 0;
  overflow: hidden;
}


/* Filas */

.brands-row {
  position: relative;

  width: 100%;
  overflow: hidden;
}


/* Track animado */

.brands-track {
  display: flex;

  width: max-content;

  transform: translate3d(0, 0, 0);
  will-change: transform;
}


/*
 * Cada grupo mide únicamente su contenido.
 * El padding-right mantiene exactamente la misma separación
 * entre el último logo de un grupo y el primero del siguiente.
 */

.brands-group {
  display: flex;
  align-items: center;
  justify-content: flex-start;

  flex: 0 0 auto;
  width: max-content;

  gap: 20px;
  padding-right: 20px;
}


/* Marca */

.brands .brand-item {
  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  height: 82px;
  padding: 2px 6px;

  color: inherit;
  background: transparent;

  border: 0;
  border-radius: 0;
  box-shadow: none;

  text-decoration: none;
}


/* Logo */

.brands .brand-item img {
  display: block;

  width: auto;
  height: auto;

  max-width: 175px;
  max-height: 68px;

  object-fit: contain;

  transition: transform 180ms ease;
}

.brands .brand-item:hover img,
.brands .brand-item:focus-visible img {
  transform: scale(1.06);
}


/* Animación */

.brands-row-left .brands-track.is-ready {
  animation: brands-marquee-left 28s linear infinite;
}

.brands-row-right .brands-track.is-ready {
  animation: brands-marquee-right 28s linear infinite;
}

@keyframes brands-marquee-left {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-25%, 0, 0);
  }
}

@keyframes brands-marquee-right {
  from {
    transform: translate3d(-25%, 0, 0);
  }

  to {
    transform: translate3d(0, 0, 0);
  }
}


/* Pausa durante interacción */

.brands-row:hover .brands-track,
.brands-row:focus-within .brands-track {
  animation-play-state: paused;
}


/* Mobile */

@media (max-width: 600px) {

  .brands {
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .brands .section-heading {
    margin-bottom: 8px;
  }

  .brands .section-heading > div {
    gap: 7px;
  }

  .brands-group {
    gap: 20px;
    padding-right: 20px;
  }

  .brands .brand-item {
    height: 62px;
    padding: 2px 4px;
  }

  .brands .brand-item img {
    max-width: 125px;
    max-height: 52px;
  }

}


/* Accesibilidad */

@media (prefers-reduced-motion: reduce) {

  .brands-track {
    animation: none;
    transform: none;
  }

}


/* =========================================================
   FOOTER - CONTACT & DIRECTIONS REFINEMENT
   ========================================================= */

/* Todo el footer comercial en negro */

.footer-info,
.footer-info .footer-column,
.footer-info .footer-column h2,
.footer-info .footer-column h3,
.footer-info .footer-description,
.footer-info .footer-store-link,
.footer-info .footer-contact-list li,
.footer-info .footer-contact-list a,
.footer-info .footer-links a {
  color: #000;
}

/* Iconos también negros */

.footer-info .icon {
  opacity: 1;
  filter: brightness(0);
}

/* Teléfonos fijos en una única línea */

.footer-phone-line {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.footer-phone-separator {
  color: #000;
  font-weight: 700;
}

/* Cómo llegar */

.footer-links .footer-directions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  width: auto;
  margin-top: 8px;
  padding: 8px 14px;

  color: #000;

  border: 1px solid #000;
  border-radius: 999px;

  font-weight: 700;
  line-height: 1;

  text-decoration: none;

  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.footer-links .footer-directions .icon {
  width: 16px;
  height: 16px;
}

.footer-links .footer-directions:hover,
.footer-links .footer-directions:focus-visible {
  color: #fff;
  background: #000;

  transform: translateY(-1px);
}

.footer-links .footer-directions:hover .icon,
.footer-links .footer-directions:focus-visible .icon {
  filter: brightness(0) invert(1);
}

/* Mobile */

@media (max-width: 600px) {

  .footer-phone-line {
    flex-wrap: wrap;
    white-space: normal;
  }

}


/* =========================================================
   FOOTER - DIRECTIONS BUTTON FINAL
   ========================================================= */

.footer-company-actions {
  display: flex;
  align-items: center;

  margin-top: 18px;
}

/* Permitir la píldora también fuera de .footer-links */

.footer-company-actions .footer-directions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 9px 16px;

  color: #000;
  background: #fff;

  border: 1px solid #000;
  border-radius: 999px;

  box-shadow: 0 3px 0 #000;

  font-weight: 700;
  line-height: 1;

  text-decoration: none;

  transform: translateY(0);

  transition:
    transform 100ms ease,
    box-shadow 100ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.footer-company-actions .footer-directions .icon {
  width: 16px;
  height: 16px;

  filter: brightness(0);
}

/* Hover */

.footer-company-actions .footer-directions:hover,
.footer-company-actions .footer-directions:focus-visible {
  color: #fff;
  background: #000;
}

.footer-company-actions .footer-directions:hover .icon,
.footer-company-actions .footer-directions:focus-visible .icon {
  filter: brightness(0) invert(1);
}

/* Click: el botón baja y desaparece la "base" */

.footer-company-actions .footer-directions:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 #000;
}


/* =========================================================
   FOOTER - COLUMN DISTRIBUTION
   ========================================================= */

/*
 * Priorizamos ancho para Contacto.
 * Catálogo e Información se desplazan hacia la derecha.
 */

.footer-info-grid {
  grid-template-columns:
    minmax(240px, 1.2fr)
    minmax(430px, 2fr)
    minmax(130px, 0.7fr)
    minmax(180px, 0.9fr);

  column-gap: 38px;
}

/* Dirección en una sola línea en desktop */

.footer-contact-list li:first-child span {
  white-space: nowrap;
}

/* Horarios también en una sola línea por cada día */

.footer-contact-list li:last-child span {
  white-space: nowrap;
}

/* Mobile/tablet: no forzar líneas */

@media (max-width: 1100px) {

  .footer-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-contact-list li:first-child span,
  .footer-contact-list li:last-child span {
    white-space: normal;
  }

  .footer-phone-line {
    white-space: normal;
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {

  .footer-info-grid {
    grid-template-columns: 1fr;
  }

}


/* =========================================================
   CONTACT DIALOG
   ========================================================= */

.contact-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;

  color: #000;
  background: #fff;

  border: 0;
  border-radius: 18px;

  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.22);

  overflow: auto;
}

.contact-dialog::backdrop {
  background: rgba(9, 23, 36, 0.68);
  backdrop-filter: blur(3px);
}

.contact-dialog-panel {
  padding: 32px;
}


/* Header */

.contact-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;

  margin-bottom: 28px;
}

.contact-dialog-eyebrow {
  display: block;
  margin-bottom: 5px;

  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-dialog-header h2 {
  margin: 0 0 8px;

  color: #000;
  font-size: 1.8rem;
  line-height: 1.15;
}

.contact-dialog-header p {
  max-width: 520px;
  margin: 0;

  color: var(--color-text-soft);
  line-height: 1.55;
}


/* Close */

.contact-dialog-close {
  flex: 0 0 auto;

  display: grid;
  place-items: center;

  width: 40px;
  height: 40px;
  padding: 0;

  background: #fff;

  border: 1px solid var(--color-border);
  border-radius: 50%;

  cursor: pointer;

  transition:
    background-color 160ms ease,
    transform 100ms ease;
}

.contact-dialog-close:hover {
  background: #f3f5f6;
}

.contact-dialog-close:active {
  transform: translateY(2px);
}

.contact-dialog-close img {
  width: 18px;
  height: 18px;
}


/* Form */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.contact-form-field label {
  color: #000;
  font-size: 0.9rem;
  font-weight: 750;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;

  color: #000;
  background: #fff;

  border: 1px solid #cbd3d9;
  border-radius: 9px;

  font: inherit;

  outline: none;

  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.contact-form input,
.contact-form select {
  min-height: 46px;
  padding: 0 13px;
}

.contact-form textarea {
  min-height: 125px;
  padding: 12px 13px;

  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--color-primary);

  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.08);
}


/* Select */

.contact-select-wrap {
  position: relative;
}

.contact-select-wrap select {
  padding-right: 42px;

  appearance: none;
  cursor: pointer;
}

.contact-select-wrap img {
  position: absolute;
  top: 50%;
  right: 14px;

  width: 16px;
  height: 16px;

  pointer-events: none;

  transform: translateY(-50%);
}


/* Help */

.contact-form-help {
  color: var(--color-text-soft);
  font-size: 0.78rem;
}


/* Privacy */

.contact-privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  color: #000;
  font-size: 0.85rem;
  line-height: 1.45;

  cursor: pointer;
}

.contact-privacy input {
  flex: 0 0 auto;

  width: 17px;
  min-height: 17px;
  height: 17px;
  margin-top: 2px;
}


/* Actions */

.contact-form-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr);
  align-items: center;
  gap: 12px;

  padding-top: 4px;
}

.contact-form-actions .button {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.contact-cancel {
  color: #b42318;
  background: #fff;

  border: 1px solid #b42318;
}

.contact-cancel:hover,
.contact-cancel:focus-visible {
  color: #8f1c13;
  background: #fff7f6;
  border-color: #8f1c13;
}

.contact-form-status {
  min-height: 0;
  margin: 0;

  font-size: 0.88rem;
}


/* Mobile */

@media (max-width: 600px) {

  .contact-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);

    border-radius: 14px;
  }

  .contact-dialog-panel {
    padding: 22px 18px;
  }

  .contact-dialog-header {
    gap: 14px;
    margin-bottom: 22px;
  }

  .contact-dialog-header h2 {
    font-size: 1.55rem;
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
  }

}


/* =========================================================
   NAVIGATION - CONTACT TRIGGER
   ========================================================= */

.nav-contact-trigger {
  display: flex;
  align-items: center;

  margin: 0;
  padding: 0;

  color: inherit;
  background: transparent;

  border: 0;

  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;

  cursor: pointer;
}

.nav-contact-trigger:hover,
.nav-contact-trigger:focus-visible {
  color: var(--color-primary);
}


/* Contact form - optional fields */

.contact-optional {
  color: var(--color-text-soft);
  font-size: 0.78rem;
  font-weight: 400;
}


/* =========================================================
   CONTACT - WHATSAPP SUBMIT
   ========================================================= */

.contact-whatsapp-submit {
  gap: 9px;

  color: #fff;
  background: #128c4a;
  border-color: #128c4a;
}

.contact-whatsapp-submit:hover,
.contact-whatsapp-submit:focus-visible {
  color: #fff;
  background: #0f753e;
  border-color: #0f753e;
}

.contact-whatsapp-submit img {
  width: 19px;
  height: 19px;
  filter: brightness(0) invert(1);
}

/* =========================================================
   BRAND IDENTITY
   ========================================================= */

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand-logo {
  display: block;
  width: auto;
  height: 64px;
  max-width: 100%;
}

/* Footer brand identity */
.footer-brand-logo {
  display: block;
  width: auto;
  height: 72px;
  max-width: 100%;
  margin-bottom: 16px;
}


/* =========================================================
   BENEFITS BAR
   ========================================================= */

.benefits-bar {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.benefit-item {
  min-width: 0;
  min-height: 82px;
  padding: 16px 22px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;

  color: var(--color-primary);
  background: transparent;
  border: 0;

  font: inherit;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
}

.benefit-item + .benefit-item {
  border-left: 1px solid var(--color-border);
}

.benefit-item img {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;

  filter:
    invert(17%)
    sepia(19%)
    saturate(1842%)
    hue-rotate(169deg)
    brightness(90%)
    contrast(92%);
}

.benefit-action {
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition);
}

.benefit-action:hover,
.benefit-action:focus-visible {
  background: var(--color-surface);
}


/* Benefits - mobile */

@media (max-width: 700px) {

  .benefits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .benefit-item {
    min-height: 76px;
    padding: 14px 10px;
    gap: 9px;

    font-size: 0.86rem;
  }

  .benefit-item img {
    width: 27px;
    height: 27px;
  }

  .benefit-item + .benefit-item {
    border-left: 0;
  }

  .benefit-item:nth-child(even) {
    border-left: 1px solid var(--color-border);
  }

  .benefit-item:nth-child(n + 3) {
    border-top: 1px solid var(--color-border);
  }

}


/* =========================================================
   SEARCH DIALOG
   ========================================================= */

/* ---------------------------------------------------------
   Dialog
   --------------------------------------------------------- */

.search-dialog {
  width: min(760px, calc(100% - 32px));
  max-width: none;
  margin: auto;
  padding: 0;

  color: var(--color-text);
  background: transparent;

  border: 0;
  overflow: visible;
}

.search-dialog::backdrop {
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(4px);
}


/* ---------------------------------------------------------
   Panel
   --------------------------------------------------------- */

.search-dialog-panel {
  padding: 28px;

  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 18px;

  box-shadow:
    0 24px 70px rgba(15, 23, 42, 0.22);
}


/* ---------------------------------------------------------
   Heading
   --------------------------------------------------------- */

.search-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;

  margin-bottom: 22px;
}

.search-dialog-header .eyebrow {
  margin: 0 0 4px;
}

.search-dialog-header h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
}


/* ---------------------------------------------------------
   Close
   --------------------------------------------------------- */

.search-dialog-close {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;

  width: 44px;
  height: 44px;
  padding: 0;

  color: var(--color-text);
  background: var(--color-surface);

  border: 1px solid var(--color-border);
  border-radius: 50%;

  cursor: pointer;

  font: inherit;
  font-size: 1.75rem;
  line-height: 1;
}

.search-dialog-close:hover,
.search-dialog-close:focus-visible {
  color: var(--color-primary);
  border-color: var(--color-primary);
}


/* ---------------------------------------------------------
   Search form inside dialog
   --------------------------------------------------------- */

.search-dialog .search {
  display: flex;
  width: 100%;
  margin: 0;
}

.search-dialog .search input {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 12px 16px;

  color: var(--color-text);
  background: #fff;

  border: 1px solid var(--color-border);
  border-right: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);

  outline: none;

  font: inherit;
  font-size: 1rem;
}

.search-dialog .search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;

  min-width: 58px;
  padding: 0 18px;

  color: #fff;
  background: var(--color-primary);

  border: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;

  cursor: pointer;
  font-weight: 700;
}

.search-dialog .search-button .icon {
  filter: brightness(0) invert(1);
}


/* ---------------------------------------------------------
   Header search trigger
   --------------------------------------------------------- */

.js-search-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.js-search-open:hover,
.js-search-open:focus-visible {
  color: var(--color-primary);
}


/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 600px) {

  .search-dialog {
    width: calc(100% - 24px);
  }

  .search-dialog-panel {
    padding: 20px;
    border-radius: 14px;
  }

  .search-dialog-header {
    gap: 16px;
    margin-bottom: 18px;
  }

  .search-dialog-close {
    width: 40px;
    height: 40px;
  }

  .search-dialog .search input {
    min-height: 50px;
    padding-inline: 14px;
  }

}
