/* Design System & Variáveis */
:root {
    /* Cores Primárias - Temática Hospitalar (Azul Galileo) */
    --primary-blue: #1D70B8;
    /* Azul Galileo (Logo e base) */
    --secondary-blue: #00B14F;
    /* Verde Galileo (Detalhes da logo) */
    --light-blue: #EAF4FA;
    /* Fundo muito claro */
    --header-blue: #FFFFFF;
    /* Header branco para destacar a logo */

    /* Cores de Feedback/Destaque */
    --success-green: #00B14F;
    /* Verde Galileo para frete grátis/descontos */
    --accent-yellow: #F4A81E;
    /* Laranja Galileo para ofertas/estrelas */

    /* Cores Neutras */
    --bg-color: #EBECEF;
    /* Fundo clássico de e-commerce */
    --surface-color: #FFFFFF;
    /* Fundo dos cards */
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #E5E5E5;

    /* Sombras e Transições */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

/* Reset Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header Principal */
.main-header {
    background-color: var(--header-blue);
    padding-top: 12px;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tamanho da Logo Oficial em Imagem Atualizado */
.logo-img {
    height: 75px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    /* Força o alinhamento central vertical */
    height: 100%;
}

.logo:hover .logo-img {
    transform: scale(1.05);
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-text {
    color: var(--primary-blue);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1;
}

.logo-subtext {
    color: var(--text-muted);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.search-bar {
    flex: 1;
    max-width: 600px;
    display: flex;
    background: #FFFFFF;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    height: 40px;
}

.search-bar input {
    flex: 1;
    border: none;
    padding: 0 15px;
    font-size: 1rem;
    outline: none;
    color: var(--text-main);
}

.search-btn {
    background: none;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    border-left: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.search-btn:hover {
    background-color: #f5f5f5;
    color: var(--secondary-blue);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-link {
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
}

.action-link:hover {
    color: var(--secondary-blue);
}

.cart-badge {
    background-color: var(--accent-yellow);
    color: var(--text-main);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    position: absolute;
    top: -8px;
    right: -10px;
}

/* Navegação Inferior */
.nav-bar {
    background-color: var(--primary-blue);
    margin-top: 12px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 25px;
    height: 40px;
    align-items: center;
}

.nav-item {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-item:hover {
    color: #FFFFFF;
}

.text-highlight {
    color: var(--accent-yellow);
    font-weight: 600;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px 20px;
}

/* Hero Banner */
.hero-banner {
    margin-top: 30px;
    background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--primary-blue) 100%);
    border-radius: 8px;
    padding: 60px 40px;
    color: #FFFFFF;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.hero-banner.has-video {
    padding: 120px 40px;
    display: flex;
    align-items: center;
    min-height: 500px;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 0;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    /* Totalmente invisível */
    z-index: 1;
}

.sound-toggle {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    transition: var(--transition);
}

.sound-toggle:hover {
    background: rgba(255, 255, 255, 0.4);
}

.banner-content {
    position: relative;
    z-index: 1;
    max-width: 60%;
}

.banner-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.banner-content p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.btn-primary {
    display: inline-block;
    background-color: var(--accent-yellow);
    color: var(--header-blue);
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: #ffca2c;
    transform: translateY(-2px);
}

/* Formas de Pagamento */
.payment-methods {
    display: flex;
    background-color: var(--primary-blue);
    border-radius: 8px;
    margin-top: 30px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    justify-content: space-between;
}

.payment-card {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    padding: 0 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.payment-card:last-child {
    border-right: none;
}

.payment-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-yellow);
}

.payment-info h4 {
    font-size: 1rem;
    font-weight: 500;
    color: #FFFFFF;
}

.payment-info p {
    font-size: 0.85rem;
    color: var(--light-blue);
    margin-top: 4px;
}

/* Grid de Produtos */
.products-section {
    margin-top: 50px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* Product Card */
.product-card {
    background: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    border-bottom: 1px solid #f0f0f0;
}

.product-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
}

.product-details {
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
    background-color: var(--primary-blue);
}

.product-details .product-price,
.product-details .product-title,
.product-details .product-installments {
    color: #FFFFFF;
}

.product-details .free-shipping {
    color: var(--accent-yellow);
}


.product-price {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-main);
    margin-bottom: 5px;
}

.product-installments {
    font-size: 0.85rem;
    color: var(--success-green);
    margin-bottom: 8px;
}

.free-shipping {
    font-size: 0.8rem;
    color: var(--success-green);
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-title {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.4;
    font-weight: 400;
    transition: var(--transition);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card:hover .product-title {
    color: var(--accent-yellow);
}

.btn-add-cart {
    margin-top: auto;
    width: 100%;
    padding: 12px;
    background-color: var(--accent-yellow);
    color: var(--primary-blue);
    border: none;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add-cart:hover {
    background-color: #ffca2c;
    transform: translateY(-2px);
}

/* Footer */
.main-footer {
    background-color: #FFFFFF;
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 20px;
}

.footer-column a {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 10px;
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--secondary-blue);
}

.footer-bottom {
    background-color: #f5f5f5;
    padding: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsividade */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }

    .logo-img {
        height: 55px;
        /* Tamanho ajustado para não quebrar no celular */
    }

    .search-bar {
        order: 3;
        max-width: 100%;
        margin-top: 10px;
    }

    .nav-container {
        overflow-x: auto;
        white-space: nowrap;
    }

    .payment-methods {
        flex-direction: column;
        gap: 20px;
    }

    .payment-card {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 20px;
    }

    .payment-card:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .banner-content {
        max-width: 100%;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
}

.compact-footer {
    padding-top: 30px !important;
}

.compact-footer .centered-container {
    display: flex;
    justify-content: center;
    width: 100%;
    padding-bottom: 20px;
}

.compact-footer .align-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.compact-footer .footer-links-row {
    display: flex;
    flex-direction: row;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.compact-footer .footer-links-row a {
    margin: 0 !important;
}

/* =========================================
   BOTÃO FLUTUANTE DO WHATSAPP
   ========================================= */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: all 0.3s ease;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    animation: none;
}

@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
}
/* =========================================
   BOTÕES DO CARD DE PRODUTO
   ========================================= */
.product-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* O SEGREDO DO ALINHAMENTO ESTÁ NESTA LINHA ABAIXO */
    margin-top: auto; 
    padding-top: 15px;
}

/* Botão Principal: Comprar Agora (Verde para conversão) */
.btn-buy-now {
    background-color: var(--success-green); 
    color: #FFFFFF;
    border: none;
    padding: 10px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.btn-buy-now:hover {
    background-color: #009040; /* Verde um pouco mais escuro ao passar o mouse */
    transform: translateY(-2px);
}

/* Botão Secundário: Adicionar ao Carrinho (Amarelo) */
.btn-add-cart {
    background-color: var(--accent-yellow);
    color: var(--text-main);
    border: none;
    padding: 10px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.btn-add-cart:hover {
    background-color: #e09612;
    transform: translateY(-2px);
}

/* =========================================
   MODAL DE AUTENTICAÇÃO
   ========================================= */
.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: 9999;
}

.modal-content {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: var(--shadow-md);
}

.btn-close-modal {
    position: absolute;
    top: 15px; right: 15px;
    background: none; border: none;
    cursor: pointer; color: var(--text-muted);
}

.modal-content h2 {
    color: var(--primary-blue);
    margin-bottom: 20px;
    text-align: center;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
}

.btn-auth {
    width: 100%;
    padding: 12px;
    background-color: var(--success-green);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.btn-auth:hover { background-color: #009040; }

.auth-switch {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--primary-blue);
    font-weight: 600;
}