/* Estilos para Checkout */

.checkout-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ddd;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s;
}

.progress-step.active .step-number {
    background-color: #E07856;
    color: white;
}

.progress-step.completed .step-number {
    background-color: #28a745;
    color: white;
}

.step-label {
    font-size: 0.9rem;
    color: #666;
}

.progress-step.active .step-label {
    color: #E07856;
    font-weight: 600;
}

.progress-line {
    flex: 1;
    height: 2px;
    background-color: #ddd;
    margin: 0 1rem;
    max-width: 100px;
}

.checkout-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

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

.checkout-section {
    display: none;
}

.checkout-section.active {
    display: block;
}

.checkout-section h2 {
    margin-bottom: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.checkout-section h2 i {
    color: #E07856;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #E07856;
    outline: none;
}

.form-group input.error,
.form-group select.error {
    border-color: #dc3545;
}

.form-hint {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.85rem;
    color: #666;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

.btn-next,
.btn-submit {
    flex: 1;
    background-color: #E07856;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-next:hover,
.btn-submit:hover {
    background-color: #C85A3A;
}

.btn-back {
    background-color: #f8f9fa;
    color: #333;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-back:hover {
    background-color: #e9ecef;
}

/* Métodos de pago */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.payment-option {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: block;
}

.payment-option:hover {
    border-color: #E07856;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-option input[type="radio"]:checked + .payment-option-content {
    border-left: 4px solid #E07856;
    padding-left: 1rem;
}

.payment-option-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.payment-option-header i {
    font-size: 1.3rem;
    color: #E07856;
}

.payment-option-logos {
    display: flex;
    gap: 0.5rem;
    font-size: 1.8rem;
    margin-top: 0.5rem;
}

.card-details {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.secure-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem;
    background-color: #E078561a;
    border-radius: 8px;
    color: #E07856;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Resumen del pedido */
.order-summary {
    position: sticky;
    top: 100px;
    height: fit-content;
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.order-summary h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.checkout-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

.checkout-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

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

.checkout-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.checkout-item-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.checkout-item-info p {
    font-size: 0.85rem;
    color: #666;
}

.checkout-item-price {
    font-weight: bold;
    color: #E07856;
}

/* Códigos de descuento */
.discount-section {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.discount-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #333;
}

.discount-input-group {
    display: flex;
    gap: 0.5rem;
}

.discount-input-group input {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
}

.discount-input-group button {
    background-color: #E07856;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.discount-input-group button:hover {
    background-color: #C85A3A;
}

.discount-message {
    margin-top: 0.8rem;
    padding: 0.8rem;
    border-radius: 8px;
    display: none;
}

.discount-message .success {
    color: #28a745;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.discount-message .error {
    color: #dc3545;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.available-codes {
    margin-top: 1rem;
}

.available-codes small {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
}

.code-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.code-chip {
    background-color: #E078561a;
    color: #E07856;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.code-chip:hover {
    background-color: #E07856;
    color: white;
}

/* Totales */
.order-totals {
    margin-bottom: 1.5rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.total-final {
    font-size: 1.5rem;
    font-weight: bold;
    color: #E07856;
    border-top: 2px solid #ddd;
    border-bottom: none;
    margin-top: 1rem;
}

.discount-text {
    color: #28a745;
    font-weight: 600;
}

.free-shipping-progress {
    margin: 1rem 0;
    padding: 1rem;
    background-color: #E078561a;
    border-radius: 8px;
}

.free-shipping-text {
    font-size: 0.9rem;
    color: #E07856;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Trust badges */
.trust-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
}

.trust-badge {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.trust-badge i {
    font-size: 1.5rem;
    color: #E07856;
    margin-bottom: 0.5rem;
}

.trust-badge span {
    display: block;
    font-size: 0.8rem;
    color: #666;
}

/* Empty checkout */
.empty-checkout {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-checkout i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .checkout-progress {
        padding: 0 1rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .progress-line {
        max-width: 50px;
        margin: 0 0.5rem;
    }
    
    .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .checkout-form {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .order-summary {
        position: static;
    }
    
    .trust-badges {
        grid-template-columns: 1fr;
    }
}
