/**
 * ==========================================================
 * ESTILO VISUAL DEFINITIVO - TIENDA CRISTO REY
 * ==========================================================
 * Paleta sofisticada contrastando rojo oscuro con tonos beige/dorado.
 * Diseño CSS Vanilla, compatible con cualquier dispositivo.
 */

:root {
    --color-realeza: #7A1921;
    /* Carmesí oscuro */
    --color-realeza-claro: #A32832;
    --color-fondo: #FDFBF7;
    /* Beige pergamino sutil */
    --color-texto-principal: #1F2937;
    --color-texto-secundario: #4B5563;
    --color-oro: #D4AF37;
    /* Dorado clásico */
    --sombra-premium: 0 20px 40px -10px rgba(122, 25, 33, 0.1);
    --borde-radio: 16px;
    --borde-suave: 1px solid rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto-principal);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* ================== FONDO DECORATIVO ================== */
.lienzo-fondo {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.esfera-decorativa {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.4;
}

.esfera-decorativa.dorada {
    width: 400px;
    height: 400px;
    background-color: rgba(212, 175, 55, 0.4);
    top: -10%;
    right: -10%;
}

.esfera-decorativa.carmesi {
    width: 500px;
    height: 500px;
    background-color: rgba(122, 25, 33, 0.2);
    bottom: -20%;
    left: -20%;
}

/* ================== ENCABEZADO PRINCIPAL (NAV BAR) ================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(70, 4, 4, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .logo-text {
        display: none;
    }
}

/* ================== TARJETA CENTRAL ================== */
.tarjeta-principal {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--borde-radio);
    width: 100%;
    max-width: 460px;
    box-shadow: var(--sombra-premium);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: fadeIn 0.8s ease-out forwards;
}

/* =========================================
   SELECTOR DE MÉTODO DE PAGO
========================================= */
.metodo-tarjeta {
    position: relative;
}

.metodo-opcion input[type="radio"]:checked + .metodo-tarjeta {
    border-color: #D4AF37 !important;
    background: rgba(212, 175, 55, 0.08) !important;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
    transform: translateY(-2px);
}

.metodo-opcion input[type="radio"]:checked + .metodo-tarjeta::after {
    content: "✓";
    position: absolute;
    top: -8px;
    right: -8px;
    background: #D4AF37;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: scaleInCheck 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.metodo-opcion:hover .metodo-tarjeta {
    border-color: rgba(212, 175, 55, 0.4);
}

@keyframes scaleInCheck {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

@keyframes spinnerOpacity {
    0% { opacity: 1; }
    100% { opacity: 0; }
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================== ENCABEZADO EVENTO ================== */
.encabezado-evento {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.logo-evento {
    width: 350px;
    height: auto;
    margin-bottom: 12px;
}

.titulo-evento {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-realeza);
}

.subtitulo-evento {
    font-size: 0.9rem;
    color: var(--color-texto-secundario);
    width: 80%;
    line-height: 1.4;
}

.etiqueta-precio {
    display: inline-block;
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-realeza);
    padding: 8px 16px;
    border-radius: 30px;
    margin-top: 10px;
}

.etiqueta-precio .monto {
    font-weight: 700;
    font-size: 1.1rem;
}

.etiqueta-precio .moneda {
    font-weight: 600;
    font-size: 0.85rem;
}

.etiqueta-precio .detalle-precio {
    font-size: 0.75rem;
    color: var(--color-texto-secundario);
    margin-left: 4px;
}

.linea-separadora {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(122, 25, 33, 0.2), transparent);
}

/* ================== ZONA DE INTERACCIÓN ================== */
.seccion-compra {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.titulo-seccion {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-texto-principal);
}

.texto-instruccion {
    font-size: 0.9rem;
    color: var(--color-texto-secundario);
    text-align: center;
}

/* Controles de Cantidad (+/-) */
.control-cantidad {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 10px 0;
}

.btn-circular {
    background: transparent;
    border: 2px solid var(--color-realeza);
    color: var(--color-realeza);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-circular svg {
    width: 20px;
    height: 20px;
}

.btn-circular:hover:not(:disabled) {
    background: var(--color-realeza);
    color: white;
}

.btn-circular:disabled {
    border-color: #D1D5DB;
    color: #D1D5DB;
    cursor: not-allowed;
}

.pantalla-cantidad {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-texto-principal);
    width: 60px;
    text-align: center;
}

/* Resumen Total */
.resumen-cobro {
    width: 100%;
    background: #F3F4F6;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
}

.resumen-cobro span {
    color: var(--color-texto-secundario);
}

.resumen-cobro strong {
    font-size: 1.25rem;
    color: var(--color-realeza);
}

/* Botón de Pago Maestro */
.btn-maestro {
    width: 100%;
    background-color: var(--color-realeza);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-maestro:hover:not(:disabled) {
    background-color: var(--color-realeza-claro);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(122, 25, 33, 0.4);
}

.btn-maestro.procesando {
    background-color: #9CA3AF;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

/* Nota Stripe */
.leyenda-seguridad {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--color-texto-secundario);
}

.icono-candado {
    width: 14px;
    height: 14px;
}

/* Animación y Spinner Pequeño por si se requiere */
@keyframes rotar {
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Pequeño */
@media (max-width: 480px) {
    .tarjeta-principal {
        padding: 30px 20px;
    }

    .titulo-evento {
        font-size: 1.3rem;
    }

    .pantalla-cantidad {
        font-size: 2.5rem;
    }
}