/* CSS da Página de Carrinho/Checkout */

/* Esconder botões de compartilhar */
.share-buttons {
    display: none !important;
}

/* Modal de Confirmação de Remoção */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.confirm-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.confirm-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 340px;
    padding: 24px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.confirm-modal-overlay.active .confirm-modal {
    transform: scale(1);
}

.confirm-modal-icon {
    width: 60px;
    height: 60px;
    background: #fff0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.confirm-modal-icon i {
    font-size: 28px;
    color: #e30000;
}

.confirm-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.confirm-modal-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}

.confirm-modal-buttons {
    display: flex;
    gap: 12px;
}

.confirm-modal-btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.confirm-modal-btn.cancel {
    background: #f5f5f5;
    color: #333;
}

.confirm-modal-btn.cancel:hover {
    background: #e0e0e0;
}

.confirm-modal-btn.confirm {
    background: #e30000;
    color: white;
}

.confirm-modal-btn.confirm:hover {
    background: #c70000;
}

/* Toast de Cupom */
.coupon-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    width: 85%;
    max-width: 350px;
    background: #f0f0f0;
    padding: 14px 18px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    opacity: 0;
    transition: all 0.4s ease;
}

.coupon-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.coupon-toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.coupon-toast-icon.error {
    background: #e30000;
    border-radius: 8px;
    padding: 6px;
}

.coupon-toast-icon.error img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.coupon-toast-icon.success {
    background: #e8f5e9;
}

.coupon-toast-icon.success i {
    color: #4CAF50;
    font-size: 20px;
}

.coupon-toast-content {
    flex: 1;
}

.coupon-toast-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    display: block;
    margin-bottom: 2px;
}

.coupon-toast-title.error-title {
    color: #e30000;
}

.coupon-toast-text {
    font-size: 12px;
    color: #666;
    display: block;
}

/* Container de Itens do Carrinho */
#cartItemsContainer {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-item-wrapper {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cart-item-wrapper + .cart-item-wrapper {
    margin-top: 10px;
}

.cart-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Carrinho Vazio */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    min-height: 50vh;
}

.cart-empty .empty-icon {
    width: 100px;
    height: 100px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.cart-empty .empty-icon i {
    font-size: 40px;
    color: #ccc;
}

.cart-empty .empty-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.cart-empty .empty-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}

.cart-empty .btn-continue-shopping {
    background: #e30000;
    color: white;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
}

.cart-empty .btn-continue-shopping:hover {
    background: #c70000;
}

/* Header Checkout */
.header-checkout {
    background: var(--primary-color);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.checkout-logo {
    text-align: center;
    margin-bottom: 15px;
}

.logo-checkout {
    height: 35px;
    width: auto;
}

.checkout-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    flex: 1;
    position: relative;
}

.step.active {
    color: white;
}

.step i {
    font-size: 20px;
    margin-bottom: 3px;
}

.step span {
    font-weight: 600;
}

.step-lock {
    color: white;
    font-size: 18px;
}

/* Container Principal */
.checkout-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 150px;
    background: white;
}

/* Item do Carrinho */
.cart-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
}

.item-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.item-details {
    flex: 1;
}

.item-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.item-size,
.item-color,
.item-seller {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.item-size strong,
.item-color strong,
.item-seller strong {
    color: var(--text-dark);
}

.item-gift {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.gift-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.item-gift label {
    font-size: 14px;
    color: var(--text-light);
    cursor: pointer;
}

/* Controles do Carrinho */
.cart-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
}

.btn-delete {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-delete:hover {
    background: #FFF0F0;
}

.btn-delete i {
    font-size: 18px;
    color: var(--text-light);
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.btn-qty {
    width: 40px;
    height: 40px;
    border: none;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-qty:hover {
    background: var(--bg-gray);
}

.btn-qty i {
    font-size: 14px;
    color: var(--primary-color);
}

.qty-input {
    width: 50px;
    height: 40px;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.price-value {
    font-size: 20px;
    font-weight: 900;
    color: var(--text-dark);
}

/* Botões de Compartilhar */
.share-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-share {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border: 2px solid var(--primary-color);
    background: white;
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-share:hover {
    background: #FFF0F0;
}

.btn-share.whatsapp i {
    font-size: 20px;
}

.btn-share.copy i {
    font-size: 18px;
}

/* Seções */
.freight-section-cart,
.coupon-section,
.payment-methods-cart {
    margin-bottom: 25px;
}

.section-title-cart {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    text-align: center;
}

/* Input Groups */
.freight-input-group,
.coupon-input-group {
    display: flex;
    gap: 10px;
}

.input-cep,
.input-coupon {
    flex: 1;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
}

.input-cep::placeholder,
.input-coupon::placeholder {
    color: #ccc;
}

.btn-calculate,
.btn-add-coupon {
    padding: 14px 25px;
    background: #E0E0E0;
    color: var(--text-dark);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.btn-calculate:hover,
.btn-add-coupon:hover {
    background: #D0D0D0;
}

/* Resultado do Frete */
.freight-result {
    margin-top: 15px;
    padding: 12px;
    background: var(--bg-gray);
    border-radius: 8px;
}

.freight-location {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.freight-location i {
    color: var(--primary-color);
}

/* Formas de Pagamento */
.payment-cards-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.payment-cards-row.center {
    justify-content: center;
}

.payment-card-icon {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.payment-pix-row {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.pix-icon-cart {
    height: 28px;
    width: auto;
}

.payment-pix-cart {
    display: flex;
    justify-content: center;
}

.pix-icon-cart {
    height: 45px;
    width: auto;
}

/* Disclaimer Legal */
.legal-disclaimer {
    margin: 25px 0;
    padding: 15px;
    background: var(--bg-gray);
    border-radius: 8px;
}

.legal-disclaimer p {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-light);
    text-align: center;
    margin: 0;
}

/* Resumo do Carrinho */
.cart-summary {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 999;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.summary-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.summary-values {
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-total {
    font-size: 28px;
    font-weight: 900;
    color: var(--text-dark);
}

.pix-discount {
    background: #D4F4DD;
    color: #00A650;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
}

.summary-installment {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.summary-installment strong {
    color: var(--text-dark);
    font-weight: 700;
}

.btn-continue {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-continue:hover {
    background: var(--primary-dark);
}

/* Modal de Prazo de Entrega */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: flex-end;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-delivery {
    background: white;
    width: 100%;
    max-width: 600px;
    border-radius: 20px 20px 0 0;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

.modal-close {
    width: 35px;
    height: 35px;
    border: none;
    background: none;
    color: var(--primary-color);
    font-size: 22px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.delivery-location {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.delivery-location i {
    color: var(--primary-color);
}

.delivery-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.delivery-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.delivery-option:hover {
    border-color: var(--primary-color);
}

.delivery-option.selected {
    border-color: var(--primary-color);
    background: #FFF5F5;
}

.option-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.option-icon i {
    font-size: 24px;
    color: #e30000;
}

.option-icon .correios-icon {
    width: 36px;
    height: auto;
}

.option-content {
    flex: 1;
}

.option-content h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.option-content p {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.4;
}

.option-content p strong {
    color: var(--text-dark);
}

.option-content .store-time {
    margin-top: 4px;
    font-size: 11px;
    color: #999;
}

.option-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    flex-shrink: 0;
}

.option-price.free {
    color: #4CAF50;
}

.option-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.option-price.free {
    color: #00A650;
}

/* Responsivo */
@media (max-width: 768px) {
    .checkout-steps {
        padding: 0 10px;
    }
    
    .step span {
        font-size: 11px;
    }
    
    .cart-item {
        padding: 15px;
    }
    
    .item-image {
        width: 80px;
        height: 80px;
    }
    
    .item-title {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .step span {
        display: none;
    }
    
    .step i {
        font-size: 18px;
    }
    
    .cart-controls {
        padding: 12px 15px;
    }
    
    .btn-delete {
        width: 35px;
        height: 35px;
    }
    
    .btn-qty {
        width: 35px;
        height: 35px;
    }
    
    .qty-input {
        width: 40px;
        height: 35px;
    }
    
    .price-value {
        font-size: 18px;
    }
    
    .summary-total {
        font-size: 24px;
    }
    
    .payment-cards-row {
        gap: 8px;
    }
    
    .payment-card-icon {
        height: 28px;
    }
}

