/* ============================================
   CHECKOUT MODERNO E PROFISSIONAL
   Design System 2025
   ============================================ */

/* Container Principal */
.checkout-modern {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.checkout-modern__container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header do Checkout */
.checkout-modern__header {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.checkout-modern__header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.checkout-modern__header h1 i {
    color: #0066FF;
}

.checkout-modern__header p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 20px;
}

.checkout-modern__login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    color: #fff;
    padding: 12px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.checkout-modern__login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
    color: #fff;
    text-decoration: none;
}

/* Grid Layout */
.checkout-modern__grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

/* Formulário */
.checkout-modern__form {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.checkout-modern__section {
    margin-bottom: 40px;
}

.checkout-modern__section:last-child {
    margin-bottom: 0;
}

.checkout-modern__section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout-modern__section-title i {
    color: #0066FF;
}

/* Campos do Formulário */
.checkout-modern__field {
    margin-bottom: 20px;
}

.checkout-modern__label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.checkout-modern__label span {
    color: #dc3545;
    margin-left: 2px;
}

.checkout-modern__input,
.checkout-modern__select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.checkout-modern__input:focus,
.checkout-modern__select:focus {
    border-color: #0066FF;
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
    outline: none;
}

.checkout-modern__input::placeholder {
    color: #999;
}

.checkout-modern__error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 6px;
    display: block;
}

/* Grid de Campos */
.checkout-modern__row {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.checkout-modern__row--2 {
    grid-template-columns: 1fr 1fr;
}

.checkout-modern__row--3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.checkout-modern__row--custom {
    grid-template-columns: 3fr 1fr;
}

.checkout-modern__row--address {
    grid-template-columns: 100px 1fr 1fr;
}

/* Resumo do Pedido */
.checkout-modern__summary {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.checkout-modern__summary-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout-modern__summary-title i {
    color: #0066FF;
}

/* Itens do Pedido */
.checkout-modern__items {
    margin-bottom: 20px;
}

.checkout-modern__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.checkout-modern__item:last-child {
    border-bottom: none;
}

.checkout-modern__item-name {
    font-weight: 500;
    color: #333;
    flex: 1;
}

.checkout-modern__item-price {
    font-weight: 600;
    color: #0066FF;
    white-space: nowrap;
    margin-left: 15px;
}

/* Totais */
.checkout-modern__totals {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.checkout-modern__total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 1rem;
}

.checkout-modern__total-row--shipping {
    color: #666;
}

.checkout-modern__total-row--final {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0066FF;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
    margin-top: 10px;
}

/* Botão de Finalizar */
.checkout-modern__submit {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #CDFF00 0%, #B8E600 100%);
    color: #000;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(205, 255, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.checkout-modern__submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(205, 255, 0, 0.4);
    filter: brightness(1.05);
}

.checkout-modern__submit i {
    font-size: 1.2rem;
}

/* Badge de Segurança */
.checkout-modern__security {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.checkout-modern__security-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #28a745;
    font-size: 0.875rem;
    font-weight: 600;
}

.checkout-modern__security-badge i {
    font-size: 1rem;
}

/* Responsivo */
@media (max-width: 992px) {
    .checkout-modern__grid {
        grid-template-columns: 1fr;
    }
    
    .checkout-modern__summary {
        position: relative;
        top: 0;
        max-height: none;
    }
    
    .checkout-modern__row--2,
    .checkout-modern__row--3,
    .checkout-modern__row--custom,
    .checkout-modern__row--address {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .checkout-modern {
        padding: 30px 0;
    }
    
    .checkout-modern__header,
    .checkout-modern__form,
    .checkout-modern__summary {
        padding: 25px;
        border-radius: 16px;
    }
    
    .checkout-modern__header h1 {
        font-size: 1.5rem;
    }
    
    .checkout-modern__section-title,
    .checkout-modern__summary-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .checkout-modern__header,
    .checkout-modern__form,
    .checkout-modern__summary {
        padding: 20px;
    }
    
    .checkout-modern__input,
    .checkout-modern__select {
        padding: 12px 14px;
    }
    
    .checkout-modern__submit {
        padding: 16px;
        font-size: 1rem;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.checkout-modern__header,
.checkout-modern__form,
.checkout-modern__summary {
    animation: fadeInUp 0.6s ease;
}

.checkout-modern__form {
    animation-delay: 0.1s;
}

.checkout-modern__summary {
    animation-delay: 0.2s;
}

/* Estados de Loading */
.checkout-modern__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.checkout-modern__submit.loading {
    position: relative;
    color: transparent;
}

.checkout-modern__submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
