:root { --primary-color: #f37021; --primary-hover: #d85d15; --text-main: #333; --bg-body: #fdfdfd; --card-bg: #ffffff; --whatsapp-color: #25D366; }
* { box-sizing: border-box; font-family: 'Poppins', sans-serif; }
body { margin: 0; padding: 0; background-color: var(--bg-body); color: var(--text-main); padding-bottom: 90px; scroll-behavior: smooth; overflow-x: hidden; }

/* CABEÇALHO E LOGO - RESOLVIDO O BUG DE ZOOM/CORTE */
header { background-color: var(--primary-color); padding: 15px 0; line-height: 0; box-shadow: 0 4px 10px rgba(0,0,0,0.1); text-align: center; }
.header-banner-img { width: 100%; height: auto; max-height: 140px; object-fit: contain; display: block; margin: 0 auto; padding: 0 15px;}

/* BARRA DE BUSCA E BOTÃO MOBILE */
.search-section { background: white; padding: 20px 15px; border-bottom: 1px solid #f0f0f0; text-align: center; }
.search-flex-container { display: flex; gap: 10px; align-items: center; justify-content: center; max-width: 600px; margin: 0 auto; width: 100%; }

.hamburger-btn { background: var(--primary-color); border: none; color: white; width: 45px; height: 45px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; box-shadow: 0 4px 10px rgba(243, 112, 33, 0.2); }
.search-input { flex: 1; padding: 12px 20px; border: 2px solid #eee; border-radius: 50px; font-size: 0.95rem; outline: none; transition: 0.3s; background-color: #f9f9f9; width: 100%; }
.search-input:focus { border-color: var(--primary-color); background-color: white; box-shadow: 0 4px 12px rgba(243, 112, 33, 0.1); }

.controls-wrapper { display: flex; flex-direction: column; align-items: center; gap: 15px; margin-top: 15px; }
.sort-select { padding: 10px 20px; border-radius: 30px; border: 1px solid #ddd; background: #fff; font-size: 0.9rem; color: #555; outline: none; cursor: pointer; }
.sort-select:hover { border-color: var(--primary-color); color: var(--primary-color); }

/* GAVETA MOBILE (APP STYLE) */
.mobile-drawer-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 2999; backdrop-filter: blur(3px); }
.mobile-drawer { position: fixed; top: 0; left: -320px; width: 280px; height: 100%; background: white; z-index: 3000; transition: 0.3s ease; box-shadow: 5px 0 20px rgba(0,0,0,0.3); overflow-y: auto; display: flex; flex-direction: column; }
.mobile-drawer.open { left: 0; }

.drawer-header { display: flex; justify-content: space-between; padding: 25px 20px; border-bottom: 1px solid #eee; align-items: center; background: var(--primary-color); color: white; }
.drawer-header h3 { margin: 0; font-size: 1.1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;}
.drawer-header button { background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; font-weight: bold; }

.drawer-menu { list-style: none; padding: 0; margin: 0; }
.drawer-menu li { border-bottom: 1px solid #f0f0f0; }
.drawer-menu a { display: block; padding: 16px 20px; color: #333; text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: 0.2s; }
.drawer-menu a.active { color: var(--primary-color); background: rgba(243, 112, 33, 0.05); border-left: 4px solid var(--primary-color); padding-left: 16px;}

.drawer-btn-toggle { background: transparent; border: none; color: #888; padding: 15px 20px; font-size: 1rem; cursor: pointer; }
.drawer-submenu { display: none; background: #fafafa; border-top: 1px solid #eee; }
.drawer-submenu.open { display: block; }
.drawer-submenu a { padding: 14px 20px 14px 40px; font-size: 0.9rem; font-weight: 400; color: #555; }
.drawer-submenu a::before { content: "• "; color: var(--primary-color); margin-right: 5px; }

/* MEGA MENU DE CATEGORIAS (DESKTOP) */
.main-nav { background-color: #111; border-bottom: 3px solid var(--primary-color); position: relative; z-index: 500; }
.nav-container { max-width: 1200px; margin: 0 auto; }
.nav-menu { display: flex; list-style: none; margin: 0; padding: 0; justify-content: center; flex-wrap: wrap; }
.nav-item { position: relative; }
.nav-item > a { display: block; padding: 16px 22px; color: white; text-decoration: none; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; transition: background-color 0.3s, color 0.3s; letter-spacing: 0.5px; }
.nav-item > a:hover, .nav-item > a.active { background-color: var(--primary-color); color: white; }

.mega-menu { position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(15px); background: white; min-width: 250px; box-shadow: 0 15px 35px rgba(0,0,0,0.2); border-radius: 0 0 12px 12px; opacity: 0; visibility: hidden; transition: all 0.3s ease; border-top: 4px solid var(--primary-color); padding: 25px; pointer-events: none; }
.nav-item.has-dropdown:hover .mega-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); pointer-events: auto; }

.mega-menu-content { display: flex; gap: 30px; }
.mega-menu-column h3 { font-size: 0.95rem; color: #111; margin: 0 0 15px 0; border-bottom: 2px solid #eee; padding-bottom: 10px; cursor: pointer; transition: 0.2s; text-transform: uppercase; }
.mega-menu-column h3:hover { color: var(--primary-color); }
.mega-menu-column ul { list-style: none; padding: 0; margin: 0; }
.mega-menu-column ul li { margin-bottom: 10px; }
.mega-menu-column ul li a { color: #666; text-decoration: none; font-size: 0.9rem; transition: 0.2s ease; display: inline-block; }
.mega-menu-column ul li a:hover, .mega-menu-column ul li a.active { color: var(--primary-color); transform: translateX(5px); font-weight: 600; }

/* REGRAS RÍGIDAS DE RESPONSIVIDADE */
@media (max-width: 768px) { 
    .desktop-only { display: none !important; } 
}

@media (min-width: 769px) {
    .hamburger-btn { display: none !important; }
    .mobile-drawer-overlay, .mobile-drawer { display: none !important; }
}

/* PRODUTOS E MODAIS (GERAL) */
.container { max-width: 1200px; margin: 0 auto; padding: 20px 15px; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.product-card { background: var(--card-bg); border-radius: 12px; cursor: pointer; transition: transform 0.3s, box-shadow 0.3s; position: relative; border: 1px solid #eee; overflow: hidden; display: flex; flex-direction: column;}
.product-card:hover { transform: translateY(-5px); border-color: var(--primary-color); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

.product-img-wrapper { position: relative; width: 100%; padding-top: 133%; background: #f0f0f0; overflow: hidden; }
.product-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.5s ease-in-out; }

.badge { position: absolute; top: 8px; left: 8px; background: var(--primary-color); color: white; padding: 4px 8px; border-radius: 4px; font-size: 0.65rem; font-weight: 800; z-index: 10; }
.badge-soldout { background: white; color: #333; border: 1px solid #ccc; }
.esgotado .product-img { filter: grayscale(100%); opacity: 0.6; }

.product-info { padding: 12px 10px; flex: 1; display: flex; flex-direction: column; justify-content: space-between;}
.product-title { font-size: 0.85rem; font-weight: 500; margin-bottom: 4px; line-height: 1.2; }
.product-price { color: var(--primary-color); font-weight: 700; font-size: 1.05rem; margin-bottom: 2px;}
.old-price { font-size: 0.75rem; color: #999; text-decoration: line-through; margin-right: 5px; font-weight: normal;}

.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 4000; justify-content: center; align-items: center; padding: 15px; backdrop-filter: blur(5px); overscroll-behavior: none; }
.modal-content { background: white; width: 100%; max-width: 900px; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; position: relative; max-height: 90vh; }

.modal-close { position: absolute; top: 10px; right: 10px; background: white; border: none; width: 30px; height: 30px; border-radius: 50%; font-size: 1rem; cursor: pointer; z-index: 100; box-shadow: 0 2px 5px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center;}

.modal-img-container { width: 100%; height: auto; display: flex; flex-direction: column; padding: 15px; background: #fafafa; flex-shrink: 0; position: relative;}
.zoom-wrapper { width: 100%; height: 280px; position: relative; border-radius: 10px; overflow: hidden; }
.modal-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }

.legenda-foto-modal { position: absolute; bottom: 10px; left: 10px; background: var(--primary-color); color: white; padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; display: none; z-index: 50; box-shadow: 0 2px 5px rgba(0,0,0,0.2); pointer-events: none;}

.modal-thumbnails { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 5px; scroll-snap-type: x mandatory; }
.thumb-img { width: 50px; height: 50px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; transition: 0.3s; opacity: 0.6; flex-shrink: 0; scroll-snap-align: start; }
.thumb-img:hover, .thumb-img.active { border-color: var(--primary-color); opacity: 1; }

.modal-details { padding: 15px 20px 20px 20px; width: 100%; display: flex; flex-direction: column; overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
.modal-title-text { font-size: 1.2rem; font-weight: 600; margin: 0 0 5px 0; line-height: 1.2; }
.modal-price-text { font-size: 1.4rem; font-weight: 700; color: var(--primary-color); margin-bottom: 15px; }

.modal-desc { font-size: 0.85rem; color: #555; line-height: 1.5; margin-bottom: 15px; padding: 10px; background: #fdf2eb; border-radius: 8px; word-wrap: break-word; }

.size-opt, .color-opt { display: inline-flex; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s, outline 0.2s; margin: 0 6px 6px 0; }
.size-opt { min-width: 38px; height: 38px; border: 1px solid #ddd; align-items: center; justify-content: center; border-radius: 6px; font-weight: 600; padding: 0 8px; font-size: 0.85rem;}
.size-opt.selected { background: var(--primary-color); color: white; border-color: var(--primary-color); box-shadow: 0 2px 5px rgba(243, 112, 33, 0.3); }
.color-opt { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #eee; box-shadow: inset 0 0 4px rgba(0,0,0,0.1); }
.color-opt.selected { outline: 2px solid var(--primary-color); outline-offset: 2px; transform: scale(1.1); border-color: transparent; }

.btn-add { background: var(--primary-color); color: white; border: none; padding: 14px; border-radius: 10px; font-size: 1rem; font-weight: 700; cursor: pointer; margin-top: 15px; box-shadow: 0 4px 10px rgba(243, 112, 33, 0.3); transition: 0.2s; width: 100%;}
.btn-add:not(:disabled):hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn-add:disabled { background: #e0e0e0; color: #888; cursor: not-allowed; box-shadow: none; transform: none; }

.related-section { margin-top: 25px; border-top: 1px solid #eee; padding-top: 15px; }
.related-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 10px; color: var(--text-main); }
.related-grid { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory;}
.related-card { min-width: 110px; width: 110px; flex-shrink: 0; cursor: pointer; border: 1px solid #eee; border-radius: 8px; padding: 5px; scroll-snap-align: start;}
.related-card img { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; margin-bottom: 5px;}
.related-card h4 { font-size: 0.75rem; margin: 0 0 2px 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.related-card p { font-size: 0.8rem; font-weight: 700; color: var(--primary-color); margin: 0; }

.cart-float-btn { position: fixed; bottom: 20px; right: 20px; background: var(--primary-color); width: 55px; height: 55px; border-radius: 50%; color: white; display: flex; align-items: center; justify-content: center; z-index: 1000; box-shadow: 0 4px 10px rgba(0,0,0,0.3); transition: 0.3s; cursor: pointer;}
.cart-float-btn:hover { transform: scale(1.05); }
.cart-count { position: absolute; top: -2px; right: -2px; background: red; color: white; width: 20px; height: 20px; border-radius: 50%; font-size: 0.7rem; font-weight: bold; display: flex; align-items: center; justify-content: center; border: 2px solid white; }

footer { text-align: center; padding: 30px 15px; background: white; border-top: 1px solid #eee; margin-top: 30px; }
.social-links { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-btn { background: #f4f4f4; color: #333; border: none; padding: 10px 20px; border-radius: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 500; font-size: 0.85rem; cursor: pointer; transition: 0.3s; }
.footer-btn:hover { background: #e0e0e0; }

#loading { text-align: center; padding: 50px 20px; }
.spinner { border: 4px solid #f3f3f3; border-top: 4px solid var(--primary-color); border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.btn-qtd { width: 28px; height: 28px; border: 1px solid #ddd; background: white; border-radius: 6px; font-size: 1rem; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--primary-color); font-weight: bold; }
.btn-qtd:hover { background: #f0f0f0; }

/* =========================================
   REGRAS EXCLUSIVAS PARA COMPUTADOR
   ========================================= */
@media (min-width: 769px) {
    /* A LÁGICA QUE RESOLVEU O BUG DO OUTDOOR NO PC */
    .header-banner-img { max-height: 180px; }
    
    .search-section { padding: 30px 15px; }
    .search-input { font-size: 1.1rem; padding: 15px 30px; }
    .controls-wrapper { flex-direction: row; justify-content: center; gap: 20px; }
    .sort-select { font-size: 0.95rem; padding: 10px 24px; margin: 0;}
    
    .container { padding: 30px 20px; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 25px; }
    .product-info { padding: 20px 15px; }
    .product-title { font-size: 1.05rem; margin-bottom: 8px; }
    .product-price { font-size: 1.25rem; }
    
    .modal-content { flex-direction: row; height: 600px; max-width: 950px; }
    .modal-close { width: 35px; height: 35px; font-size: 1.2rem; top: 15px; right: 15px; }
    .modal-img-container { width: 50%; padding: 30px; }
    
    .zoom-wrapper { height: calc(100% - 90px); }
    .zoom-wrapper:hover .modal-img { transform: scale(1.5); cursor: zoom-in; }
    
    .legenda-foto-modal { top: 15px; left: 15px; bottom: auto; font-size: 0.95rem; padding: 8px 18px; }
    .thumb-img { width: 60px; height: 60px; }
    
    .modal-details { padding: 40px; }
    .modal-title-text { font-size: 1.6rem; margin-bottom: 8px; }
    .modal-price-text { font-size: 1.8rem; margin-bottom: 25px;}
    .modal-desc { font-size: 0.95rem; padding: 15px; margin-bottom: 25px; }
    .size-opt { min-width: 45px; height: 45px; font-size: 0.95rem; }
    .color-opt { width: 40px; height: 40px; }
    .btn-add { padding: 18px; font-size: 1.1rem; margin-top: 20px; }

    .related-card { min-width: 140px; width: 140px; }
    .related-card img { height: 140px; }
    
    .cart-float-btn { width: 65px; height: 65px; bottom: 30px; right: 30px; }
    .cart-float-btn svg { width: 30px; height: 30px; }
    .cart-count { width: 24px; height: 24px; font-size: 0.75rem; }
}
/* =======================================
   CHIPS DE FILTRO INTELIGENTE (ESTOQUE)
   ======================================= */
.chips-container {
    display: flex;
    flex-wrap: wrap; /* Permite quebrar a linha e não espremer os botões */
    gap: 12px; /* Espaço garantido entre cada botão (cima, baixo, lados) */
    margin-bottom: 25px;
}

.chip-filtro {
    background: #1e1e1e; /* Fundo cinza escuro combinando com os cards */
    border: 1px solid #333;
    color: #e0e0e0;
    padding: 8px 18px;
    border-radius: 30px; /* Deixa a borda bem redondinha (Pílula) */
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.chip-filtro:hover {
    background: #2a2a2a;
    border-color: #555;
    transform: translateY(-1px);
}

.chip-filtro.active {
    background: rgba(243, 112, 33, 0.15); /* Fundo laranja transparente */
    border-color: var(--primary); /* Borda laranja principal */
    color: var(--primary);
    font-weight: 600;
}

.chip-filtro.vazia {
    border-style: dashed;
    border-color: #444;
    color: #666;
    background: transparent;
}

.badge-qtd {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #ccc;
    font-weight: 600;
}

.chip-filtro.active .badge-qtd {
    background: var(--primary);
    color: white;
}

.chip-filtro.vazia .badge-qtd {
    background: transparent;
    color: #555;
    border: 1px solid #444;
}