/* ===================================================================================
   CARRINHO LATERAL (SLIDE-OUT CART - ISA BEAUTY) - RESPONSIVO
   =================================================================================== */
.cart-sidebar-isa {
    position: fixed !important; /* Força a sobreposição */
    top: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 420px !important;
    height: 100% !important;
    background-color: #ffffff !important;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2) !important;
    z-index: 999999 !important; /* Aumentado drasticamente para ficar acima do header */
    display: flex !important;
    flex-direction: column !important;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-sidebar-isa.open-cart {
    transform: translateX(0);
}

/* Fundo Escurecido */
.cart-overlay-isa {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay-isa.show-overlay {
    opacity: 1;
    visibility: visible;
}

/* Cabeçalho do Carrinho */
.cart-header-isa {
    padding: 20px 24px;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-header-isa h3 {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #222222;
}

.close-cart-isa {
    background: none;
    border: none;
    font-size: 30px;
    color: #888888;
    cursor: pointer;
    transition: color 0.2s;
}

.close-cart-isa:hover {
    color: #333333;
}

/* Corpo do Carrinho com Scroll */
.cart-body-isa {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Item do Carrinho */
.cart-item-isa {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    padding-bottom: 15px;
    border-bottom: 1px solid #f5f5f5;
}

.cart-item-img-container {
    width: 75px;
    height: 75px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f9f9f9;
    border: 1px solid #eaeaea;
    flex-shrink: 0;
}

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

.cart-item-info-isa {
    flex: 1;
    padding-right: 15px;
}

.cart-item-info-isa h4 {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 4px;
    line-height: 1.3;
}

.cart-item-price-isa {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #B8860B;
}

/* Quantidade */
.cart-item-qty-isa {
    display: flex;
    align-items: center;
    border: 1px solid #cccccc;
    border-radius: 4px;
    width: fit-content;
    height: 28px;
    margin-top: 8px;
}

.qty-btn-isa {
    background: none;
    border: none;
    width: 28px;
    height: 100%;
    cursor: pointer;
    font-size: 14px;
    color: #555555;
}

.qty-btn-isa:hover {
    background-color: #f0f0f0;
}

.cart-item-qty-isa span {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 0 10px;
    color: #333333;
}

.remove-item-isa {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    font-size: 22px;
    color: #aaaaaa;
    cursor: pointer;
}

.remove-item-isa:hover {
    color: #cc0000;
}

/* Rodapé */
.cart-footer-isa {
    padding: 24px;
    border-top: 1px solid #eaeaea;
    background-color: #fafafa;
}

.cart-total-row-isa {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.cart-total-row-isa span:first-child {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #555555;
}

.cart-total-price-isa {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #222222;
}

.cart-shipping-notice-isa {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #888888;
    margin-bottom: 18px;
}
.btn-checkout-isa {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #CFB53B 0%, #B8860B 100%);
    color: #ffffff;
    border: none;
    border-radius: 25px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.2);
    
    /* Configuração necessária para os efeitos */
    position: relative;
    overflow: hidden; 
    transition: all 0.2s ease; /* Transição suave para o clique */
}

/* Efeito de Reflexo (Passa da esquerda para a direita) */
.btn-checkout-isa::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.7s ease;
}

.btn-checkout-isa:hover::after {
    left: 150%; /* O reflexo atravessa o botão */
}

/* Efeito de "Encolher" ao clicar */
.btn-checkout-isa:active {
    transform: scale(0.95); /* Reduz 5% do tamanho total */
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.3);
}

/* ===================================================================================
   MODAL DE CHECKOUT CENTRAL (WHATSAPP) - RESPONSIVO
   =================================================================================== */
.modal-overlay-isa {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay-isa.show-modal {
    opacity: 1;
    visibility: visible;
}

.modal-content-isa {
    background-color: #ffffff;
    width: 100%;
    max-width: 480px;
    padding: 30px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    margin: 0 15px;
}

.modal-overlay-isa.show-modal .modal-content-isa {
    transform: translateY(0);
}

.close-modal-isa {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #888888;
    cursor: pointer;
}

.modal-title-isa {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #222222;
    margin-bottom: 8px;
}

.modal-subtitle-isa {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #666666;
    margin-bottom: 25px;
    line-height: 1.4;
}

.modal-form-isa {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group-isa {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group-isa label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #444444;
}

.form-input-isa {
    font-family: 'Inter', sans-serif;
    border: 1px solid #cccccc;
    border-radius: 8px;
    height: 44px; /* Ligeiramente maior para facilitar o toque no telemóvel */
    padding: 0 12px;
    font-size: 14px;
    color: #333333;
    outline: none;
    -webkit-appearance: none; /* Remove estilos padrão do iOS */
}

.form-input-isa:focus {
    border-color: #B8860B;
}

.textarea-isa {
    height: 80px;
    padding: 12px;
    resize: none;
}

.btn-submit-whatsapp-isa {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff;
    border: none;
    border-radius: 25px;
    height: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(18, 140, 126, 0.25);
    transition: all 0.2s;
}

/* ===================================================================================
   MEDIA QUERIES - REGRAS DE RESPONSIVIDADE PARA SMARTPHONES (Ecrãs até 576px)
   =================================================================================== */
@media (max-width: 576px) {
    /* O Carrinho passa a ocupar o ecrã inteiro no telemóvel */
    .cart-sidebar-isa {
        max-width: 100%;
    }

    .cart-header-isa {
        padding: 16px;
    }

    .cart-body-isa {
        padding: 16px;
        gap: 15px;
    }

    .cart-item-img-container {
        width: 65px;
        height: 65px;
    }

    .cart-item-info-isa h4 {
        font-size: 13px;
    }

    .cart-footer-isa {
        padding: 16px;
    }

    /* O Modal ganha mais espaço nas laterais e o texto ajusta-se */
    .modal-content-isa {
        padding: 20px;
        margin: 0 10px;
        border-radius: 16px;
    }

    .modal-title-isa {
        font-size: 20px;
        padding-right: 20px; /* Evita que o título bata no 'X' */
    }

    .modal-subtitle-isa {
        font-size: 12px;
        margin-bottom: 18px;
    }
    
    .modal-form-isa {
        gap: 12px;
    }
    
    .form-input-isa {
        height: 42px;
        font-size: 13px;
    }
}





/* Animação de Pulso/Tremor para o Contador da Navbar */
.pulse-badge-isa {
    animation: badgePulseIsa 0.4s ease-in-out;
}

@keyframes badgePulseIsa {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.4); /* O número cresce */
        background-color: #25D366; /* Pisca em verde durante o pulso */
    }
    100% {
        transform: scale(1); /* Volta ao tamanho normal */
    }
}












/* Bloqueia o site quando o carrinho/modal abrem */
body.cart-lock-scroll {
    overflow: hidden !important;
}

/* Scroll interno para o Carrinho */
.cart-body-isa {
    flex: 1;
    overflow-y: auto !important; /* Força o scroll aqui */
    -webkit-overflow-scrolling: touch; /* Suaviza no telemóvel */
    max-height: calc(100vh - 180px); /* Garante que nunca ultrapassa a tela */
}

/* Scroll interno para o Modal se o conteúdo for grande */
.modal-content-isa {
    max-height: 90vh;
    overflow-y: auto !important;
}







/* ===========================whatsapp modal============== */
/* Efeito de Reflexo e Escala para Botões */
.btn-checkout-isa, .btn-submit-whatsapp-isa {
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    z-index: 1;
}

.btn-checkout-isa::after, .btn-submit-whatsapp-isa::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease-in-out;
}

.btn-checkout-isa:hover::after, .btn-submit-whatsapp-isa:hover::after {
    left: 150%;
}

.btn-checkout-isa:active, .btn-submit-whatsapp-isa:active {
    transform: scale(0.94);
}

/* Estrutura do Modal */
.modal-overlay-isa {
    position: fixed !important;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.65);
    display: none; 
    align-items: center; justify-content: center;
    z-index: 9999999 !important;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay-isa.show-modal {
    display: flex;
    opacity: 1;
}

.modal-content-isa {
    background: #fff;
    width: 90%; max-width: 400px;
    padding: 30px;
    border-radius: 20px;
    position: relative;
}

