/* ==========================================================================
   1. RESET E ESTRUTURA GLOBAL (PREMIUM)
   ========================================================================== */
:root { 
    --primary-color: #0066FF; 
    --primary-dark: #0052cc; 
    --secondary-gradient: linear-gradient(135deg, #0066FF 0%, #5B8DEF 100%);
    --accent-gradient: linear-gradient(135deg, #FF3366 0%, #FF5B85 100%);
    --bg-color: #F8F9FA; 
    --text-dark: #1a1a1a; 
    --text-muted: #64748b;
    --card-shadow: 0 10px 30px -10px rgba(0,0,0,0.08);
    --hover-shadow: 0 20px 40px -10px rgba(0, 102, 255, 0.15);
    --tc-header-gutter: clamp(22px, 6vw, 96px);
}

* {
    box-sizing: border-box;
}

html { 
    height: auto; 
    min-height: 100%; 
    overflow-x: hidden; 
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh; /* 🔥 AJUSTE: Altura dinâmica para mobile (evita scroll desnecessário) */
    margin: 0;
    background-color: var(--bg-color);
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    position: relative;
    padding-top: 0;
    overflow-x: hidden; /* 🔥 CORREÇÃO: Garante que não haja barra de rolagem horizontal */
}

main, section, .content-area {
    flex: 0 0 auto; /* 🔥 AJUSTE: Conteúdo não força altura total */
    width: 100%;
    /* margin-top: 150px; */ /* Removido pois o header não é mais fixo */
}

/* 🔥 Reduz espaçamento inferior de todas as páginas */
main.mb-5, .mb-5 {
    margin-bottom: 2rem !important;
}

main.container-optimized {
    margin-bottom: 2rem !important;
}

.container-optimized { 
    max-width: 1320px; 
    margin: 0 auto; 
    padding: 0 24px;
}

/* 🔥 AJUSTE: Puxa o conteúdo de coleções/categorias mais para cima */
.page-title {
    margin-top: 0.5rem !important; /* Reduzido drasticamente */
    margin-bottom: 1.5rem !important;
    padding-top: 0 !important;
}

a { text-decoration: none; transition: all 0.3s ease; }

/* ==========================================================================
   2. HEADER E FOOTER
   ========================================================================== */
/* 🔥 CORREÇÃO: Header unificado, estático e com altura mínima para evitar 'pulo' */
#global-header {
    width: 100%;
    z-index: 1050;
    position: static; /* Garante que o header role com a página */
    background-color: #000000; /* 🔥 CORREÇÃO: Preto forte e fosco */
    min-height: 70px; /* 🔥 AJUSTE: Altura reduzida */
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* 🔥 CORREÇÃO: Estilos para o nome e slogan da loja no header */
.header-store-name-secondary {
    color: #FFFFFF; /* Garante que a segunda parte do nome seja branca */
}

.header-store-slogan {
    font-size: 0.75rem; color: #FFFFFF; font-weight: 500; 
    text-transform: uppercase; letter-spacing: 1px; opacity: 0.8;
    display: block; /* Garante que o slogan não herde estilos indesejados */
}

.tc-header-inner {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding-left: var(--tc-header-gutter);
    padding-right: var(--tc-header-gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    .tc-header-inner {
        padding-left: 18px;
        padding-right: 18px;
    }

    /* 🔥 AJUSTE MOBILE: Aproxima o logo do nome da loja. */
    .header-logo-link {
        gap: 12px !important;
    }

    /* 🔥 AJUSTE MOBILE: Coloca o nome da loja em duas linhas (Tech em cima, Center embaixo). */
    .header-store-name-wrapper {
        flex-direction: column;
        gap: 0 !important;
        line-height: 1.1; /* Aproxima as duas linhas do nome. */
    }

    .tc-header-inner a span:first-of-type {
        font-size: 1.3rem !important; /* Aumenta a fonte para melhor visibilidade. */
    }

    /* 🔥 CORREÇÃO: Garante que a segunda parte do nome ("Center") apareça e tenha o tamanho correto. */
    .header-store-name-secondary {
        font-size: 1.3rem !important; /* Aumenta a fonte para melhor visibilidade. */
    }

    /* Esconde o slogan no mobile para economizar espaço, usando um seletor específico. */
    .header-store-slogan {
        display: none !important;
    }

    .tc-header-inner a img {
        width: 40px !important;
        height: 40px !important;
    }
}

.cart-icon-container {
    will-change: transform;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.cart-icon-container i {
    transition: transform 0.2s ease;
}

.cart-icon-container:hover {
    transform: translateY(-4px) scale(1.05) !important;
    box-shadow: 0 15px 35px rgba(0, 102, 255, 0.3) !important;
}

.cart-icon-container:hover i {
    transform: rotate(-4deg) scale(1.02);
}

.cart-icon-container:active {
    transform: translateY(0) scale(0.99);
}

@media (hover: hover) {
    .cart-icon-container:hover {
        transform: translateY(-1px) scale(1.01);
    }
}

@media (min-width: 992px) {
    .cart-icon-container:hover {
        box-shadow: 0 10px 22px rgba(0, 102, 255, 0.14);
    }
    .cart-icon-container:hover i {
        transform: rotate(-2deg) scale(1.01);
    }
}

/* ==========================================================================
   HERO SECTION - TÍTULO (HOME)
   ========================================================================== */
.hero-title {
    display: flex;
    flex-direction: column; /* Empilha os spans verticalmente */
    /* Adicione um max-width se o título for muito longo e precisar de controle */
    /* max-width: 800px; */ /* Exemplo, ajuste conforme necessário */
}

/* 🔥 TÍTULO PRINCIPAL DA PÁGINA (FORA DO CARROSSEL) */
.main-hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.main-hero-title span {
    white-space: nowrap; /* Garante 2 linhas fixas */
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.5rem, 5vw, 4rem); /* AJUSTE: Fonte reduzida para caber na tela */
    font-weight: 900; /* 🔥 MAIS GROSSO (Black) */
    text-transform: uppercase;
    letter-spacing: -1.5px;
    line-height: 1.1;
    line-height: 1.3; /* 🔥 AJUSTE: Aumentado para evitar sobreposição de linhas */
    
    /* 🔥 ESTILO "BONITO" (Gradiente + Sombra) */
    background: linear-gradient(135deg, #0f172a 20%, #0066FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 5px 15px rgba(0, 102, 255, 0.15));
    padding-bottom: 5px; /* Evita cortar a sombra */
}

@media (min-width: 769px) { /* Aplica os deslocamentos apenas em telas maiores */
    /* 🔥 AJUSTE: Move a primeira linha ("Conectando você em") para a esquerda */
    .main-hero-title span:first-child {
        margin-left: -40px; /* Deslocamento visual */
    }

    /* 🔥 AJUSTE: Move a segunda linha ("Apenas um clique") um pouco para a esquerda */
    .main-hero-title span:last-child {
        margin-left: 0px;
    }
}
@media (max-width: 768px) { /* Ajusta para mobile */
    .main-hero-title span {
        font-size: clamp(2rem, 8vw, 4rem); /* Aumentado para mobile e melhor escalabilidade */
        letter-spacing: -1px; /* Ajuste para mobile */
    }
    .main-hero-title span:first-child,
    .main-hero-title span:last-child {
        margin-left: 0; /* Remove deslocamento visual para centralizar */
    }
}

.hero-title span {
    white-space: nowrap; /* Impede que o texto dentro de cada span quebre */
}

/* ==========================================================================
   CONTROLE DE VISIBILIDADE NO CARREGAMENTO
   ========================================================================== */

/* 🔥 CORREÇÃO DEFINITIVA: Removemos qualquer ocultação inicial. O botão aparece imediatamente. */
.btn-voltar-smart {
    /* opacity e visibility removidos para garantir exibição imediata */
}

body.page-ready .btn-voltar-smart {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   BOTÃO VOLTAR GLOBAL
   ========================================================================== */
/* 🔥 CORREÇÃO: Botão de voltar posicionado sobre o conteúdo, sem criar espaço vazio. */
/* 🔥 CORREÇÃO 2: O botão agora faz parte do fluxo normal da página, abaixo do header. */
.global-back-btn {
    width: 100%;
    padding: 0;           /* Remove padding extra */
    background-color: transparent !important; /* 🔥 CORREÇÃO: Fundo transparente (tira a barra preta) */
    position: absolute;   /* 🔥 CORREÇÃO: Flutuante (Livre) para não empurrar conteúdo */
    top: 80px;            /* Posiciona logo abaixo do header (mais pra cima) */
    left: 0;
    z-index: 990;         /* Acima do conteúdo, mas abaixo de modais */
    display: block !important; /* 🔥 FORÇADO: Garante que o elemento não seja escondido */
    margin-top: 0;
    pointer-events: none; /* 🔥 IMPORTANTE: Permite clicar no conteúdo atrás da área vazia do botão */
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem; /* 🔥 AJUSTE: Aumentado para melhor área clicável */
    background: rgba(255, 255, 255, 0.95); /* 🔥 VISUAL: Fundo branco para contraste */
    color: #1a1a1a;       /* Texto escuro */
    border: 1px solid #e2e8f0; /* 🔥 REMOVIDO borda preta */
    border-radius: 50px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-left: clamp(30px, 6vw, 96px); /* 🔥 Mais espaço lateral para melhor clique */
    pointer-events: auto; /* 🔥 IMPORTANTE: Garante que o botão seja clicável */
}

.back-btn:hover {
    background: #FFFFFF;
    color: #0066FF;       /* Azul Tech Center no hover */
    border-color: #0066FF;
    transform: translateX(-5px);
    box-shadow: 0 8px 20px rgba(0, 102, 255, 0.15);
}

.back-btn:active {
    transform: translateX(-3px) scale(0.98);
}

.back-arrow {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.back-btn:hover .back-arrow {
    transform: translateX(-3px);
}

.back-text {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* Mobile: Remove a seta, mantém apenas o texto */
@media (max-width: 768px) {
    .back-btn {
        padding: 0.5rem 1rem; /* 🔥 AJUSTE: Tamanho equilibrado */
        font-size: 0.85rem;
        margin-left: 15px;
        gap: 6px; /* 🔥 AJUSTE: Espaço entre ícone e texto */
        box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* 🔥 AJUSTE: Sombra mais bonita */
    }

    .back-arrow {
        display: inline-block; /* 🔥 AJUSTE: Mostra a seta novamente */
        color: var(--primary-color);
    }

    .back-text {
        font-size: 0.85rem;
    }

    .global-back-btn {
        display: none !important; /* 🔥 ESCONDE NO MOBILE (Apenas Desktop) */
    }
}

/* 🔥 MENU MOBILE: Força posição fixa absoluta - NÃO PODE ROLAR */
#mobile-menu-overlay,
#mobile-menu-sidebar {
    position: fixed !important;
    will-change: transform, opacity;
    margin: 0 !important;
    padding: 0 !important;
}

#mobile-menu-overlay {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important; /* Dynamic viewport para mobile */
    max-height: 100vh !important;
    overflow: hidden !important;
}

#mobile-menu-sidebar {
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    height: 100dvh !important; /* Dynamic viewport para mobile */
    max-height: 100vh !important;
    overflow: hidden !important;
}

/* 🔥 UNIFICAÇÃO: Estilo do botão de voltar "smart" usado em várias páginas */
.btn-voltar-smart {
    position: absolute;
    top: 100px;
    left: clamp(15px, 4vw, 30px);
    z-index: 1020;
    padding: 12px 24px; /* 🔥 AJUSTE: Mais encorpado e clicável */
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--text-dark);
    font-weight: 800; /* 🔥 AJUSTE: Fonte mais grossa */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12); /* 🔥 AJUSTE: Sombra mais bonita */
    border: 1px solid #e2e8f0; /* 🔥 REMOVIDO borda preta */
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    width: fit-content;
}

.btn-voltar-smart:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    background: white;
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.15);
}

@media (max-width: 768px) {
    .btn-voltar-smart {
        display: none !important; /* 🔥 ESCONDE NO MOBILE */
    }
}

#global-footer, footer {
    flex-shrink: 0;
    width: 100%;
    background-color: #000000 !important;
    position: relative;
    z-index: 10;
    color: white;
    margin-top: auto;
}

/* ==========================================================================
   3. ANIMAÇÕES GERAIS
   ========================================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card, .category-card, .animate-fade-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.text-gradient {
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-hover-scale:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 102, 255, 0.2);
}

/* ============================================
   4. CARDS DE PRODUTO (REESTILIZADOS)
   ============================================ */
.product-card {
    background: white;
    border-radius: 24px;
    padding: 1.2rem; /* 🔥 AUMENTADO: Mais respiro interno */
    border: 1px solid #e2e8f0; /* 🔥 REMOVIDO borda preta */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* 🔥 AJUSTE: Transição mais fluida */
    height: 100%;
    min-height: 380px; /* 🔥 FORÇA MÁXIMA: Altura aumentada para preencher o vazio */
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    z-index: 1;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -5px rgba(0, 60, 255, 0.25), 0 0 0 1px #0033cc; /* 🔥 AJUSTE: Glow e contorno mais fortes */
    border-color: #0033cc !important; /* 🔥 AJUSTE: Azul muito mais forte */
    z-index: 10;
}

.product-img-wrapper {
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    position: relative;
    background: transparent !important;
    border-radius: 18px;
    padding: 6px;
    border: none !important;
    overflow: hidden !important; /* 🔥 CRÍTICO: Força o clipping */
    transform: translateZ(0); /* 🔥 Cria novo contexto de empilhamento */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    isolation: isolate; /* 🔥 FIX: Garante contexto isolado para z-index */
    z-index: 1;
}

/* 🔥 EFEITO PAVIO (FUSE) NA BORDA DA IMAGEM */
.product-img-wrapper::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(from 0deg, transparent 0%, transparent 60%, #0066FF 100%); /* Rastro Azul */
    animation: spin-fuse-border 3s linear infinite;
    z-index: -2;
}

.product-img-wrapper::after {
    content: '';
    position: absolute;
    inset: 3px; /* Espessura da borda */
    background: radial-gradient(circle at center, #f8f9fa 0%, #fff 70%);
    border-radius: calc(18px - 3px); /* Ajuste do raio interno */
    z-index: -1;
}

@keyframes spin-fuse-border {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.product-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.05));
    transition: transform 0.5s ease;
    position: relative;
    z-index: 0; /* 🔥 FIX: Garante que a imagem fique dentro do efeito de borda */
}

.product-card:hover .product-img-wrapper img { 
    transform: scale(1.12) rotate(2deg);
}

.product-brand { 
    font-size: 0.7rem; 
    color: var(--primary-color); 
    background: rgba(0, 102, 255, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
    width: fit-content;
    text-transform: uppercase; 
    font-weight: 800; 
    letter-spacing: 0.5px; 
    margin-bottom: 8px; 
}

.product-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.15rem; /* 🔥 AUMENTADO: Título mais presente */
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3rem; /* 🔥 AUMENTADO */
}

/* 🔥 AVALIAÇÃO (ESTRELAS) */
.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.product-rating .stars { color: #FFD700; display: flex; gap: 1px; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1)); }
.product-rating .stars i { font-size: 0.85rem; }

.product-rating .rating-count {
    color: #94a3b8; font-size: 0.75rem; font-weight: 600; margin-left: 4px;
}

.price-section { margin-top: auto; padding-top: 10px; border-top: 1px dashed #f1f5f9; }

.price-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-end; 
}

.price-old {
    font-size: 1rem !important;
    color: #475569 !important;
    text-decoration: none !important; /* 🔥 AJUSTE: Removemos o padrão para animar */
    font-weight: 600 !important;
    margin-bottom: 4px !important;
    position: relative;
    display: inline-block;
}

/* 🔥 ANIMAÇÃO DE CORTE (STRIKETHROUGH) */
@keyframes strikeThrough {
    0% { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}

/* 🔥 ANIMAÇÃO DE "FALHA" NO PREÇO ANTIGO */
@keyframes oldPriceFail {
    to { opacity: 0.4; color: #cbd5e1; filter: grayscale(100%); }
}

/* 🔥 ANIMAÇÃO DE PISCAR SUAVE (PULSO) */
@keyframes priceBlinkSoft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 🔥 ANIMAÇÃO "FODA" DE APARIÇÃO DO PREÇO NOVO (POP ELÁSTICO) */
@keyframes priceRevealPop {
    0% { opacity: 0; transform: translateY(15px) scale(0.8); filter: blur(5px); }
    60% { opacity: 1; transform: translateY(-3px) scale(1.1); filter: blur(0); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.has-discount .price-old::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 2px;
    background-color: #000000; /* 🔥 AJUSTE: Linha preta */
    transform: scaleX(0);
    transform-origin: left;
    animation: strikeThrough 2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards 0.2s; /* 🔥 AJUSTE: Muito mais lenta */
}

.has-discount .price-old {
    animation: oldPriceFail 1s ease forwards 1.5s; /* 🔥 AJUSTE: Falha sincronizada com corte lento */
}

.price-current {
    font-size: 1.5rem !important; /* 🔥 AUMENTADO: Preço destaque */
    font-weight: 800 !important;
    color: var(--primary-color) !important; /* 🔥 VOLTEI PARA AZUL */
    letter-spacing: -0.5px !important;
    line-height: 1 !important;
}

.has-discount .price-current {
    opacity: 0; /* Começa invisível */
    animation: 
        priceRevealPop 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 1.8s; /* 🔥 AJUSTE: Apenas aparece, sem piscar */
}

.btn-bag {
    width: 46px !important; /* 🔥 AUMENTADO */
    height: 46px !important;
    border-radius: 50% !important;
    background: var(--primary-color) !important;
    color: white !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.25rem !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.2, 1) !important;
    z-index: 2 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
}

.btn-bag:hover {
    background: var(--primary-dark) !important;
    transform: scale(1.1) rotate(10deg) !important;
    box-shadow: 0 8px 20px rgba(0, 102, 255, 0.3) !important;
}

/* 🔥 BADGE DE DESCONTO % OFF - LIVRE, POSICIONADO NO CANTO INFERIOR DIREITO DA ÁREA DA IMAGEM */
.discount-badge-percent {
    position: absolute;
    bottom: 7rem; /* 🔥 REPOSICIONADO para nova altura */
    right: 1rem;
    background: linear-gradient(135deg, #ff1744 0%, #f50057 100%) !important;
    color: white !important;
    font-weight: 800 !important;
    font-size: 0.7rem !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
    display: inline-block !important;
    box-shadow: 0 4px 12px rgba(255, 23, 68, 0.4) !important;
    z-index: 10 !important;
    animation: discount-pulse 2s ease-in-out infinite !important;
    letter-spacing: 0.5px !important;
    pointer-events: none !important;
}

@keyframes discount-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 🔥 TEXTO DE DESCONTO ABAIXO DO TÍTULO */
.discount-below-title {
    background: #ff1744; /* Fundo Vermelho */
    color: white; /* Fonte Branca */
    font-weight: 800;
    font-size: 0.75rem;
    padding: 4px 10px; /* Espaçamento interno para criar a caixa */
    border-radius: 4px; /* Bordas levemente arredondadas (retângulo) */
    margin-bottom: 6px;
    display: inline-block; /* Comporta-se como uma caixa */
    box-shadow: 0 2px 5px rgba(255, 23, 68, 0.25); /* Sombra leve */
}

/* 🔥 ETIQUETA ECONOMIZE (Estilo Padrão) */
.economize-pill {
    font-size: 0.75rem;
    font-weight: 700;
    color: #15803d; /* Verde Escuro */
    background-color: #dcfce7; /* Verde Claro */
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 8px;
}

/* ============================================
   5. BADGES CORRIGIDOS (Estilo Moderno e Compacto)
   ============================================ */
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    right: auto;
    width: auto;
    max-width: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 20;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: white !important;
    transition: transform 0.25s ease, opacity 0.25s ease;
    animation: badge-slide-in-right 0.5s cubic-bezier(0.2, 0.9, 0.2, 1) 0.2s both;
}

/* 🔥 Animação do badge vindo da direita */
@keyframes badge-slide-in-right {
    from { opacity: 0; transform: translateX(20px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

/* 🔥 SPINNER CUSTOMIZADO - EFEITO PAVIO (FUSE) */
@keyframes spin-fuse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-border {
    display: inline-block !important;
    width: 25px !important;
    height: 25px !important;
    border-width: 2px !important;
    border-style: solid !important;
    /* Top (Cabeça), Right (Vazio), Bottom (Vazio), Left (Cauda) */
    border-color: #0066FF transparent transparent rgba(0, 102, 255, 0.25) !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;
    filter: drop-shadow(0 0 4px #0066FF) !important; /* 🔥 EFEITO: Brilho real no pavio */
    animation: spin-fuse 0.5s linear infinite !important;
    margin: 15px auto !important; /* Separado */
}

.badge-novo { background: linear-gradient(135deg, #0066FF 0%, #0052cc 100%); }
.badge-oferta { background: linear-gradient(135deg, #FF3366 0%, #FF5B85 100%); }
.badge-hot { background: linear-gradient(135deg, #FF9F43 0%, #FFC700 100%); }
.badge-premium { background: linear-gradient(135deg, #2D3436 0%, #000000 100%); }

/* SEÇÃO DE PRODUTOS RELACIONADOS */
.related-products-section {
    background: white;
    padding: 4rem 0;
    margin-top: 4rem;
    border-top: 1px solid #e2e8f0;
}

.related-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.related-title i {
    color: var(--primary-color);
    font-size: 2rem;
}

.container-optimized {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==========================================================================
   6. RESPONSIVO MOBILE
   ========================================================================== */
@media (max-width: 768px) {
    .container-optimized { 
        padding-left: 20px; 
        padding-right: 20px; 
    }
    
    .product-card {
        padding: 1.5rem;
        margin: 0 auto;
        max-width: 400px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.06);
        min-height: 420px; /* Altura mínima para mobile */
    }

    .product-img-wrapper {
        margin-bottom: 1.2rem;
        border-radius: 16px;
        padding: 10px; /* 🔥 Ajustado para manter o efeito do pavio consistente */
    }

    .product-img-wrapper::after {
        border-radius: calc(16px - 3px); /* Ajuste para mobile */
    }

    .product-name {
        font-size: 1.4rem; /* Aumentado de 1.25rem */
        min-height: auto;
        margin-bottom: 12px; /* Mais espaço */
    }

    .price-old {
        font-size: 1.1rem; /* Aumentado para mobile */
        margin-bottom: 6px;
    }

    .price-current { font-size: 2rem !important; } /* Aumentado de 1.7rem */
    .btn-bag { width: 54px !important; height: 54px !important; font-size: 1.4rem !important; } /* Maior em mobile */

    /* 🔥 AJUSTE CARRINHO MOBILE: Mais pra direita e pra baixo */
    .btn-bag {
        margin-right: -5px !important;
        transform: translateY(5px) !important;
    }

    .product-badge {
        top: 15px;
        left: 15px;
        font-size: 0.7rem;
    }

    .discount-badge-percent {
        font-size: 0.75rem !important; /* 🔥 MENOR */
        padding: 4px 10px !important;
        bottom: 11rem !important; /* 🔥 AJUSTE: Um pouco mais pra baixo (perto da marca) */
        right: 1.5rem !important;
    }
}

/* ==========================================================================
   7. SEÇÃO EQUIPE (HOME)
   ========================================================================== */

/* 🔥 ESTILO DOS TÍTULOS DA HOME (Nossas Categorias, Coleções Especiais) */
.section-title, 
.section-header h2,
.home-section-title,
h2.text-center { /* 🔥 AJUSTE: Seletor de fallback para garantir que pegue */
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important; /* 🔥 AJUSTE: Peso 700 (Bold) é mais seguro */
    color: #000000 !important;
    font-size: 2.5rem !important;
    letter-spacing: -1.5px !important; /* 🔥 AJUSTE: Mais fechado para estilo logo */
    line-height: 1.1 !important;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    text-align: center;
}

@media (max-width: 768px) {
    .section-title, .section-header h2, .home-section-title { font-size: 2rem !important; }
}

/* 🔥 CORREÇÃO: Alinha o título da seção "Nossa Equipe" à esquerda no desktop.
   A classe 'team-section-container' é adicionada via JS (home.js) para
   garantir que o seletor seja específico e não afete outras seções. */
.team-section-container .section-header,
.team-section-container .section-title {
    margin-bottom: 2.5rem; /* Mantém a margem inferior */
}

@media (min-width: 768px) {
    .team-section-container .section-header,
    .team-section-container .section-title {
        text-align: left !important;
    }
}

/* Animação de entrada para os cards da equipe */
@keyframes card-slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.team-card-wrapper {
    opacity: 0; /* Começa invisível */
    animation: card-slide-in-left 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Wrapper para o carrossel mobile */
.team-carousel-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
    margin: 0 auto;
}

/* Track do carrossel mobile */
.team-track-mobile {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Cada slide do carrossel mobile */
.team-slide {
    flex: 0 0 100%;
    padding: 0 1rem;
    box-sizing: border-box;
}

/* Card do membro da equipe (Estilo unificado) */
.team-member {
    background: white;
    border-radius: 24px;
    padding: 1.5rem;
    text-align: left;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    height: 100%;
    min-height: 320px; /* 🔥 CORREÇÃO: Altura mínima fixa para uniformizar cards */
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-member:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -5px rgba(0, 60, 255, 0.25), 0 0 0 1px #0033cc;
    border-color: #0033cc !important;
}

.team-member-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.25rem;
    border: 4px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.team-member:hover .team-member-photo {
    transform: scale(1.05);
}

.team-member-info {
    flex: 1; /* Ocupa o espaço vertical restante */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Alinha o conteúdo no topo */
    width: 100%;
}

.team-member-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: #0f172a;
    margin: 0 0 0.35rem 0;
    letter-spacing: 0;
    text-align: left; /* Ensure name is left-aligned */
    width: 100%; /* Ensure it takes full width to left-align */
}

.team-member-role {
    font-size: 0.75rem;
    color: var(--primary-color);
    background: rgba(0, 102, 255, 0.08);
    padding: 4px 12px;
    border-radius: 12px;
    display: inline-block;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 1rem 0;
    align-self: center;
}

.team-member-bio {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4; /* 🔥 CORREÇÃO: Limita bio a 4 linhas para uniformizar altura */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* No desktop, o wrapper não precisa esconder o overflow */
@media (min-width: 768px) {
    .team-carousel-wrapper {
        overflow: visible;
    }
}

/* 🔥 CORREÇÃO MOBILE: Cards da equipe com tamanho uniforme */
@media (max-width: 767px) {
    .team-member {
        min-height: 280px; /* Altura fixa menor para mobile */
        max-width: 100%;
        padding: 1.25rem;
    }

    .team-member-photo {
        width: 100px;
        height: 100px;
        margin-bottom: 1rem;
    }

    .team-member-name {
        font-size: 1.1rem;
    }

    .team-member-role {
        font-size: 0.7rem;
        padding: 4px 10px;
        margin-bottom: 0.75rem;
    }

    .team-member-bio {
        font-size: 0.85rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .team-slide {
        padding: 0 0.5rem;
    }
}

/* ==========================================================================
   8. PÁGINA DE PRODUTO (ESTILOS UNIFICADOS)
   ========================================================================== */
.produto-page-body {
    background:
        radial-gradient(1200px 800px at 18% 10%, rgba(0, 102, 255, 0.12) 0%, rgba(0, 102, 255, 0) 55%),
        radial-gradient(900px 600px at 85% 20%, rgba(34, 197, 94, 0.12) 0%, rgba(34, 197, 94, 0) 50%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    /* 🔥 AJUSTE: Layout Fullscreen Centralizado */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 🔥 AJUSTE: Header Absoluto para não ocupar espaço de fluxo */
.produto-page-body #global-header {
    position: absolute;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
}

/* 🔥 AJUSTE: Centraliza o conteúdo na tela */
.produto-page-body main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 0;
}

.produto-container {
  width: min(1180px, calc(100% - 24px)); /* 🔥 AJUSTE: Reduzido para 12px de margem lateral */
  margin: 0 auto;
  padding: 0 !important; /* 🔥 AJUSTE: Remove padding para centralizar */
  gap: 16px; /* 🔥 AJUSTE: Gap ainda mais reduzido entre as colunas */
  align-items: start;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.image-side,
.info-side {
  border-radius: 28px;
  /* border: 1px solid rgba(148, 163, 184, 0.25); */ /* 🔥 AJUSTE: Borda interna removida */
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.14);
}

.image-side {
  padding: 16px; /* 🔥 AJUSTE: Padding interno reduzido */
  overflow: hidden;
  position: relative;
}

.image-side .image-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  padding: 12px; /* 🔥 AJUSTE: Padding interno do wrapper reduzido */
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #e2e8f0; /* 🔥 REMOVIDO borda preta */
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.14);
  transition: transform 420ms ease, box-shadow 420ms ease;
}

.image-side #prod-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: translateZ(0);
  transition: transform 520ms ease, filter 520ms ease;
}

.image-side:hover .image-wrapper {
  transform: translateY(-6px);
  box-shadow: 0 26px 80px rgba(0, 102, 255, 0.18);
  border-color: var(--primary-color) !important;
}

.image-side:hover #prod-img {
  transform: scale(1.06);
  filter: drop-shadow(0 18px 40px rgba(2, 6, 23, 0.18));
}

.info-side {
  padding: 16px; /* 🔥 AJUSTE: Padding interno reduzido para 16px */
}

.info-content {
  max-width: 640px;
}

#prod-brand {
  font-size: 0.72rem;
  letter-spacing: 2.6px;
  opacity: 0.9;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary-color);
}

#prod-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.55rem, 2.4vw, 2.55rem);
  letter-spacing: -1.2px;
  margin-bottom: 10px; /* 🔥 AJUSTE: Margem inferior reduzida */
  font-weight: 900;
}

.info-side .price-section {
  margin-bottom: 12px; /* 🔥 AJUSTE: Margem inferior reduzida */
  border-top: none;
  padding-top: 0;
}

#prod-price-old {
  font-size: 1.05rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

#prod-price-new {
  font-size: clamp(2.1rem, 3.3vw, 3rem);
  letter-spacing: -1.8px;
  font-weight: 900;
  color: var(--primary-color);
}

#discount-badge {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

#prod-desc {
  font-size: 1.02rem;
  color: rgba(71, 85, 105, 0.98);
  line-height: 1.75;
  margin-bottom: 18px; /* 🔥 AJUSTE: Margem inferior reduzida */
}

.button-group {
  gap: 12px;
}

.btn-action {
  border-radius: 14px;
  padding: 10px 20px; /* Botões menores e mais delicados */
  font-size: 0.95rem;
  gap: 10px;
  will-change: transform;
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
  font-weight: 700;
}

.btn-action i {
  font-size: 1.05rem;
}

@media (max-width: 1024px) {
  .produto-container {
    grid-template-columns: 1fr;
    padding-top: 0; /* 🔥 AJUSTE: Remove padding superior em mobile */
  }
}

@media (max-width: 768px) {
  .produto-container {
    width: calc(100% - 16px); /* 🔥 AJUSTE: Reduzido para 8px de margem lateral em mobile */
    padding: 0; /* 🔥 AJUSTE: Remove padding em mobile */
  }

  .button-group {
    flex-direction: column;
  }

  .btn-action {
    width: 100%;
  }
}

/* ==========================================================================
   9. ESTILOS DE PRODUTO ESGOTADO (OVERLAY)
   ========================================================================== */
/* Cards de Listagem */
.product-card.esgotado {
    position: relative;
}

.product-card.esgotado .product-img-wrapper {
    filter: grayscale(100%);
    opacity: 0.6;
}

.product-card.esgotado::after {
    content: 'ESGOTADO';
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-10deg);
    background: rgba(220, 38, 38, 0.9); /* Vermelho Alerta */
    color: white;
    padding: 8px 20px;
    font-weight: 900;
    font-size: 1.2rem;
    border-radius: 8px;
    z-index: 20;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 2px solid white;
    pointer-events: none;
    letter-spacing: 2px;
}

/* Página de Detalhes */
.image-wrapper.esgotado-detail img {
    filter: grayscale(100%);
    opacity: 0.6;
}

.esgotado-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-10deg);
    background: rgba(220, 38, 38, 0.9);
    color: white;
    padding: 10px 30px;
    font-weight: 900;
    font-size: 1.5rem;
    border-radius: 8px;
    z-index: 20;
    border: 2px solid white;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* ==========================================================================
   10. BADGES DE CATEGORIA COM CORES (NOVO SISTEMA)
   ========================================================================== */
.categoria-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.categoria-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

/* Badge de categoria no card de produto */
.product-card .categoria-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    font-size: 0.7rem;
    padding: 4px 10px;
}

/* Badge de categoria na página de detalhes */
.produto-detalhes .categoria-badge {
    font-size: 0.875rem;
    padding: 8px 16px;
}

/* Estilos para diferentes seções com categorias */
.categoria-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 8px;
    margin-bottom: 8px;
}

/* Filtro de categoria ativo */
.filter-categoria.active {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Grid de filtros de categoria */
.categoria-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.categoria-filter-btn {
    padding: 10px 18px;
    border: 2px solid transparent;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.categoria-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.categoria-filter-btn.active {
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25), inset 0 2px 4px rgba(255,255,255,0.2);
}

/* Animação de entrada para badges */
@keyframes badge-pop {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.categoria-badge.animate {
    animation: badge-pop 0.3s ease-out;
}

/* ============================================
   BARRA DE BUSCA PREMIUM (REFEITA DO ZERO)
   ============================================ */
#searchInput {
    width: 100%;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    background: #ffffff;
    border: 2px solid #ffffff !important; /* 🔥 BORDA BRANCA PURA */
    border-radius: 50px !important;
    outline: none !important; /* 🔥 REMOVE outline nativo */
    box-shadow: none !important; /* 🔥 REMOVE sombras de conflito */
    transition: none !important; /* 🔥 REMOVE animações */
    appearance: none;
    -webkit-appearance: none;
}

#searchInput:hover {
    border: 2px solid #ffffff !important;
    box-shadow: none !important;
    transform: none !important; /* 🔥 REMOVE movimento para ficar estático */
    transition: none !important;
}

#searchInput:focus,
#searchInput:focus-visible {
    border: 2px solid #ffffff !important;
    background: #ffffff;
    box-shadow: none !important;
    -webkit-box-shadow: none !important; /* 🔥 Garante remoção no Chrome/Safari */
    transform: none !important; /* 🔥 REMOVE movimento ao clicar */
    outline: none !important; /* 🔥 GARANTE que não apareça contorno extra */
    outline-width: 0 !important;
    outline-color: transparent !important;
    transition: none !important;
}
