/* ================================================================
   MultiOfertas — Comparador de Preços
   Design: Light theme, estilo Buscapé/Pelando para mercados
   ================================================================ */

/* ── Fonte ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-50:  #f0fdf4;
  --green-100: #dcfce7;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --gray-50:   #f9fafb;
  --gray-100:  #f3f4f6;
  --gray-200:  #e5e7eb;
  --gray-300:  #d1d5db;
  --gray-400:  #9ca3af;
  --gray-500:  #6b7280;
  --gray-600:  #4b5563;
  --gray-700:  #374151;
  --gray-800:  #1f2937;
  --gray-900:  #111827;
  --orange:    #f97316;
  --red:       #ef4444;
  --blue:      #3b82f6;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow:    0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius:    10px;
  --radius-lg: 14px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { display: block; max-width: 100%; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 99px; }

/* ── Animações ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1);    }
}
.fade-up  { animation: fadeUp  0.35s ease both; }
.fade-in  { animation: fadeIn  0.25s ease both; }
.scale-in { animation: scaleIn 0.2s  ease both; }

/* ================================================================
   NAVBAR
   ================================================================ */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--gray-900);
  white-space: nowrap;
}
.navbar-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: var(--green-500);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.navbar-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}
.navbar-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.navbar-links a:hover,
.navbar-links a.active {
  background: var(--green-50);
  color: var(--green-600);
}
.navbar-links a.active {
  font-weight: 600;
  border-bottom: 2px solid var(--green-500);
  border-radius: 0;
}
.navbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}
.navbar-cart-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 1.1rem;
  transition: background 0.15s;
}
.navbar-cart-btn:hover { background: var(--gray-200); }
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--green-500);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}
.navbar-city {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8rem;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 0.375rem 0.75rem;
  border-radius: 99px;
}
.city-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); }

/* ================================================================
   LAYOUT & MAIN WRAPPER
   ================================================================ */
.page-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* ================================================================
   SIDEBAR — FILTROS
   ================================================================ */
.sidebar {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: sticky;
  top: 76px;
  box-shadow: var(--shadow-sm);
}
.sidebar-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gray-800);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-100);
}
.sidebar-section { margin-bottom: 1.25rem; }
.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-600);
  margin-bottom: 0.75rem;
  cursor: pointer;
}
.sidebar-section-header svg { transition: transform 0.2s; }
.sidebar-section-header.collapsed svg { transform: rotate(-90deg); }

/* Checkboxes personalizados */
.check-list { display: flex; flex-direction: column; gap: 0.5rem; }
.check-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gray-700);
  cursor: pointer;
  padding: 0.25rem 0.375rem;
  border-radius: 6px;
  transition: background 0.15s;
}
.check-item:hover { background: var(--gray-50); }
.check-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--green-500);
  cursor: pointer;
}
.check-count {
  margin-left: auto;
  font-size: 0.72rem;
  background: var(--gray-100);
  color: var(--gray-500);
  padding: 1px 6px;
  border-radius: 99px;
}

/* Range de preço */
.price-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--green-500);
  cursor: pointer;
}
.price-range-display {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--gray-700);
  font-weight: 600;
  text-align: center;
}

/* Botão limpar filtros */
.btn-clear-filters {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 1rem;
  padding: 0.5rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--gray-500);
  font-weight: 500;
  background: #fff;
  transition: all 0.15s;
}
.btn-clear-filters:hover {
  border-color: var(--red);
  color: var(--red);
  background: #fef2f2;
}

/* App promo */
.sidebar-app-promo {
  margin-top: 1.25rem;
  padding: 1rem;
  background: var(--gray-800);
  border-radius: var(--radius);
  text-align: center;
}
.sidebar-app-promo p {
  font-size: 0.78rem;
  color: var(--gray-400);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.btn-app {
  width: 100%;
  padding: 0.5rem;
  background: #fff;
  color: var(--gray-800);
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 8px;
  transition: opacity 0.15s;
}
.btn-app:hover { opacity: 0.9; }

/* ================================================================
   CONTENT AREA
   ================================================================ */
.content-area { min-width: 0; }

/* Hero / Search */
.hero {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.hero-title {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}
.hero-title span { color: var(--green-500); }
.hero-subtitle {
  font-size: 0.925rem;
  color: var(--gray-500);
  margin-bottom: 1.25rem;
}
.search-box {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
}
.search-input-wrap {
  flex: 1;
  position: relative;
}
.search-input-wrap .s-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 1rem;
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.925rem;
  color: var(--gray-800);
  background: var(--gray-50);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  font-family: inherit;
}
.search-input:focus {
  outline: none;
  border-color: var(--green-400);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74,222,128,.15);
}
.search-input::placeholder { color: var(--gray-400); }
.btn-search {
  padding: 0.75rem 1.5rem;
  background: var(--green-500);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius);
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(34,197,94,.35);
}
.btn-search:hover { background: var(--green-600); transform: translateY(-1px); }
.btn-search:active { transform: translateY(0); }

/* Autocomplete */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  overflow: hidden;
  display: none;
}
.autocomplete-dropdown.visible { display: block; }
.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  font-size: 0.87rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: background 0.1s;
}
.autocomplete-item:hover { background: var(--gray-50); }
.autocomplete-item .ac-icon { color: var(--gray-400); font-size: 0.85rem; }
.autocomplete-item strong { color: var(--green-600); }

/* Category pills */
.cat-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.cat-pill {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  background: var(--gray-100);
  border: 1.5px solid transparent;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: all 0.15s;
  white-space: nowrap;
}
.cat-pill:hover { background: var(--green-50); border-color: var(--green-400); color: var(--green-600); }
.cat-pill.active {
  background: var(--green-500);
  color: #fff;
  border-color: var(--green-500);
  box-shadow: 0 2px 6px rgba(34,197,94,.3);
}

/* Results bar */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.results-count {
  font-size: 0.875rem;
  color: var(--gray-500);
}
.results-count strong { color: var(--gray-800); }
.sort-select {
  font-size: 0.825rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  color: var(--gray-700);
  background: #fff;
  font-family: inherit;
  cursor: pointer;
}
.sort-select:focus { outline: none; border-color: var(--green-400); }

/* ================================================================
   PRODUCT GRID
   ================================================================ */
#product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* ── Card padrão ── */
.product-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-300);
}

.card-img-wrap {
  position: relative;
  background: #fff;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  border-bottom: 1px solid var(--gray-100);
  overflow: hidden;
}
.card-img-wrap img {
  max-height: 130px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s;
}
.product-card:hover .card-img-wrap img { transform: scale(1.05); }

/* Badges */
.badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-menor-preco {
  background: var(--green-500);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.badge-oferta {
  background: #fff5f0;
  color: var(--orange);
  border: 1px solid rgba(249,115,22,.25);
  left: auto;
  right: 0.5rem;
  top: 0.5rem;
}
.badge-desconto {
  top: auto;
  bottom: 0.5rem;
  left: auto;
  right: 0.5rem;
  background: var(--red);
  color: #fff;
}

.wishlist-btn {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}
.wishlist-btn:hover { border-color: var(--red); color: var(--red); }
.wishlist-btn.active { background: #fef2f2; border-color: var(--red); color: var(--red); }

.card-body {
  padding: 0.875rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-cat {
  font-size: 0.72rem;
  color: var(--green-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}
.card-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-800);
  line-height: 1.3;
  margin-bottom: 0.125rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-brand {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-bottom: 0.625rem;
}
.card-price-area {
  margin-top: auto;
}
.card-price-orig {
  font-size: 0.75rem;
  color: var(--gray-400);
  text-decoration: line-through;
  line-height: 1;
}
.card-price {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--green-600);
  line-height: 1;
  margin: 0.125rem 0;
}
.card-unit { font-size: 0.7rem; color: var(--gray-400); }
.card-vendor {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--gray-500);
}
.vendor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.card-footer {
  border-top: 1px solid var(--gray-100);
  padding: 0.625rem 0.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-stores-count {
  font-size: 0.75rem;
  color: var(--gray-400);
}
.btn-add-cart {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-500);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 2px 6px rgba(34,197,94,.35);
}
.btn-add-cart:hover { background: var(--green-600); transform: scale(1.1); }
.btn-add-cart.added { background: var(--green-600); }

/* ── Card FEATURED (destaque largo) ── */
.product-card.featured {
  grid-column: span 1;
  flex-direction: column;
  background: var(--gray-800);
  border-color: var(--gray-700);
  color: #fff;
}
.product-card.featured:hover { border-color: var(--green-500); }
.product-card.featured .card-img-wrap {
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.product-card.featured .card-img-wrap img { filter: drop-shadow(0 8px 20px rgba(0,0,0,.4)); }
.product-card.featured .card-cat   { color: var(--green-400); }
.product-card.featured .card-name  { color: #fff; }
.product-card.featured .card-brand { color: #9ca3af; }
.product-card.featured .card-price { color: var(--green-400); font-size: 1.6rem; }
.product-card.featured .card-price-orig { color: #6b7280; }
.product-card.featured .card-unit  { color: #9ca3af; }
.product-card.featured .card-vendor { color: #9ca3af; }
.product-card.featured .card-footer { border-top-color: rgba(255,255,255,.08); }
.product-card.featured .card-stores-count { color: #9ca3af; }

/* ── Empty state ── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--gray-400);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.1rem; color: var(--gray-600); font-weight: 600; margin-bottom: 0.5rem; }
.empty-state p  { font-size: 0.875rem; }

/* ── Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 6px;
}
@keyframes shimmer { from { background-position: -400px 0; } to { background-position: 400px 0; } }
.skeleton-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 280px;
}
.skeleton-card .sk-img  { height: 160px; margin: 0; border-radius: 0; }
.skeleton-card .sk-body { padding: 0.875rem; display: flex; flex-direction: column; gap: 0.5rem; }
.skeleton-card .sk-line { height: 12px; }

/* ================================================================
   MODAL — COMPARATIVO DE PREÇOS
   ================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-panel {
  background: #fff;
  border-radius: 1.25rem;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0,0,0,.15);
  transform: scale(0.96);
  transition: transform 0.2s;
}
.modal-overlay.open .modal-panel { transform: scale(1); }
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
  border-radius: 1.25rem 1.25rem 0 0;
}
.modal-header-title { flex: 1; }
.modal-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.modal-title { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); }
.modal-subtitle { font-size: 0.8rem; color: var(--gray-500); margin-top: 0.125rem; }
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--gray-500);
  background: var(--gray-100);
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.modal-close:hover { background: var(--gray-200); color: var(--gray-700); }

/* Economia banner */
.saving-banner {
  margin: 1rem 1.25rem 0;
  padding: 0.875rem 1rem;
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.saving-banner .saving-icon { font-size: 1.25rem; }
.saving-banner strong { font-weight: 700; color: var(--green-700); font-size: 0.9rem; }
.saving-banner p { font-size: 0.78rem; color: var(--gray-500); margin-top: 0.125rem; }

/* Vendor rows */
.vendor-list { padding: 1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: 0.625rem; }
.vendor-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--gray-200);
  transition: border-color 0.15s;
  cursor: pointer;
}
.vendor-row:hover { border-color: var(--green-300); }
.vendor-row.best {
  background: var(--green-50);
  border-color: var(--green-400);
}
.vendor-rank {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--gray-100);
  color: var(--gray-500);
}
.vendor-row.best .vendor-rank {
  background: var(--green-500);
  color: #fff;
}
.vendor-info { flex: 1; min-width: 0; }
.vendor-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.vendor-row.best .vendor-name { color: var(--green-700); }
.vendor-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}
.vendor-prices { text-align: right; flex-shrink: 0; }
.vendor-price-orig { font-size: 0.72rem; color: var(--gray-400); text-decoration: line-through; }
.vendor-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--gray-800);
  line-height: 1.1;
}
.vendor-row.best .vendor-price { color: var(--green-600); }
.vendor-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.67rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 99px;
  background: var(--green-500);
  color: #fff;
  margin-left: 0.375rem;
}
.vendor-tag-red { background: var(--red); }

/* Modal footer */
.modal-footer {
  padding: 0.75rem 1.25rem 1.25rem;
  border-top: 1px solid var(--gray-100);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.btn-modal-primary {
  width: 100%;
  padding: 0.875rem;
  background: var(--green-500);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 3px 10px rgba(34,197,94,.35);
}
.btn-modal-primary:hover { background: var(--green-600); transform: translateY(-1px); }
.btn-modal-secondary {
  width: 100%;
  padding: 0.75rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-600);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s;
}
.btn-modal-secondary:hover { border-color: var(--gray-300); background: var(--gray-50); }
.modal-date-note { text-align: center; font-size: 0.72rem; color: var(--gray-400); margin-top: 0.25rem; }

/* ================================================================
   FOOTER
   ================================================================ */
footer {
  border-top: 1px solid var(--gray-200);
  background: #fff;
  margin-top: 3rem;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* ================================================================
   LISTA DE COMPRAS (lista.php)
   ================================================================ */
.lista-page { max-width: 1100px; margin: 2rem auto; padding: 0 1.5rem; display: grid; grid-template-columns: 1fr 360px; gap: 1.5rem; align-items: start; }
.lista-header { margin-bottom: 1.5rem; }
.lista-header h1 { font-size: 1.75rem; font-weight: 800; color: var(--gray-900); }
.lista-header p  { font-size: 0.875rem; color: var(--gray-500); margin-top: 0.25rem; }
.lista-total-badge { float: right; background: var(--gray-100); color: var(--gray-600); font-size: 0.82rem; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 99px; }

/* Item da lista */
.lista-item {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.15s;
}
.lista-item:hover { border-color: var(--green-300); }
.lista-item-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lista-item-img img { max-width: 64px; max-height: 64px; object-fit: contain; }
.lista-item-info { flex: 1; min-width: 0; }
.lista-item-name { font-weight: 600; font-size: 0.95rem; color: var(--gray-800); }
.lista-item-melhor {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--green-600);
  margin-top: 0.25rem;
  font-weight: 600;
}
.lista-item-preco-medio { font-size: 0.78rem; color: var(--gray-400); margin-top: 0.125rem; }

.qty-ctrl {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.qty-btn {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  font-size: 1rem;
  color: var(--gray-600);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  font-weight: 700;
}
.qty-btn:hover { border-color: var(--green-400); color: var(--green-600); }
.qty-val { font-weight: 700; font-size: 0.95rem; min-width: 20px; text-align: center; }

.btn-remove-item {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--gray-400);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  transition: all 0.15s;
}
.btn-remove-item:hover { background: #fef2f2; border-color: var(--red); color: var(--red); }

.add-item-btn {
  width: 100%;
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-400);
  font-weight: 500;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
}
.add-item-btn:hover { border-color: var(--green-400); color: var(--green-600); background: var(--green-50); }

/* Comparativo lateral */
.comparativo-card {
  background: var(--gray-800);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: 76px;
  box-shadow: var(--shadow-lg);
}
.comparativo-header {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.comparativo-header h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.comparativo-header p { font-size: 0.78rem; color: #9ca3af; margin-top: 0.25rem; }

.mercado-row {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: background 0.15s;
}
.mercado-row:hover { background: rgba(255,255,255,.03); }
.mercado-row.vencedor {
  background: rgba(34,197,94,.12);
  border-color: rgba(34,197,94,.2);
}
.mercado-row-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.25rem; }
.mercado-nome { font-weight: 600; font-size: 0.9rem; color: #f3f4f6; display: flex; align-items: center; gap: 0.5rem; }
.mercado-row.vencedor .mercado-nome { color: var(--green-400); }
.vencedor-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--green-500);
  color: #fff;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  text-transform: uppercase;
}
.mercado-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.mercado-total { font-size: 1.5rem; font-weight: 800; color: #fff; line-height: 1; }
.mercado-row.vencedor .mercado-total { color: var(--green-400); }
.mercado-economia { font-size: 0.78rem; color: var(--green-400); margin-top: 0.25rem; display: flex; align-items: center; gap: 0.25rem; font-weight: 600; }
.mercado-caro { font-size: 0.78rem; color: #ef4444; margin-top: 0.25rem; font-weight: 500; }

.comparativo-actions { padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.625rem; }
.btn-comp-primary {
  width: 100%;
  padding: 0.875rem;
  background: var(--green-500);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.15s;
  box-shadow: 0 3px 10px rgba(34,197,94,.3);
}
.btn-comp-primary:hover { background: var(--green-600); }
.btn-comp-secondary {
  width: 100%;
  padding: 0.75rem;
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  color: #d1d5db;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s;
}
.btn-comp-secondary:hover { background: rgba(255,255,255,.05); }

.detalhamento { padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,.06); }
.detalhamento h3 { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; font-weight: 700; margin-bottom: 0.75rem; }
.det-row { display: flex; justify-content: space-between; font-size: 0.82rem; color: #d1d5db; margin-bottom: 0.5rem; }
.det-row.highlight { color: var(--green-400); font-weight: 700; font-size: 0.88rem; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) {
  #product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .page-wrapper { grid-template-columns: 1fr; }
  .sidebar { position: static; top: auto; }
}
@media (max-width: 600px) {
  #product-grid { grid-template-columns: 1fr; }
  .hero { padding: 1.25rem; }
  .hero-title { font-size: 1.4rem; }
  .search-box { flex-direction: column; }
  .lista-page { grid-template-columns: 1fr; }
}
