﻿/*
--- SISTEMA DE DISEÑO PARA EL PORTAL DE PAGOS ---
Versión Refinada para un Look Profesional
*/

/* 1. VARIABLES Y CONFIGURACIÓN GENERAL */
:root {
    --brand-primary: #003a70;
    --brand-primary-dark: #002a52;
    --brand-accent: #005cbf;
    --brand-accent-hover: #004a99;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --background-light: #f8f9fa;
    --background-white: #ffffff;
    --border-color: #dee2e6;
    --success-color: #198754;
    --danger-color: #dc3545;
    --processing-color: #0d6efd;
    --font-family-sans-serif: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --box-shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.04);
    --box-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --border-radius: 0.75rem; /* Esquinas más suaves */
}

/* 2. ESTILOS BASE Y TIPOGRAFÍA */
body {
    background-color: var(--background-light);
    font-family: var(--font-family-sans-serif);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--brand-primary);
}

.lead {
    font-weight: 400;
    font-size: 1.1rem; /* Ligeramente más grande para legibilidad */
}

/* 3. LAYOUT Y CONTENEDORES PRINCIPALES */
.payment-container {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* Encabezado de la página de inicio */
.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.company-logo {
    max-height: 50px; /* Ajusta la altura máxima de tu logo */
    width: auto;
}

.payment-card {
    background-color: var(--background-white);
    border: none; /* Eliminamos el borde para un look más limpio */
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg); /* Sombra más pronunciada y profesional */
    overflow: hidden;
}

.payment-card-header {
    background-color: var(--background-white);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--brand-primary);
}

    .payment-card-header h4, .payment-card-header h5 {
        margin-bottom: 0;
        font-size: 1.25rem;
    }

.payment-card-body {
    padding: 2.5rem;
}

@media (max-width: 767px) {
    .payment-card-body {
        padding: 1.5rem;
    }
}

.payment-card-footer {
    background-color: #fcfdff;
    padding: 1rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

/* 4. COMPONENTES DE FORMULARIO */
.form-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control-lg {
    min-height: 3.5rem;
    font-size: 1rem;
    border-radius: 0.5rem; /* Radio de borde más sutil para inputs */
    border: 1px solid #ced4da;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

    .form-control-lg:focus {
        border-color: var(--brand-accent);
        box-shadow: 0 0 0 0.25rem rgba(0, 92, 191, 0.15); /* Sombra de foco más suave */
    }

.form-floating > .form-control-lg:placeholder-shown ~ label {
    padding-top: 1.1rem;
}

/* 5. BOTONES */
.btn-primary {
    background-color: var(--brand-accent);
    border-color: var(--brand-accent);
    font-weight: 600;
    padding: 1rem 1.5rem; /* Un poco más de padding vertical */
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 15px rgba(0, 92, 191, 0.2); /* Sombra que coincide con el color */
}

    .btn-primary:hover, .btn-primary:focus {
        background-color: var(--brand-accent-hover);
        border-color: var(--brand-accent-hover);
        transform: translateY(-2px); /* Efecto de "levantar" el botón */
        box-shadow: 0 6px 20px rgba(0, 92, 191, 0.25);
    }

    .btn-primary:disabled {
        background-color: var(--brand-accent);
        border-color: var(--brand-accent);
        opacity: 0.65;
    }

/* 6. PÁGINA DE CHECKOUT ESPECÍFICA */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 40%;
    gap: 2.5rem; /* Más espaciado */
}

@media (max-width: 991px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .order-summary-card {
        margin-top: 2rem;
    }
}

.order-summary-card {
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

    .order-summary-card h5 {
        color: var(--brand-primary);
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem; /* Ajuste sutil del tamaño de fuente */
    color: var(--text-secondary);
}

    .summary-item .label {
        font-weight: 400;
    }

    .summary-item .value {
        font-weight: 600;
        color: var(--text-primary);
    }

.summary-total {
    border-top: 2px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

    .summary-total .label {
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--text-primary);
    }

    .summary-total .value {
        font-size: 1.75rem;
        font-weight: 700;
        color: var(--brand-primary);
    }

/* 7. PÁGINA DE CONFIRMACIÓN */
.confirmation-card {
    padding: 3rem;
    text-align: center;
}

@media (max-width: 767px) {
    .confirmation-card {
        padding: 2rem;
    }
}

.confirmation-icon {
    width: 6rem;
    height: 6rem;
    margin-bottom: 1.5rem;
}

    .confirmation-icon.success {
        color: var(--success-color);
    }

    .confirmation-icon.danger {
        color: var(--danger-color);
    }

    .confirmation-icon.processing {
        color: var(--processing-color);
    }

.confirmation-card h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.transaction-summary {
    background-color: var(--background-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-top: 2rem;
    padding: 1.5rem;
    text-align: left;
}

/* 8. PÁGINA DE REVISIÓN DE PEDIDO (DISEÑO PROFESIONAL) */
.review-layout {
    display: grid;
    grid-template-columns: 1fr 380px; /* Columna lateral un poco más ancha */
    gap: 2.5rem;
}

@media (max-width: 991px) {
    .review-layout {
        grid-template-columns: 1fr;
    }
}

.sticky-top {
    top: 2rem;
}

.info-section {
    width: 100%;
}

.info-section-header {
    display: flex;
    align-items: center;
    color: var(--brand-primary);
    margin-bottom: 1.5rem;
}

    .info-section-header i {
        font-size: 1.5rem;
        color: var(--brand-accent);
    }

    .info-section-header h5 {
        font-size: 1.25rem;
        margin-bottom: 0;
    }

.customer-details .detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 1rem;
}

    .customer-details .detail-item .label {
        color: var(--text-secondary);
    }

    .customer-details .detail-item .value {
        font-weight: 500;
        color: var(--text-primary);
    }

.product-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.product-list .product-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.product-icon-placeholder {
    width: 50px;
    height: 50px;
    background-color: var(--background-light);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.product-info {
    flex-grow: 1;
}

.product-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.product-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    gap: 0.5rem;
}

.product-pricing {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: auto; /* Empuja el precio a la derecha */
}

.original-price {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.final-price {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.text-success .label, .text-success .value {
    color: var(--success-color) !important;
}
