/* Páginas estáticas de la tienda (/, /en/, /fracciones/, /en/fractions/).
   Mismos tokens que src/styles.css del portafolio, sin Bootstrap: estas
   páginas no cargan Angular y deben ser ligeras para el SEO. */
:root {
  --font: 'Poppins', system-ui, sans-serif;
  --clr-accent: #7c3aed;
  --clr-accent-dark: #6d28d9;
  --clr-accent-light: #a78bfa;
  --clr-accent-subtle: #ede9fe;
  --clr-bg: #ffffff;
  --clr-bg-alt: #f8fafc;
  --clr-bg-hero: #0f172a;
  --clr-heading: #0f172a;
  --clr-body: #475569;
  --clr-muted: #94a3b8;
  --clr-white: #f1f5f9;
  --clr-border: #e2e8f0;
  --clr-success: #10b981;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10);
  --shadow-lg: 0 12px 28px rgba(0,0,0,.12);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --ancho: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--clr-body);
  background: var(--clr-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
/* Los hijos de una rejilla no encogen por debajo de su contenido (min-width: auto);
   sin esto, las imágenes de 520 px desbordan la pantalla en móvil. */
.hero .contenedor > *, .destacado > *, .sobre > *, .rejilla > *, .interiores > * { min-width: 0; }
h1, h2, h3 { overflow-wrap: break-word; }
a { color: var(--clr-accent); }
h1, h2, h3 { color: var(--clr-heading); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }

.contenedor { max-width: var(--ancho); margin: 0 auto; padding: 0 20px; }
.seccion { padding: 80px 0; }
.seccion--alt { background: var(--clr-bg-alt); }
.seccion__intro { max-width: 680px; margin-bottom: 40px; }
.etiqueta {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--clr-accent); background: var(--clr-accent-subtle);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
}

/* ── Cabecera ─────────────────────────────────────────────── */
[id] { scroll-margin-top: 84px; }
.cabecera {
  position: sticky; top: 0; z-index: 10;
  background: rgba(15, 23, 42, .96); backdrop-filter: blur(6px);
}
.cabecera .contenedor { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.marca { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.marca span { color: var(--clr-accent-light); }
.menu { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.menu a { color: var(--clr-white); text-decoration: none; font-size: .92rem; font-weight: 500; }
.menu a:hover { color: var(--clr-accent-light); }
.menu .idioma { border: 1px solid rgba(241,245,249,.35); border-radius: 999px; padding: 3px 12px; }
@media (max-width: 760px) {
  .menu li:not(.siempre) { display: none; }
}

/* ── Botones ──────────────────────────────────────────────── */
.botones { display: flex; flex-wrap: wrap; gap: 12px; }
.boton {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  text-decoration: none; border: 2px solid transparent; transition: transform .15s, background .15s;
}
.boton:hover { transform: translateY(-2px); }
.boton--primario { background: var(--clr-accent); color: #fff; }
.boton--primario:hover { background: var(--clr-accent-dark); }
.boton--contorno { border-color: var(--clr-accent); color: var(--clr-accent); }
.boton--claro { border-color: rgba(241,245,249,.5); color: #fff; }
.boton--inactivo { background: var(--clr-border); color: var(--clr-body); cursor: default; }
.boton--inactivo:hover { transform: none; }

/* ── Portada (hero) ───────────────────────────────────────── */
.hero { background: var(--clr-bg-hero); color: var(--clr-white); padding: 90px 0 100px; overflow: hidden; }
.hero .contenedor { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--clr-accent-light); }
.hero p { font-size: 1.1rem; color: #cbd5e1; max-width: 560px; }
.hero .etiqueta { background: rgba(124,58,237,.25); color: var(--clr-accent-light); }
.abanico { position: relative; height: 380px; }
.abanico img {
  position: absolute; width: 56%; border-radius: var(--r-sm); box-shadow: var(--shadow-lg);
}
.abanico img:nth-child(1) { left: 0; top: 30px; transform: rotate(-8deg); }
.abanico img:nth-child(2) { left: 22%; top: 0; z-index: 2; }
.abanico img:nth-child(3) { right: 0; top: 30px; transform: rotate(8deg); }
@media (max-width: 860px) {
  .hero .contenedor { grid-template-columns: 1fr; }
  .abanico { height: 300px; max-width: 420px; }
}

/* ── Tarjetas ─────────────────────────────────────────────── */
.rejilla { display: grid; gap: 24px; }
.rejilla--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.rejilla--5 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.tarjeta {
  background: #fff; border: 1px solid var(--clr-border); border-radius: var(--r-md);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.tarjeta__icono {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--clr-accent-subtle); color: var(--clr-accent); font-size: 1.4rem; margin-bottom: 14px;
}
.proyecto { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.proyecto img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-bottom: 1px solid var(--clr-border); }
.proyecto__texto { padding: 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.proyecto__texto p { font-size: .93rem; }
.proyecto__texto a { margin-top: auto; font-weight: 600; text-decoration: none; }

/* Producto destacado */
.destacado {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: 44px; align-items: center;
  background: #fff; border: 1px solid var(--clr-border); border-radius: var(--r-lg);
  padding: 40px; box-shadow: var(--shadow-md);
}
.destacado ul { padding-left: 0; list-style: none; margin: 0 0 24px; }
.destacado li { padding-left: 28px; position: relative; margin-bottom: 8px; }
.destacado li::before { content: "✓"; position: absolute; left: 0; color: var(--clr-success); font-weight: 700; }
@media (max-width: 860px) { .destacado { grid-template-columns: 1fr; padding: 26px; } }

.folleto { text-align: center; display: flex; flex-direction: column; align-items: center; }
.folleto img { border-radius: var(--r-sm); box-shadow: var(--shadow-md); margin-bottom: 12px; }
.folleto h3 { font-size: 1rem; margin-bottom: 4px; }
.folleto p { font-size: .85rem; margin: 0; }
.folleto .nivel { color: var(--clr-accent); font-weight: 600; }
.folleto .precio { color: var(--clr-heading); font-weight: 700; font-size: .95rem; margin: auto 0 8px; padding-top: 10px; }
.precio small { font-weight: 500; font-size: .75em; color: var(--clr-body); }
.boton--peq { padding: 7px 18px; font-size: .88rem; }

/* Pack completo */
.pack {
  display: grid; grid-template-columns: 1fr auto; gap: 36px; align-items: center;
  background: #fff; border: 2px solid var(--clr-accent); border-radius: var(--r-lg);
  padding: 36px 40px; box-shadow: var(--shadow-md);
}
.pack h2 { margin-bottom: .4em; }
.pack__compra { text-align: center; min-width: 200px; }
.pack__antes { margin: 0; color: var(--clr-muted); text-decoration: line-through; }
.pack__precio { margin: 0 0 14px; font-size: 2.4rem; font-weight: 800; color: var(--clr-heading); line-height: 1.1; }
.pack__precio small { font-size: .4em; font-weight: 500; color: var(--clr-body); }
.nota-pago { font-size: .85rem; color: var(--clr-muted); margin: 0; }
@media (max-width: 700px) { .pack { grid-template-columns: 1fr; padding: 26px; } }

/* Catálogo de folletos (js/catalogo.js) */
.catalogo { margin-top: 56px; }
.catalogo__titulo { font-size: 1.35rem; margin-bottom: 20px; }
.catalogo__rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.ficha {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--clr-border);
  border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm);
}
.ficha img { width: 100%; aspect-ratio: 1 / 1.05; object-fit: cover; object-position: top; border-bottom: 1px solid var(--clr-border); }
.ficha__cuerpo { padding: 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
/* Altura fija: cada línea de texto tiene su hueco reservado y se corta con "…",
   así todas las tarjetas miden lo mismo aunque la descripción sea larga. */
.ficha__serie, .ficha__nivel {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ficha__serie { font-size: .72rem; font-weight: 700; color: var(--clr-accent); text-transform: uppercase; letter-spacing: .05em; }
.ficha h4, .ficha__desc { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.ficha h4 { margin: 0; font-size: 1rem; color: var(--clr-heading); line-height: 1.3; -webkit-line-clamp: 2; line-clamp: 2; height: 2.6em; }
.ficha__nivel { margin: 0; font-size: .82rem; color: var(--clr-accent-dark); font-weight: 600; line-height: 1.4; height: 1.4em; }
.ficha__desc { margin: 4px 0 0; font-size: .85rem; line-height: 1.5; -webkit-line-clamp: 3; line-clamp: 3; height: 4.5em; }
.ficha__mas {
  align-self: flex-start; height: 1.6em; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .82rem; font-weight: 600; color: var(--clr-accent); visibility: hidden;
}
.ficha__mas.visible { visibility: visible; }
.ficha__mas:hover { text-decoration: underline; }

/* Ventana de "Ver más" */
.ficha-detalle {
  border: 0; border-radius: var(--r-lg); padding: 0; width: calc(100% - 32px); max-width: 720px;
  max-height: calc(100vh - 48px); box-shadow: var(--shadow-lg); color: var(--clr-body); overflow: auto;
}
.ficha-detalle[open] { display: grid; grid-template-columns: 240px 1fr; }
.ficha-detalle::backdrop { background: rgba(15, 23, 42, .55); }
.ficha-detalle img { width: 100%; height: 100%; object-fit: cover; object-position: top; background: var(--clr-bg-alt); }
.ficha-detalle__texto { padding: 28px 26px 24px; display: flex; flex-direction: column; gap: 6px; }
.ficha-detalle__texto h3 { margin: 0; font-size: 1.2rem; }
.ficha-detalle__desc { margin: 6px 0 14px; font-size: .92rem; line-height: 1.6; white-space: pre-line; }
.ficha-detalle__cerrar {
  position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: var(--clr-bg-alt); color: var(--clr-heading); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
@media (max-width: 600px) {
  .ficha-detalle[open] { grid-template-columns: 1fr; }
  .ficha-detalle img { height: 220px; }
}
.ficha__pie { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ficha__precio { font-weight: 700; color: var(--clr-heading); }
.ficha__precio small { font-weight: 500; font-size: .75em; color: var(--clr-body); }

.interiores { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.interiores img { border-radius: var(--r-sm); box-shadow: var(--shadow-md); border: 1px solid var(--clr-border); }

/* Llamada a la acción */
.cta {
  background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-dark));
  color: #fff; border-radius: var(--r-lg); padding: 48px; text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: #ede9fe; max-width: 620px; margin: 0 auto 24px; }
.cta .botones { justify-content: center; }
.cta .boton--primario { background: #fff; color: var(--clr-accent-dark); }
.cta p a { color: #fff; font-weight: 600; }

/* Formulario de contacto (dentro de .cta) */
.contacto {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px;
  max-width: 640px; margin: 0 auto; text-align: left;
}
.contacto label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 600; color: #fff; }
.contacto .ancho, .contacto__error, .contacto button { grid-column: 1 / -1; }
.contacto input, .contacto textarea {
  font: inherit; font-weight: 400; color: var(--clr-heading); background: #fff;
  border: 2px solid transparent; border-radius: var(--r-sm); padding: 11px 14px; resize: vertical;
}
.contacto input:focus, .contacto textarea:focus { outline: none; border-color: var(--clr-accent-light); }
.contacto button { justify-self: center; border: 0; cursor: pointer; }
.contacto button:disabled { opacity: .7; cursor: wait; transform: none; }
.contacto__error { margin: 0; background: #fee2e2; color: #991b1b; border-radius: var(--r-sm); padding: 10px 14px; font-size: .9rem; }
@media (max-width: 600px) { .contacto { grid-template-columns: 1fr; } .cta { padding: 32px 20px; } }

/* Popup de confirmación */
.aviso {
  border: 0; border-radius: var(--r-lg); padding: 32px 28px; max-width: 380px; width: calc(100% - 32px);
  text-align: center; box-shadow: var(--shadow-lg); color: var(--clr-body);
}
.aviso::backdrop { background: rgba(15, 23, 42, .55); }
.aviso__icono {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: #d1fae5; color: var(--clr-success); font-size: 1.6rem; font-weight: 800;
}
.aviso h3 { margin-bottom: 8px; }
.aviso p { margin: 0 0 22px; }
.aviso .boton { border: 0; cursor: pointer; }

/* Sobre mí */
.sobre { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; }
.sobre img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; box-shadow: var(--shadow-md); }
@media (max-width: 700px) { .sobre { grid-template-columns: 1fr; } .sobre img { max-width: 180px; } }

/* Preguntas frecuentes */
.faq details { border-bottom: 1px solid var(--clr-border); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--clr-heading); }
.faq details p { margin: 10px 0 0; }

/* Migas de pan */
.migas { font-size: .85rem; color: var(--clr-muted); margin-bottom: 18px; }
.migas a { color: var(--clr-accent-light); text-decoration: none; }

/* ── Pie ──────────────────────────────────────────────────── */
.pie { background: var(--clr-bg-hero); color: var(--clr-muted); padding: 40px 0; font-size: .9rem; }
.pie .contenedor { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.pie a { color: var(--clr-white); text-decoration: none; margin-right: 18px; }
.pie a:hover { color: var(--clr-accent-light); }

/* Proyecto destacado (ocupa toda la fila) y cabeceras sin captura */
.proyecto--destacado { grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr 1fr; }
.proyecto--destacado img { aspect-ratio: 16 / 10; height: 100%; border-bottom: 0; border-right: 1px solid var(--clr-border); }
.proyecto--destacado .proyecto__texto { padding: 32px; justify-content: center; }
.proyecto--destacado .proyecto__texto p { font-size: 1rem; }
.proyecto--destacado .proyecto__texto a { margin-top: 10px; }
@media (max-width: 860px) {
  .proyecto--destacado { grid-template-columns: 1fr; }
  .proyecto--destacado img { border-right: 0; border-bottom: 1px solid var(--clr-border); }
  .proyecto--destacado .proyecto__texto { padding: 22px; }
}
.proyecto__meta { font-size: .75rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--clr-accent); }
.proyecto__cabecera { aspect-ratio: 16 / 7; display: flex; align-items: center; justify-content: center; font-size: 3rem; border-bottom: 1px solid var(--clr-border); }
.proyecto__cabecera--verde   { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.proyecto__cabecera--rosa    { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.proyecto__cabecera--naranja { background: linear-gradient(135deg, #ffedd5, #fed7aa); }
.proyecto__cabecera--azul    { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.proyecto__cabecera--violeta { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.proyecto__cabecera--lima    { background: linear-gradient(135deg, #ecfccb, #d9f99d); }
