/* ===========================
   VARIABLES & RESET
=========================== */
:root {
    /* ── Paleta del logo ── */
    --primary:        #8B3020;   /* Terracota principal */
    --primary-dark:   #3D1208;   /* Marrón muy oscuro — texto/headers */
    --primary-light:  #A83D2A;   /* Terracota medio */
    --primary-xlight: #C04530;   /* Terracota claro */
    --accent:         #C8882A;   /* Ámbar/cobre cálido */
    --accent-light:   #D9A050;   /* Ámbar claro */
    --gold:           #C9A040;   /* Dorado cálido */

    /* ── Neutros ── */
    --bg:             #FAF6EF;   /* Crema cálida */
    --bg-warm:        #F5EDE0;   /* Crema más intensa */
    --bg-dark:        #1E0C07;   /* Marrón casi negro — footer */
    --bg-mid:         #3D1208;   /* Marrón oscuro — secciones oscuras */
    --white:          #FFFFFF;
    --text:           #1A0A06;   /* Marrón casi negro para texto */
    --text-muted:     #7A5A50;   /* Marrón grisáceo */
    --border:         #E8D8CC;   /* Borde cálido */
    --border-dark:    #C8A090;   /* Borde más visible */

    /* ── Efecto / sombra ── */
    --shadow:    0 4px 24px rgba(61,18,8,0.10);
    --shadow-lg: 0 12px 48px rgba(61,18,8,0.16);

    /* ── Forma / tipografía ── */
    --radius:    12px;
    --radius-lg: 20px;
    --transition: 0.25s ease;
    --font:       'Montserrat', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.section { padding: 5rem 0; }

/* ── Section header ── */
.section__header {
    text-align: center;
    margin-bottom: 3rem;
}
.section__tag {
    display: inline-block;
    background: rgba(139,48,32,0.10);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.35rem 1rem;
    border-radius: 100px;
    margin-bottom: 0.75rem;
}
.section__title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: var(--primary-dark);
    line-height: 1.2;
    margin-bottom: 1rem;
}
.section__desc {
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
    font-size: 1.02rem;
}

/* ===========================
   BUTTONS
=========================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn--primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.btn--primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139,48,32,0.32);
}
.btn--outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn--outline:hover {
    background: var(--primary);
    color: white;
}
.btn--ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border-dark);
}
.btn--ghost:hover { background: var(--border); color: var(--text); }
.btn--whatsapp {
    background: #25D366;
    color: white;
    border-color: #25D366;
}
.btn--whatsapp:hover {
    background: #1ebe59;
    border-color: #1ebe59;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,211,102,0.35);
}
.btn--sm { padding: 0.5rem 1rem; font-size: 0.82rem; }
.btn--full { width: 100%; justify-content: center; }

/* ===========================
   HEADER & NAV
=========================== */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--transition);
}
.header.scrolled { box-shadow: var(--shadow); }

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 2rem;
}

/* Logo con imagen */
.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.nav__logo-img {
    height: 52px;
    width: auto;
    display: block;
    /* El logo tiene fondo blanco — se mezcla perfectamente con el header blanco */
}
/* Fallback si no hay imagen */
.logo-fallback {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.logo-icon { font-size: 1.6rem; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-main {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: 0.08em;
    font-family: var(--font-serif);
}
.logo-sub {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}
.nav__link {
    padding: 0.5rem 0.9rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 6px;
    transition: all var(--transition);
    letter-spacing: 0.02em;
}
.nav__link:hover { color: var(--primary); background: rgba(139,48,32,0.06); }

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}
.nav__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}

/* ===========================
   HERO
=========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg,
        #1E0C07 0%,
        #3D1208 35%,
        #5A1C10 65%,
        #3D1208 100%);
    overflow: hidden;
}

/* Patrón sutil */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 40px,
            rgba(255,255,255,0.018) 40px,
            rgba(255,255,255,0.018) 41px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 40px,
            rgba(255,255,255,0.018) 40px,
            rgba(255,255,255,0.018) 41px
        );
}

/* Brillo cálido lateral */
.hero__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 80% 40%, rgba(200,136,42,0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 10% 80%, rgba(139,48,32,0.25) 0%, transparent 50%);
}

/* Línea decorativa oriental en hero */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-xlight), var(--accent), var(--primary-xlight), transparent);
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 740px;
    padding-top: 70px;
}

.hero__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(201,160,64,0.15);
    border: 1px solid rgba(201,160,64,0.35);
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    margin-bottom: 1.5rem;
}

.hero__title {
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    color: white;
    line-height: 1.1;
    margin-bottom: 1.25rem;
}
.hero__title em {
    font-style: normal;
    color: var(--gold);
}

.hero__desc {
    font-size: 1.08rem;
    color: rgba(255,255,255,0.72);
    max-width: 560px;
    margin-bottom: 2.25rem;
    line-height: 1.75;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}
.hero__actions .btn--outline {
    color: rgba(255,255,255,0.85);
    border-color: rgba(255,255,255,0.35);
}
.hero__actions .btn--outline:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.6);
    color: white;
}

.hero__certs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.cert-badge {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.7);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.35rem 0.9rem;
    border-radius: 100px;
}

/* Línea decorativa estilo oriental en hero right */
.hero__deco {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 45%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    opacity: 0.06;
}
.hero__deco-lines {
    width: 100%;
    height: 100%;
}

.hero__scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}
.hero__scroll span {
    display: block;
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(201,160,64,0.7));
    margin: 0 auto;
    animation: scrollPulse 1.8s infinite;
}
@keyframes scrollPulse {
    0%   { opacity: 0; }
    50%  { opacity: 1; }
    100% { opacity: 0; }
}

/* ===========================
   STATS BAR
=========================== */
.stats-bar {
    background: var(--primary-dark);
    padding: 1.5rem 0;
    border-bottom: 2px solid var(--primary);
}
.stats-bar__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0.25rem;
    border-right: 1px solid rgba(255,255,255,0.08);
}
.stat:last-child { border-right: none; }
.stat strong {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gold);
    font-family: var(--font-serif);
    line-height: 1;
}
.stat span {
    font-size: 0.76rem;
    color: rgba(255,255,255,0.55);
    margin-top: 0.2rem;
    font-weight: 500;
    letter-spacing: 0.04em;
}

/* ===========================
   NOSOTROS
=========================== */
.nosotros { background: var(--white); }

.nosotros__grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: center;
}

.img-stack {
    position: relative;
    height: 420px;
}
.img-card {
    position: absolute;
    border-radius: var(--radius-lg);
}
.img-card--1 {
    width: 75%;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    top: 0; left: 0;
    box-shadow: var(--shadow-lg);
}
.img-card--1::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0 L80 0 L80 4 L4 4 L4 80 L0 80 Z' fill='rgba(255,255,255,0.04)'/%3E%3C/svg%3E") repeat;
    border-radius: inherit;
}
.img-card--2 {
    width: 65%;
    height: 260px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    bottom: 0; right: 0;
    box-shadow: var(--shadow-lg);
}
.img-card--1::before {
    content: '🏛️';
    position: absolute;
    font-size: 5rem;
    opacity: 0.15;
    bottom: 1rem;
    right: 1rem;
}
.img-card--2::before {
    content: '🪵';
    position: absolute;
    font-size: 4rem;
    opacity: 0.2;
    bottom: 1rem;
    right: 1rem;
}
.img-card--accent {
    width: 110px;
    height: 110px;
    background: var(--primary-dark);
    border: 3px solid var(--primary-xlight);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: var(--shadow-lg);
    z-index: 2;
    padding: 0.5rem;
}
.img-card--accent strong {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold);
    font-family: var(--font-serif);
    line-height: 1;
}
.img-card--accent span {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nosotros__content .section__tag { display: inline-block; margin-bottom: 0.75rem; }
.nosotros__content .section__title { text-align: left; margin-bottom: 1.25rem; }
.nosotros__content p { color: var(--text-muted); margin-bottom: 1rem; line-height: 1.8; }

.certs-grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 1.75rem 0;
}
.cert-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    transition: all var(--transition);
}
.cert-card:hover { box-shadow: var(--shadow); transform: translateX(4px); }
.cert-card__icon { font-size: 1.4rem; flex-shrink: 0; }
.cert-card div { display: flex; flex-direction: column; }
.cert-card strong { font-size: 0.88rem; color: var(--primary-dark); }
.cert-card span { font-size: 0.78rem; color: var(--text-muted); }

/* ===========================
   PRODUCTOS
=========================== */
.productos { background: var(--bg); }

/* Divisor decorativo tipo Oriental */
.section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}
.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    max-width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-xlight));
}
.section-divider::after {
    background: linear-gradient(90deg, var(--primary-xlight), transparent);
}
.section-divider span {
    width: 8px; height: 8px;
    background: var(--primary);
    border-radius: 50%;
    display: block;
}

.productos__tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2.5rem;
}
.tab-btn {
    padding: 0.6rem 1.4rem;
    border-radius: 100px;
    border: 2px solid var(--border-dark);
    background: white;
    font-family: var(--font);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.02em;
}
.tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.product-detail {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: start;
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.product-detail__info h3 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}
.product-detail__desc {
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.specs-table {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    font-size: 0.86rem;
    border-bottom: 1px solid var(--border);
}
.spec-row:last-child { border-bottom: none; }
.spec-row:nth-child(even) { background: var(--bg); }
.spec-row span { color: var(--text-muted); }
.spec-row strong { color: var(--primary-dark); text-align: right; font-size: 0.88rem; }

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.feature-tag {
    background: rgba(139,48,32,0.08);
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    letter-spacing: 0.04em;
}

.color-options { margin-bottom: 1.5rem; }
.color-options p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.colors { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.color-chip {
    width: 72px;
    height: 52px;
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: default;
    transition: transform var(--transition);
}
.color-chip:hover { transform: scale(1.08); }
.color-chip span { font-size: 0.58rem; font-weight: 700; color: white; text-shadow: 0 1px 3px rgba(0,0,0,0.6); text-align: center; }

/* Product Visual */
.product-detail__visual { display: flex; flex-direction: column; gap: 1rem; }
.product-visual { display: flex; flex-direction: column; gap: 1rem; }

.wood-texture-card {
    background: linear-gradient(135deg, #f2ece2 0%, #e8ddd0 100%);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    border: 1px solid #d5c9b8;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.04);
}
.wt-label {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--primary-dark);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: var(--font-serif);
}
.wt-layers { display: flex; flex-direction: column; gap: 3px; margin-bottom: 1.25rem; }
.wt-layer {
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.76rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wt-mel      { background: var(--primary); }
.wt-core     { background: var(--accent);     height: 2.5rem; }
.wt-mdf-core { background: #7A5238;           height: 4rem; }
.wt-mdf-rh   { background: #3A6B5A;           height: 4rem; }
.wt-chapa    { background: var(--accent); }
.wt-core-tp  { background: #A0722A;           height: 2.5rem; }
.wt-size { font-size: 0.76rem; color: var(--text-muted); font-weight: 600; letter-spacing: 0.04em; }

.product-badges-stack { display: flex; flex-direction: column; gap: 0.5rem; }
.p-badge {
    background: var(--bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    padding: 0.6rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-dark);
}

/* ===========================
   SERVICIOS
=========================== */
.servicios { background: var(--bg-mid); }
.servicios .section__tag {
    background: rgba(201,160,64,0.18);
    color: var(--gold);
}
.servicios .section__title { color: white; }

.servicios__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.servicio-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.servicio-card::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-xlight), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}
.servicio-card:hover { background: rgba(255,255,255,0.08); transform: translateY(-5px); }
.servicio-card:hover::before { opacity: 1; }
.servicio-card__icon { font-size: 2.5rem; margin-bottom: 1rem; }
.servicio-card h3 { color: white; font-size: 1rem; margin-bottom: 0.75rem; font-weight: 600; }
.servicio-card p { color: rgba(255,255,255,0.55); font-size: 0.86rem; line-height: 1.65; }

/* ===========================
   CALCULADORA
=========================== */
.calculadora { background: var(--white); }

.calc-wrapper {
    max-width: 920px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.calc-config {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    border: 1px solid var(--border);
}
.calc-config__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}
.sheet-dims-display {
    background: rgba(139,48,32,0.06);
    border: 1px solid rgba(139,48,32,0.15);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-size: 0.86rem;
    color: var(--text-muted);
}
.sheet-dims-display strong { color: var(--primary); margin-left: 0.5rem; font-weight: 700; }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.form-group label {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text);
    background: white;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139,48,32,0.08);
}

.calc-pieces {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    border: 1px solid var(--border);
}
.pieces-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.pieces-header h3 { font-size: 1rem; color: var(--primary-dark); font-weight: 700; }

.pieces-legend {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.8fr 40px;
    gap: 0.5rem;
    padding: 0 0.25rem;
    margin-bottom: 0.5rem;
}
.pieces-legend span {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.pieces-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.piece-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.8fr 40px;
    gap: 0.5rem;
    align-items: center;
}
.piece-row input {
    padding: 0.6rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    font-family: var(--font);
    font-size: 0.86rem;
    width: 100%;
    outline: none;
    transition: border-color var(--transition);
    background: white;
    color: var(--text);
}
.piece-row input:focus { border-color: var(--primary); }
.piece-remove {
    background: none;
    border: none;
    color: #C0392B;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: background var(--transition);
    line-height: 1;
}
.piece-remove:hover { background: #FEF2F2; }

.calc-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Results */
.calc-results {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border);
}
.results-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
.result-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.result-card strong {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-serif);
    line-height: 1;
}
.result-card span { font-size: 0.76rem; color: var(--text-muted); font-weight: 500; }

.optimizer-visual { margin-bottom: 2rem; }
.optimizer-visual h4 { font-size: 0.92rem; color: var(--primary-dark); margin-bottom: 1rem; font-weight: 700; }
#sheetsContainer { display: flex; flex-wrap: wrap; gap: 1rem; }
.sheet-canvas-wrapper { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.sheet-canvas-wrapper span { font-size: 0.72rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
canvas.sheet-canvas { border: 2px solid var(--primary); border-radius: 8px; display: block; }

.results-cta {
    text-align: center;
    padding: 1.5rem;
    background: rgba(139,48,32,0.05);
    border-radius: var(--radius);
    border: 1px solid rgba(139,48,32,0.12);
}
.results-cta p { color: var(--text-muted); margin-bottom: 1rem; font-size: 0.95rem; }

/* ===========================
   CONTACTO
=========================== */
.contacto {
    background: var(--bg);
    position: relative;
}
.contacto::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), var(--primary), transparent);
}

.contacto__grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 4rem;
    align-items: start;
}
.contacto__info .section__tag { display: inline-block; margin-bottom: 0.75rem; }
.contacto__info .section__title { text-align: left; font-size: 2rem; margin-bottom: 1rem; }
.contacto__info > p { color: var(--text-muted); line-height: 1.75; margin-bottom: 2rem; }

.contact-items { display: flex; flex-direction: column; gap: 0.85rem; margin-bottom: 2rem; }
.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.contact-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateX(4px);
}
.contact-item__icon { font-size: 1.3rem; flex-shrink: 0; }
.contact-item div { display: flex; flex-direction: column; }
.contact-item strong { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.contact-item span { font-size: 0.95rem; color: var(--primary-dark); font-weight: 600; }

.maderas-note {
    background: rgba(200,136,42,0.07);
    border: 1px solid rgba(200,136,42,0.2);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.maderas-note strong { display: block; color: var(--accent); margin-bottom: 0.5rem; font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.06em; }
.maderas-note p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.75; }
.maderas-note em { font-style: normal; font-weight: 700; color: var(--accent); }

.contacto__form .form {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}
.contacto__form .form h3 { font-size: 1.2rem; color: var(--primary-dark); margin-bottom: 1.5rem; font-family: var(--font-serif); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-privacy { text-align: center; font-size: 0.73rem; color: var(--text-muted); margin-top: 0.75rem; }

.form-success {
    background: white;
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    text-align: center;
}
.success-icon { font-size: 3rem; margin-bottom: 1rem; }
.form-success h3 { color: var(--primary); margin-bottom: 0.75rem; font-family: var(--font-serif); }
.form-success p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ===========================
   FOOTER
=========================== */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.65);
    padding: 4rem 0 0;
    position: relative;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent-light), var(--primary), transparent);
}
.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.footer__brand .footer-logo { margin-bottom: 1rem; }
.footer__brand p { font-size: 0.86rem; line-height: 1.75; margin-bottom: 1rem; }
.footer__certs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.footer__certs span {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 100px;
    letter-spacing: 0.06em;
}
.footer__links h4 { color: rgba(255,255,255,0.85); font-size: 0.85rem; margin-bottom: 1rem; letter-spacing: 0.06em; text-transform: uppercase; }
.footer__links ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer__links a { font-size: 0.84rem; color: rgba(255,255,255,0.45); transition: color var(--transition); }
.footer__links a:hover { color: var(--gold); }
.footer__contact h4 { color: rgba(255,255,255,0.85); font-size: 0.85rem; margin-bottom: 1rem; letter-spacing: 0.06em; text-transform: uppercase; }
.footer__contact p { font-size: 0.84rem; margin-bottom: 0.4rem; }

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    font-size: 0.76rem;
    color: rgba(255,255,255,0.25);
}

/* Footer logo */
.footer-logo-img {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
    /* Invertir para que sea visible sobre el fondo oscuro */
    filter: invert(1) sepia(0.2) brightness(1.1);
    opacity: 0.85;
}

/* ===========================
   FLOATING WHATSAPP
=========================== */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 58px;
    height: 58px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,0.45);
    z-index: 999;
    transition: all var(--transition);
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(37,211,102,0.55);
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1024px) {
    .nosotros__grid { grid-template-columns: 1fr; gap: 3rem; }
    .img-stack { height: 280px; }
    .contacto__grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .servicios__grid { grid-template-columns: repeat(2, 1fr); }
    .product-detail { grid-template-columns: 1fr; }
    .stats-bar__grid { grid-template-columns: repeat(2, 1fr); }
    .results-summary { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav__menu {
        display: none;
        position: fixed;
        top: 70px; left: 0; right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        z-index: 999;
    }
    .nav__menu.open { display: flex; }
    .nav__toggle { display: flex; }
    .nav > .btn--whatsapp { display: none; }

    .hero__content { padding-top: 90px; }
    .hero__actions { flex-direction: column; align-items: flex-start; }

    .calc-config__grid { grid-template-columns: 1fr; }
    .piece-row { grid-template-columns: 1.5fr 1fr 1fr 0.7fr 36px; }
    .pieces-legend { grid-template-columns: 1.5fr 1fr 1fr 0.7fr 36px; }
    .form-row { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; }
    .footer__bottom { flex-direction: column; gap: 0.3rem; text-align: center; }
    .productos__tabs { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.5rem; }
    .servicios__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .section { padding: 3.5rem 0; }
    .results-summary { grid-template-columns: repeat(2, 1fr); }
    .stats-bar__grid { grid-template-columns: repeat(2, 1fr); }
    .servicios__grid { grid-template-columns: 1fr; }
}

/* ===========================
   ANIMATIONS
=========================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
