/* ==========================================================================
   Estilos para la Página de Checkout (checkout.html)
   ========================================================================== */
.checkout-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}
.checkout-page-container h1 {
    font-size: 2rem;
    margin-bottom: 32px;
}
.checkout-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
}

/* Formulario */
.checkout-form-section {
    background: var(--surface-color);
    padding: 32px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: relative;
}
.form-group {
    margin-bottom: 24px;
}
.form-group h2 {
    font-size: 1.3rem;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}
.form-group input, .form-group select {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition-fast);
}
.form-group input:focus, .form-group select:focus {
    border-color: var(--primary-color);
}
.input-row {
    display: flex;
    gap: 16px;
}

/* Tarjeta de Crédito UI */
.cc-card-ui {
    background: linear-gradient(135deg, #2C2C2C 0%, #1A1A1A 100%);
    border-radius: var(--radius-md);
    padding: 24px;
    color: white;
    box-shadow: var(--shadow-md);
    margin-top: 16px;
}
.cc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}
.cc-card-ui input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    margin-bottom: 16px;
}
.cc-card-ui input::placeholder {
    color: rgba(255,255,255,0.5);
}
.cc-card-ui input:focus {
    border-color: var(--primary-color);
    background: rgba(255,255,255,0.15);
}

/* Resumen del Pedido */
.checkout-summary-section {
    background: var(--bg-color);
    border-radius: var(--radius-md);
    padding: 32px;
    height: fit-content;
}
.checkout-summary-section h3 {
    font-size: 1.3rem;
    margin-bottom: 24px;
}
.checkout-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    max-height: 400px;
    overflow-y: auto;
}
.checkout-item {
    display: flex;
    gap: 12px;
    align-items: center;
}
.checkout-item img {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}
.checkout-item-details {
    flex: 1;
}
.checkout-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.checkout-item-price {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.summary-totals {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: var(--text-muted);
}
.summary-row.total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-color);
}

/* Overlays (Processing / Success) */
.processing-overlay, .success-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    z-index: 5;
    text-align: center;
}
.spinner {
    width: 50px; height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
.success-overlay i {
    font-size: 4rem;
    color: #10B981;
    margin-bottom: 16px;
}
.success-overlay h3 { margin-bottom: 8px; font-size: 1.5rem; }
.success-overlay p { margin-bottom: 24px; color: var(--text-muted); }

@media (max-width: 992px) {
    .checkout-layout { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
    .input-row { flex-direction: column; gap: 0; }
    .checkout-form-section { padding: 24px 16px; }
}
