* {
    box-sizing: border-box;
}

body {
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #333;
}

.checkout-wrapper {
    min-height: 100vh;
    background: #FFFFFF;
}

.checkout-header {
    background: transparent;
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
}

.checkout-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.logo-link {
    color: white;
    text-decoration: none;
    display: inline-block;
}

.checkout-logo {
    max-width: 180px;
    height: auto;
    display: block;
}

.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.checkout-title {
    color: #040434;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    font-family: "Montserrat", sans-serif;
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.order-summary {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.order-summary h2 {
    color: #040434;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 2px solid #ef046e;
    padding-bottom: 10px;
    font-family: "Montserrat", sans-serif;
}

.order-items-list {
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-info {
    flex: 1;
}

.order-item-name {
    display: block;
    font-weight: 600;
    color: #040434;
    margin-bottom: 5px;
    font-family: "Montserrat", sans-serif;
}

.order-item-quantity {
    display: block;
    font-size: 14px;
    color: #666;
    font-family: "Montserrat", sans-serif;
}

.order-item-price {
    font-weight: 600;
    color: #040434;
    font-size: 18px;
    font-family: "Montserrat", sans-serif;
}

.order-total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #ef046e;
    font-size: 24px;
    font-weight: 700;
    color: #040434;
    text-align: right;
    font-family: "Montserrat", sans-serif;
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-family: "Montserrat", sans-serif;
}

.empty-cart a {
    color: #ef046e;
    text-decoration: none;
}

.checkout-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.checkout-form h2 {
    color: #040434;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    margin-top: 30px;
    border-bottom: 2px solid #ef046e;
    padding-bottom: 10px;
    font-family: "Montserrat", sans-serif;
}

.checkout-form h2:first-child {
    margin-top: 0;
}

.checkout-form h3 {
    color: #040434;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    margin-top: 20px;
    font-family: "Montserrat", sans-serif;
}

.card-details {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 2px solid #e0e0e0;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group-half {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #040434;
    font-weight: 600;
    font-size: 14px;
    font-family: "Montserrat", sans-serif;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #ef046e;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-option:hover {
    border-color: #ef046e;
    background: #f9f9f9;
}

.payment-option input[type="radio"] {
    width: auto;
    margin-right: 15px;
    cursor: pointer;
}

.payment-option input[type="radio"]:checked + .payment-icon + .payment-text {
    color: #ef046e;
}

.payment-option:has(input[type="radio"]:checked) {
    border-color: #ef046e;
    background: #fff5f9;
}

.payment-icon {
    font-size: 24px;
    margin-right: 10px;
}

.payment-text {
    font-weight: 600;
    color: #040434;
    font-family: "Montserrat", sans-serif;
}

.form-note {
    background: #fff5f9;
    border-left: 4px solid #ef046e;
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
}

.form-note p {
    margin: 0;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
    font-family: "Montserrat", sans-serif;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: #040434;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 20px;
    font-family: "Montserrat", sans-serif;
}

.btn-submit:hover {
    background: #ef046e;
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-family: "Montserrat", sans-serif;
}

.back-link:hover {
    color: #ef046e;
}

/* Overlay de procesamiento */
#processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.3s ease;
}

.processing-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.processing-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ef046e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.processing-text {
    font-size: 20px;
    font-weight: 600;
    color: #040434;
    margin: 0 0 10px 0;
    font-family: "Montserrat", sans-serif;
}

.processing-subtext {
    font-size: 14px;
    color: #666;
    margin: 0;
    font-family: "Montserrat", sans-serif;
}

/* Modal de error de pago */
#payment-error-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.error-modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    text-align: center;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.error-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.error-title {
    font-size: 24px;
    font-weight: 700;
    color: #d32f2f;
    margin: 0 0 15px 0;
    font-family: "Montserrat", sans-serif;
}

.error-message {
    font-size: 16px;
    color: #333;
    margin: 0 0 20px 0;
    line-height: 1.6;
    font-family: "Montserrat", sans-serif;
}

.error-suggestion {
    background: #fff5f9;
    border-left: 4px solid #ef046e;
    padding: 15px;
    margin: 20px 0;
    text-align: left;
    border-radius: 5px;
    font-size: 14px;
    color: #333;
    line-height: 1.8;
    font-family: "Montserrat", sans-serif;
}

.error-suggestion strong {
    color: #040434;
    display: block;
    margin-bottom: 8px;
}

.error-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.btn-try-other {
    padding: 12px 24px;
    background: #ef046e;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    font-family: "Montserrat", sans-serif;
}

.btn-try-other:hover {
    background: #d1045d;
}

.btn-close-error {
    padding: 12px 24px;
    background: #e0e0e0;
    color: #333;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    font-family: "Montserrat", sans-serif;
}

.btn-close-error:hover {
    background: #d0d0d0;
}

/* Estilos para el carrito en el modal */
.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-row:last-child {
    border-bottom: none;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info strong {
    display: block;
    color: #040434;
    margin-bottom: 5px;
}

.cart-item-info small {
    color: #666;
    font-size: 12px;
}

.cart-item-price {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-item-price span {
    font-weight: 600;
    color: #040434;
    font-size: 16px;
}

.btn-remove-item {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #dd7774;
    transition: color 0.3s;
}

.btn-remove-item:hover {
    color: #c55;
}

.btn-remove-item svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Datos bancarios */
.bank-details {
    margin-top: 25px;
    padding: 0;
    background: transparent;
    border-radius: 12px;
    border: none;
    animation: fadeIn 0.4s ease;
}

.bank-details h3 {
    color: #040434;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    margin-bottom: 25px;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bank-details h3::before {
    content: "🏦";
    font-size: 24px;
}

.bank-info-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 2px solid #e8e9ea;
    box-shadow: 0 4px 15px rgba(4, 4, 52, 0.08);
    transition: all 0.3s ease;
}

.bank-info-box:hover {
    box-shadow: 0 6px 20px rgba(4, 4, 52, 0.12);
    border-color: #ef046e;
}

.bank-info-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    font-family: "Montserrat", sans-serif;
    transition: all 0.2s ease;
    gap: 15px;
}

.bank-info-item:hover {
    background: rgba(239, 4, 110, 0.03);
    margin: 0 -15px;
    padding-left: 15px;
    padding-right: 15px;
    border-radius: 6px;
}

.bank-info-item:last-child {
    border-bottom: none;
}

.bank-info-item strong {
    min-width: 200px;
    color: #040434;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.bank-info-value {
    flex: 1;
    color: #1a1a2e;
    font-size: 15px;
    font-family: "Courier New", monospace;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: rgba(4, 4, 52, 0.05);
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid rgba(4, 4, 52, 0.1);
    word-break: break-all;
    min-width: 0;
    overflow-wrap: break-word;
}

.btn-copy {
    background: linear-gradient(135deg, #ef046e 0%, #d1045d 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(239, 4, 110, 0.3);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 110px;
    justify-content: center;
    flex-shrink: 0;
}

.btn-copy:hover {
    background: linear-gradient(135deg, #d1045d 0%, #b0034d 100%);
    box-shadow: 0 4px 12px rgba(239, 4, 110, 0.4);
    transform: translateY(-1px);
}

.btn-copy:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(239, 4, 110, 0.3);
}

.btn-copy::before {
    content: "📋";
    font-size: 14px;
}

.form-group input[type="file"] {
    padding: 16px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    cursor: pointer;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.form-group input[type="file"]:hover {
    border-color: #ef046e;
    background: linear-gradient(135deg, #fff5f9 0%, #ffffff 100%);
    box-shadow: 0 2px 8px rgba(239, 4, 110, 0.1);
}

.form-group input[type="file"]:focus {
    outline: none;
    border-color: #ef046e;
    box-shadow: 0 0 0 3px rgba(239, 4, 110, 0.1);
}

.form-group input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, #ef046e 0%, #d1045d 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    margin-right: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(239, 4, 110, 0.3);
}

.form-group input[type="file"]::file-selector-button:hover {
    background: linear-gradient(135deg, #d1045d 0%, #b0034d 100%);
    box-shadow: 0 4px 10px rgba(239, 4, 110, 0.4);
    transform: translateY(-1px);
}

.form-help {
    display: block;
    margin-top: 10px;
    color: #666;
    font-size: 13px;
    font-family: "Montserrat", sans-serif;
    line-height: 1.5;
    padding-left: 4px;
}

.receipt-preview {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    border: 2px solid #e8e9ea;
    position: relative;
    box-shadow: 0 2px 10px rgba(4, 4, 52, 0.08);
    animation: fadeIn 0.4s ease;
}

.receipt-preview img {
    max-width: 100%;
    max-height: 350px;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid #e8e9ea;
}

.receipt-preview .pdf-info {
    text-align: center;
    padding: 20px;
}

.receipt-preview .pdf-info p {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    color: #333;
}

.btn-remove-receipt {
    margin-top: 15px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-remove-receipt:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    transform: translateY(-1px);
}

.btn-remove-receipt:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .checkout-content {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        position: static;
    }
    
    .checkout-title {
        font-size: 24px;
    }
    
    .checkout-form,
    .order-summary {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group-half {
        flex: 1;
    }
    
    .bank-info-box {
        padding: 20px 15px;
    }
    
    .bank-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 18px 0;
    }
    
    .bank-info-item:hover {
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }
    
    .bank-info-item strong {
        min-width: auto;
        width: 100%;
        margin-bottom: 8px;
    }
    
    .bank-info-value {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .btn-copy {
        width: 100%;
        min-width: auto;
    }
    
    .receipt-preview {
        padding: 15px;
    }
    
    .receipt-preview img {
        max-height: 250px;
    }
}

/* Estilos para selector de cuotas */
.installments-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    color: #333;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 40px;
}

.installments-select:hover {
    border-color: #4a90e2;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.1);
}

.installments-select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.installment-amount {
    margin-top: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4a90e2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: fadeIn 0.3s ease;
}

.installment-label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    font-family: "Montserrat", sans-serif;
}

.installment-value {
    font-size: 18px;
    font-weight: 700;
    color: #4a90e2;
    font-family: "Montserrat", sans-serif;
}

