:root {
    --primary: #cb253d;
    --primary-dark: #a61c30;
    --secondary: #ffdae6;
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text: #242b35;
    --text-light: #5f6368;
    --error: #d90429;
    --success: #25D366;
    --border: #dadce0;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Google Sans Flex', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    padding-bottom: 40px;
}

/* Header */
#header {
    background: white;
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
}

.header-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-brand img {
    max-width: 150px;
    height: auto;
    margin-bottom: 0;
}

.header-brand h1 {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
    line-height: 1.2;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1.5px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.btn-back:hover {
    background-color: var(--primary);
    color: #ffffff;
    transform: translateY(-1px);
}

@media (max-width: 650px) {
    .header-inner {
        flex-direction: column;
        text-align: center;
    }

    .header-brand {
        flex-direction: column;
        gap: 10px;
    }
}

/* Layout Principal */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

@media (max-width: 850px) {
    .container {
        grid-template-columns: 1fr;
    }
}

section {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    border: 1px solid var(--border);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

section:hover {
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.08);
}

h2 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(203, 37, 61, 0.2);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.radio-group {
    display: flex;
    gap: 15px;
    background: #f1f3f4;
    padding: 5px;
    border-radius: 10px;
}

.radio-option {
    flex: 1;
}

.radio-option input {
    display: none;
}

.radio-option label {
    display: block;
    text-align: center;
    padding: 10px;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
}

.radio-option label:active {
    transform: scale(0.97);
}

.radio-option input:checked + label {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: var(--primary);
    font-weight: bold;
}

/* Summary Sidebar */
.sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.summary-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-top: 5px solid var(--primary);
    padding: 30px 25px;
}

.total-label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.total-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin: 10px 0;
    line-height: 1.15;
}

.total-personalizado {
    font-size: 1.75rem;
    color: var(--primary);
}

.nota-especial {
    font-size: 0.85rem;
    color: var(--text);
    background: rgba(203, 37, 61, 0.08);
    border-left: 3px solid var(--primary);
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 15px;
    font-weight: 500;
}

.alert-warning {
    background: #ffeaea;
    border: 1px solid #ff8282;
    color: #606060;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 15px;
    font-weight: 500;
    text-align: center;
}

.important {
    color: #cb253d;
    font-size: 1.2rem;
    font-weight: bold;
}

.badge {
    display: none;
    background: rgba(37, 211, 102, 0.12);
    color: #189e49;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    width: 100%;
}

.btn-whatsapp {
    width: 100%;
    background: var(--success);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s, background 0.2s, opacity 0.2s;
    margin-top: 20px;
    text-decoration: none;
}

.btn-whatsapp:hover:not(:disabled) {
    background: #1eb956;
    transform: translateY(-2px);
}

.btn-whatsapp:disabled {
    background: #b0bec5;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.disclaimer {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 20px;
    line-height: 1.5;
    border-top: 1px solid var(--border);
    padding-top: 15px;
}

.error-msg {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: 5px;
    display: none;
}

.input-error {
    border-color: var(--error) !important;
}

.hidden {
    display: none !important;
}

/* =========================================================
   ANIMACIONES Y DINAMISMO DEL FORMULARIO
   ========================================================= */

section:not(#seccionAlimentos) {
    opacity: 0;
    animation: fadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

section:nth-child(1) { animation-delay: 0.05s; }
section:nth-child(2) { animation-delay: 0.15s; }
section:nth-child(4) { animation-delay: 0.25s; }

#seccionAlimentos:not(.hidden) {
    animation: fadeUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.summary-card {
    opacity: 0;
    animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#info-salon:not(:empty) {
    animation: fadeSlideRight 0.35s ease-out forwards;
    background: rgba(203, 37, 61, 0.08);
    border-left: 3px solid var(--primary);
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
    color: var(--text) !important;
    font-weight: 500;
}

@keyframes fadeSlideRight {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#cortesiaBadge[style*="inline-block"] {
    animation: badgePop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes badgePop {
    0% {
        opacity: 0;
        transform: scale(0.75);
    }
    70% {
        transform: scale(1.06);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.input-error {
    animation: shakeError 0.35s ease-in-out;
}

.error-msg[style*="block"] {
    animation: fadeInDown 0.25s ease-out forwards;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-4px); }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-whatsapp:not(:disabled) {
    animation: pulseReady 2s infinite;
}

.btn-whatsapp:not(:disabled):hover {
    animation: none;
}

@keyframes pulseReady {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}