:root {
    --primary: #009ee3;
    --primary-dark: #007cb3;
    --dark-blue: #1a2b49;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- PORTADA / INDEX --- */
.hero {
    flex: 1;
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary) 100%);
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    box-sizing: border-box;
}

.hero-logo {
    max-width: 180px;
    height: auto;
    border-radius: 16px;
    background: white;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    margin-bottom: 25px;
    animation: floatAndPulse 4s ease-in-out infinite;
}

@keyframes floatAndPulse {
    0% {
        transform: translateY(0px) scale(1);
        box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    }
    50% {
        transform: translateY(-8px) scale(1.23);
        box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    }
    100% {
        transform: translateY(0px) scale(1);
        box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    }
}

.hero h1 {
    font-size: 2.5em;
    margin: 10px 0 15px 0;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 1.2em;
    opacity: 0.92;
    max-width: 500px;
    margin: 0 0 35px 0;
    line-height: 1.5;
}

.btn-cta {
    display: inline-block;
    background-color: #ffffff;
    color: var(--dark-blue);
    padding: 18px 36px;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.btn-cta:hover {
    background-color: #f0f0f0;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* --- FORMULARIO / PEDIDO (UNIFICADO) --- */
header {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary) 100%);
    color: white;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

header .logo-mini {
    height: 42px;
    border-radius: 8px;
    background: white;
    padding: 4px;
}

.btn-volver {
    color: white;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 600;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.btn-volver:hover {
    opacity: 1;
}

.container {
    max-width: 800px;
    margin: 30px auto;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

h2 {
    text-align: center;
    color: var(--dark-blue);
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.6em;
}

.fieldset {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    background: #fafafa;
}

.fieldset legend {
    font-weight: 700;
    color: var(--primary-dark);
    padding: 0 10px;
    font-size: 1.05em;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

label {
    display: block;
    font-weight: 600;
    font-size: 0.88em;
    margin-bottom: 6px;
    color: #444;
}

input[type="text"], input[type="email"], input[type="tel"], select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 0.95em;
}

.producto-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-color);
    background: #ffffff;
    border-radius: 6px;
    margin-bottom: 8px;
}

.producto-info { flex: 1; padding-right: 15px; }
.producto-nombre { font-weight: 600; font-size: 0.95em; color: #222; }
.producto-precio { font-size: 0.88em; color: var(--primary-dark); font-weight: 700; margin-top: 2px; }
.producto-cant { width: 75px; padding: 8px; text-align: center; border: 1px solid #ccc; border-radius: 6px; font-size: 1em; font-weight: bold; }

.resumen-total {
    font-size: 1.4em;
    font-weight: 800;
    text-align: right;
    margin-top: 20px;
    color: var(--dark-blue);
    background: #eef8fc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ccebf8;
}

/* Botón principal alineado al degradado de la marca */
.btn-pagar {
    width: 100%;
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary) 100%);
    color: white;
    padding: 18px;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 158, 227, 0.3);
    transition: all 0.3s ease;
}

.btn-pagar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 158, 227, 0.4);
}

.btn-pagar:disabled { 
    background: #bdc3c7; 
    cursor: not-allowed; 
    box-shadow: none;
    transform: none;
}

footer {
    text-align: center;
    padding: 20px;
    font-size: 0.88em;
    color: #777;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
}