/* ====================================================================
   BASE.CSS — THINKCHIP
   Reset, estilos base de HTML/body y tipografía global.
==================================================================== */

/* ====================================================================
   2.0 - ESTILOS BASE Y RESETEO
==================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--color-fondo);
  overflow-x: hidden;
}

body {
  font-family: var(--fuente-principal);
  color: var(--color-texto-principal);
  line-height: 1.72;
  overflow-x: hidden;
  background-color: var(--color-fondo);
  min-height: 100vh;
  position: relative;
}

/* Textura de grano premium (sutil y performante) */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.02;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* En Firefox, los filtros SVG complejos pueden emborronar. Reducimos numOctaves para mayor fluidez. */
}

figure {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--fuente-titulos);
  color: var(--color-brand);
  margin-bottom: 0.9rem;
  text-align: center;
  font-weight: 700;
  line-height: 1.25;
}

h1 {
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  margin-top: 1.5rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.4rem, 3.2vw, 2.1rem);
  margin-top: 2.8rem;
  letter-spacing: -0.005em;
}

h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
}

h4 {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
}

p {
  font-size: 1.15rem;
}

/* ====================================================================
   3.0 - CLASES DE MAQUETACIÓN (Layout)
==================================================================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

/* Empuja el contenido de <main class="container"> por debajo del header fijo
   para evitar solapamiento con el breadcrumb al cargar la página. */
main.container {
  padding-top: 6rem;
}

@media (max-width: 768px) {
  .container {
    width: 100%;
    padding: 1.5rem 1rem;
  }
  main.container {
    padding-top: 5rem;
  }
}

.grid-destacado,
.grid-marcas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 2rem;
}

.recomendaciones-grid-estatica {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 2rem;
  margin-top: 2rem;
  align-items: start;
}

.grid--2-cols {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
  .grid--2-cols {
    grid-template-columns: 1fr;
  }
}