/* ============================================
   V-MAX SISTEMA DE COTAÇÃO — style.css
   Cores: Verde escuro, Preto, Branco, Dourado
============================================ */

:root {
  --green: #1a6b2f;
  --green-dark: #0f4a1f;
  --green-light: #2d9248;
  --gold: #d4a017;
  --black: #0a0a0a;
  --dark: #111111;
  --dark2: #1a1a1a;
  --dark3: #222222;
  --white: #ffffff;
  --gray: rgba(255,255,255,0.55);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Barlow', sans-serif;
  background: var(--dark);
  color: var(--white);
  overflow-x: hidden;
}

/* ── HEADER ── */
.header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--green);
  padding: 12px 24px;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.header-logo { display: flex; align-items: center; gap: 12px; }
.header-logo img { height: 38px; width: auto; }
.header-divider { width: 1px; height: 32px; background: rgba(255,255,255,0.15); }
.header-title { font-family: 'Bebas Neue', sans-serif; font-size: 18px; letter-spacing: 2px; line-height: 1; }
.header-sub { font-size: 10px; color: var(--gold); letter-spacing: 2px; text-transform: uppercase; margin-top: 2px; }

.cart-toggle {
  display: flex; align-items: center; gap: 8px;
  background: var(--green); color: white; border: none;
  padding: 10px 18px; border-radius: 6px;
  font-family: 'Barlow', sans-serif; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: background 0.2s; position: relative;
}
.cart-toggle:hover { background: var(--green-light); }
.cart-count {
  background: var(--gold); color: var(--black);
  font-size: 11px; font-weight: 700;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  animation: pop 0.3s ease;
}
@keyframes pop { 0% { transform: scale(0); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, #1a3d20 100%);
  padding: 32px 24px;
  border-bottom: 1px solid rgba(26,107,47,0.4);
  position: relative; overflow: hidden;
}
.hero::after {
  content: 'V-MAX';
  position: absolute; right: -20px; top: 50%; transform: translateY(-50%);
  font-family: 'Bebas Neue', sans-serif; font-size: 120px;
  color: rgba(255,255,255,0.04); pointer-events: none; letter-spacing: 8px;
}
.hero-inner { max-width: 1200px; margin: 0 auto; position: relative; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(212,160,23,0.15); border: 1px solid rgba(212,160,23,0.3);
  color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; padding: 5px 14px; border-radius: 100px; margin-bottom: 10px;
}
.hero-tag span { width: 6px; height: 6px; background: var(--gold); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.hero h1 { font-family: 'Bebas Neue', sans-serif; font-size: 36px; letter-spacing: 2px; line-height: 1; }
.hero h1 span { color: var(--green-light); }
.hero p { font-size: 14px; color: rgba(255,255,255,0.55); margin-top: 8px; max-width: 480px; }

/* ── FILTROS ── */
.filters-section {
  background: var(--dark2);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 16px 24px;
  max-width: 100%;
}
.search-wrap {
  max-width: 1200px; margin: 0 auto 12px;
  position: relative;
}
.search-wrap svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); opacity: 0.4; }
.search-wrap input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50px;
  padding: 11px 18px 11px 42px;
  font-family: 'Barlow', sans-serif; font-size: 14px;
  color: var(--white); outline: none; transition: border-color 0.2s;
}
.search-wrap input::placeholder { color: rgba(255,255,255,0.3); }
.search-wrap input:focus { border-color: var(--green); }

.filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  max-width: 1200px; margin: 0 auto 10px;
}
.fbtn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.65);
  padding: 6px 14px; border-radius: 50px;
  font-family: 'Barlow', sans-serif; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.fbtn:hover { border-color: var(--green); color: var(--white); }
.fbtn.active { background: var(--green); border-color: var(--green); color: var(--white); }
.fbtn-marca { font-weight: 700; }

.results-info {
  max-width: 1200px; margin: 0 auto;
  font-size: 12px; color: rgba(255,255,255,0.35);
}
.results-info span { color: var(--gold); font-weight: 600; }

/* ── PRODUTOS ── */
.products-section { padding: 20px 24px 80px; max-width: 1200px; margin: 0 auto; }
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* ── CARD ── */
.product-card {
  background: var(--dark2);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px; overflow: hidden;
  transition: all 0.3s;
  display: flex; flex-direction: column;
}
.product-card:hover {
  border-color: var(--green);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.product-card.in-cart { border-color: var(--gold); }

.card-img {
  width: 100%; height: 160px;
  background: var(--dark3);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.product-card:hover .card-img img { transform: scale(1.05); }
.card-img-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a1a, #222);
}
.card-img-placeholder span { font-size: 11px; color: rgba(255,255,255,0.2); letter-spacing: 1px; }

.card-cat-badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(26,107,47,0.9); color: white;
  font-size: 9px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; padding: 3px 8px; border-radius: 4px;
}

.card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.card-cat { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.card-name { font-family: 'Barlow Condensed', sans-serif; font-size: 16px; font-weight: 700; line-height: 1.2; margin-bottom: 6px; }
.card-desc { font-size: 12px; color: rgba(255,255,255,0.45); line-height: 1.5; flex: 1; margin-bottom: 12px; }

.btn-add {
  width: 100%; padding: 10px;
  background: rgba(26,107,47,0.15);
  border: 1px solid rgba(26,107,47,0.4);
  color: var(--green-light);
  border-radius: 6px;
  font-family: 'Barlow', sans-serif; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-add:hover { background: var(--green); border-color: var(--green); color: white; }
.btn-add.added { background: var(--gold); border-color: var(--gold); color: var(--black); }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: rgba(255,255,255,0.3);
}
.empty-state h3 { font-family: 'Bebas Neue', sans-serif; font-size: 28px; margin: 12px 0 8px; }
.empty-state p { font-size: 14px; }

/* ── CARRINHO OVERLAY ── */
.cart-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.7);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

/* ── CARRINHO PANEL ── */
.cart-panel {
  position: fixed; top: 0; right: -100%; z-index: 400;
  width: 100%; max-width: 420px; height: 100vh;
  background: var(--dark2);
  border-left: 1px solid rgba(26,107,47,0.3);
  display: flex; flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}
.cart-panel.open { right: 0; }

.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(26,107,47,0.1);
}
.cart-header h2 { font-family: 'Bebas Neue', sans-serif; font-size: 22px; letter-spacing: 1px; }
.cart-close {
  background: rgba(255,255,255,0.08); border: none; color: white;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 16px; cursor: pointer; transition: background 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.cart-close:hover { background: rgba(255,255,255,0.2); }

.cart-name-field {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cart-name-field label {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255,255,255,0.45); margin-bottom: 8px;
}
.cart-name-field input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px; padding: 11px 14px;
  font-family: 'Barlow', sans-serif; font-size: 15px;
  color: white; outline: none; transition: border-color 0.2s;
}
.cart-name-field input:focus { border-color: var(--green); }
.cart-name-field input::placeholder { color: rgba(255,255,255,0.25); }

.cart-items { flex: 1; overflow-y: auto; padding: 12px; }
.cart-items::-webkit-scrollbar { width: 4px; }
.cart-items::-webkit-scrollbar-track { background: transparent; }
.cart-items::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.cart-empty { text-align: center; padding: 40px 20px; color: rgba(255,255,255,0.3); font-size: 14px; }

/* ── ITEM DO CARRINHO ── */
.cart-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px; padding: 12px 14px;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 12px;
  animation: slideIn 0.25s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

.cart-item-info { flex: 1; }
.cart-item-name { font-family: 'Barlow Condensed', sans-serif; font-size: 15px; font-weight: 700; }
.cart-item-cat { font-size: 10px; color: var(--gold); letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }

.cart-item-qty {
  display: flex; align-items: center; gap: 6px;
}
.qty-btn {
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: white; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: var(--green); border-color: var(--green); }
.qty-num {
  width: 32px; text-align: center;
  font-family: 'Bebas Neue', sans-serif; font-size: 20px; color: var(--gold);
}
.btn-remove {
  background: rgba(200,30,30,0.15); border: 1px solid rgba(200,30,30,0.3);
  color: #ff6b6b; width: 28px; height: 28px; border-radius: 6px;
  cursor: pointer; font-size: 14px; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.btn-remove:hover { background: rgba(200,30,30,0.4); }

/* ── RODAPÉ CARRINHO ── */
.cart-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(10,10,10,0.5);
}
.cart-total-line {
  display: flex; justify-content: space-between;
  font-size: 14px; color: rgba(255,255,255,0.6);
  margin-bottom: 12px; padding: 8px 12px;
  background: rgba(255,255,255,0.04); border-radius: 6px;
}
.cart-total-line span:last-child { font-weight: 700; color: var(--gold); }

.btn-whatsapp {
  width: 100%; padding: 15px;
  background: #25D366; border: none; border-radius: 8px;
  color: white; font-family: 'Barlow', sans-serif;
  font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all 0.25s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 8px;
}
.btn-whatsapp:hover:not(:disabled) { background: #1daa52; transform: translateY(-1px); }
.btn-whatsapp:disabled { opacity: 0.4; cursor: not-allowed; }
.cart-hint { font-size: 11px; color: rgba(255,255,255,0.3); text-align: center; }

/* ── FLOAT WA ── */
.float-wa {
  position: fixed; bottom: 24px; right: 24px; z-index: 150;
  background: #25D366; width: 56px; height: 56px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  text-decoration: none; transition: transform 0.25s;
}
.float-wa:hover { transform: scale(1.1); }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: white;
  padding: 10px 20px; border-radius: 50px;
  font-size: 13px; font-weight: 600;
  z-index: 500; opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.toast.show { opacity: 1; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .header { padding: 10px 14px; }
  .hero { padding: 24px 14px; }
  .hero h1 { font-size: 28px; }
  .filters-section { padding: 12px 14px; }
  .products-section { padding: 14px 14px 80px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-img { height: 130px; }
  .cart-panel { max-width: 100%; }
  .float-wa { bottom: 16px; right: 16px; width: 50px; height: 50px; }
}
