/* ---------- Page hero (producto) ---------- */
.page-hero { position: relative; min-height: 64vh; display: flex; align-items: center; color: #fff; overflow: hidden; }
.page-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 50%; background-color: var(--ink); }
.page-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(20,20,24,.5), rgba(20,20,24,.78)),
                repeating-linear-gradient(115deg, rgba(255,255,255,.05) 0 1px, transparent 1px 64px);
}
.page-hero-content { position: relative; text-align: center; padding: 70px 24px; width: 100%; }
.page-hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px; justify-content: center;
    text-transform: uppercase; letter-spacing: 3px; font-size: 12px; font-weight: 600;
    color: #e8b7bd; margin-bottom: 16px;
}
.page-hero-eyebrow::before { content: ''; width: 16px; height: 2px; background: #e8b7bd; transform: skewX(-20deg); }
.page-hero-title { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; font-size: clamp(2rem, 5vw, 3.4rem); }
.page-hero-sub { max-width: 620px; margin: 16px auto 0; font-size: 17px; color: #e8e6e6; }

/* ---------- Badge "producto estrella" (por si se reutiliza en catálogo) ---------- */
.badge-star {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--bg-alt); color: var(--carmin); font-size: 12px; font-weight: 600;
    padding: 6px 14px; border-radius: 22px; border: 1px solid var(--border); margin-bottom: 22px;
}

/* ---------- CTA final de página de producto ---------- */
.product-cta { position: relative; background: var(--ink); color: #fff; padding: 64px 0; overflow: hidden; }
.product-cta::before {
    content: ''; position: absolute; inset: 0;
    background: repeating-linear-gradient(115deg, rgba(255,255,255,.04) 0 1px, transparent 1px 64px);
    pointer-events: none;
}
.product-cta-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.product-cta-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.product-cta-sub { color: #c9c7cb; margin-top: 8px; font-size: 15px; }

/* ---------- Presentación de producto (intro centrada) ---------- */
.product-intro { text-align: center; }
.product-intro-inner { max-width: 560px; margin: 0 auto; }
.product-intro-eyebrow {
    font-weight: 700; color: var(--ink); font-size: 16px; line-height: 1.4;
    margin-bottom: 22px;
}
.product-intro-eyebrow.light { color: #fff; }
.product-intro-title {
    font-family: var(--font-display); font-weight: 700; color: var(--carmin);
    font-size: clamp(2.2rem, 5vw, 3.2rem); letter-spacing: -.01em; margin-bottom: 30px;
}
.product-intro-text p { color: var(--muted); font-size: 16px; margin-bottom: 18px; }
.product-intro-text p:last-child { margin-bottom: 0; }
.product-intro-text.light p { color: #e8e6e6; }

/* Cuando la intro va montada sobre el hero (imagen de fondo) */
.page-hero .page-hero-content.product-intro { padding: 110px 24px; }

/* =========================================================
   A partir de acá van las secciones propias del catálogo
   que se agreguen en los próximos pasos.
   ========================================================= */

/* =========================================================
   Máximas dimensiones, máximo confort
   ========================================================= */
.dim-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start;
}

/* ---------- Card izquierda ---------- */
.dim-card-outer {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 40px 44px;
}
.dim-info-block { display: flex; gap: 18px; align-items: flex-start; }
.dim-info-icon {
    flex: 0 0 50px; width: 50px; height: 50px; border-radius: 50%;
    background: var(--carmin); display: flex; align-items: center; justify-content: center;
}
.dim-info-icon svg { width: 22px; height: 22px; }
.dim-info-title { color: var(--carmin); font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.dim-info-desc { color: var(--ink); font-size: 14.5px; line-height: 1.55; }

.dim-divider { height: 1px; background: var(--border); margin: 26px 0; }

.dim-row { display: flex; align-items: center; gap: 26px; }
.dim-diagram { display: flex; align-items: center; gap: 14px; }
.dim-diagram img { display: block; }
.dim-label {
    font-size: 11px; letter-spacing: .08em; font-weight: 700; color: var(--muted);
    text-transform: uppercase;
}

.dim-diagram-v { align-items: center; }
.dim-diagram-v img { height: 180px; width: auto; }
.dim-arrow-v {
    position: relative; width: 2px; height: 160px; background: var(--carmin); flex: 0 0 auto;
    margin: 0 2px;
}
.dim-arrow-v::before, .dim-arrow-v::after {
    content: ''; position: absolute; left: 50%; transform: translateX(-50%);
    border-left: 4px solid transparent; border-right: 4px solid transparent;
}
.dim-arrow-v::before { top: -6px; border-bottom: 7px solid var(--carmin); }
.dim-arrow-v::after { bottom: -6px; border-top: 7px solid var(--carmin); }

.dim-diagram-h { flex-direction: column; align-items: center; gap: 10px; }
.dim-diagram-h img { width: 180px; height: auto; }
.dim-arrow-h {
    position: relative; height: 2px; width: 160px; background: var(--carmin);
    margin: 2px 0;
}
.dim-arrow-h::before, .dim-arrow-h::after {
    content: ''; position: absolute; top: 50%; transform: translateY(-50%);
    border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}
.dim-arrow-h::before { left: -6px; border-right: 7px solid var(--carmin); }
.dim-arrow-h::after { right: -6px; border-left: 7px solid var(--carmin); }

.dim-value { flex: 1; }
.dim-value-label {
    color: var(--carmin); font-weight: 700; font-size: 12.5px; text-transform: uppercase;
    letter-spacing: .03em; line-height: 1.4; margin-bottom: 8px;
}
.dim-value-number { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--ink); }

/* ---------- Columna derecha: foto decorativa + número máximo de hojas ---------- */
.patio-diagram {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column;
}
.patio-photo-inner { line-height: 0; }
.patio-photo-inner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.patio-diagram .dim-divider { margin: 0; }
.patio-diagram .dim-info-block { padding: 28px 32px; }

@media (max-width: 900px) {
    .dim-grid { grid-template-columns: 1fr; }
    .dim-card-outer { padding: 32px 28px; }
}
@media (max-width: 560px) {
    .dim-row { flex-direction: column; align-items: flex-start; gap: 18px; }
    .dim-value { padding-left: 2px; }
    .patio-diagram .dim-info-block { padding: 24px 24px; }
}

/* =========================================================
   Configuraciones Rollkit
   ========================================================= */
.config-intro {
    text-align: center; max-width: 620px; margin: 0 auto 52px;
    font-size: 17px; font-weight: 600; color: var(--carmin); line-height: 1.5;
}
.config-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.config-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px 26px 30px; text-align: center;
}
.config-card-title { color: var(--carmin); font-weight: 700; font-size: 15px; margin-bottom: 18px; }
.config-card img { width: 100%; height: auto; display: block; border-radius: 4px; }

@media (max-width: 700px) {
    .config-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Máxima hermeticidad
   ========================================================= */
.hermetic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.hermetic-card-title { color: var(--carmin); font-weight: 700; font-size: 15px; margin-bottom: 14px; }
.hermetic-photo-wrap {
    position: relative; border-radius: var(--radius); overflow: hidden;
    aspect-ratio: 3 / 4; box-shadow: 0 12px 30px rgba(0,0,0,.10);
}
.hermetic-photo-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 800px) {
    .hermetic-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
}

/* =========================================================
   Máxima adaptación y diseño (configuración angular)
   ========================================================= */
.adapt-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; max-width: 980px; margin: 0 auto; align-items: start; }
.adapt-left { display: flex; flex-direction: column; gap: 24px; }
.adapt-intro { color: var(--ink); font-weight: 600; font-size: 16px; line-height: 1.6; }

.adapt-photo {
    border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,.10);
}
.adapt-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adapt-photo-main { height: 350px; }

.adapt-right { display: flex; flex-direction: column; gap: 24px; align-self: end; }
.adapt-right .adapt-photo { height: 230px; }

@media (max-width: 860px) {
    .adapt-grid { grid-template-columns: 1fr; }
    .adapt-photo-main { height: 280px; }
    .adapt-right .adapt-photo { height: 205px; }
}

/* =========================================================
   Plegakit — Personalización de perfiles (foto + conector + texto)
   ========================================================= */
.custom-row {
    display: flex; align-items: center; gap: 0;
    max-width: 780px; margin: 0 auto 48px;
}
.custom-photo {
    flex: 0 0 200px; height: 140px; border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 10px 26px rgba(0,0,0,.12);
}
.custom-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.custom-connector { flex: 0 0 70px; height: 2px; background: var(--carmin); opacity: .5; position: relative; margin: 0 14px; }
.custom-connector::after {
    content: ''; position: absolute; top: 50%; width: 11px; height: 11px; border-radius: 50%;
    background: var(--carmin); border: 2px solid #fff; transform: translateY(-50%);
    box-shadow: 0 2px 6px rgba(0,0,0,.28);
}
.custom-row .custom-connector::after { left: -5.5px; }
.custom-row-reverse .custom-connector::after { right: -5.5px; }

.custom-text { flex: 1; }
.custom-title { color: var(--carmin); font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.custom-desc { color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.custom-desc em { font-style: italic; }

@media (max-width: 640px) {
    .custom-row, .custom-row-reverse { flex-direction: column; align-items: flex-start; gap: 14px; }
    .custom-connector { display: none; }
    .custom-photo { flex: 0 0 auto; width: 100%; height: 180px; }
}

/* =========================================================
   Proyectos instalados (carrusel + lightbox con toolbar)
   Usado en Rollkit y Plegakit
   ========================================================= */
.carousel-wrap { position: relative; }

.gallery-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.gallery-grid::-webkit-scrollbar { display: none; }

.gallery-item {
    display: block;
    flex: 0 0 auto;
    width: 300px;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius); overflow: hidden; position: relative;
    border: 0; padding: 0; cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
    scroll-snap-align: start;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; pointer-events: none; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item-label {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px;
    background: linear-gradient(0deg, rgba(0,0,0,.65), transparent);
    color: #fff; font-size: 13.5px; font-weight: 600; text-align: left;
}

/* Flechas del carrusel */
.carousel-btn {
    position: absolute; top: 42%; transform: translateY(-50%);
    width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
    background: #fff; color: var(--carmin);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; cursor: pointer; z-index: 5;
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
    transition: background .2s ease, color .2s ease;
}
.carousel-btn:hover { background: var(--carmin); color: #fff; }
.carousel-btn.prev { left: -10px; }
.carousel-btn.next { right: -10px; }

@media (max-width: 900px) {
    .gallery-item { width: 240px; }
}
@media (max-width: 560px) {
    .gallery-item { width: 78vw; max-width: 300px; }
    .carousel-btn { display: none; } /* en mobile queda el swipe táctil */
}

/* Lightbox */
.lightbox {
    position: fixed; inset: 0; background: rgba(10,10,12,.94); z-index: 500;
    display: flex; align-items: center; justify-content: center; padding: 40px;
    opacity: 0; visibility: hidden; transition: opacity .25s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
    max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
    cursor: zoom-in; transition: transform .3s ease;
}
.lightbox img.zoomed { transform: scale(1.7); cursor: zoom-out; }

.lightbox-toolbar { position: absolute; top: 18px; right: 24px; display: flex; gap: 10px; z-index: 10; }
.lightbox-btn {
    width: 38px; height: 38px; border-radius: 50%; border: none;
    background: rgba(255,255,255,.12); color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .2s ease;
}
.lightbox-btn:hover { background: rgba(255,255,255,.26); }
.lightbox-btn svg { width: 18px; height: 18px; }

@media (max-width: 560px) {
    .lightbox { padding: 20px; }
    .lightbox-toolbar { top: 10px; right: 12px; }
}

/* =========================================================
   Recursos descargables (PDFs)
   ========================================================= */
.downloads-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.download-card {
    display: flex; align-items: center; gap: 14px;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px; transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.download-card:hover { border-color: var(--carmin); box-shadow: 0 10px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.download-icon {
    flex: 0 0 42px; width: 42px; height: 42px; border-radius: 10px;
    background: rgba(154,12,26,.08); color: var(--carmin);
    display: flex; align-items: center; justify-content: center;
}
.download-icon svg { width: 22px; height: 22px; }
.download-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.download-title {
    font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.download-meta { font-size: 12px; color: var(--muted); }
.download-arrow {
    flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%;
    background: var(--bg-alt); color: var(--carmin);
    display: flex; align-items: center; justify-content: center;
    transition: background .2s ease, color .2s ease;
}
.download-arrow svg { width: 14px; height: 14px; }
.download-card:hover .download-arrow { background: var(--carmin); color: #fff; }

/* Variante de 1 columna centrada para cuando queda un solo recurso público
   (ej. plegakit.php luego de mover la ficha técnica al panel de cliente) */
.downloads-grid.downloads-grid-1 { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; }

/* Variante de 2 columnas para cuando hay solo 2 recursos (evita el hueco de una grilla de 4) */
.downloads-grid.downloads-grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 720px; margin: 0 auto; }
@media (max-width: 560px) {
    .downloads-grid.downloads-grid-2 { grid-template-columns: 1fr; }
}

/* Variante de 3 columnas (ej. dashboard cliente: fichas técnicas + manual) */
.downloads-grid.downloads-grid-3 { grid-template-columns: repeat(3, 1fr); max-width: 1040px; margin: 0 auto; }
@media (max-width: 760px) {
    .downloads-grid.downloads-grid-3 { grid-template-columns: 1fr 1fr; max-width: 720px; }
}
@media (max-width: 560px) {
    .downloads-grid.downloads-grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .downloads-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
    .downloads-grid { grid-template-columns: 1fr; }
    .download-title { white-space: normal; }
}

/* Sección con poco contenido (una sola fila): menos padding vertical que el estándar */
.section-compact { padding: 56px 0; }