:root { --primary: #0b1a3a; --accent: #25d366; --bg: #f8fafc; --text: #1e293b; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Poppins', sans-serif; background: var(--bg); color: var(--text); }

header { background: var(--primary); padding: 15px 8%; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1000; gap: 20px; }
.logo img { height: 40px; }

.catalog-nav { display:flex; gap:18px; align-items:center; }
.catalog-nav a { color:white; text-decoration:none; font-size:14px; font-weight:600; }
.catalog-nav a:hover { opacity:0.85; }
.header-tools { display:flex; align-items:center; gap:14px; }

/* BUSCA ESTILIZADA COM LUPA */
.search-bar { flex: 1; max-width: 500px; display: flex; background: white; border-radius: 30px; overflow: hidden; border: 1px solid #e2e8f0; }
.search-bar input { flex: 1; border: none; padding: 10px 20px; outline: none; font-size: 14px; }
.search-bar button { background: var(--primary); color: white; border: none; padding: 0 18px; cursor: pointer; transition: 0.3s; }
.search-bar button:hover { background: #162a56; }

.cart-trigger { color: white; font-size: 24px; cursor: pointer; position: relative; }
.cart-badge { position: absolute; top: -8px; right: -10px; background: var(--accent); font-size: 11px; padding: 2px 7px; border-radius: 50%; font-weight: bold; color: white; }

.filters { display: flex; justify-content: center; gap: 10px; padding: 25px; flex-wrap: wrap; background: white; border-bottom: 1px solid #eee; }
.filter-btn { padding: 10px 22px; border-radius: 30px; border: 1px solid #e2e8f0; background: white; cursor: pointer; font-size: 12px; font-weight: 600; color: #64748b; transition: 0.3s; }
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.container { padding: 40px 8%; min-height: 50vh; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 30px; }

.card { background: white; padding: 20px; border-radius: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); text-align: center; }
.card img { width: 100%; height: 200px; object-fit: contain; }
.card h4 { font-size: 14px; margin: 15px 0; height: 40px; }
.price-tag { color: var(--primary); font-size: 18px; font-weight: 700; margin-bottom: 15px; display: block; }

.btn-group { display: flex; gap: 10px; }
.btn-det, .btn-add { flex: 1; padding: 10px; border-radius: 8px; border: none; cursor: pointer; font-weight: 700; font-size: 11px; }
.btn-det { background: #f1f5f9; color: var(--primary); }
.btn-add { background: var(--primary); color: white; }

/* CARRINHO SIDEBAR */
.sidebar { position: fixed; right: -450px; top: 0; width: 400px; height: 100%; background: white; z-index: 2000; transition: 0.4s; display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0,0,0,0.1); }
.sidebar.active { right: 0; }
.sidebar-header { background: var(--primary); color: white; padding: 20px; display: flex; justify-content: space-between; align-items: center; }
.sidebar-body { flex: 1; padding: 20px; overflow-y: auto; }
.client-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 25px; background: #f8fafc; padding: 15px; border-radius: 12px; }
.client-form label { font-size: 11px; font-weight: 700; color: var(--primary); }
.client-form input { padding: 12px; border: 1px solid #e2e8f0; border-radius: 8px; outline: none; }

.cart-item { display: flex; gap: 12px; padding: 15px 0; border-bottom: 1px solid #f1f5f9; align-items: center; }
.cart-item img { width: 50px; height: 50px; object-fit: contain; }
.qty-ctrl { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.qty-btn { width: 25px; height: 25px; border-radius: 50%; border: 1px solid #ddd; background: white; cursor: pointer; font-weight: bold; }
.cart-total-container { padding: 15px 0; border-top: 2px solid var(--primary); margin-top: 15px; font-weight: 700; display: flex; justify-content: space-between; font-size: 18px; color: var(--primary); }

.sidebar-footer { padding: 20px; border-top: 1px solid #eee; }
.btn-order { width: 100%; padding: 15px; background: var(--accent); color: white; border: none; border-radius: 10px; font-weight: 700; cursor: pointer; }

/* FOOTER */
.main-footer { background: var(--primary); color: white; padding: 60px 8% 30px; margin-top: 50px; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; }
.footer-logo { height: 40px; margin-bottom: 20px; }
.footer-section h4 { margin-bottom: 20px; color: var(--accent); font-size: 14px; }
.footer-section p { font-size: 13px; color: #cbd5e1; margin-bottom: 8px; }
.social-links { display: flex; gap: 15px; }
.social-links a { color: white; font-size: 22px; transition: 0.3s; }
.social-links a:hover { color: var(--accent); transform: translateY(-3px); }
.footer-bottom { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 12px; color: #94a3b8; }

/* MODAL GALERIA */
.modal-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); display:none; justify-content:center; align-items:center; z-index:3000; }
.modal-content { background:white; padding:30px; border-radius:15px; max-width:800px; width:90%; display:grid; grid-template-columns: 1fr 1fr; gap:30px; position:relative; }
.main-view { width:100%; height:300px; object-fit:contain; border-radius:10px; background: #f8fafc; }
.thumbs { display:flex; gap:8px; flex-wrap:wrap; margin-top: 10px; }
.thumb-img { width:55px; height:55px; object-fit:contain; border:1px solid #ddd; cursor:pointer; border-radius:5px; }

.mobile-cart-fab { position: fixed; bottom: 100px; right: 30px; background: var(--primary); color: white; width: 60px; height: 60px; border-radius: 50%; display: none; align-items: center; justify-content: center; font-size: 24px; z-index: 999; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
#cart-count-fab { position: absolute; top: 0; right: 0; background: var(--accent); font-size: 10px; padding: 3px 7px; border-radius: 50%; }
.whatsapp-float { position: fixed; bottom: 30px; right: 30px; background: #25d366; color: white; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; z-index: 1000; }

@media (max-width: 768px) {
  .catalog-nav { display:none; }

    .modal-content { grid-template-columns: 1fr; }
    .mobile-cart-fab { display: flex; }
    .header-tools .cart-trigger { display: none; }
    .sidebar { width: 100%; right: -100%; }
}