/* ========================================
   CHECKOUT STYLES
   VICENTE - Loja de Moda Masculina
   ======================================== */

/* Layout Principal */
.checkout-section {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 2rem 0;
}

.checkout-header {
    text-align: center;
    margin-bottom: 2rem;
}

.checkout-header h1 {
    color: #000000;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.checkout-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

.checkout-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Formulário de Checkout */
.checkout-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.checkout-step {
    padding: 2rem;
}

.step-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.step-header h2 {
    color: #000000;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-header h2 i {
    color: #000000;
}

/* Endereços */
.address-selection {
    margin-bottom: 2rem;
}

.existing-addresses h3 {
    color: #495057;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.address-option {
    margin-bottom: 1rem;
}

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

.address-option label {
    display: block;
    padding: 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.address-option input[type="radio"]:checked + label {
    border-color: #000000;
    background: #f8f9fa;
}

.address-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.address-info strong {
    color: #000000;
    font-size: 1rem;
}

.address-info span {
    color: #6c757d;
    font-size: 0.875rem;
}

.default-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #000000;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.add-new-address {
    margin-top: 1rem;
    text-align: center;
}

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

.payment-method {
    margin-bottom: 1rem;
}

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

.payment-method label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method input[type="radio"]:checked + label {
    border-color: #000000;
    background: #f8f9fa;
}

.payment-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.payment-info i {
    font-size: 1.5rem;
    color: #000000;
}

.payment-details strong {
    display: block;
    color: #000000;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.payment-details span {
    color: #6c757d;
    font-size: 0.875rem;
}

.payment-icon i {
    font-size: 2rem;
    color: #000000;
}

/* Formulário do Cartão */
#credit-card-form {
    display: none;
    margin-top: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

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

.card-form-group {
    display: flex;
    flex-direction: column;
}

.card-form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.card-form-group input {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.3s ease;
}

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

/* Resumo do Pedido */
.checkout-summary {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.summary-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.summary-header h3 {
    color: #000000;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.summary-items {
    margin-bottom: 2rem;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f3f4;
}

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

.item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-placeholder {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.5rem;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-info h4 {
    color: #000000;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.item-quantity {
    color: #6c757d;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* Tags de Variação */
.item-variations {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.variation-tag {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.size-tag {
    background: #e9ecef;
    color: #495057;
    border: 1px solid #dee2e6;
}

.color-tag {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.item-price {
    color: #000000;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Preço original riscado para itens em promoção */
.original-price {
    margin-top: 4px;
}

.price-original {
    text-decoration: line-through;
    color: #999;
    font-size: 0.85em;
    font-weight: normal;
}

/* Barra de Progresso do Frete Grátis */
.free-shipping-progress {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.free-shipping-progress.achieved {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #28a745;
}

.free-shipping-progress.in-progress {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #6c757d;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-header span:first-child {
    font-weight: 600;
    color: #000000;
    font-size: 0.9rem;
}

.progress-text {
    font-weight: 600;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: #dc3545;
    border-radius: 4px;
    transition: all 0.5s ease;
    width: 0%;
}

.progress-info {
    text-align: center;
}

.progress-info span {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

.free-shipping-progress.achieved .progress-info span {
    color: #28a745;
    font-weight: 500;
}

.summary-header h3 {
    color: #000000;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.summary-items {
    margin-bottom: 2rem;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-placeholder {
    width: 100%;
    height: 100%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.5rem;
}

.item-info {
    flex: 1;
}

.item-info h4 {
    color: #000000;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.item-quantity {
    color: #6c757d;
    font-size: 0.75rem;
}

.item-price {
    color: #000000;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Totais */
.summary-totals {
    margin-bottom: 2rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    font-size: 0.875rem;
}

.total-row:not(.final-total) {
    color: #6c757d;
}

.final-total {
    color: #000000;
    font-weight: 700;
    font-size: 1.1rem;
    padding-top: 1rem;
    border-top: 2px solid #e9ecef;
}

.shipping-row {
    color: #495057;
    font-weight: 500;
}

/* Informações de Frete */
.shipping-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.shipping-info > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.shipping-info > div:last-child {
    margin-bottom: 0;
}

.shipping-info i {
    color: #000000;
    width: 16px;
}

.shipping-info span {
    color: #495057;
}

.free-shipping-notice {
    color: #856404;
    background: #fff3cd;
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
}

.free-shipping-notice i {
    color: #856404;
}

.free-shipping-achieved {
    color: #155724;
    background: #d4edda;
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
}

.free-shipping-achieved i {
    color: #155724;
}

/* Segurança */
.summary-security {
    border-top: 2px solid #e9ecef;
    padding-top: 1.5rem;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.security-item i {
    color: #000000;
    width: 16px;
}

/* Botões */
.step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid #e9ecef;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: #000000;
    color: white;
}

.btn-primary:hover {
    background: #333333;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: #000000;
    border: 2px solid #000000;
}

.btn-outline:hover {
    background: #000000;
    color: white;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Responsividade */
@media (max-width: 768px) {
    .checkout-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .checkout-summary {
        position: static;
        order: -1;
    }
    
    .card-form-row {
        grid-template-columns: 1fr;
    }
    
    .step-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Seção de Opções de Frete */
.shipping-section {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.shipping-section h3 {
    color: #000000;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.shipping-options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.shipping-option {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.shipping-option:hover {
    border-color: #000000;
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.shipping-option.selected {
    border-color: #000000;
    background-color: #f8f9fa;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Opção de Frete Grátis */
.shipping-option[data-price="0"] {
    border-color: #28a745;
    background: #f8fff9;
}

.shipping-option[data-price="0"] .shipping-name {
    color: #28a745;
    font-weight: 600;
}

.shipping-option[data-price="0"] .shipping-price {
    color: #28a745;
    font-weight: 600;
}

.shipping-option[data-price="0"] .shipping-delivery {
    color: #28a745;
    font-style: italic;
}

.shipping-option-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.shipping-option-header input[type="radio"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #000000;
}

.shipping-info-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
}

.shipping-name {
    font-weight: 600;
    color: #000000;
    font-size: 1.1em;
}

.shipping-price {
    font-weight: 700;
    color: #000000;
    font-size: 1.2em;
}

.shipping-details {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 0.9em;
    color: #666;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
}

/* Removido shipping-source para evitar duplicação de nomes */

.shipping-delivery {
    color: #666;
    font-weight: 500;
}

/* Estilo especial para retirada na loja */
.shipping-option .shipping-name i.fa-store {
    color: #013c10;
    margin-right: 0.5rem;
}

.shipping-option .shipping-delivery {
    color: #666;
    font-weight: 500;
}

/* Informações de Frete Selecionado */
.selected-shipping-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.selected-shipping-info i {
    color: #000000;
}

.selected-shipping-info span {
    color: #000000;
    font-weight: 500;
}

.shipping-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.shipping-loading i {
    margin-right: 10px;
    color: #013c10;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .shipping-option {
        padding: 12px;
    }
    
    .shipping-option-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .shipping-name {
        font-size: 1em;
    }
    
    .shipping-price {
        margin-top: 5px;
        font-size: 1.1em;
    }
    
    .shipping-details {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .shipping-source {
        align-self: flex-start;
    }
}

/* ========================================
   ESTILOS DE CUPONS
   ======================================== */

.coupon-section {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.coupon-section h4 {
    color: #000000;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.coupon-section h4 i {
    color: #013c10;
}

.coupon-form {
    margin-bottom: 1rem;
}

.coupon-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.coupon-input-group input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: border-color 0.3s ease;
}

.coupon-input-group input:focus {
    outline: none;
    border-color: #013c10;
}

.coupon-input-group .btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.coupon-message {
    font-size: 0.85rem;
    padding: 0.5rem;
    border-radius: 4px;
    display: none;
}

.coupon-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6c3;
}

.coupon-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.coupon-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.applied-coupon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6c3 100%);
    border: 2px solid #28a745;
    border-radius: 8px;
    margin-top: 1rem;
}

.coupon-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #155724;
    font-weight: 600;
}

.coupon-info i {
    font-size: 1.2rem;
    color: #28a745;
}

.coupon-info span:first-of-type {
    font-size: 0.95rem;
    font-weight: 700;
}

.coupon-info span:last-of-type {
    background: #28a745;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.applied-coupon .btn {
    padding: 0.5rem;
    font-size: 0.8rem;
    color: #721c24;
    border-color: #721c24;
}

.applied-coupon .btn:hover {
    background: #721c24;
    color: white;
}

/* Linha de desconto nos totais */
.discount-row {
    color: #28a745;
    font-weight: 600;
}

.discount-row span:last-child {
    color: #28a745;
    font-weight: 700;
}

/* Responsivo para cupons */
@media (max-width: 768px) {
    .coupon-input-group {
        flex-direction: column;
    }
    
    .coupon-input-group .btn {
        width: 100%;
    }
    
    .applied-coupon {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .coupon-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ========================================
   ESTILOS DE PARCELAS
   ======================================== */

.installments-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.installment-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.installment-text {
    color: #495057;
    font-size: 0.95rem;
}

.installment-text strong {
    color: #013c10;
    font-weight: 700;
}

.installment-value {
    color: #013c10;
    font-weight: 600;
    font-size: 1rem;
}

.installment-value strong {
    color: #013c10;
    font-weight: 700;
}

.total-with-interest {
    border-top: 1px solid #dee2e6;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.total-with-interest span {
    color: #dc3545;
    font-size: 0.9rem;
    font-weight: 600;
}

.total-with-interest strong {
    color: #dc3545;
    font-weight: 700;
}

/* Estilo para o select de parcelas */
#card_installments {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

#card_installments:focus {
    outline: none;
    border-color: #013c10;
    box-shadow: 0 0 0 3px rgba(1, 60, 16, 0.1);
}

#card_installments option {
    padding: 0.5rem;
    font-size: 0.95rem;
}

/* Responsivo para parcelas */
@media (max-width: 768px) {
    .installment-details {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .installment-text,
    .installment-value {
        font-size: 0.9rem;
    }
    
    .total-with-interest span {
        font-size: 0.85rem;
    }
}
