/* Páginas internas + bloques nuevos de la home. Usa los tokens de styles.css. */

/* Los datos opcionales de config.js usan [hidden]; esto evita que un display: flex lo pise */
[hidden] { display: none !important; }

/* ---------- Encabezado de página interna ---------- */
.page-hero { padding-block: 7.5rem 3.5rem; background: var(--card); border-bottom: 1px solid var(--border); }
.page-hero__grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 64rem) { .page-hero__grid { grid-template-columns: 1.1fr 1fr; gap: 4rem; } }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; text-wrap: balance; margin-bottom: 1rem; }
.page-hero__lead { color: #404040; font-size: 1.1rem; max-width: 40rem; }
.page-hero__img { border-radius: calc(var(--radius) + 4px); overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow); background: var(--muted-bg); }
.page-hero__img img { width: 100%; height: 100%; object-fit: cover; }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.page-hero__price { margin: 1.25rem 0 0; font-weight: 700; font-size: 1.2rem; color: var(--primary-dark); }

.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .82rem; color: var(--muted); margin-bottom: 1.25rem; padding: 0; list-style: none; }
.crumbs li:not(:last-child)::after { content: "›"; margin-left: .4rem; }
.crumbs a:hover { color: var(--primary); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.chips li { padding: .35rem .8rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-size: .85rem; font-weight: 600; }

/* ---------- Texto largo ---------- */
.prose { max-width: 46rem; }
.prose h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin: 2.5rem 0 1rem; text-wrap: balance; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.15rem; margin: 1.75rem 0 .6rem; }
.prose p, .prose li { color: #404040; font-size: 1.05rem; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1.25rem; }
.prose li { margin-bottom: .4rem; }
.prose a:not(.btn) { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 3px; }
.prose .note { font-size: .9rem; color: var(--muted); border-left: 3px solid var(--border); padding-left: 1rem; }

.split { display: grid; gap: 3rem; }
@media (min-width: 64rem) { .split { grid-template-columns: 1.4fr 1fr; gap: 4rem; align-items: start; } }
.detail__card .btn { margin-top: .75rem; }

.photo-row { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-top: 2.5rem; }
.photo-row .gallery__item { aspect-ratio: 4 / 3; }

.table { width: 100%; border-collapse: collapse; font-size: .98rem; background: var(--card); border-radius: calc(var(--radius) + 4px); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-weight: 500; width: 45%; }
.table td { font-weight: 600; }
.table tr:last-child th, .table tr:last-child td { border-bottom: 0; }

/* ---------- Preguntas frecuentes ---------- */
.faq { display: grid; gap: .75rem; max-width: 48rem; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); padding: 1rem 1.25rem; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-weight: 700; font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: .75rem 0 0; color: #404040; }

/* ---------- Video ---------- */
.video-page { max-width: 24rem; margin: 0 auto; }

/* ---------- Links relacionados (home + internas) ---------- */
.related { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.related a { display: block; background: var(--card); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); padding: 1.1rem 1.25rem; transition: box-shadow .3s, transform .3s, border-color .3s; }
.related a:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--primary); }
.related strong { display: block; font-size: 1rem; margin-bottom: .25rem; }
.related span { color: var(--muted); font-size: .88rem; line-height: 1.45; display: block; }

/* ---------- Plano (se muestra solo si está cargado en config.js) ---------- */
.plan-link { margin-top: 1rem; }

/* ---------- Footer: links ---------- */
.footer__links { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; margin: 0 0 1.5rem; padding: 0 0 1.5rem; list-style: none; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer__links a { color: rgba(255,255,255,.75); }
.footer__links a:hover { color: #fff; }
