/* ==========================================================================
   RADAR DE PREÇOS DE ALIMENTOS & CESTA INTELIGENTE - DESIGN SYSTEM
   Paleta: Dark Obsidian, Emerald Mint (Economia) & Radiant Gold (Campeão)
   Tipografia: Outfit (Headings) + Inter (Interface/Dados)
   ========================================================================== */

:root {
  --bg-main: #0b0f19;
  --bg-surface: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-input: #1a2234;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #10b981;
  --border-glow: rgba(16, 185, 129, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --emerald-main: #10b981;
  --emerald-hover: #059669;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --emerald-light: #d1fae5;
  --emerald-dark: #064e3b;

  --gold-main: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.25);
  --blue-accent: #3b82f6;
  --danger-main: #ef4444;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.15);
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.06) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==================== NAVBAR ==================== */
.navbar {
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 24px;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 2rem;
  background: linear-gradient(135deg, #10b981, #047857);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.brand-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ffffff, #a7f3d0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--emerald-main);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Seletor de Cidade */
.city-selector-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 6px 14px;
  gap: 8px;
  transition: var(--transition);
}

.city-selector-wrapper:hover, .city-selector-wrapper:focus-within {
  border-color: var(--emerald-main);
  box-shadow: 0 0 15px var(--emerald-glow);
}

.city-icon {
  font-size: 1rem;
}

.city-select {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.city-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* Botão Cesta na Nav */
.btn-basket-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-basket-nav:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald-main);
  transform: translateY(-1px);
}

.basket-badge {
  background: var(--emerald-main);
  color: #064e3b;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}

/* ==================== ABAS ==================== */
.nav-tabs-container {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-tabs {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  padding: 8px 24px 0;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 12px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--emerald-main);
  border-bottom-color: var(--emerald-main);
}

.tab-pill {
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 999px;
}

/* ==================== CONTEÚDO PRINCIPAL ==================== */
.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  flex: 1;
  width: 100%;
}

.tab-pane {
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== HERO SEARCH CARD ==================== */
.hero-search-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.search-input-group {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  transition: var(--transition);
  margin-bottom: 16px;
}

.search-input-group:focus-within {
  border-color: var(--emerald-main);
  box-shadow: 0 0 20px var(--border-glow);
}

.search-symbol {
  font-size: 1.25rem;
  margin-right: 10px;
  color: var(--text-muted);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 500;
  outline: none;
  padding: 8px 0;
}

.search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.btn-clear-search {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
}

.btn-clear-search:hover {
  color: var(--text-primary);
}

.btn-search-action {
  background: var(--emerald-main);
  color: #064e3b;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-search-action:hover {
  background: var(--emerald-hover);
  color: #ffffff;
}

/* Chips Rápidos */
.quick-staples {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.quick-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chips-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.chip:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--emerald-main);
  color: #a7f3d0;
  transform: translateY(-1px);
}

/* Barra de Controles e Filtros */
.search-controls-bar {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-item label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.control-select {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 7px 12px;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.control-select:focus {
  border-color: var(--emerald-main);
}

/* Toggle Switch */
.toggle-item {
  margin-left: auto;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #334155;
  transition: .3s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--emerald-main);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.toggle-text {
  font-size: 0.84rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* ==================== SUMMARY BANNER ==================== */
.summary-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.summary-metric {
  display: flex;
  flex-direction: column;
}

.metric-title {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 4px;
}

.metric-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.text-emerald {
  color: var(--emerald-main);
}

.metric-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.highlight-metric {
  border-left: 3px solid var(--emerald-main);
  padding-left: 12px;
}

/* ==================== RESULTS HEADER & GRID ==================== */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.results-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.results-city-badge {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

/* ==================== PRODUCT CARD ==================== */
.product-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-card);
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 12px 35px -10px rgba(0, 0, 0, 0.7), var(--shadow-glow);
}

.product-card.card-best-value {
  border-color: var(--emerald-main);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(17, 24, 39, 0.8) 100%);
}

.badge-champion {
  position: absolute;
  top: -10px;
  right: 14px;
  background: linear-gradient(90deg, #10b981, #059669);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-cheapest {
  position: absolute;
  top: -10px;
  left: 14px;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.badge-source {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-source.badge-live {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
}

.badge-source.badge-ref {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
}

.card-date {
  font-size: 0.67rem;
  color: var(--text-muted);
  display: block;
  margin-top: 3px;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.supermarket-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #e2e8f0;
}

.supermarket-loc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.35;
}

.card-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.meta-pill {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

/* Preço e Destaque de R$/kg */
.card-pricing-block {
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.price-main {
  font-family: 'Outfit', sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffffff;
}

.price-unit-col {
  text-align: right;
}

.unit-price-val {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--emerald-main);
}

.unit-price-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
}

.savings-tag {
  font-size: 0.74rem;
  font-weight: 600;
  color: #34d399;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-add-basket {
  width: 100%;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
  border-radius: var(--radius-sm);
  padding: 9px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-add-basket:hover {
  background: var(--emerald-main);
  color: #064e3b;
  font-weight: 700;
}

/* ==================== CESTA BASICA COMPARADOR ==================== */
.basket-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

.basket-items-panel, .basket-comparison-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.panel-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
}

.panel-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.basket-add-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.input-basket-item {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 0.9rem;
  outline: none;
}

.input-basket-qty {
  width: 70px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 8px;
  font-size: 0.9rem;
  text-align: center;
  outline: none;
}

.basket-presets {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.basket-presets span {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.preset-btn {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.preset-btn:hover {
  background: rgba(59, 130, 246, 0.25);
}

.basket-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
}

.basket-item-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.basket-item-info {
  flex: 1;
}

.basket-item-title {
  font-weight: 600;
  font-size: 0.92rem;
}

.basket-item-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.basket-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-qty {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
}

.btn-qty:hover {
  background: rgba(255, 255, 255, 0.1);
}

.basket-qty-display {
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 24px;
  text-align: center;
}

.btn-remove-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
}

.btn-remove-item:hover {
  color: var(--danger-main);
}

/* Winner Card */
.winner-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(6, 78, 59, 0.4) 100%);
  border: 1.5px solid var(--emerald-main);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-glow);
}

.winner-badge {
  color: var(--emerald-main);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.winner-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.winner-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.winner-total-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.winner-total-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
}

.winner-savings-banner {
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #a7f3d0;
}

/* Ranking List */
.ranking-section h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ranking-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.ranking-row.winner-row {
  border-color: var(--emerald-main);
  background: rgba(16, 185, 129, 0.08);
}

.ranking-rank {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  width: 28px;
  color: var(--text-muted);
}

.ranking-row.winner-row .ranking-rank {
  color: var(--emerald-main);
}

.ranking-store {
  flex: 1;
}

.ranking-store-name {
  font-weight: 600;
  font-size: 0.92rem;
}

.ranking-store-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.ranking-pricing {
  text-align: right;
}

.ranking-total {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.ranking-diff {
  font-size: 0.74rem;
  color: var(--danger-main);
  font-weight: 600;
}

.ranking-diff.winner-diff {
  color: var(--emerald-main);
}

/* ==================== SUPERMERCADOS GRID ==================== */
.section-intro {
  margin-bottom: 24px;
}

.section-intro h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.section-intro p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.supermarkets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.supermarket-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: var(--transition);
}

.supermarket-card:hover {
  border-color: var(--border-focus);
  transform: translateY(-2px);
}

.sup-card-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.sup-card-loc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.sup-card-stat {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

/* ==================== FORMULÁRIO CADASTRAR ==================== */
.form-card-container {
  max-width: 680px;
  margin: 0 auto;
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.form-header {
  margin-bottom: 24px;
}

.form-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.form-header p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus {
  border-color: var(--emerald-main);
  box-shadow: 0 0 15px var(--border-glow);
}

.form-hint {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-actions {
  margin-top: 24px;
}

/* ==================== BOTÕES E UTILITÁRIOS ==================== */
.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--emerald-main);
  color: #064e3b;
}

.btn-primary:hover {
  background: var(--emerald-hover);
  color: #ffffff;
}

.btn-success {
  background: #10b981;
  color: #ffffff;
}

.btn-success:hover {
  background: #059669;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
  width: 100%;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-outline-danger {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.btn-outline-danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

.alert {
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--emerald-main);
  color: #a7f3d0;
}

/* Spinner e Estados de Carregamento */
.loading-state, .empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
}

.spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--emerald-main);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid var(--emerald-main);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  font-weight: 500;
  font-size: 0.9rem;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==================== FOOTER ==================== */
.footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 18px 24px;
  margin-top: auto;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-stats strong {
  color: var(--emerald-main);
}

/* ==================== RESPONSIVIDADE ==================== */
@media (max-width: 860px) {
  .basket-container {
    grid-template-columns: 1fr;
  }

  .nav-container {
    flex-wrap: wrap;
  }

  .city-selector-wrapper {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .search-controls-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .toggle-item {
    margin-left: 0;
  }

  .form-row {
    flex-direction: column;
    gap: 12px;
  }
}
