/* ==========================================================================
   Uldem · Landing
   Mobile-first: los estilos base son los del celular y se agrandan con
   min-width (600px y 900px). Colores y medidas se editan en :root.
   ========================================================================== */

:root {
  /* Colores */
  --bg: #F3F3F1;
  --black: #111;
  --gray: #6B6F76;
  --gray-light: #E6E6E3;
  --red: #D7261E;
  --red-dark: #B81D16;
  --white: #fff;

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-blur: blur(12px);
  --shadow: 0 8px 24px rgba(17, 17, 17, 0.06);
  --shadow-hover: 0 18px 44px rgba(17, 17, 17, 0.12);

  /* Tipografía */
  --font-title: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --font-text: "Barlow", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  /* Medidas */
  --radius: 20px;
  --radius-sm: 12px;
  --header-h: 60px;
  --container: 1160px;
  --gutter: clamp(16px, 5vw, 20px);
  --section-y: clamp(56px, 13vw, 104px);
  --ease: 0.2s ease;

  /* Áreas seguras (notch, barra de gestos) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  max-width: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--black);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.5;
  overflow-x: hidden;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

a,
button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 6px;
}

mark {
  background: #FFE9A8;
  color: var(--black);
  padding: 0.05em 0.3em;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-left: max(var(--gutter), var(--safe-left));
  padding-right: max(var(--gutter), var(--safe-right));
}

/* El header fijo no tapa los títulos al navegar por anclas */
section[id] {
  scroll-margin-top: calc(var(--header-h) + var(--safe-top) - 24px);
}

#inicio {
  scroll-margin-top: 0;
}

/* Contenedor de íconos SVG (antes era un style="" inline; la política de seguridad no permite estilos inline) */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--black);
  color: var(--white);
  border-radius: 8px;
  transition: top var(--ease);
}

.skip-link:focus {
  top: calc(12px + var(--safe-top));
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

.accent {
  color: var(--red);
}

/* ---------- Manchas de fondo ----------
   Degradados radiales en una sola capa fija (sin filter: blur, que es caro
   en celulares). No generan scroll porque la capa no sale de la pantalla. */

.blobs {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 105% -4%, rgba(215, 38, 30, 0.2) 0, rgba(215, 38, 30, 0) min(78vw, 560px)),
    radial-gradient(circle at -12% 62%, rgba(107, 111, 118, 0.14) 0, rgba(107, 111, 118, 0) min(72vw, 600px)),
    radial-gradient(circle at 104% 110%, rgba(215, 38, 30, 0.1) 0, rgba(215, 38, 30, 0) min(60vw, 420px));
}

/* ---------- Glass ---------- */

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.6em 1.3em;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease),
    transform var(--ease), box-shadow var(--ease);
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(215, 38, 30, 0.26);
}

.btn--primary:active {
  background: var(--red-dark);
  box-shadow: 0 4px 10px rgba(215, 38, 30, 0.3);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.6);
  border-color: var(--black);
  color: var(--black);
}

.btn--ghost:active {
  background: var(--black);
  color: var(--white);
}

.btn--sm {
  min-height: 44px;
  padding: 0.45em 1em;
}

.btn--lg {
  min-height: 52px;
  padding: 0.7em 1.2em;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.0625rem);
}

.btn__long {
  display: none;
}

/* ---------- Header ---------- */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding-top: var(--safe-top);
  background: rgba(243, 243, 241, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  transition: background-color var(--ease), box-shadow var(--ease);
}

.header.is-scrolled,
.header.is-menu-open {
  background: rgba(243, 243, 241, 0.9);
  box-shadow: 0 6px 20px rgba(17, 17, 17, 0.07);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--header-h);
}

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

/* En celular el header no muestra el botón de WhatsApp (aparece desde 600px) */
.header__actions .btn {
  display: none;
}

/* Logo: se muestra la imagen si cargó; si no, queda el texto. */
.brand {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  text-decoration: none;
}

.brand__img {
  display: none;
  width: auto;
  height: 42px;
}

.brand__text {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
}

.brand--has-logo .brand__img {
  display: block;
}

.brand--has-logo .brand__text {
  display: none;
}

.brand--footer .brand__img {
  height: 76px;
}

/* Menú: desplegable en celular y tablet, en línea desde 900px */
.nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  padding: 4px max(var(--gutter), var(--safe-right)) 12px max(var(--gutter), var(--safe-left));
  background: var(--bg);
  border-bottom: 1px solid var(--gray-light);
  box-shadow: 0 16px 30px rgba(17, 17, 17, 0.1);
}

.nav.is-open {
  display: flex;
  animation: nav-in 0.18s ease;
}

@keyframes nav-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.nav a {
  display: flex;
  align-items: center;
  min-height: 52px;
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--gray-light);
  transition: color var(--ease);
}

.nav a:last-of-type {
  border-bottom: 0;
}

/* "Mostrar mi consulta": aparece en el menú solo si se ocultó la barra deslizándola */
.nav__quote {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--gray-light);
  color: var(--red);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.nav__quote[hidden] {
  display: none;
}

.nav__quote-count {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding-inline: 7px;
  background: var(--red);
  border-radius: 999px;
  color: var(--white);
  font-size: 0.875rem;
}

.nav a:active {
  color: var(--red);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color var(--ease);
}

.nav-toggle:active {
  background: rgba(17, 17, 17, 0.08);
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Tipografía de sección ---------- */

.tag {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  color: var(--gray);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.section {
  padding-block: var(--section-y);
}

/* Entre Quiénes somos → Marcas → Productos va menos aire que entre las demás secciones */
#quienes-somos {
  padding-bottom: clamp(12px, 3vw, 24px);
}

#marcas {
  padding-top: clamp(32px, 6vw, 56px);
  padding-bottom: clamp(12px, 3vw, 24px);
}

#productos {
  padding-top: clamp(32px, 6vw, 56px);
}

.section__head {
  max-width: 720px;
  margin-bottom: clamp(24px, 6vw, 40px);
}

.section__title,
.hero__title,
.cta__title {
  font-family: var(--font-title);
  font-weight: 800;
  line-height: 0.98;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.section__title {
  font-size: clamp(2.1rem, 8.6vw, 3.5rem);
}

.section__lead {
  margin-top: 12px;
  color: var(--gray);
  font-size: clamp(1rem, 0.96rem + 0.4vw, 1.125rem);
}

/* ---------- Hero ----------
   Ocupa la pantalla visible (svh: descuenta la barra del navegador móvil)
   y deja el título y el botón de WhatsApp a la vista sin scrollear. */

.hero {
  display: flex;
  align-items: center;
  min-height: min(100vh, 760px);
  min-height: min(100svh, 760px);
  padding-top: calc(var(--header-h) + var(--safe-top) + clamp(16px, 3.5svh, 72px));
  padding-bottom: clamp(28px, 5svh, 72px);
}

/* En celular: el texto arriba y la tarjeta animada abajo. Desde 900px, lado a lado. */
.hero__inner {
  display: grid;
  gap: clamp(28px, 6vw, 56px);
}

.hero__content {
  min-width: 0;
}

.hero .tag {
  margin-bottom: 12px;
}

.hero__title {
  max-width: 1100px;
  font-size: clamp(2.375rem, 11.2vw, 6rem);
}

.hero__text {
  max-width: 620px;
  margin-top: clamp(12px, 2.4svh, 22px);
  color: var(--gray);
  font-size: clamp(1rem, 0.94rem + 0.5vw, 1.1875rem);
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: clamp(16px, 3svh, 32px);
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin-top: clamp(24px, 4svh, 40px);
  padding-top: 18px;
  border-top: 1px solid var(--gray-light);
  color: var(--gray);
}

.hero__facts strong {
  color: var(--black);
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Tarjeta animada del hero: las fotos de los rubros se van turnando */
.promo {
  width: 100%;
  max-width: 520px;
  padding: 10px;
  border-radius: var(--radius);
  /* es un enlace al rubro de la foto visible */
  display: block;
  /* el scroll vertical sigue andando; el deslizamiento horizontal cambia la foto */
  touch-action: pan-y;
  -webkit-touch-callout: none;
  user-select: none;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@media (hover: hover) {
  .promo:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  }
}

.promo:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 4px;
}

.promo__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--white);
  border-radius: var(--radius-sm);
}

.promo__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 4%;
  object-fit: contain;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 0.7s ease, transform 3.6s ease-out;
}

.promo__img.is-active {
  opacity: 1;
  transform: scale(1);
}

.promo__foot {
  padding: 14px 8px 6px;
}

.promo__label {
  color: var(--gray);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.promo__title {
  margin-top: 2px;
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 6.5vw, 1.9rem);
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  /* reserva dos renglones: la tarjeta no cambia de alto entre fotos */
  min-height: 2.1em;
}

.promo__title.is-changing {
  animation: promo-title 0.45s ease;
}

@keyframes promo-title {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Barritas de avance: una por foto, la activa en rojo */
.promo__dots {
  display: flex;
  gap: 5px;
  margin-top: 12px;
}

.promo__dots span {
  flex: 1;
  height: 3px;
  background: var(--gray-light);
  border-radius: 2px;
  transition: background-color 0.4s ease;
}

.promo__dots span.is-active {
  background: var(--red);
}

/* ---------- Quiénes somos ---------- */

.about {
  display: grid;
  gap: clamp(28px, 7vw, 56px);
}

.about__text p:not(.tag) {
  margin-top: 16px;
  color: var(--gray);
}

.about__text p:not(.tag):first-of-type {
  color: var(--black);
  font-size: clamp(1rem, 0.96rem + 0.4vw, 1.125rem);
}

.values {
  display: grid;
  gap: 12px;
}

/* En celular: ícono a la izquierda y texto a la derecha (tarjeta compacta) */
.value {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 14px;
  align-items: start;
  padding: 18px;
  border-radius: var(--radius);
  transition: transform var(--ease), box-shadow var(--ease);
}

.value__icon {
  display: inline-flex;
  grid-row: span 2;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--red);
  border-radius: 13px;
  color: var(--white);
}

.value__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.value h3 {
  font-family: var(--font-title);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.value p {
  margin-top: 4px;
  color: var(--gray);
}

/* ---------- Productos: catálogo ---------- */

.catalog {
  display: grid;
  gap: 16px;
}

/* Rubros: fila con scroll lateral en celular, grilla desde 900px */
/* Rubros: grilla de links (2 columnas en celular, más a medida que hay lugar) */
.catalog__rubros {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.rubro {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 6px 10px;
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--black);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color var(--ease), background-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.rubro__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--white);
  border-radius: 8px;
}

.rubro__media img {
  width: 100%;
  height: 100%;
  padding: 6%;
  object-fit: contain;
}

.rubro__name {
  padding-inline: 4px;
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
}

.rubro:active {
  transform: scale(0.97);
}

.rubro[aria-pressed="true"] {
  background: var(--white);
  border-color: var(--red);
  box-shadow: 0 8px 20px rgba(215, 38, 30, 0.16);
}

.rubro[aria-pressed="true"] .rubro__name {
  color: var(--red-dark);
}

.rubro:focus-visible,
.group-btn:focus-visible,
.item__add:focus-visible,
.item__wa:focus-visible,
.quote__toggle:focus-visible,
.quote__remove:focus-visible,
.quote__clear:focus-visible {
  outline: 3px solid rgba(215, 38, 30, 0.45);
  outline-offset: 2px;
}

/* Panel del rubro elegido */
.catalog__panel {
  display: grid;
  padding: 16px 12px 12px;
  border-radius: var(--radius);
}

.catalog__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 16px;
  padding-inline: 4px;
}

.catalog__title {
  font-family: var(--font-title);
  font-size: clamp(1.75rem, 7vw, 2.4rem);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.catalog__count {
  margin-top: 4px;
  color: var(--gray);
  font-size: 0.9375rem;
}

.catalog__all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding-inline: 6px;
  color: var(--red-dark);
  font-weight: 600;
  cursor: pointer;
}

.catalog__all span {
  display: inline-block;
  transition: transform var(--ease);
}

/* Línea industrial / profesional: control segmentado */
.catalog__groups {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 4px;
  margin-top: 14px;
  padding: 4px;
  background: rgba(17, 17, 17, 0.06);
  border-radius: 999px;
}

.catalog__groups[hidden] {
  display: none;
}

.group-btn {
  min-height: 44px;
  padding: 0.4em 1em;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--gray);
  font: inherit;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
  transition: background-color var(--ease), color var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.group-btn[aria-pressed="true"] {
  background: var(--white);
  color: var(--black);
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.12);
}

/* Tipos de insumo (ferretería): chips que se acomodan en varias filas */
.catalog__groups--chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  background: none;
}

.catalog__groups--chips .group-btn {
  background: rgba(255, 255, 255, 0.72);
  border: 1.5px solid var(--gray-light);
  color: #4d5158;
}

.catalog__groups--chips .group-btn[aria-pressed="true"] {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
  box-shadow: none;
}

/* Productos del rubro */
.items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.item {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 6px;
  background: rgba(255, 255, 255, 0.75);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  transition: border-color var(--ease), box-shadow var(--ease);
  animation: item-in 0.3s ease both;
}

@keyframes item-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.item.is-added {
  border-color: rgba(215, 38, 30, 0.6);
}

.item__media {
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--white);
  border-radius: 8px;
}

.item__media img {
  width: 100%;
  height: 100%;
  padding: 6%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

/* La foto se toca (o cliquea) para verla grande (js/main.js, initLightbox) */
.item__media:not(.item__media--empty) img {
  cursor: zoom-in;
}

/* Visor de la foto grande */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: calc(64px + var(--safe-top, 0px)) 12px calc(24px + var(--safe-bottom, 0px));
  background: rgba(17, 17, 17, 0.92);
  cursor: zoom-out;
  animation: lightbox-in 0.2s ease;
}

.lightbox:focus {
  outline: none;
}

.lightbox[hidden] {
  display: none;
}

@keyframes lightbox-in {
  from {
    opacity: 0;
  }
}

.lightbox__img {
  /* en celular ocupa todo el ancho; en la computadora, como mucho 760px o el 80% del alto */
  width: min(100%, 80vh, 760px);
  /* nunca más alta que la pantalla (menos el espacio de la X y el margen de abajo):
     las fotos verticales se achican para entrar enteras */
  max-height: calc(100vh - 88px - var(--safe-top) - var(--safe-bottom));
  max-height: calc(100dvh - 88px - var(--safe-top) - var(--safe-bottom));
  padding: 6%;
  object-fit: contain;
  background: var(--white);
  border-radius: var(--radius-sm);
  animation: lightbox-zoom 0.25s ease;
}

@keyframes lightbox-zoom {
  from {
    transform: scale(0.92);
  }
}

.lightbox__close {
  position: absolute;
  top: calc(12px + var(--safe-top, 0px));
  right: max(12px, var(--safe-right, 0px));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(255, 255, 255, 0.15);
  border: 0;
  border-radius: 999px;
  color: var(--white);
  cursor: pointer;
}

.lightbox__close svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

/* Con la foto abierta no se mueve la página de fondo */
.has-lightbox {
  overflow: hidden;
}

/* Si falta la foto, queda un recuadro gris */
.item__media--empty {
  background: var(--gray-light);
}

.item__media--empty img {
  visibility: hidden;
}

.item__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 10px 4px 2px;
}

.item__tag {
  color: var(--gray);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.item__name {
  margin-bottom: 10px;
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.item__actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
}

.item__add {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 44px;
  padding: 0.3em 0.6em;
  background: var(--white);
  border: 1.5px solid rgba(215, 38, 30, 0.55);
  border-radius: 999px;
  color: var(--red-dark);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
}

.item__add svg,
.quote__chevron,
.quote__remove svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.item__add[aria-pressed="true"] {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.item__add:active {
  transform: scale(0.96);
}

/* Consultar solo este producto */
.item__wa {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  background: rgba(17, 17, 17, 0.06);
  border-radius: 50%;
  color: var(--black);
  cursor: pointer;
  transition: background-color var(--ease), color var(--ease);
}

.item__wa:active {
  background: var(--black);
  color: var(--white);
}

.catalog__noscript {
  padding: 16px;
  color: var(--gray);
  text-align: center;
}

/* ---------- Barra de consulta (productos agregados) ---------- */

.quote {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  padding: 0 max(12px, var(--safe-right)) calc(12px + var(--safe-bottom)) max(12px, var(--safe-left));
  pointer-events: none;
  animation: quote-in 0.25s ease;
}

.quote[hidden] {
  display: none;
}

@keyframes quote-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

.quote__swipe,
.quote__sheet {
  max-width: 560px;
  margin-inline: auto;
  pointer-events: auto;
}

/* Deslizar la barra hacia la izquierda la oculta (js/main.js, initQuoteSwipe).
   Se vuelve a mostrar desde el menú o el botón del header (.nav__quote, .quote-restore). */
.quote__swipe {
  position: relative;
}

.quote__trash {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-right: 22px;
  background: var(--gray);
  border-radius: 999px;
  color: var(--white);
  font-weight: 700;
  opacity: 0;
}

.quote__trash svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quote__bar {
  position: relative;
  /* el scroll vertical sigue funcionando; el horizontal lo maneja el deslizamiento */
  touch-action: pan-y;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: var(--black);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(17, 17, 17, 0.3);
}

.quote__toggle {
  display: inline-flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  padding: 0 10px 0 6px;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--ease);
}

.quote__badge {
  display: grid;
  flex: none;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding-inline: 8px;
  background: var(--white);
  border-radius: 999px;
  color: var(--black);
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 800;
}

.quote__label {
  overflow: hidden;
  font-size: 0.9375rem;
  line-height: 1.15;
}

.quote__chevron {
  margin-left: auto;
  transition: transform var(--ease);
}

.quote.is-open .quote__chevron {
  transform: rotate(180deg);
}

.quote__send {
  flex: none;
  min-height: 48px;
  box-shadow: none;
}

.quote__sheet {
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(17, 17, 17, 0.2);
}

.quote__sheet[hidden] {
  display: none;
}

.quote__sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 16px;
  border-bottom: 1px solid var(--gray-light);
}

.quote__sheet-title {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quote__clear {
  min-height: 44px;
  padding-inline: 12px;
  background: none;
  border: 0;
  border-radius: 999px;
  color: var(--red-dark);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.quote__list {
  max-height: min(50vh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.quote__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 16px;
  border-bottom: 1px solid var(--gray-light);
}

.quote__item:last-child {
  border-bottom: 0;
}

.quote__item-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  font-weight: 600;
  line-height: 1.25;
}

.quote__item-text small {
  color: var(--gray);
  font-size: 0.8125rem;
  font-weight: 500;
}

.quote__remove {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  border-radius: 50%;
  color: var(--gray);
  cursor: pointer;
}

.quote__remove:active {
  background: rgba(17, 17, 17, 0.08);
  color: var(--red);
}

/* Con productos en la consulta, la barra reemplaza al botón flotante */
.has-quote .fab {
  display: none;
}

.products__note a span {
  display: inline-block;
  transition: transform var(--ease);
}

.products__note {
  margin-top: 24px;
  color: var(--gray);
  text-align: center;
}

.products__note a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding-inline: 6px;
  color: var(--red-dark);
  font-weight: 600;
  cursor: pointer;
}

.products__note a:active {
  color: var(--black);
}

/* ---------- Marcas ---------- */

.brands {
  display: grid;
  gap: clamp(16px, 4vw, 24px);
}

/* Cada bloque: encabezado arriba y las marcas abajo, separadas por líneas */
.brands__block {
  overflow: hidden;
  border-radius: var(--radius);
}

.brands__head {
  padding: 18px 16px;
  border-bottom: 1px solid var(--gray-light);
  text-align: center;
}

.brands__title {
  color: var(--red);
  font-family: var(--font-title);
  font-size: clamp(1.45rem, 6vw, 1.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brands__sub {
  margin-top: 4px;
  color: var(--gray);
}

/* Las líneas divisorias son el fondo de la grilla que asoma por el gap */
.brands__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--gray-light);
}

.brands__grid li {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: clamp(84px, 24vw, 110px);
  padding: 12px 8px;
  background: rgba(250, 250, 248, 0.94);
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 7vw, 1.9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.03em;
  text-align: center;
  text-transform: uppercase;
  transition: background-color var(--ease), color var(--ease);
}

.brands__grid--own li {
  min-height: clamp(110px, 34vw, 220px);
  font-size: clamp(1.6rem, 8vw, 4.25rem);
}

/* Logo de cada marca: se muestra solo si carga; si no, queda el nombre */
.brand-logo__img {
  display: none;
  width: 100%;
  max-width: 180px;
  max-height: clamp(48px, 14vw, 72px);
  object-fit: contain;
}

.brands__grid--own .brand-logo__img {
  max-width: 280px;
  max-height: clamp(64px, 20vw, 130px);
}

.brand-logo--loaded .brand-logo__img {
  display: block;
}

.brand-logo--loaded .brand-logo__text {
  display: none;
}

/* Marcas propias: tarjetas con fondo de la marca que llevan a sus productos.
   Las fotos de fondo usan multiply: su fondo blanco desaparece sobre el color de la marca. */
.brand-card {
  --brand-bg: #F2F2F0;
  --brand-ink: var(--black);
  --brand-accent: var(--red);
}

.brand-card--gladiator {
  --brand-bg: #F4E6DA;
  --brand-ink: #232427;
  --brand-accent: #E35A16;
}

.brand-card--neo {
  --brand-bg: #EEE5F7;
  --brand-ink: #6E35A6;
  --brand-accent: #8A47CC;
}

/* Páginas de rubro (rubro.html): colores de Uldem */
.brand-card--uldem {
  --brand-bg: #F6E6E4;
  --brand-ink: var(--black);
  --brand-accent: var(--red);
}

.brand-card--energy {
  --brand-bg: #E2F3F5;
  --brand-ink: #14303A;
  --brand-accent: #0E8A9C;
}

.brand-card--emtop {
  --brand-bg: #E8ECF7;
  --brand-ink: #1E3A8A;
  --brand-accent: #D7261E;
}

.brand-card--obra {
  --brand-bg: #EAF5E1;
  --brand-ink: #1F3A12;
  --brand-accent: #3F8F1E;
}

.brand-card--boltz {
  --brand-bg: #ECEDEF;
  --brand-ink: #1B1D21;
  --brand-accent: #3A3D44;
}

.brand-card--luxom {
  --brand-bg: #E6EEF8;
  --brand-ink: #1D5FAF;
  --brand-accent: #E07A1F;
}

.brands__grid li.brand-card {
  display: block;
  padding: 0;
  background: var(--brand-bg);
}

.brand-card__link {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.5vw, 16px);
  width: 100%;
  height: 100%;
  min-height: inherit;
  padding: 18px 10px;
  overflow: hidden;
  /* el color va acá (no en el li) para que el multiply de las fotos se mezcle con él */
  background: var(--brand-bg);
  color: var(--brand-ink);
  text-decoration: none;
  cursor: pointer;
}

.brand-card__link:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: -3px;
}

/* Sin z-index a propósito: si lo tuviera, sería un grupo aislado y el multiply no
   se mezclaría con el color de la marca. El texto va encima con z-index: 1. */
.brand-card__bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 4%;
}

.brand-card__bg img {
  width: 48%;
  height: 92%;
  object-fit: contain;
  object-position: bottom;
  mix-blend-mode: multiply;
  opacity: 0.42;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Una foto contra cada borde, enmarcando el nombre */
.brand-card__bg img:first-child {
  object-position: left bottom;
}

.brand-card__bg img:last-child {
  object-position: right bottom;
}

/* Velo en el centro para que el nombre se lea sobre las fotos */
.brand-card__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 45% at 50% 50%, var(--brand-bg) 35%, transparent 100%);
}

.brand-card .brand-logo__text {
  color: var(--brand-ink);
}

.brand-card .brand-logo__text,
.brand-card .brand-logo__img,
.brand-card__cta {
  position: relative;
  z-index: 1;
}

.brand-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0.35em 1em;
  background: var(--brand-accent);
  border-radius: 999px;
  color: var(--white);
  font-family: var(--font-text);
  font-size: clamp(0.8125rem, 0.78rem + 0.2vw, 0.9375rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
  transition: transform var(--ease), box-shadow var(--ease);
}

.brand-card__arrow {
  display: inline-block;
  transition: transform var(--ease);
}

.brand-card__link:active .brand-card__cta {
  transform: scale(0.96);
}

/* Título del catálogo cuando se ven los productos de una marca */
.catalog__panel--marca .catalog__title {
  color: var(--brand-accent, var(--black));
}

/* Página de marca: título de cada rubro dentro de la grilla de productos */
.items__heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: clamp(14px, 3vw, 24px);
  padding: 0 4px 8px;
  border-bottom: 2px solid var(--brand-accent, var(--gray-light));
}

.items__heading:first-child {
  margin-top: 4px;
}

.items__heading h3 {
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 5.5vw, 1.75rem);
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
}

.items__heading span {
  flex: none;
  color: var(--gray);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Marca sin productos cargados todavía */
.catalog--empty .catalog__count,
.catalog--empty .catalog__all {
  display: none;
}

.items__empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: clamp(24px, 6vw, 40px) 16px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-sm);
  color: var(--gray);
  text-align: center;
}

.items__empty p {
  max-width: 460px;
}

.catalog__panel {
  scroll-margin-top: calc(var(--header-h) + var(--safe-top) + 12px);
}

/* En celular, una tarjeta de marca por fila: así las fotos de fondo se ven a los costados del nombre */
@media (max-width: 599px) {
  .brands__grid--own,
  .brands__grid--rep {
    grid-template-columns: 1fr;
  }

  .brands__grid li.brand-card {
    min-height: 150px;
  }

  .brand-card__bg {
    padding: 3% 4%;
  }

  .brand-card__bg img {
    width: 40%;
    height: 90%;
    opacity: 0.5;
  }

  .brand-card__bg::after {
    background: radial-gradient(ellipse 34% 55% at 50% 50%, var(--brand-bg) 40%, transparent 100%);
  }
}

/* ---------- Página de marca (marca.html) ---------- */

/* Botón para volver a mostrar la barra de la consulta (rubro y marca, que no tienen menú) */
.quote-restore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  background: var(--black);
  border: 0;
  border-radius: 999px;
  color: var(--white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  animation: quote-in 0.25s ease;
}

.quote-restore[hidden] {
  display: none;
}

.quote-restore svg,
.nav__quote svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 0 14px 0 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid var(--gray-light);
  border-radius: 999px;
  color: var(--black);
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--ease), border-color var(--ease);
}

.back-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--ease);
}

.back-link:active {
  background: var(--white);
  border-color: var(--black);
}

.back-link:focus-visible {
  outline: 3px solid rgba(215, 38, 30, 0.45);
  outline-offset: 2px;
}

/* El header fijo no tapa el encabezado de la marca */
.brand-page__top {
  padding-top: calc(var(--header-h) + var(--safe-top) + clamp(16px, 4vw, 40px));
  padding-bottom: 0;
}

.brand-page__products {
  padding-top: clamp(16px, 4vw, 28px);
}

/* Encabezado con el color de la marca y sus herramientas de fondo (mismo efecto que las tarjetas) */
.brand-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(240px, 42vw, 340px);
  padding: clamp(24px, 6vw, 48px) clamp(20px, 5vw, 48px);
  overflow: hidden;
  background: var(--brand-bg, var(--white));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--brand-ink, var(--black));
}

.brand-hero[hidden] {
  display: none;
}

/* Fotos a la derecha; un degradado desde la izquierda deja leer el texto */
.brand-hero .brand-card__bg {
  justify-content: flex-end;
  gap: 2%;
  padding: 4% 3% 0;
}

.brand-hero .brand-card__bg img {
  width: 36%;
  height: 96%;
  opacity: 0.5;
}

.brand-hero .brand-card__bg::after {
  background: linear-gradient(90deg, var(--brand-bg) 40%, transparent 85%);
}

/* En celular, una sola foto chica abajo a la derecha para no tapar el texto */
@media (max-width: 599px) {
  .brand-hero {
    align-items: flex-start;
    padding-bottom: 96px;
  }

  .brand-hero .brand-card__bg img:first-child:not(:last-child) {
    display: none;
  }

  .brand-hero .brand-card__bg img {
    width: 44%;
    height: 42%;
    opacity: 0.45;
  }

  .brand-hero .brand-card__bg::after {
    background: linear-gradient(180deg, var(--brand-bg) 50%, transparent 80%);
  }
}

.brand-hero__content {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.brand-hero .tag {
  background: rgba(255, 255, 255, 0.75);
}

.brand-hero__title {
  font-family: var(--font-title);
  font-size: clamp(3.4rem, 17vw, 7rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand-hero__text {
  max-width: 460px;
  margin-top: 12px;
  color: #3d4046;
  font-size: clamp(1rem, 0.96rem + 0.4vw, 1.125rem);
}

.brand-hero__count {
  display: inline-block;
  margin-top: 16px;
  padding: 0.35em 1em;
  background: var(--brand-accent, var(--red));
  border-radius: 999px;
  color: var(--white);
  font-weight: 600;
}

.brand-hero__count:empty {
  display: none;
}

.brand-missing {
  padding: clamp(24px, 6vw, 48px);
  border-radius: var(--radius);
  text-align: center;
}

.brand-missing p {
  margin: 12px 0 20px;
  color: var(--gray);
}

/* 5 marcas en 2 columnas: la última ocupa el ancho completo */
.brands__grid--rep li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

/* ---------- Llamado final ---------- */

.section--cta {
  padding-top: 8px;
}

.cta {
  padding: clamp(40px, 11vw, 80px) clamp(16px, 5vw, 40px);
  background:
    radial-gradient(circle at 100% 0%, rgba(215, 38, 30, 0.5) 0, rgba(215, 38, 30, 0) min(85%, 520px)),
    var(--black);
  border-radius: clamp(22px, 6vw, 28px);
  color: var(--white);
  text-align: center;
}

.cta__title {
  font-size: clamp(2.3rem, 10vw, 4.5rem);
}

.cta .accent {
  color: #FF5A52;
}

.cta__text {
  max-width: 520px;
  margin: 14px auto 24px;
  color: #C9CBCF;
  font-size: clamp(1rem, 0.96rem + 0.4vw, 1.125rem);
}

.cta .btn {
  width: 100%;
  max-width: 340px;
}

/* ---------- Footer ---------- */

/* El espacio de abajo deja libre el lugar del botón flotante */
.footer {
  padding-block: 8px calc(88px + var(--safe-bottom));
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid var(--gray-light);
  text-align: center;
}

.footer__text {
  color: var(--gray);
}

.footer__text a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 4px;
  color: var(--black);
  font-weight: 600;
  cursor: pointer;
}

.footer__text a:active {
  color: var(--red);
}

/* ---------- Botón flotante de WhatsApp ----------
   Se oculta solo mientras hay otro botón de WhatsApp grande en pantalla
   (hero y llamado final), para no tapar contenido. */

.fab {
  position: fixed;
  right: max(16px, var(--safe-right));
  bottom: calc(16px + var(--safe-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: var(--red);
  border-radius: 50%;
  color: var(--white);
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.22);
  cursor: pointer;
  transition: transform var(--ease), background-color var(--ease), opacity var(--ease), visibility var(--ease);
}

.fab:active {
  background: var(--red-dark);
  transform: scale(0.93);
}

.fab .icon {
  width: 30px;
  height: 30px;
}

.fab.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
}

/* ---------- Hover: solo donde hay mouse (en celular no existe) ---------- */

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    transform: translateY(-2px);
  }

  .btn--primary:hover {
    background: var(--red-dark);
    box-shadow: 0 12px 26px rgba(215, 38, 30, 0.34);
  }

  .btn--ghost:hover {
    background: var(--black);
    color: var(--white);
  }

  .btn:active {
    transform: scale(0.97);
  }

  .nav a:hover {
    color: var(--red);
  }

  .nav-toggle:hover {
    background: rgba(17, 17, 17, 0.06);
  }

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

  .rubro:hover {
    border-color: rgba(215, 38, 30, 0.5);
    transform: translateY(-2px);
  }

  .group-btn:hover {
    color: var(--black);
  }

  .catalog__groups--chips .group-btn:hover {
    border-color: var(--black);
  }

  .item:hover {
    box-shadow: var(--shadow-hover);
  }

  .item:hover .item__media img {
    transform: scale(1.04);
  }

  .item__add:hover {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
  }

  .item__wa:hover {
    background: var(--black);
    color: var(--white);
  }

  .quote__toggle:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .quote__remove:hover {
    background: rgba(17, 17, 17, 0.06);
    color: var(--red);
  }

  .catalog__all:hover span,
  .products__note a:hover span {
    transform: translateX(4px);
  }

  .brands__grid li:hover {
    background: var(--white);
    color: var(--red);
  }

  .back-link:hover {
    background: var(--white);
    border-color: var(--black);
  }

  .back-link:hover svg {
    transform: translateX(-3px);
  }

  .brands__grid li.brand-card:hover {
    background: var(--brand-bg);
  }

  .brand-card__link:hover .brand-card__bg img {
    opacity: 0.6;
    transform: scale(1.05);
  }

  .brand-card__link:hover .brand-card__cta {
    box-shadow: 0 8px 18px rgba(17, 17, 17, 0.18);
  }

  .brand-card__link:hover .brand-card__arrow {
    transform: translateX(4px);
  }

  .footer__text a:hover {
    color: var(--red);
  }

  .fab:hover {
    background: var(--red-dark);
    transform: scale(1.07);
  }
}

/* ---------- Desde 600px (celular grande apaisado / tablet) ---------- */

@media (min-width: 600px) {
  :root {
    --gutter: 32px;
  }

  .header__actions .btn {
    display: inline-flex;
  }

  .btn__long {
    display: inline;
  }

  .btn__short {
    display: none;
  }

  .btn--lg {
    min-height: 56px;
    padding-inline: 1.7em;
  }

  .hero__actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }

  .items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .catalog__panel {
    padding: 22px 20px 20px;
  }

  .catalog__groups:not(.catalog__groups--chips) {
    justify-self: start;
    max-width: 440px;
  }

  .brands__grid li {
    min-height: 130px;
  }

  .brands__grid--rep {
    grid-template-columns: repeat(5, 1fr);
  }

  .brands__grid--rep li:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .cta .btn {
    width: auto;
    max-width: none;
  }

  .footer__inner {
    gap: 14px;
  }
}

/* ---------- Desde 900px (escritorio) ---------- */

@media (min-width: 900px) {
  :root {
    --header-h: 63px;
  }

  .brand__img {
    height: 46px;
  }

  .brand--footer .brand__img {
    height: 84px;
  }

  .hero__inner {
    grid-template-columns: minmax(0, 1fr) clamp(300px, 33vw, 420px);
    align-items: center;
  }

  /* Con la tarjeta al lado, el título tiene menos ancho: letra un poco más chica */
  .hero__title {
    font-size: clamp(3.3rem, 6vw, 4.9rem);
  }

  .promo {
    justify-self: end;
  }

  .nav,
  .nav.is-open {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 32px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    animation: none;
  }

  .nav a,
  .nav__quote {
    min-height: 44px;
    border-bottom: 0;
  }

  .nav__quote {
    border-top: 0;
  }

  .nav-toggle {
    display: none;
  }

  .values {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  /* En escritorio la tarjeta de valor vuelve a apilarse: ícono arriba */
  .value {
    display: block;
    padding: 24px;
  }

  .value__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
  }

  .value h3 {
    font-size: 1.5rem;
  }

  .value p {
    margin-top: 6px;
  }

  .about__text {
    max-width: 760px;
  }

  .catalog {
    gap: 20px;
  }

  .catalog__rubros {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .catalog__panel {
    padding: 28px;
  }

  .items {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }

  .item__name {
    font-size: 1.25rem;
  }

  .brands__grid li {
    min-height: 220px;
    font-size: 2.4rem;
  }

  .brands__grid--own li {
    min-height: 220px;
    font-size: 4.25rem;
  }

  .section--cta {
    padding-top: 24px;
  }

  .footer {
    padding-top: 24px;
  }

  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ---------- Preferencias del usuario ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Sin soporte de backdrop-filter: fondos más opacos para mantener el contraste */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: rgba(255, 255, 255, 0.92);
  }

  .header {
    background: rgba(243, 243, 241, 0.97);
  }
}
