/* ===== ESTILOS DO CARRINHO ===== */

/* Estilos para SweetAlert2 dark theme */
.swal-dark-theme {
    background: #1a202c !important;
    color: #e2e8f0 !important;
}

.swal-confirm-button {
    background: #10b981 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.swal-confirm-button:hover {
    background: #059669 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

.btn-orders {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-orders:hover {
    background: #5a67d8;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Estilos específicos da página do carrinho */
.cart-container {
    background: #1a202c;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
    border: 1px solid #4a5568;
}

.cart-header {
    background: #1a202c;
    padding: 1rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
    border: 1px solid #4a5568;
}

.back-button {
    display: inline-flex;
    align-items: center;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1rem;
    transition: color 0.3s;
}

.back-button:hover {
    color: #764ba2;
}

.back-button .icon {
    margin-right: 0.5rem;
}

.cart-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e2e8f0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #4a5568;
    gap: 1rem;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.cart-item-image.no-image {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
    font-size: 2rem;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.3;
}

.cart-item-price {
    color: #28a745;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.quantity-input {
    width: 60px;
    padding: 0.3rem;
    border: 1px solid #4a5568;
    border-radius: 5px;
    text-align: center;
    font-size: 0.9rem;
    background: #2d3748;
    color: #e2e8f0;
}

.btn-update {
    background: #1a202c;
    color: white;
    border: 1px solid #007bff;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-update:hover {
    background: #2d3748;
}

.btn-remove {
    background: #1a202c;
    color: white;
    border: 1px solid #dc3545;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-remove:hover {
    background: #2d3748;
}

.cart-summary {
    background: #1a202c;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 1.5rem;
    border: 2px solid #4a5568;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.cart-total {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.cart-total-label {
    font-size: 1rem;
    opacity: 0.9;
}

.btn-checkout-trigger {
    background: #1a202c;
    color: white;
    border: 2px solid #e5092c;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.btn-checkout-trigger:hover {
    background: #2d3748;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 9, 44, 0.4);
}

.checkout-section {
    background: #1a202c;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    position: sticky;
    bottom: 1rem;
    display: none; /* Oculta o formulário por padrão */
    border: 1px solid #4a5568;
}

.checkout-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #e2e8f0;
    margin-bottom: 1rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #4a5568;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
    background: #2d3748;
    color: #e2e8f0;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    background: #2d3748;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a0aec0;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: #e2e8f0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    transform: scale(1.2);
}

.address-fields {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: #2d3748;
    border-radius: 10px;
    border: 1px solid #4a5568;
}

.address-fields.show {
    display: block;
}

.btn-whatsapp {
    width: 100%;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    color: white;
}

.btn-whatsapp:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Estilos para abas de pagamento */
.payment-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #4a5568;
    padding-bottom: 1rem;
}

.payment-tab {
    background: #2d3748;
    border: 2px solid #4a5568;
    color: #a0aec0;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.payment-tab:hover {
    background: #4a5568;
    border-color: #667eea;
    color: #667eea;
}

.payment-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.payment-form {
    display: block;
}

/* Estilos para seção de cartão */
.card-section {
    background: #2d3748;
    padding: 1.5rem;
    border-radius: 15px;
    margin: 1.5rem 0;
    border: 2px solid #4a5568;
    color: #e2e8f0;
}

.card-section h3 {
    color: #e2e8f0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-mercadopago {
    width: 100%;
    background: linear-gradient(135deg, #009ee3 0%, #0077cc 100%);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 158, 227, 0.3);
}

.btn-mercadopago:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 158, 227, 0.4);
    color: white;
}

.btn-mercadopago:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.empty-cart {
    text-align: center;
    padding: 3rem 1rem;
    color: #a0aec0;
}

.empty-cart .icon {
    font-size: 4rem;
    color: #4a5568;
    margin-bottom: 1rem;
}

.empty-cart h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
}

.empty-cart p {
    margin-bottom: 1.5rem;
    line-height: 1.5;
    color: #a0aec0;
}

.btn-continue {
    background: #667eea;
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn-continue:hover {
    background: #764ba2;
    color: white;
}

/* Modal de confirmação */
.confirmation-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.confirmation-content {
    background-color: #2c3e50;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    animation: slideIn 0.3s ease;
    border: 1px solid #34495e;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.confirmation-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1rem;
    animation: bounce 0.6s ease;
}

.confirmation-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ecf0f1;
    margin-bottom: 1rem;
}

.confirmation-message {
    color: #bdc3c7;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.confirmation-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-ok {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-ok:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

.debug-info {
    background: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    font-family: monospace;
    font-size: 0.9rem;
    color: #e2e8f0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Responsivo para mobile */
@media (max-width: 767px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    .cart-item-image {
        width: 100%;
        height: 200px;
        align-self: center;
        max-width: 200px;
    }
    
    .cart-item-details {
        width: 100%;
    }
    
    .cart-item-controls {
        width: 100%;
        justify-content: space-between;
    }

    .confirmation-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
        border-radius: 15px;
    }

    .confirmation-buttons {
        flex-direction: column;
    }
    
    /* Responsividade para modal do QR Code PIX */
    #pixQrCodeModal .confirmation-content {
        margin: 5% auto;
        max-width: 95%;
        padding: 1.5rem;
    }
    
    #pixQrCodeModal .confirmation-content img {
        width: 250px !important;
        height: 250px !important;
    }
    
    #pixQrCodeModal .confirmation-content div[style*="width: 300px"] {
        width: 250px !important;
        height: 250px !important;
    }
    
    /* Campo de copiar e colar responsivo */
    #pixQrCodeModal .confirmation-content input[type="text"] {
        font-size: 0.8rem;
        padding: 0.6rem;
    }
    
    #pixQrCodeModal .confirmation-content button {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    /* Ajustar espaçamentos para mobile */
    #pixQrCodeModal .confirmation-content .confirmation-title {
        font-size: 1.3rem;
    }
    
    #pixQrCodeModal .confirmation-content .confirmation-message {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}
