:root {
    --bg: #fafaf7;
    --surface: #ffffff;
    --text: #1a1a1a;
    --muted: #6b6b6b;
    --primary: #c9803a;
    --primary-dark: #a8642a;
    --accent: #2c4a3e;
    --border: #e8e4dc;
    --radius: 14px;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    letter-spacing: -0.01em;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container.narrow {
    max-width: 520px;
}

/* === Navbar === */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 48px;
    gap: 32px;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: grid;
    place-items: center;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 18px;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    font-size: 15px;
    color: var(--text);
    position: relative;
    padding: 6px 0;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.25s ease;
}

.nav-links a:hover::after { width: 100%; }

.btn-ghost {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* === Hero === */
.hero {
    padding: 80px 0 100px;
    background: linear-gradient(180deg, #fffaf2 0%, var(--bg) 100%);
    overflow: hidden;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary);
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero p {
    font-size: 18px;
    color: var(--muted);
    margin-bottom: 36px;
    max-width: 520px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-block;
    padding: 14px 28px;
    background: var(--primary);
    color: white;
    border-radius: 999px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 6px 20px rgba(201, 128, 58, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(201, 128, 58, 0.4);
}

.btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.hero-art {
    position: relative;
    height: 420px;
}

.hero-circle, .hero-square {
    position: absolute;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    opacity: 0.9;
    box-shadow: var(--shadow-lg);
}

.hero-circle {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    top: 20px;
    right: 60px;
    background: linear-gradient(135deg, #f4a86b, var(--primary));
    animation: float 6s ease-in-out infinite;
}

.hero-square {
    width: 220px;
    height: 220px;
    bottom: 30px;
    left: 30px;
    background: linear-gradient(135deg, var(--accent), #3d6b59);
    animation: float 6s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* === Sections === */
.section { padding: 80px 0; }
.section-alt { background: white; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-title {
    font-size: clamp(32px, 4vw, 44px);
    text-align: center;
    margin-bottom: 12px;
}

.section-sub {
    text-align: center;
    color: var(--muted);
    margin-bottom: 48px;
}

/* === Cards === */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #f5e9d8, #e8d4b3);
    background-size: cover;
    background-position: center;
}

.card-body {
    padding: 24px;
}

.card-body h3 {
    font-size: 22px;
    margin-bottom: 8px;
}

.card-body p {
    color: var(--muted);
    font-size: 15px;
}

.card.promo .card-body {
    padding: 28px 24px;
}

.badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

/* === Forms === */
.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
}

.form input, .form textarea, .form select {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: white;
    transition: border 0.2s;
}

.form input:focus, .form textarea:focus, .form select:focus {
    outline: none;
    border-color: var(--primary);
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-top: 16px;
    font-size: 14px;
}

.alert.error { background: #fde8e8; color: #a72b2b; }
.alert.success { background: #e6f4ea; color: #1e6b3a; }

.muted { color: var(--muted); }

/* === Footer === */
.footer {
    background: var(--accent);
    color: white;
    padding: 48px 0;
    margin-top: 80px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    padding: 0 48px;
    width: 100%;
}

.footer p { color: rgba(255, 255, 255, 0.7); margin-top: 4px; }

/* === Detalle producto === */
.producto-detalle {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    margin-top: 24px;
    align-items: start;
}

.producto-img-principal {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #f5e9d8, #e8d4b3);
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.producto-img-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.producto-img-thumb {
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border 0.2s;
}

.producto-img-thumb:hover { border-color: var(--primary); }

.producto-info h1 {
    font-size: 36px;
    line-height: 1.1;
}

.precio-box {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 20px;
    margin-top: 16px;
}

.precio-box strong {
    font-size: 28px;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
}

/* === Presupuesto (carrito público) === */
.presupuesto-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 32px;
    align-items: start;
}

.presup-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.presup-item:last-child { border-bottom: none; }

.presup-item-img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    background-color: #f0eadf;
}

.presup-item-info small { color: var(--muted); }

.presup-totales {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.presup-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.presup-line.total {
    border-top: 2px solid var(--border);
    margin-top: 12px;
    padding-top: 16px;
    font-size: 22px;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

/* === Render IA === */
.render-comparativa {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.render-comparativa figure {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 20px;
}

.render-comparativa img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* === Hamburger mobile === */
.nav-burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    transition: all 0.25s;
}

.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === Responsive === */
@media (max-width: 768px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-art { display: none; }
    .producto-detalle, .presupuesto-grid, .render-comparativa { grid-template-columns: 1fr; }
    .presup-totales { position: relative; top: 0; }
    .nav-inner { padding: 14px 20px; gap: 12px; }
    .nav-burger { display: flex; }

    .nav-links {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        padding: 16px 20px;
        flex-direction: column;
        gap: 4px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border);
        z-index: 99;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 8px; font-size: 17px; border-bottom: 1px solid var(--border); }
    .nav-links a:last-child { border-bottom: none; }
    .nav-links a::after { display: none; }

    .nav-actions { display: none; }

    .presup-item {
        grid-template-columns: 70px 1fr;
        gap: 12px;
    }
    .presup-item > div:last-child { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding-top: 8px; }
    .presup-item-img { width: 70px; height: 70px; }

    .admin-table { font-size: 13px; }
    .admin-table th, .admin-table td { padding: 10px 8px; }
}

@media (max-width: 480px) {
    .section { padding: 48px 0; }
    .container { padding: 0 16px; }
    .nav-inner { padding: 12px 16px; }
}
