 /* =========================================
   ESTILOS GERAIS & UTILITÁRIOS
   ========================================= */

:root { 
    --color-primary: #EA1D2C; 
    --color-primary-dark: #b91c29; 
}

body { 
    background-color: #F3F4F6 !important;
    color: #334155; 
    -webkit-font-smoothing: antialiased;
    background-image: linear-gradient(180deg, color-mix(in srgb, var(--color-primary), transparent 100%) 0%, #F3F4F6 500px) !important;
    background-attachment: fixed;
}

/* Scrollbars Personalizadas */
.hide-scroll::-webkit-scrollbar { display: none; }
.hide-scroll { -ms-overflow-style: none; scrollbar-width: none; }

.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #f1f1f1; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 10px; }

/* Utilitários de Interface */
.chip-common { transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; user-select: none; }
.active-scale:active { transform: scale(0.95); }
.chip-disabled { opacity: 0.25; pointer-events: none; background: #f1f5f9; border-color: #e2e8f0; text-decoration: line-through; color: #94a3b8; }

/* =========================================
   COMPONENTES
   ========================================= */

/* Garante que o alerta fique acima de tudo, inclusive do carrinho */
.swal2-container {
    z-index: 99999999 !important;
}

/* Cards de Produto */
.product-card { 
    background: white; border-radius: 12px; overflow: hidden; transition: all 0.3s ease; border: 1px solid transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 10px 20px -5px rgba(0,0,0,0.1); border-color: var(--color-primary); }
.heart-active { fill: var(--color-primary); color: var(--color-primary); animation: heartBeat 0.4s forwards; }

/* Timer / Countdown */
.countdown-text {
    font-variant-numeric: tabular-nums;
    min-width: 80px;
    display: inline-block;
}
.timer-accent {
    background-color: #fdf2f0; 
    color: #d48377;
    border: 1px solid #f9e4e0;
    font-weight: 700;
}

/* Miniaturas */
.thumb-active { border-color: var(--color-primary); opacity: 1; }
.thumb-inactive { border-color: transparent; opacity: 0.6; }

/* Garante que o carrossel não corte verticalmente */
#heroGridContainer {
    display: flex;
    overflow-x: auto;
    overflow-y: visible; /* Garante que sombras ou partes altas não cortem */
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding-bottom: 10px; /* Respiro para não cortar a sombra do card */
}

.hero-card {
    scroll-snap-align: center; /* Centraliza melhor no mobile */
    flex: 0 0 90%; /* Deixa uma pontinha do próximo card aparecendo (estilo App) */
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Adicione esta regra para as imagens dentro do banner */
.hero-card img {
    width: 100%;
    /* Reduzimos o max-height para garantir o formato retangular */
    max-height: 180px; 
    /* 'cover' corta as bordas para preencher o retângulo, 
       'contain' mostra a imagem inteira com possíveis faixas vazias */
    object-fit: cover; 
    display: block;
    border-radius: 12px;
}


/* =========================================
   MODAIS & OVERLAYS
   ========================================= */

/* Modal Detalhes */
/* Garante que o modal de detalhes ganhe de qualquer outro elemento */
#modalDetails {
    z-index: 999999 !important;
    pointer-events: auto !important;
}

/* Garante que o conteúdo do iFood dentro do modal também seja clicável */
.animate-slide-up {
    pointer-events: auto !important;
}
.modal-close-btn { pointer-events: auto !important; z-index: 9999 !important; }

/* Modal Zoom */
#modalImageZoom {
    touch-action: pinch-zoom;
    user-select: none;
    -webkit-user-select: none;
    background-color: rgba(0, 0, 0, 0.95);
}
#zoomedImg {
    transition: opacity 0.2s ease-in-out;
    max-width: 100%; max-height: 100%; object-contain: contain;
}

/* Filtros */
#filterModalDrawer { z-index: 1000; }
#filterOverlay { z-index: 990; }


/* =========================================
   CORREÇÕES MODO ESCURO (Dark Mode)
   ========================================= */

@media (prefers-color-scheme: dark) {
    body { background-color: #F3F4F6 !important; color: #334155 !important; }
    
    .product-card, footer, #modalDetails .bg-white, #modalCart .bg-white, 
    #filterDrawer, #modalDelivery .bg-white {
        background-color: #FFFFFF !important; color: #334155 !important;
    }
    
    header.glass-header { background-color: var(--color-primary) !important; }
    img { filter: none !important; }
    input, select, textarea { background-color: #FFFFFF !important; color: #334155 !important; }
}

/* =========================================
   REFINAMENTO DE DESIGN - VITRINE ONLINE
   ========================================= */

/* 1. Grid de Produtos mais "App" */
#productsGrid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* Força 2 colunas no mobile */
    gap: 12px !important;
    padding: 12px !important;
}

/* 2. Card de Produto Premium */
.product-card {
    border-radius: 16px !important; /* Bordas mais suaves */
    border: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03) !important;
    display: flex;
    flex-direction: column;
}

/* Ajuste da Imagem do Card */
.product-card img {
    aspect-ratio: 1/1 !important; /* Foto sempre quadrada */
    object-fit: cover !important;
    border-bottom: 1px solid #f1f5f9;
}

/* 3. Tipografia e Preço */
.product-card .p-3 {
    padding: 10px !important;
}

.product-card h3 {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    margin-bottom: 6px !important;
    color: #1e293b !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.2rem; /* Mantém alinhamento mesmo com nomes curtos */
}

.product-card .text-lg {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: var(--color-primary) !important;
}


/* 5. Efeito de Skeleton Loading (Aquece o olhar enquanto carrega) */
@keyframes skeleton-pulse {
    0% { background-color: #f1f5f9; }
    50% { background-color: #e2e8f0; }
    100% { background-color: #f1f5f9; }
}

.loading-skeleton {
    animation: skeleton-pulse 1.5s infinite;
}

/* 6. Banner de Destaque (Hero) */
.hero-card {
    border-radius: 20px !important;
    margin: 10px !important;
    overflow: hidden;
}

/* Ajuste para o botão do Header não parecer "pesado" */
header.glass-header #headerFavBtn, 
header.glass-header button[onclick="openCartModal()"] {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

header.glass-header #headerFavBtn:hover {
    transform: translateY(-2px);
}

/* =========================================
   REFINAMENTO LOADER PREMIUM (CÍRCULO + RESPIRO)
   ========================================= */

#initialLoader {
    z-index: 99999;
    background-color: #ffffff;
}

/* 1. Contêiner da Logo (Agora Círculo Perfeito) */
#loaderStoreLogoCont {
    width: 100px;  /* Tamanho ideal para mobile */
    height: 100px;
    border-radius: 50%; /* Faz o círculo */
    border: 3px solid #f1f5f9; /* Borda fina de fundo */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    position: relative;
    margin-bottom: 32px; /* Aumenta o respiro para o texto abaixo */
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}

/* 2. O Spinner que gira ao redor do círculo */
#loaderStoreLogoCont::after {
    content: "";
    position: absolute;
    inset: -6px; /* Fica um pouco por fora da logo */
    border: 3px solid transparent;
    border-top-color: var(--color-primary); /* Cor da loja */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 3. A Imagem da Logo circular */
#loaderStoreLogo {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Não distorce */
    border-radius: 50%; /* Garante que a imagem siga o círculo */
}

/* 4. Barra de Progresso e Texto com mais respiro */
#loaderProgressBarCont {
    width: 140px;
    height: 4px;
    background-color: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 12px;
}

#initialLoader p {
    color: #94a3b8;
    letter-spacing: 2px;
    font-size: 10px;
    font-weight: 800;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================================
   BOTTOM NAVIGATION BAR - ESTILO APP NATIVO
   ========================================= */
.mobile-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999;
    padding-bottom: env(safe-area-inset-bottom); /* Suporte para iPhone moderno */
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    gap: 4px;
    flex: 1;
    transition: all 0.3s ease;
}

.nav-item i { width: 22px; height: 22px; }
.nav-item span { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.nav-item.active { color: var(--color-primary); }

/* Botão Central de Destaque (Carrinho) */
.nav-item-main {
    position: relative;
    top: -15px; /* Eleva o botão do carrinho */
}

.main-cart-circle {
    width: 56px;
    height: 56px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid #F3F4F6; /* Cor do fundo do body para dar efeito de recorte */
}

/* Badges de Contagem */
.badge-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--color-primary);
    color: white;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.badge-count-main {
    position: absolute;
    top: 0;
    right: 0;
    background: #334155;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid var(--color-primary);
}

/* Ajuste no Body para o conteúdo não ficar escondido atrás da barra */
body {
    padding-bottom: 80px !important;
}

/* Faz os badges aparecerem quando o valor for > 0 */
#cartBadgeBottom:not(:empty), 
#favBadgeBottom:not(:empty):not(:contains('0')) {
    transform: scale(1) !important;
}

/* Garante que o conteúdo da página não suma atrás da barra */
body {
    padding-bottom: 80px !important;
}

/* Estilo para quando o item estiver ativo (ex: Início) */
.nav-active {
    color: var(--color-primary) !important;
}

/* =========================================
   HEADER & BUSCA EXPANSÍVEL (NOVO)
   ========================================= */
header {
    background: #ffffff !important;
    transition: all 0.3s ease;
}

/* Animação para a barra de busca descer suavemente */
#expandableSearch {
    transition: all 0.3s ease-in-out;
}

.animate-reveal-down {
    animation: revealDown 0.3s ease-out;
}

@keyframes revealDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* BOTTOM NAVIGATION - ESTILO FLAT (SEM DESTAQUE CENTRAL) */
#mainNavBottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around; /* Distribui os 5 ícones igualmente */
    align-items: center;
    border-top: 1px solid #e2e8f0;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom); /* Suporte para iPhone moderno */
}

.nav-btn-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    color: #94a3b8;
    transition: all 0.2s;
   cursor: pointer; /* Garante o cursor de clique */
    pointer-events: auto; /* Garante que aceite eventos de toque/clique */
}

.nav-btn-item i {
    width: 22px; /* Diminuímos um pouco para caber os 5 sem apertar */
    height: 22px;
}

.nav-btn-item span {
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.nav-btn-item.active, .nav-btn-item:active {
    color: var(--color-primary);
}

/* Badge dos contadores */
.badge-nav {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--color-primary);
    color: white;
    font-size: 9px;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    items-center: center;
    justify-content: center;
    border: 2px solid white;
}

.badge-nav.hidden {
    display: none;
}

/* Classe para mostrar o badge quando houver itens */
.badge-visible {
    transform: scale(1) !important;
}


/* Reset Final de Espaçamento */
body {
    padding-bottom: 75px !important;
}

/* Esconde a barra enquanto o loader estiver na tela */
#initialLoader:not(.hidden) ~ #mainNavBottom {
    display: none !important;
}

/* Garante que modais fiquem ACIMA da barra */
#modalDetails, #modalCart, #filterModal {
    z-index: 100001 !important; /* Um número maior que o 99999 da barra */
}

/* Garante que o Header colorido tenha sombra e contraste */
header {
    background-color: var(--color-primary) !important;
}

/* Barra de Categorias - FIXA E SEM VAZAMENTO */
#categoryContainer {
    background-color: #F3F4F6 !important; /* Mesma cor do fundo do body para camuflar */
    padding-top: 10px;
    padding-bottom: 10px;
    position: sticky; 
    top: 60px; /* Ajuste esse valor para a altura exata do seu Header */
    z-index: 50; /* Garante que fique acima dos produtos, mas abaixo de modais */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Chips de Categoria - Destaque discreto */
.category-chip {
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
}

.category-chip.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Barra de Status (Loja Fechada) - Quando o header é vermelho, o banner precisa ser diferente */
#statusBanner {
    background-color: #1e293b !important; /* Azul bem escuro ou preto para destacar do vermelho */
    color: white;
}

/* =========================================
   DISCOVERY FEED - UI REELS (SHOPEE LIKE)
   ========================================= */

/* Força snap scrolling vertical */
#reelsContainer {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Scroll suave no iOS */
}

/* O Item do Feed (Ocupa a tela inteira) */
.reel-item {
    height: 100vh; /* Altura total da viewport */
    height: 100dvh; /* Altura dinâmica (lida com barras de navegação mobile) */
    width: 100%;
    snap-align: start; /* Trava o scroll aqui */
    snap-stop: always; /* Força parar em cada item */
    position: relative;
    overflow: hidden;
    background-color: #000;
}

/* A Mídia (Imersiva de fundo) */
.reel-media-cont {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.reel-media-cont img, .reel-media-cont video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Preenche a tela mantendo a proporção */
    object-position: center; /* Centraliza o conteúdo */
}

/* Camada de Gradiente (Sombra embaixo para ler o texto) */
.reel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 40%, transparent 70%);
    z-index: 2;
    pointer-events: none; /* Deixa cliques passarem para a mídia */
}

/* =========================================
   CAMADA DE ENGAJAMENTO (FLUTUANTE NO TOPO)
   ========================================= */

/* 1. Botões Laterais Direitos (Gostei, Compartilhar, Views) */
.reel-actions-sidebar {
    position: absolute;
    right: 12px;
    bottom: 160px; /* Posicionado acima do card do produto */
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px; /* Espaço entre os botões */
}

.action-btn-cont {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px; /* Espaço entre ícone e texto */
    color: white;
    text-align: center;
}

/* Estilo dos ícones circulares da Shopee */
.action-btn-cont button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    items-center: center;
    justify-content: center;
    color: white;
    transition: all 0.2s ease;
}

.action-btn-cont button:active { transform: scale(0.9); background-color: rgba(255, 255, 255, 0.2); }

/* Ícone de favorito ativo (Coração Vermelho) */
.action-btn-cont button.is-fav {
    background-color: #fff !important; /* Fundo branco para destacar o coração vermelho */
}

.action-btn-cont button.is-fav i {
    fill: #EA1D2C !important;
    color: #EA1D2C !important;
    stroke: #EA1D2C !important;
}

.action-btn-cont span {
    font-size: 10px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5); /* Sombra para ler no branco */
    max-width: 60px;
}

/* 2. Informações do Produto (Texto embaixo na esquerda) */
.reel-text-info {
    position: absolute;
    left: 16px;
    bottom: 110px; /* Posicionado acima do card */
    z-index: 10;
    color: white;
    max-width: 75%; /* Não encostar nos botões da direita */
}

/* =========================================
   3. CARD DO PRODUTO (FLUTUANTE EMBAIXO - IGUAL REFERÊNCIA)
   ========================================= */
.reel-product-card {
    position: absolute;
    bottom: 20px;
    left: 16px;
    right: 16px;
    z-index: 10;
    background-color: #fff;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.reel-product-card:active { transform: scale(0.98); }

.reel-prod-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #f1f5f9;
}

.reel-prod-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.reel-prod-name {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    margin-bottom: 4px;
}

.reel-prod-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.reel-prod-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--color-primary);
}

.reel-prod-old-price {
    font-size: 11px;
    color: #94a3b8;
    text-decoration: line-through;
}

#reelsContainer {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: 100vh;
}

.reel-item {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* Esconder barra de scroll */
.hide-scroll::-webkit-scrollbar {
    display: none;
}
.hide-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Garante que o feed cubra o Header e outros modais */
#discoveryFeed {
    position: fixed !important;
    inset: 0 !important;
    z-index: 200000 !important;
    background-color: #000;
}

/* Força a imagem a preencher o fundo sem sobrar espaços pretos */
.reel-media-cont img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Estilo do coração ativo no feed */
.action-btn-cont button.is-fav {
    background-color: white !important;
}
.action-btn-cont button.is-fav i {
    color: #EA1D2C !important;
    fill: #EA1D2C !important;
}

/* Força o container a aceitar o scroll dos itens */
#reelsContainer {
    display: block !important;
    height: 100dvh !important;
    overflow-y: scroll !important;
    scroll-snap-type: y mandatory !important;
}

/* Garante que cada item do feed seja visível */
.reel-item {
    display: flex !important;
    flex-direction: column;
    justify-content: flex-end;
    background-color: #000;
}

/* Garante que as imagens não fiquem escondidas */
.reel-media-cont, .reel-media-cont img {
    display: block !important;
    opacity: 1 !important;
}

/* Estilo para garantir que os botões laterais apareçam sobre a imagem */
.reel-actions-sidebar {
    z-index: 20 !important;
}

/* Definição da animação de zoom lento */
@keyframes zoomEffect {
    0% { transform: scale(1.3); }
    100% { transform: scale(1.0); }
}

/* Classe base da imagem para cobrir tudo e ter o estado inicial */
.zoom-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transform: scale(1.3); /* Começa ampliada */
    will-change: transform;
}

/* Garante que o feed ocupe a tela toda e tenha scroll de 'trava' (snap) */
#reelsContainer {
    display: block !important;
    height: 100dvh !important;
    overflow-y: scroll !important;
    scroll-snap-type: y mandatory !important;
    scroll-behavior: smooth;
    background: #000;
}
/* Garante que o container de vídeos/fotos tenha scroll suave */
#reelsContainer {
    height: 100dvh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}


/* =========================================
   PROVADOR - INTERFACE FLUTUANTE ATUALIZADA
   ========================================= */

#provadorFullscreen {
    height: 100dvh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #ffffff;
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Camada de Peças (Fundo) */
.peças-container {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 1;
    /* Ajustado para aproximar os decks verticalmente */
    gap: 0px; 
}

/* DECKS - Configuração de Carrossel Slide */
#deckTop, #deckBot {
    height: 42dvh; 
    display: flex;
    align-items: center;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

#deckTop::-webkit-scrollbar, 
#deckBot::-webkit-scrollbar {
    display: none;
}

/* CARD DA PEÇA - APROXIMADO */
.p-card {
    /* Aumentado para 92vw para que as imagens fiquem quase coladas */
    flex: 0 0 92vw; 
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: center;
    transition: all 0.4s ease;
    position: relative;
    /* Remove margens extras */
    margin: 0; 
}

.p-card img {
    max-height: 95%; /* Imagem um pouco maior */
    max-width: 95%;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.08));
}

/* Peças laterais agora ficam bem encostadas na central */
.p-card:not(.active-piece) {
    opacity: 0.5;
    transform: scale(0.9);
}

/* Zoom na peça ativa */
.active-piece img {
    transform: scale(1.05);
    filter: drop-shadow(0 10px 25px rgba(0,0,0,0.15));
}

/* Header Flutuante - AJUSTADO PARA CLIQUE */
#provHeader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999999 !important; /* Maior que o container pai */
    padding: 20px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.95) 0%, transparent 100%);
    pointer-events: none; /* Mantém para o scroll passar por trás */
}

/* Garante que os botões dentro do Header SEJAM clicáveis */
#provHeader button, 
#provHeader select { 
    pointer-events: auto !important; 
    position: relative;
    z-index: 10;
}

/* Botão de Fechar específico */
#btnCloseProvador {
    cursor: pointer !important;
    touch-action: manipulation;
}

/* Footer Flutuante */
#provFooter {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(255,255,255,1) 40%, transparent 100%);
}

#btnFinalizarLook {
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: transform 0.2s ease;
}

#btnFinalizarLook:active {
    transform: scale(0.96);
}

.ui-element {
    transition: transform 0.4s ease, opacity 0.4s ease;
}
.ui-hidden {
    transform: translateY(-100%);
    opacity: 0;
}
.ui-hidden-bottom {
    transform: translateY(100%);
    opacity: 0;
}

#provadorFullscreen {
    z-index: 9999999 !important; /* Um número absurdo para ganhar de tudo */
}

#provHeader {
    pointer-events: none; /* Deixa o toque passar para as roupas no fundo */
}

#provHeader button, 
#provHeader select {
    pointer-events: auto !important; /* Mas os botões e selects funcionam */
}

@keyframes slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.animate-slide-up {
    animation: slide-up 0.3s ease-out;
}

/* Garante que o container de restaurante não tenha padding excessivo nas laterais */
body[data-theme="restaurante"] #catalogContainer {
    padding-left: 0;
    padding-right: 0;
}

body[data-theme="restaurante"] .product-card-restaurante {
    border-bottom: 1px solid #f1f5f9;
}

/* js/styles.css */

#cartDrawer {
    z-index: 999999; /* Fica acima de tudo */
    pointer-events: auto !important;
}

/* Container onde ficam os itens na sacola */
#cartList {
    flex: 1;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch; /* Suavidade no iPhone */
    padding-bottom: 100px; /* Espaço para o botão de finalizar não cobrir o último item */
}

/* Garante que o body não fique preso se o modal bugar */
body.modal-open {
    overflow: hidden !important;
}
