/* Home de Ñums (index.html). Se carga después de base.css. Mobile-first. */

.t3 {
  --radio-t3: 18px;
  --sombra-t3: 0 1px 2px rgb(25 25 25 / 6%), 0 6px 20px rgb(25 25 25 / 6%);
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

.t3-ancho {
  width: min(100% - 24px, 1240px);
  margin-inline: auto;
}

.t3-saltar {
  position: absolute;
  z-index: 60;
  padding: 10px 16px;
  color: #fff;
  background: var(--tinta);
}

/* ---------- Anuncio y cabecera ---------- */

.t3-anuncio {
  padding: 8px 12px;
  margin: 0;
  font-size: .78rem;
  font-weight: 600;
  text-align: center;
  color: var(--lima);
  background: var(--tinta);
}

.t3-cabecera {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 10px 0;
  background: rgb(252 247 243 / 92%);
  border-bottom: 1px solid var(--linea);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
}

.t3-cabecera-fila {
  display: grid;
  grid-template-areas: 'logo carrito' 'buscador buscador';
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  align-items: center;
}

.t3-logo {
  grid-area: logo;
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.05em;
  color: var(--acento);
  text-decoration: none;
}

.t3-carrito { grid-area: carrito; }

/* Buscador bien visible: borde fuerte, fondo blanco y botón de color (Baymard #241). */
.t3-buscador {
  position: relative;
  grid-area: buscador;
  display: flex;
  align-items: center;
  height: 48px;
  background: #fff;
  border: 2px solid var(--tinta);
  border-radius: 999px;
}

.t3-buscador > svg {
  flex: none;
  margin: 0 8px 0 14px;
  color: var(--tinta-suave);
}

.t3-buscador input {
  flex: 1;
  min-width: 0;
  height: 100%;
  font-size: 16px;
  background: none;
  border: 0;
  outline: 0;
  -webkit-appearance: none;
  appearance: none;
}

.t3-buscador:focus-within { box-shadow: 0 0 0 3px rgb(17 54 221 / 25%); border-color: var(--acento); }

.t3-buscar-boton {
  flex: none;
  height: 38px;
  padding: 0 16px;
  margin-right: 4px;
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
  background: var(--acento);
  border: 0;
  border-radius: 999px;
}

.t3-sugerencias {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 40;
  max-height: min(70vh, 480px);
  padding: 12px;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgb(25 25 25 / 18%);
}

.t3-sug-titulo {
  margin: 4px 4px 8px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--tinta-suave);
  text-transform: uppercase;
}

.t3-sug-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.t3-sug-chips .chip {
  display: inline-flex;
  align-items: center;
  height: 34px;
  color: var(--tinta);
  text-decoration: none;
}

.t3-sug-producto {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px;
  font-size: .9rem;
  line-height: 1.3;
  color: var(--tinta);
  text-decoration: none;
  border-radius: 10px;
}

.t3-sug-producto:hover,
.t3-sug-producto:focus-visible { background: #f3efe8; }

.t3-sug-producto img { border-radius: 8px; object-fit: cover; }

.t3-sug-todos {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  font-weight: 700;
  color: var(--acento);
  background: #eef1fd;
  border: 0;
  border-radius: 10px;
}

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

.t3-boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 22px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
}

.t3-boton-lima { color: var(--tinta); background: var(--lima); }
.t3-boton-negro { color: #fff; background: var(--tinta); }

/* ---------- Portada bento ---------- */

.t3-bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.t3-tile {
  position: relative;
  display: flex;
  min-height: 150px;
  overflow: hidden;
  color: var(--tinta);
  text-decoration: none;
  border-radius: var(--radio-t3);
}

.t3-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.t3-tile-texto {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  padding: 14px;
}

.t3-eyebrow {
  margin: 0;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.t3-eyebrow-azul { color: var(--acento); }

.t3-tile-titulo {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
}

.t3-flecha {
  margin-top: auto;
  font-size: 1.2rem;
  font-weight: 700;
}

.t3-tile-principal {
  grid-column: 1 / -1;
  min-height: 420px;
  color: #fff;
  background: var(--tinta);
}

/* La foto ocupa la mitad derecha; el texto queda sobre fondo negro. */
.t3-tile-principal img {
  inset: 38% 0 0 0;
  height: 62%;
  object-position: center 30%;
}

.t3-tile-principal .t3-tile-texto { padding: 22px; }
.t3-tile-principal .t3-eyebrow { color: var(--lima); }

.t3-titular {
  font-size: clamp(2.1rem, 9vw, 3.6rem);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.045em;
}

.t3-tile-sub {
  max-width: 30ch;
  margin: 6px 0 12px;
  font-size: .95rem;
  color: rgb(255 255 255 / 80%);
}

.t3-tile-ofertas { color: #fff; background: var(--acento); }
.t3-tile-hogar { background: var(--lima); }
.t3-tile-plantas { grid-column: 1 / -1; min-height: 130px; background: #f0dcdc; }

/* Fotos pequeñas a la derecha para que el texto se lea. */
.t3-tile-ofertas img,
.t3-tile-hogar img {
  inset: auto -12% -18% auto;
  width: 78%;
  height: 78%;
  border-radius: 50%;
}

.t3-tile-plantas img {
  inset: 0 0 0 auto;
  width: 46%;
}

.t3-tile-plantas .t3-tile-texto { max-width: 58%; }

@media (hover: hover) {
  .t3-tile img { transition: transform .3s ease; }
  .t3-tile:hover img { transform: scale(1.04); }
}

/* ---------- Secciones ---------- */

.t3-seccion {
  margin-top: 36px;
  scroll-margin-top: 136px; /* la cabecera fija no tapa el título al saltar */
}

.t3-seccion-cabeza {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.t3-h2 {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -.035em;
}

.t3-seccion-cabeza .t3-h2 { margin: 0; }

/* ---------- Categorías ---------- */

.t3-categorias {
  display: flex;
  gap: 14px;
  padding-bottom: 4px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.t3-categorias::-webkit-scrollbar { display: none; }

.t3-categoria {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  width: 92px;
  color: var(--tinta);
  text-align: center;
  text-decoration: none;
  scroll-snap-align: start;
}

.t3-categoria img {
  width: 84px;
  height: 84px;
  margin-bottom: 8px;
  object-fit: cover;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: var(--sombra-t3);
}

.t3-categoria-nombre { font-size: .88rem; font-weight: 700; }
.t3-categoria-num { font-size: .74rem; color: var(--tinta-suave); }

@media (hover: hover) {
  .t3-categoria img { transition: transform .2s ease; }
  .t3-categoria:hover img { transform: translateY(-3px); }
}

/* ---------- Beneficios ---------- */

.t3-beneficios {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin-top: 28px;
  margin-bottom: 0;
  list-style: none;
}

.t3-beneficios li {
  padding: 12px;
  font-size: .8rem;
  line-height: 1.3;
  color: var(--tinta-suave);
  background: #fff;
  border-radius: 14px;
}

.t3-beneficios b {
  display: block;
  font-size: .92rem;
  color: var(--tinta);
}

/* ---------- Tarjeta de producto ---------- */

.t3-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.t3-card-foto {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radio-t3);
}

.t3-card-foto img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Segunda vista al pasar el cursor (Baymard recomienda más de una imagen en listas). */
.t3-card-foto-alt { opacity: 0; transition: opacity .25s ease; }

@media (hover: hover) {
  .t3-card:hover .t3-card-foto-alt { opacity: 1; }
}

.t3-marcas {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
}

.t3-marca {
  padding: 2px 8px;
  font-size: .72rem;
  font-weight: 800;
  border-radius: 999px;
}

.t3-marca-rango { color: var(--lima); background: var(--tinta); }
.t3-marca-oferta { color: var(--tinta); background: var(--lima); }
.t3-marca-nuevo { color: #fff; background: var(--acento); }

.t3-card-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  padding: 10px 2px 0;
}

.t3-card-nombre {
  display: -webkit-box;
  overflow: hidden;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--tinta);
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* Toda la tarjeta es clicable sin duplicar enlaces para el lector de pantalla. */
.t3-card-nombre::after {
  position: absolute;
  inset: 0;
  content: '';
}

.t3-estrellas {
  font-size: .8rem;
  font-weight: 700;
  color: var(--tinta);
}

.t3-estrellas > span:first-child { color: #e0a100; }
.t3-estrellas-num { font-weight: 400; color: var(--tinta-suave); }

.t3-card-precio {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 800;
}

.t3-card-precio s {
  font-size: .8rem;
  font-weight: 400;
  color: var(--tinta-suave);
}

.t3-agregar {
  position: relative; /* encima del enlace que cubre la tarjeta */
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  margin-top: auto;
  font-size: .85rem;
  font-weight: 700;
  color: var(--tinta);
  text-decoration: none;
  background: #fff;
  border: 1.5px solid var(--tinta);
  border-radius: 999px;
}



button.t3-agregar { color: #fff; background: var(--tinta); }

@media (hover: hover) {
  button.t3-agregar:hover { background: var(--acento); border-color: var(--acento); }
  a.t3-agregar:hover { color: #fff; background: var(--tinta); }
}

/* ---------- Carriles horizontales (sin movimiento automático) ---------- */

.t3-flechas { display: none; gap: 6px; }

.t3-flecha-boton {
  width: 42px;
  height: 42px;
  font-weight: 700;
  background: #fff;
  border: 1px solid var(--linea);
  border-radius: 50%;
}

.t3-carril {
  display: grid;
  grid-auto-columns: 46%;
  grid-auto-flow: column;
  gap: 12px;
  padding-bottom: 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.t3-carril::-webkit-scrollbar { display: none; }
.t3-carril > * { scroll-snap-align: start; }
.t3-carril-chico { grid-auto-columns: 38%; }

/* ---------- Inspiración ---------- */

.t3-look {
  display: grid;
  gap: 18px;
}

.t3-look-foto {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radio-t3);
}

.t3-look-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Punto sobre el sillón: pulso suave para que se note que se puede tocar. */
.t3-punto {
  position: absolute;
  top: 63%;
  left: 52%;
  width: 34px;
  height: 34px;
  padding: 0;
  background: #fff;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgb(255 255 255 / 45%);
  transform: translate(-50%, -50%);
  animation: t3-pulso 2s ease-out infinite;
}

.t3-punto::after {
  position: absolute;
  inset: 11px;
  content: '';
  background: var(--acento);
  border-radius: 50%;
}

.t3-punto[aria-expanded='true'] { animation: none; }

@keyframes t3-pulso {
  0% { box-shadow: 0 0 0 0 rgb(255 255 255 / 70%); }
  100% { box-shadow: 0 0 0 16px rgb(255 255 255 / 0%); }
}

.t3-punto-ficha {
  position: absolute;
  bottom: 14px;
  left: 50%;
  width: min(92%, 320px);
  transform: translateX(-50%);
}

.t3-punto-ficha a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  font-size: .85rem;
  line-height: 1.35;
  color: var(--tinta);
  text-decoration: none;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--sombra-t3);
}

.t3-punto-ficha img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }

.t3-look-sub { margin: -6px 0 14px; color: var(--tinta-suave); }

.t3-look-lista {
  display: grid;
  gap: 8px;
}

.t3-fila {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  background: #fff;
  border-radius: 14px;
}

.t3-fila img { flex: none; object-fit: cover; border-radius: 10px; }

.t3-fila-texto {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  font-size: .9rem;
}

.t3-fila-texto a {
  font-weight: 700;
  color: var(--tinta);
  text-decoration: none;
}

.t3-fila-agregar {
  flex: none;
  width: 42px;
  height: 42px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--tinta);
  background: var(--lima);
  border: 0;
  border-radius: 50%;
}

/* ---------- Catálogo ---------- */

.t3-orden {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: .85rem;
  font-weight: 600;
}

.t3-orden select {
  height: 40px;
  padding: 0 34px 0 12px;
  font-size: .9rem;
  color: var(--tinta);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23191919' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--linea);
  border-radius: 999px;
  -webkit-appearance: none;
  appearance: none;
}

.t3-filtros {
  display: flex;
  gap: 8px;
  padding-bottom: 4px;
  margin-bottom: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.t3-filtros::-webkit-scrollbar { display: none; }
.t3-filtros .chip:not([aria-pressed='true']) { background: #fff; }

.t3-conteo {
  margin: 0 0 12px;
  font-size: .85rem;
  color: var(--tinta-suave);
}

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

.t3-vacio { padding: 40px 0; text-align: center; }

.t3-mas {
  margin-top: 26px;
  text-align: center;
}

.t3-mas .t3-conteo { margin-bottom: 10px; }

/* ---------- Reseñas ---------- */

.t3-resenas {
  display: grid;
  gap: 12px;
}

.t3-resena {
  padding: 18px;
  margin: 0;
  background: #fff;
  border-radius: var(--radio-t3);
}

.t3-resena-estrellas {
  margin: 0 0 8px;
  letter-spacing: 2px;
  color: #e0a100;
}

.t3-resena blockquote {
  margin: 0 0 12px;
  font-size: 1rem;
  line-height: 1.45;
}

.t3-resena figcaption {
  font-size: .85rem;
  font-weight: 700;
}

.t3-resena figcaption span {
  display: block;
  font-weight: 600;
  color: #15803d;
}

/* ---------- Boletín y pie ---------- */

.t3-boletin {
  display: grid;
  gap: 14px;
  padding: 24px;
  color: #fff;
  background: var(--acento);
  border-radius: var(--radio-t3);
}

.t3-boletin p { margin: 0; color: rgb(255 255 255 / 85%); }
.t3-boletin .t3-h2 { margin-bottom: 6px; }

.t3-boletin-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.t3-boletin-form input {
  flex: 1 1 200px;
  height: 46px;
  padding: 0 18px;
  font-size: 16px;
  border: 0;
  border-radius: 999px;
}

.t3-boletin-form :focus-visible { outline-color: var(--lima); }
.t3-boletin-ok { flex-basis: 100%; font-weight: 700; color: var(--lima) !important; }

.t3-pie {
  padding: 36px 0 24px;
  margin-top: 48px;
  color: rgb(255 255 255 / 75%);
  background: var(--tinta);
}

.t3-pie .t3-logo { color: var(--lima); }

.t3-pie-columnas {
  display: grid;
  gap: 24px;
}

.t3-pie-titulo {
  margin-bottom: 8px;
  font-weight: 700;
  color: #fff;
}

.t3-pie nav a {
  display: block;
  padding: 6px 0;
  color: rgb(255 255 255 / 75%);
  text-decoration: none;
}

.t3-pie nav a:hover { color: var(--lima); }
.t3-pie :focus-visible { outline-color: var(--lima); }

.t3-pagos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.t3-pagos li {
  padding: 4px 10px;
  font-size: .78rem;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 8px;
}

.t3-pie-legal {
  padding-top: 18px;
  margin-top: 24px;
  margin-bottom: 0;
  font-size: .8rem;
  border-top: 1px solid rgb(255 255 255 / 12%);
}

/* ---------- Barra inferior (solo celular) ---------- */

.t3-nav-inferior {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 35;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff;
  border-top: 1px solid var(--linea);
}

.t3-nav-inferior a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
  height: 60px;
  font-size: .72rem;
  font-weight: 600;
  color: var(--tinta);
  text-decoration: none;
}

.t3 .aviso { bottom: calc(76px + env(safe-area-inset-bottom)); }

/* ---------- Tablet ---------- */

@media (min-width: 700px) {
  .t3-cabecera-fila {
    grid-template-areas: 'logo buscador carrito';
    grid-template-columns: auto 1fr auto;
    gap: 20px;
  }

  .t3-buscador { max-width: 680px; }

  .t3-bento {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(190px, auto));
  }

  .t3-tile-principal {
    grid-row: 1 / 3;
    grid-column: 1 / 3;
    min-height: 0;
  }

  .t3-tile-plantas { grid-column: 3 / 5; }

  .t3-beneficios { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .t3-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .t3-carril { grid-auto-columns: 30%; }
  .t3-carril-chico { grid-auto-columns: 22%; }
  .t3-flechas { display: flex; }
  .t3-resenas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .t3-categorias { justify-content: space-between; }

  .t3-look {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
  }

  .t3-boletin {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 36px;
  }

  .t3-pie-columnas { grid-template-columns: 2fr 1fr 1fr; }
}

/* ---------- Escritorio ---------- */

@media (min-width: 1000px) {
  .t3 { padding-bottom: 0; }
  .t3-nav-inferior { display: none; }
  .t3 .aviso { bottom: 24px; }

  .t3-bento { grid-template-rows: repeat(2, 230px); }

  /* Texto a la izquierda y foto a la derecha en el bloque principal. */
  .t3-tile-principal img {
    inset: 0 0 0 46%;
    width: 54%;
    height: 100%;
  }

  .t3-tile-principal .t3-tile-texto {
    justify-content: center;
    max-width: 52%;
    padding: 32px;
  }

  .t3-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .t3-carril { grid-auto-columns: calc((100% - 36px) / 4); }
  .t3-carril-chico { grid-auto-columns: calc((100% - 60px) / 6); }
  .t3-seccion { margin-top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .t3-punto { animation: none; }
  .t3-tile img,
  .t3-card-foto-alt,
  .t3-categoria img { transition: none; }
}

@media (min-width: 700px) {
  .t3-seccion { scroll-margin-top: 90px; }
}
