:root {
    --primary: #111111;
    --accent: #d4af37; /* Dourado Premium */
    --light: #e0e4e7;
    --dark: #1a1a1a;
    --gray: #6c757d;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
body { background-color: var(--light); color: #333; overflow-x: hidden; }

/* =========================================
   CABEÇALHO (HEADER)
   ========================================= */
header {
    background: var(--primary);
    color: #fff;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}
header .logo { font-size: 1.5rem; font-weight: bold; color: var(--accent); text-decoration: none; }

.header-nav { display: flex; gap: 15px; align-items: center; font-weight: 500; }
.header-nav a { color: #fff; text-decoration: none; transition: color 0.3s;}
.header-nav a:hover { color: var(--accent); }

.search-bar { display: flex; width: 40%; }
.search-bar input { width: 100%; padding: 8px 12px; border-radius: 4px 0 0 4px; border: none; outline: none; text-align: center; }
.search-bar button { padding: 8px 15px; background: var(--accent); border: none; border-radius: 0 4px 4px 0; cursor: pointer; color: #111; }

/* =========================================
   CARRINHO FLUTUANTE (DRAWER)
   ========================================= */
.cart-drawer {
    position: fixed; top: 0; right: -450px; width: 400px; max-width: 100%; height: 100vh;
    background: #fff; box-shadow: -5px 0 15px rgba(0,0,0,0.2); z-index: 2000;
    transition: right 0.4s ease; display: flex; flex-direction: column;
}
.cart-drawer.open { right: 0; }
.cart-header { padding: 20px; background: var(--primary); color: #fff; display: flex; justify-content: space-between; align-items: center; }
.cart-items { flex: 1; padding: 20px; overflow-y: auto; }
.cart-item { display: flex; gap: 10px; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px; align-items: center; }
.cart-item img { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; }
.cart-footer { padding: 20px; border-top: 1px solid #ddd; background: #f9f9f9; }
.btn-checkout { display: block; text-align: center; background: #25d366; color: #fff; padding: 12px; border-radius: 6px; text-decoration: none; font-weight: bold; }

.whatsapp-float { position: fixed; bottom: 20px; right: 20px; background-color: #25d366; color: #FFF; width: 60px; height: 60px; border-radius: 50px; text-align: center; font-size: 30px; box-shadow: 2px 2px 10px rgba(0,0,0,0.3); z-index: 1500; display: flex; align-items: center; justify-content: center; text-decoration: none; }

/* =========================================
   ESTRUTURA DA HOME E GRIDS
   ========================================= */
.container { padding: 40px 5%; max-width: 1400px; margin: 0 auto; }
.section-title { font-size: 1.8rem; margin-bottom: 20px; border-left: 4px solid var(--accent); padding-left: 10px; }

.swiper { width: 100%; }
.swiper-slide img { width: 100%; height: 400px; object-fit: cover; display: block; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 40px 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 40px 0; }

.promo-banner { display: block; width: 100%; border-radius: 8px; overflow: hidden; transition: transform 0.3s; }
.promo-banner:hover { transform: scale(1.02); }
.promo-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }

.full-banner { margin: 0; border-radius: 8px; overflow: hidden; display: block; }


/* Altura do Banner Horizontal (Desktop) */
.full-banner img { 
    width: 100%; 
    height: 400px; /* Deixa o banner bem mais alto e imponente no PC */
    object-fit: cover; 
    display: block; 
}

.video-box { background: #000; border-radius: 8px; overflow: hidden; aspect-ratio: 9/16; position: relative; }
.video-box iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.video-box img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* =========================================
   PRODUTOS
   ========================================= */
.product-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.05); transition: 0.3s; position: relative; display: flex; flex-direction: column;}
.product-card:hover { transform: translateY(-5px); }
.product-card > img { width: 100%; height: 280px; object-fit: cover; }
.product-info { padding: 15px; display: flex; flex-direction: column; flex: 1; justify-content: space-between; }
.product-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 5px; }
.product-price { font-size: 1.3rem; color: var(--primary); font-weight: bold; margin-bottom: 15px; }
.btn-add-cart { width: 100%; background: var(--primary); color: #fff; border: none; padding: 12px; border-radius: 4px; cursor: pointer; transition: 0.2s; font-weight: bold; font-size: 1rem; }
.btn-add-cart:hover { background: var(--accent); color: var(--primary); }

/* =========================================
   RODAPÉ (FOOTER)
   ========================================= */
.main-footer { background: #111; color: #fff; padding: 50px 5% 20px; margin-top: 60px; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-bottom: 40px; }
.footer-col h4 { color: var(--accent); margin-bottom: 15px; font-size: 1.1rem; }
.footer-col p { color: #ccc; margin-bottom: 10px; line-height: 1.6; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #ccc; text-decoration: none; transition: 0.3s; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom { text-align: center; border-top: 1px solid #333; padding-top: 20px; color: #888; }

/* =========================================
   RESPONSIVIDADE (Celulares e Tablets)
   ========================================= */
@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    header { flex-direction: column; gap: 15px; padding: 15px; }
    .search-bar { width: 100%; }
    .header-nav { width: 100%; justify-content: space-between; }
    .grid-2, .grid-3, .footer-grid { grid-template-columns: 1fr; }
    .swiper-slide img { height: 250px; }
    .cart-drawer { width: 100%; right: -100%; }
}

/* =========================================
   PÁGINA DE PRODUTOS (CATÁLOGO)
   ========================================= */

/* Abas de Categorias */
.category-tabs { display: flex; gap: 10px; justify-content: center; margin: 0px 0 30px; flex-wrap: nowrap; }
.category-tabs a { padding: 8px 20px; background: #fff; border: 2px solid #eee; border-radius: 30px; text-decoration: none; color: #333; font-weight: 500; transition: 0.3s; font-size: 0.95rem; }
.category-tabs a:hover, .category-tabs a.active { background: var(--primary); color: var(--accent); border-color: var(--primary); }

/* Grid de 4 Colunas para Desktop */
.products-grid-catalog { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 40px; }

/* Detalhes menores no Cartão */
.card-details { font-size: 0.8rem; color: #777; line-height: 1.4; margin-bottom: 5px; }

/* Botões de Paginação */
.pagination { display: flex; justify-content: center; gap: 20px; margin: 40px 0; align-items: center; font-weight: 500; }
.pagination a { padding: 10px 20px; background: var(--primary); color: #fff; text-decoration: none; border-radius: 6px; transition: 0.3s; }
.pagination a:hover { background: var(--accent); color: var(--primary); }
.pagination a.disabled { background: #ccc; color: #666; cursor: not-allowed; pointer-events: none; }

/* Ajustes Responsivos do Catálogo */
@media (max-width: 1024px) {
    .products-grid-catalog { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .products-grid-catalog { grid-template-columns: repeat(1, 1fr); gap: 15px; }
    .category-tabs a { padding: 6px 15px; font-size: 0.85rem; }
}

/* =========================================
   AJUSTES DO SLIDE (Textos Dinâmicos e Mobile)
   ========================================= */

/* Altura base para computador */
.swiper-slide img { width: 100%; height: 450px !important; object-fit: cover; display: block; }

/* Aplica o tamanho vindo do Banco de Dados */
.slide-title { font-size: var(--tamanho-fonte); }
.slide-subtitle { font-size: calc(var(--tamanho-fonte) * 0.45); margin-top: 5px; }

/* REGRAS PARA O CELULAR (Telas menores que 768px) */
@media (max-width: 768px) {
    /* Deixa o banner mais alto no celular para caber os textos confortavelmente */
    .swiper-slide img { height: 350px !important; } 
    
    /* Reduz as fontes automaticamente para não quebrar a tela */
    .slide-title { font-size: calc(var(--tamanho-fonte) * 0.6) !important; }
    .slide-subtitle { font-size: calc(var(--tamanho-fonte) * 0.35) !important; }
    
    /* Força o texto ir para o centro no celular (evita que textos alinhados à esquerda/direita saiam da tela) */
    .slide-text-overlay {
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%) !important;
        text-align: center !important;
        width: 95% !important;
    }
}

@media (max-width: 768px) {
    /* ... suas outras regras de celular ... */
    
    /* Mantém a proporção do banner horizontal perfeita no celular */
    .full-banner img { height: 200px; } 
}

