    /* ────────────────────────────────────────
       VARIABLES & RESET
    ──────────────────────────────────────── */
    :root {
      --accent:      #2dbb54;
      --accent-2:    #69b749;
      --lime:        #cddc39;
      --danger:      #ff4757;
      --warning:     #ff9800;
      --bg:          #f2f2f7;
      --surface:     #ffffff;
      --surface-2:   #f8f8fb;
      --text:        #1C1C1E;
      --subtext:     #636366;
      --input-bg:    #E5E5EA;
      --border:      #D1D1D6;
      --card-left:   #2dbb54;
      --shadow:      0 2px 16px rgba(0,0,0,.09);
      --radius:      18px;
      --radius-sm:   10px;
      --font:        'Nunito', sans-serif;
      --header-h-mobile: 60px;
      --desktop-nav-h: 48px;
      --header-h-desktop: 64px;
    }
    [data-theme="dark"] {
      --accent:      #cddc39;
      --accent-2:    #cddc39;
      --lime:        #cddc39;
      --bg:          #121212;
      --surface:     #1e1e1e;
      --surface-2:   #2a2a2a;
      --text:        #ffffff;
      --subtext:     #aaaaaa;
      --input-bg:    #2d2d2d;
      --border:      #333333;
      --shadow:      0 2px 20px rgba(0,0,0,.4);
    }
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { font-size: 16px; }
    body {
      font-family: var(--font);
      background: var(--bg);
      color: var(--text);
      min-height: 100dvh;
      max-width: none;
      position: relative;
      transition: background .25s, color .25s;
    }
    img { display: block; }
    button { font-family: var(--font); cursor: pointer; border: none; background: none; }
    input { font-family: var(--font); }
    a { color: var(--accent); }
    ::-webkit-scrollbar { height: 4px; width: 4px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
 
    /* ────────────────────────────────────────
       HEADER / TOP BAR padding: 14px 20px 12px;
    ──────────────────────────────────────── */
    #app-header {
      background: linear-gradient(135deg, #2dbb54 0%, #69b749 100%);
      padding: 10px 20px;
      min-height: var(--header-h-mobile);
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 2px 12px rgba(45,187,84,.35);
    }
 
    .logo-container {
  display: flex;
  align-items: center;
}
 
.logo-img {
  height: 40px; /* Ajusta este valor según el tamaño que quieras */
  width: auto;  /* Mantiene la proporción original */
  display: block;
  /* Si el logo es blanco o necesita resaltar, puedes añadirle sombra: */
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.8));
}
    .logo-text {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 32px;
      color: #fff;
      letter-spacing: 2px;
      line-height: 1;
      text-shadow: 0 2px 6px rgba(0,0,0,.2);
    }
    .logo-text span { color: #fff700; }
 
    /* ────────────────────────────────────────
       SEARCH AREA (sticky under header)
    ──────────────────────────────────────── */
    #search-area {
      background: var(--surface);
      padding: 10px 16px 12px;
      border-bottom: 1px solid var(--border);
      transition: background .25s;
    }
    .location-bar {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 8px;
    }
    .location-bar svg { flex-shrink: 0; }
    #location-text {
      font-size: 12px;
      font-weight: 700;
      color: var(--accent);
      flex: 1;/**/
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
    }
    #theme-btn {
      background: var(--input-bg);
      border-radius: 50%;
      width: 32px; height: 32px;
      display: flex; align-items: center; justify-content: center;
      transition: background .2s, transform .15s;
      flex-shrink: 0;
    }
    #theme-btn:hover { transform: rotate(20deg); }
    .search-bar {
      display: flex;
      align-items: center;
      background: var(--input-bg);
      border-radius: 14px;
      padding: 0 12px;
      height: 44px;
      gap: 8px;
      transition: background .25s;
    }
    .search-bar svg.search-icon { flex-shrink: 0; color: var(--subtext); }
    #search-input {
      flex: 1;
      background: none;
      border: none;
      outline: none;
      font-size: 15px;
      color: var(--text);
      font-weight: 600;
      min-width: 0;
    }
    #search-input::placeholder { color: var(--subtext); font-weight: 500; }
    #clear-btn {
      /*display: none;*/
      display: flex;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      flex-shrink: 0;
      background: var(--border);
      border-radius: 50%;
      width: 22px; height: 22px;
      align-items: center; justify-content: center;
      font-size: 12px;
      color: var(--subtext);
      transition: background .15s, opacity .2s, visibility .2s;
    }
    #clear-btn:hover { background: var(--danger); color: #fff; }
    #clear-btn.visible { 
      /*display: flex;*/ 
      opacity: 1; 
      visibility: visible;
      pointer-events: auto; }
    #scan-btn {
      background: none;
      color: var(--accent);
      display: flex; align-items: center;
      transition: transform .15s;
    }
    #scan-btn:hover { transform: scale(1.1); }
 
    /* ────────────────────────────────────────
       MAIN SCROLLABLE CONTENT
    ──────────────────────────────────────── */
    #main-content {
      padding-bottom: 100px;
      min-height: calc(100dvh - 160px); /* mobile: header ~60px + search ~100px */
    }
    /* ── TAB TRANSITIONS ──────────────────────── */
    .tab-content {
      display: none;
      will-change: opacity, transform;
    }
    .tab-content.active {
      display: block;
      animation: tabIn .28s cubic-bezier(.4,0,.2,1) both;
    }
    .tab-content.tab-exit {
      display: block;
      animation: tabOut .18s cubic-bezier(.4,0,.2,1) both;
      pointer-events: none;
    }
    @keyframes tabIn {
      from { opacity: 0; transform: translateY(10px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    @keyframes tabOut {
      from { opacity: 1; transform: translateY(0); }
      to   { opacity: 0; transform: translateY(-6px); }
    }
    /* ── CARD ENTRANCE ────────────────────────── */
    .fade-in {
      animation: cardIn .35s cubic-bezier(.4,0,.2,1) both;
    }
    @keyframes cardIn {
      from { opacity: 0; transform: translateY(14px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    /* ── SUCURSAL LABEL ───────────────────────── */
    .sucursal-label {
      font-size: 11px;
      font-weight: 800;
      color: var(--info);
      background: rgba(58,155,220,.1);
      border-radius: 6px;
      padding: 3px 8px;
      margin-bottom: 6px;
      display: inline-block;
      letter-spacing: .02em;
    }
    /* ── TRENDING EMPTY STATES ────────────────── */
    .trending-state {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      padding: 28px 20px;
      text-align: center;
      color: var(--subtext);
      font-size: 13px;
    }
    .trending-state .ts-icon { font-size: 28px; }
    .trending-state .ts-text { font-weight: 600; line-height: 1.4; }
    /* ── 3-DOT MENU ───────────────────────────── */
    #menu-btn {
      position: fixed;
      top: 14px; right: 14px;
      z-index: 600;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 50%;
      width: 38px; height: 38px;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer;
      font-size: 18px;
      color: var(--subtext);
      box-shadow: 0 2px 10px rgba(0,0,0,.15);
      transition: background .2s, transform .15s;
    }
    #menu-btn:active { transform: scale(.92); }
    #app-menu {
      position: fixed;
      top: 62px; right: 14px;
      z-index: 599;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      min-width: 230px;
      box-shadow: 0 8px 32px rgba(0,0,0,.22);
      padding: 6px 0 0;
      transform-origin: top right;
      transform: scale(.85) translateY(-8px);
      opacity: 0;
      pointer-events: none;
      transition: transform .2s cubic-bezier(.34,1.56,.64,1), opacity .18s;
    }
    #app-menu.open {
      transform: scale(1) translateY(0);
      opacity: 1;
      pointer-events: all;
    }
    .menu-item {
      display: flex; align-items: center; gap: 10px;
      padding: 12px 18px;
      font-size: 13px; font-weight: 700;
      color: var(--text);
      cursor: pointer;
      border-bottom: 1px solid var(--border);
      transition: background .15s;
    }
    .menu-item:last-of-type { border-bottom: none; }
    .menu-item:hover { background: var(--surface-2); }
    .menu-footer-text {
      font-size: 10px; color: var(--subtext);
      text-align: center;
      padding: 10px 14px;
      line-height: 1.4;
    }
    /* ── LEGAL MODALS ─────────────────────────── */
    .legal-modal-overlay {
      position: fixed; inset: 0;
      background: rgba(0,0,0,.7);
      z-index: 800;
      display: flex; align-items: flex-end; justify-content: center;
      opacity: 0; pointer-events: none;
      transition: opacity .25s;
    }
    .legal-modal-overlay.open { opacity: 1; pointer-events: all; }
    .legal-modal {
      background: var(--surface);
      border-radius: 20px 20px 0 0;
      width: 100%; max-width: 540px;
      max-height: 80vh;
      padding: 20px 22px 40px;
      overflow-y: auto;
      transform: translateY(40px);
      transition: transform .3s cubic-bezier(.4,0,.2,1);
    }
    .legal-modal-overlay.open .legal-modal { transform: translateY(0); }
    .legal-modal-title {
      font-size: 16px; font-weight: 900;
      margin-bottom: 16px;
      display: flex; justify-content: space-between; align-items: center;
    }
    .legal-modal-close {
      background: none; border: none;
      font-size: 20px; color: var(--subtext); cursor: pointer;
      padding: 4px 8px;
    }
    .legal-modal-body {
      font-size: 13px; line-height: 1.7;
      color: var(--subtext);
    }
    .legal-modal-body h3 { color: var(--text); font-size: 13px; margin: 14px 0 4px; }
    /* ── BOTTOM NAV BIGGER TAP TARGET ─────────── */
 
    /* ─── Responsive visibility helpers ──────── */
    .desktop-only { display: none !important; }
    .mobile-only  { display: flex; }
 
 
    /* ────────────────────────────────────────
       SLOGAN SECTION
    ──────────────────────────────────────── */
    #slogan-section {
      text-align: center;
      padding: 20px 20px 5px;
    }
    .slogan-busca {
      font-size: 1.25rem;
      font-weight: 800;
      color: var(--text);
      letter-spacing: 1px;
    }
    .slogan-main {
  font-family: "Montserrat", sans-serif; /* Cambiado de Bebas Neue */
  font-optical-sizing: auto;
  font-weight: 900;          /* El peso más grueso (Black) */
  font-style: italic;        /* Inclinación para dar dinamismo */
  font-size: 1.875rem;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -1px;      /* Reducido para que las letras estén pegaditas como en el logo */
  text-transform: uppercase; /* Asegura que siempre esté en mayúsculas */
}
    [data-theme="dark"] .slogan-main { color: #cddc39; }
    .slogan-sub {
      font-size: 11px;
      color: var(--subtext);
      margin-top: 4px;
      letter-spacing: 2px;
      text-transform: uppercase;
    }
 
    /* ────────────────────────────────────────
       SECTION TITLES
    ──────────────────────────────────────── */
    .section-title {
      font-size: 1.0625rem; /* 17px → rem */
      font-weight: 800;
      color: var(--text);
      padding: 0 16px;
      margin-top: 20px;
      margin-bottom: 10px;
    }
 
    /* ────────────────────────────────────────
       FAVORITOS HORIZONTAL SCROLL
    ──────────────────────────────────────── */
    #favoritos-section { margin-bottom: 4px; }
    .fav-scroll {
      display: flex;
      gap: 12px;
      overflow-x: auto;
      padding: 4px 16px 10px;
      scrollbar-width: none;
    }
    .fav-scroll::-webkit-scrollbar { display: none; }
    .fav-card {
      flex-shrink: 0;
      width: 110px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 10px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      transition: transform .15s, box-shadow .15s;
    }
    .fav-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
    .fav-card img {
      width: 58px; height: 58px;
      border-radius: 10px;
      object-fit: contain;
      background: #fff;
    }
    .fav-card-name {
      font-size: 11px;
      font-weight: 700;
      text-align: center;
      color: var(--text);
      line-height: 1.3;
    }
    .fav-card-brand {
      font-size: 10px;
      color: var(--subtext);
    }
 
    /* ────────────────────────────────────────
       PROMOCIONES BANNERS
    ──────────────────────────────────────── */
    #promo-section { margin-bottom: 4px; }
    .promo-scroll {
      display: flex;
      gap: 14px;
      overflow-x: auto;
      padding: 2px 16px 10px;
      scrollbar-width: none;
    }
    .promo-scroll::-webkit-scrollbar { display: none; }
    .promo-banner {
      flex-shrink: 0;
      width: 300px;
      height: 140px;
      border-radius: 16px;
      overflow: hidden;
      cursor: pointer;
      box-shadow: 0 4px 20px rgba(0,0,0,.15);
      transition: transform .2s, box-shadow .2s;
      background: var(--surface-2);
    }
    .promo-banner:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 30px rgba(0,0,0,.2); }
    .promo-banner img { width: 100%; height: 100%; object-fit: cover; }
 
    /* ────────────────────────────────────────
       PROMO DETAIL HEADER
    ──────────────────────────────────────── */
    #promo-detail-header {
      display: flex;
      align-items: center;
      padding: 12px 16px;
      gap: 10px;
    }
    #promo-detail-header .promo-store-name {
      flex: 1;
      font-size: 17px;
      font-weight: 800;
      color: var(--text);
    }
    #close-promo-btn {
      background: var(--accent);
      color: #fff;
      border-radius: 50%;
      width: 34px; height: 34px;
      display: flex; align-items: center; justify-content: center;
      font-size: 18px;
      transition: background .15s, transform .15s;
    }
    #close-promo-btn:hover { background: var(--danger); transform: rotate(90deg); }
 
    /* ────────────────────────────────────────
       PRODUCT CARD
    ──────────────────────────────────────── */
    .product-card {
      background: var(--surface);
      border-radius: var(--radius);
      margin: 8px 12px;
      padding: 14px;
      border-left: 4px solid var(--accent);
      box-shadow: var(--shadow);
      transition: background .25s, box-shadow .2s;
    }
    .product-card:hover { box-shadow: 0 6px 28px rgba(0,0,0,.13); }
    .product-card-top {
      display: flex;
      gap: 12px;
    }
    .product-img-wrap {
      position: relative;
      flex-shrink: 0;
    }
    .product-img-wrap img {
      width: 72px; height: 72px;
      border-radius: 12px;
      object-fit: contain;
      background: #fff;
      border: 1px solid var(--border);
    }
    .offer-badge {
      position: absolute;
      top: -5px; left: -5px;
      background: var(--danger);
      color: #fff;
      font-size: 8px;
      font-weight: 900;
      padding: 2px 5px;
      border-radius: 6px;
      letter-spacing: .5px;
      box-shadow: 0 2px 6px rgba(255,71,87,.4);
    }
    .product-info { flex: 1; min-width: 0; }
    .product-name {
      font-size: 1rem;
      font-weight: 800;
      color: var(--text);
      line-height: 1.2;
      margin-bottom: 2px;
    }
    .product-detail {
      font-size: 12px;
      color: var(--subtext);
      margin-bottom: 8px;
    }
 
    /* Price list inside card */
    .price-list {
      border-top: 1px solid var(--border);
      padding-top: 10px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .price-item { }
    .price-row {
      display: flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      padding: 4px 0;
      transition: opacity .15s;
    }
    .price-row:hover { opacity: .85; }
    .store-logo-mini {
      width: 36px; height: 22px;
      border-radius: 5px;
      object-fit: contain;
      background: #fff;
      border: 1px solid var(--border);
      flex-shrink: 0;
    }
    .store-info { flex: 1; min-width: 0; }
    .verified-dot {
 
      display: inline-flex; align-items: center; justify-content: center;
 
      width: 14px; height: 14px; background: #00B5E2; border-radius: 50%;
 
      color: #fff; font-size: 8px; font-weight: 900;
 
      margin-left: 3px; flex-shrink: 0; vertical-align: middle;
 
    }
 
    .store-name {
 
      font-size: 13px;
 
      font-weight: 700;
 
      color: var(--text);
 
      white-space: nowrap;
 
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .store-location-row {
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .store-municipio {
      font-size: 10px;
      color: var(--subtext);
    }
    .chevron-icon { color: var(--subtext); transition: transform .2s; }
    .chevron-icon.open { transform: rotate(180deg); }
    .price-col { text-align: right; flex-shrink: 0; }
    .price-usd {
      font-size: 1.125rem;
      font-weight: 900;
      color: var(--accent);
      line-height: 1;
    }
    [data-theme="dark"] .price-usd { color: #cddc39; }
    .price-bs {
      font-size: 11px;
      color: var(--subtext);
    }
    .address-box {
      background: var(--input-bg);
      border-left: 3px solid var(--accent);
      border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
      padding: 8px 10px;
      margin-top: 6px;
      display: none;
    }
    .address-box.open { display: block; }
    .address-text {
      font-size: 11px;
      font-style: italic;
      color: var(--subtext);
    }
    .horario-text {
      font-size: 11px;
      font-weight: 700;
      color: var(--accent);
      margin-top: 3px;
    }
 
    /* Card buttons */
    .card-buttons {
      display: flex;
      gap: 10px;
      margin-top: 12px;
      align-items: center;
    }
    .btn-fav {
      background: var(--input-bg);
      border-radius: 12px;
      width: 44px; height: 44px;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
      transition: background .15s, transform .15s;
    }
    .btn-fav:hover { transform: scale(1.1); }
    .btn-fav svg { transition: fill .2s; }
    .btn-mercado {
      flex: 1;
      background: linear-gradient(135deg, #2dbb54, #69b749);
      color: #fff;
      border-radius: 12px;
      height: 44px;
      display: flex; align-items: center; justify-content: center;
      gap: 8px;
      font-size: 14px;
      font-weight: 800;
      letter-spacing: .3px;
      transition: transform .15s, box-shadow .15s;
      box-shadow: 0 4px 14px rgba(45,187,84,.35);
    }
    .btn-mercado:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(45,187,84,.45); }
    .btn-mercado:active { transform: translateY(0); }
 
    /* ────────────────────────────────────────
       LOADING SPINNER
    ──────────────────────────────────────── */
    #loading-indicator {
      display: none;
      justify-content: center;
      padding: 40px;
    }
    #loading-indicator.active { display: flex; }
    .spinner {
      width: 40px; height: 40px;
      border: 3px solid var(--border);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin .7s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
 
    /* Empty state */
    .empty-state {
      text-align: center;
      padding: 40px 20px;
      color: var(--subtext);
      font-size: 14px;
      font-weight: 600;
    }
    .empty-state .empty-icon { font-size: 40px; margin-bottom: 10px; }
 
    /* ────────────────────────────────────────
       MI MERCADO TAB
    ──────────────────────────────────────── */
    .mercado-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 16px 8px;
    }
    .mercado-title {
      font-size: 1.5rem;
      font-weight: 900;
      color: var(--text);
    }
    .mercado-actions {
      display: flex;
      gap: 8px;
    }
    .btn-action {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      width: 42px; height: 42px;
      display: flex; align-items: center; justify-content: center;
      color: var(--accent);
      transition: background .15s, transform .15s;
      box-shadow: var(--shadow);
    }
    .btn-action:hover { transform: scale(1.08); background: var(--input-bg); }
 
    /* Comparativa */
    .comp-section { margin-bottom: 8px; }
    .comp-title {
      font-size: 11px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: var(--accent);
      padding: 0 16px;
      margin-bottom: 8px;
    }
    .comp-scroll {
      display: flex;
      gap: 12px;
      overflow-x: auto;
      padding: 4px 16px 12px;
      scrollbar-width: none;
    }
    .comp-scroll::-webkit-scrollbar { display: none; }
    .comp-card {
      flex-shrink: 0;
      width: 185px;
      background: var(--surface);
      border: 1.5px solid var(--border);
      border-radius: 16px;
      padding: 14px;
      cursor: pointer;
      transition: border-color .2s, box-shadow .2s;
      box-shadow: var(--shadow);
    }
    .comp-card.winner {
      border-color: var(--accent);
      background: var(--surface-2);
      box-shadow: 0 4px 20px rgba(45,187,84,.2);
    }
    [data-theme="dark"] .comp-card.winner { background: #1a2e1d; }
    .winner-badge {
      background: var(--accent);
      color: #1a1a1a;
      font-size: 8px;
      font-weight: 900;
      padding: 2px 7px;
      border-radius: 5px;
      display: inline-block;
      margin-bottom: 6px;
      letter-spacing: .5px;
    }
    .comp-card-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 4px;
    }
    .comp-store-name {
      font-size: 13px;
      font-weight: 800;
      color: var(--text);
      flex: 1;
      line-height: 1.3;
    }
    .coverage-text {
      font-size: 10px;
      font-weight: 700;
      margin-top: 4px;
    }
    .coverage-full { color: var(--accent); }
    .coverage-partial { color: var(--warning); }
    .comp-total-usd {
      font-size: 1.375rem;
      font-weight: 900;
      color: var(--accent);
      margin-top: 6px;
      line-height: 1;
    }
    .comp-total-bs {
      font-size: 11px;
      color: var(--subtext);
    }
    .comp-address-box {
      background: var(--input-bg);
      border-left: 3px solid var(--accent);
      border-radius: 0 8px 8px 0;
      padding: 7px 9px;
      margin-top: 8px;
      display: none;
    }
    .comp-address-box.open { display: block; }
    .comp-address-text { font-size: 10px; font-style: italic; color: var(--subtext); }
    .comp-horario { font-size: 10px; font-weight: 700; color: var(--accent); margin-top: 3px; }
 
    /* Ahorro banner */
    #ahorro-section {
      margin: 0 12px 10px;
      background: var(--surface);
      border: 1.5px dashed var(--accent);
      border-radius: 16px;
      padding: 14px;
      display: none;
    }
    #ahorro-section.visible { display: block; }
    [data-theme="dark"] #ahorro-section { background: #1e2d1f; }
    .ahorro-inner {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .ahorro-emoji { font-size: 24px; flex-shrink: 0; }
    .ahorro-texts { flex: 1; }
    .ahorro-title { font-size: 14px; font-weight: 800; color: var(--text); }
    .ahorro-sub { font-size: 11px; color: var(--subtext); }
    .ahorro-amounts { text-align: right; }
    .ahorro-usd { font-size: 18px; font-weight: 900; color: var(--accent); }
    .ahorro-bs { font-size: 11px; font-weight: 600; color: var(--subtext); }
 
    /* Mercado item cards */
    .mercado-item {
      background: var(--surface);
      border-radius: 14px;
      margin: 6px 12px;
      padding: 12px;
      display: flex;
      align-items: flex-start;
      gap: 10px;
      box-shadow: var(--shadow);
      transition: background .25s;
    }
    .mercado-item img {
      width: 52px; height: 52px;
      border-radius: 10px;
      object-fit: contain;
      background: #fff;
      border: 1px solid var(--border);
      flex-shrink: 0;
    }
    .mercado-info { flex: 1; min-width: 0; }
    .mercado-prod-name {
      font-size: 15px;
      font-weight: 800;
      color: var(--text);
      line-height: 1.2;
    }
    .mercado-prod-detail {
      font-size: 12px;
      color: var(--subtext);
      margin-bottom: 4px;
    }
    .mercado-price-store {
      font-size: 10px;
      font-weight: 800;
      text-transform: uppercase;
      color: var(--accent);
      letter-spacing: .5px;
    }
    .mercado-price-total {
      font-size: 15px;
      font-weight: 900;
      color: var(--text);
    }
    .mercado-price-unit {
      font-size: 12px;
      color: var(--subtext);
    }
    .mercado-price-bs {
      font-size: 11px;
      color: var(--subtext);
    }
    .qty-controls {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-top: 6px;
    }
    .qty-btn {
      background: #444;
      color: #fff;
      border-radius: 6px;
      width: 26px; height: 26px;
      display: flex; align-items: center; justify-content: center;
      font-size: 16px;
      font-weight: 900;
      line-height: 1;
      transition: background .15s;
    }
    .qty-btn:hover { background: var(--accent); }
    .qty-text {
      font-size: 16px;
      font-weight: 800;
      color: var(--accent);
      min-width: 20px;
      text-align: center;
    }
    .btn-delete {
      flex-shrink: 0;
      color: var(--danger);
      background: none;
      padding: 6px;
      border-radius: 8px;
      transition: background .15s, transform .15s;
      display: flex; align-items: center;
    }
    .btn-delete:hover { background: rgba(255,71,87,.12); transform: scale(1.1); }
 
    /* Vaciar btn */
    #btn-vaciar {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      background: #2a1212;
      border: 1.5px solid var(--danger);
      color: var(--danger);
      border-radius: 14px;
      padding: 14px;
      margin: 16px 12px 0;
      font-size: 13px;
      font-weight: 800;
      letter-spacing: .5px;
      transition: background .15s;
    }
    #btn-vaciar:hover { background: rgba(255,71,87,.15); }
 
    /* ────────────────────────────────────────
       BOTTOM NAV
    ──────────────────────────────────────── */
    #bottom-nav {
      position: fixed;
      bottom: 0; left: 0;
      width: 100%;
      background: var(--surface);
      border-top: 1px solid var(--border);
      display: flex;
      height: 76px;
      padding-bottom: 8px;
      z-index: 200;
      box-shadow: 0 -4px 24px rgba(0,0,0,.08);
      transition: background .25s;
    }
    .nav-tab-btn {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      color: var(--subtext);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: .3px;
      position: relative;
      transition: color .2s;
      /* Bigger tap target */
      padding: 0;
      height: 100%;
      min-height: 68px;
      -webkit-tap-highlight-color: transparent;
    }
    .nav-tab-btn:active .nav-icon { transform: scale(.88) translateY(-2px) !important; }
    .nav-tab-btn.active { color: var(--accent); }
    .nav-tab-btn .nav-icon { transition: transform .2s; }
    .nav-tab-btn.active .nav-icon { transform: translateY(-2px); }
    .nav-badge {
      position: absolute;
      top: 8px;
      right: calc(50% - 18px);
      background: var(--danger);
      color: #fff;
      font-size: 9px;
      font-weight: 900;
      min-width: 16px;
      height: 16px;
      border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      padding: 0 3px;
    }
 
    /* ────────────────────────────────────────
       SCANNER OVERLAY
    ──────────────────────────────────────── */
    #scanner-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.92);
      z-index: 999;
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 20px;
    }
    #scanner-overlay.active { display: flex; }
    #scanner-container {
      width: 300px;
      max-width: 90vw;
      border-radius: 16px;
      overflow: hidden;
    }
    .scanner-hint {
      color: #fff;
      font-size: 14px;
      font-weight: 600;
      text-align: center;
      padding: 0 20px;
      opacity: .8;
    }
    #cancel-scan-btn {
      background: var(--danger);
      color: #fff;
      border-radius: 14px;
      padding: 14px 36px;
      font-size: 15px;
      font-weight: 800;
      letter-spacing: .5px;
      transition: background .15s, transform .15s;
    }
    #cancel-scan-btn:hover { background: #e03047; transform: scale(1.04); }
 
    /* ────────────────────────────────────────
       TOAST NOTIFICATION
    ──────────────────────────────────────── */
    #toast {
      position: fixed;
      bottom: 90px;
      left: 50%; transform: translateX(-50%) translateY(20px);
      background: #1e1e1e;
      color: #fff;
      padding: 12px 22px;
      border-radius: 24px;
      font-size: 0.8125rem; /* 13px → rem */
      font-weight: 700;
      z-index: 500;
      opacity: 0;
      transition: opacity .3s, transform .3s;
      white-space: nowrap;
      max-width: min(90vw, 420px);
      box-shadow: 0 8px 30px rgba(0,0,0,.35);
      pointer-events: none;
    }
    #toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
    [data-theme="light"] #toast { background: #1C1C1E; }
 
    /* ────────────────────────────────────────
       RESPONSIVE DESKTOP TWEAKS
    ──────────────────────────────────────── */
    /* 541px rule replaced by full desktop media query below */
 
    /* ────────────────────────────────────────
       ANIMATIONS
    ──────────────────────────────────────── */
    .fade-in {
      animation: fadeIn .3s ease forwards;
    }
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(8px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .slide-in {
      animation: slideIn .35s ease forwards;
    }
    @keyframes slideIn {
      from { opacity: 0; transform: scale(.95); }
      to   { opacity: 1; transform: scale(1); }
    }
    /* ────────────────────────────────────────
       PWA INSTALL BANNER
    ──────────────────────────────────────── */
    #install-banner {
      position: fixed;
      bottom: 84px;
      left: 50%;
      transform: translateX(-50%) translateY(120%);
      width: calc(100% - 24px);
      max-width: 516px;
      background: var(--surface);
      border: 1.5px solid var(--accent);
      border-radius: 20px;
      padding: 16px;
      z-index: 300;
      box-shadow: 0 8px 32px rgba(0,0,0,.18);
      display: flex;
      gap: 12px;
      align-items: flex-start;
      transition: transform .4s cubic-bezier(.34,1.56,.64,1), opacity .3s;
      opacity: 0;
    }
    #install-banner.show {
      transform: translateX(-50%) translateY(0);
      opacity: 1;
    }
    .install-icon {
      width: 48px; height: 48px;
      background: linear-gradient(135deg, #2dbb54, #69b749);
      border-radius: 12px;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
      font-size: 24px;
      box-shadow: 0 4px 12px rgba(45,187,84,.35);
    }
    .install-body { flex: 1; min-width: 0; }
    .install-title {
      font-size: 15px;
      font-weight: 800;
      color: var(--text);
      margin-bottom: 2px;
    }
    .install-sub {
      font-size: 12px;
      color: var(--subtext);
      line-height: 1.4;
    }
    /* iOS step hint */
    .install-ios-steps {
      margin-top: 8px;
      background: var(--input-bg);
      border-radius: 10px;
      padding: 8px 10px;
      font-size: 12px;
      color: var(--text);
      line-height: 1.6;
      display: none;
    }
    .install-ios-steps.visible { display: block; }
    .install-actions {
      display: flex;
      gap: 8px;
      margin-top: 10px;
    }
    .btn-install {
      flex: 1;
      background: linear-gradient(135deg, #2dbb54, #69b749);
      color: #fff;
      border-radius: 10px;
      padding: 9px 14px;
      font-size: 13px;
      font-weight: 800;
      border: none;
      cursor: pointer;
      transition: transform .15s, box-shadow .15s;
      box-shadow: 0 3px 10px rgba(45,187,84,.35);
    }
    .btn-install:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(45,187,84,.45); }
    .btn-install-dismiss {
      background: var(--input-bg);
      color: var(--subtext);
      border-radius: 10px;
      padding: 9px 14px;
      font-size: 13px;
      font-weight: 700;
      border: none;
      cursor: pointer;
    }
    .btn-install-dismiss:hover { background: var(--border); }
 
 
    /* ── Scroll-section wrapper (shared mobile+desktop) ──── */
    .scroll-wrapper { position: relative; }
    .scroll-btn { display: none; }
 
    /* ── Images always fluid ──────────────────────────────── */
    img { max-width: 100%; height: auto; }
 
    /* ═══════════════════════════════════════════════════════
       MOBILE  (≤ 767px) — sticky header + search area
    ═══════════════════════════════════════════════════════ */
    @media (max-width: 767px) {
      #top-wrapper {
        position: sticky;
        top: 0;
        z-index: 200;
      }
      #app-header {
        position: static; /* top-wrapper handles stickiness */
        z-index: auto;
      }
      #search-area {
        position: static; /* inside sticky top-wrapper */
        z-index: auto;
        border-bottom: 1px solid var(--border);
      }
      /* FIX 12 — PWA banner above mobile nav */
      #install-banner { bottom: 84px; }
    }
 
    /* ═══════════════════════════════════════════════════════
       DESKTOP  (≥ 768px) — full layout
    ═══════════════════════════════════════════════════════ */
    @media (min-width: 768px) {
 
      /* ── FIX 3: show desktop-only elements ────────────── */
      .desktop-only { display: flex !important; }
      .mobile-only  { display: none !important; }
 
      /* ── Sticky top-wrapper ────────────────────────────── */
      #top-wrapper {
        position: sticky;
        top: 0;
        z-index: 200;
      }
      #app-header { position: static; z-index: auto; }
      #search-area { position: static; z-index: auto; }
 
      /* ── App header: logo + search + controls ─────────── */
      #app-header {
        justify-content: space-between;
        padding: 0 32px;
        min-height: var(--header-h-desktop); /* FIX 4: use variable */
        gap: 20px;
      }
 
      /* Desktop search slot */
      #header-search-desktop {
        flex: 1;
        max-width: 860px;
        align-items: center;
      }
      #header-search-desktop .search-bar {
        width: 100%;
        background: rgba(255,255,255,0.22);
        border: 1.5px solid rgba(255,255,255,0.45);
        height: 40px;
        border-radius: 12px;
      }
      #header-search-desktop .search-bar svg.search-icon { color: rgba(255,255,255,0.85); }
      #header-search-desktop #search-input-d {
        flex: 1;
        background: none;
        border: none;
        outline: none; width: 100%;
        /*color: #fff;*/
        font-size: 0.875rem;
      }
      #header-search-desktop #search-input-d::placeholder { color: rgba(255,255,255,0.75); }
      #header-search-desktop #clear-btn-d {
        background: rgba(255,255,255,0.25);
        color: #fff;
      }
      #header-search-desktop #scan-btn-d { color: rgba(255,255,255,0.9); }
      /* Tipo chip adaptado al header desktop (glass style) */
      #header-search-desktop .search-bar-wrap { display: flex; align-items: stretch; width: 100%; }
      #header-search-desktop .tipo-chip-d {
        background: rgba(255,255,255,0.18);
        border: 1.5px solid rgba(255,255,255,0.45);
        border-right: 1px solid rgba(255,255,255,0.3);
        border-radius: 12px 0 0 12px;
        height: 40px;
        padding: 0 6px 0 10px;
      }
      #header-search-desktop .tipo-chip-d select {
        color: #fff;
        font-size: 11px;
        max-width: 96px;
      }
      #header-search-desktop .tipo-chip-d::after { border-top-color: rgba(255,255,255,0.7); }
      #header-search-desktop .tipo-chip-d .tipo-emoji { font-size: 14px; }
      #header-search-desktop .search-bar {
        border-radius: 0 12px 12px 0;
        border-left: none;
        flex: 1;
        min-width: 0;
      }

 
      /* Header right controls */
      .header-right-desktop {
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
      }
      .header-right-desktop #theme-btn {
        background: rgba(255,255,255,0.22);
        border: 1px solid rgba(255,255,255,0.35);
      }
      .header-right-desktop #theme-btn svg { stroke: #fff; }
      .header-right-desktop #menu-btn-desktop {
        background: rgba(255,255,255,0.22);
        border: 1px solid rgba(255,255,255,0.35);
        border-radius: 50%;
        width: 38px; height: 38px;
        display: flex; align-items: center; justify-content: center;
        cursor: pointer;
        color: #fff;
        transition: background .2s;
      }
      .header-right-desktop #menu-btn-desktop:hover { background: rgba(255,255,255,0.35); }
 
      /* Hide floating mobile menu btn */
      #menu-btn { display: none !important; }
 
      /* FIX 10: dropdown top = header height + 2px gutter */
      #app-menu {
        top: calc(var(--header-h-desktop) + 2px);
        right: 32px;
      }
 
      /* FIX 1: Mobile search area hidden — nav is OUTSIDE it now */
      #search-area { display: none !important; }
 
      /* ── Desktop horizontal nav ────────────────────────── */
      #desktop-nav {
        background: var(--surface);
        border-bottom: 2px solid var(--border);
        box-shadow: 0 2px 8px rgba(0,0,0,.06);
      }
      .desktop-nav-inner {
        display: flex;
        align-items: center;
        max-width: 1200px;
        width: 100%;
        margin: 0 auto;
        padding: 0 24px;
        gap: 4px;
      }
      .desktop-nav-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 0 20px;
        height: var(--desktop-nav-h);
        font-size: 0.875rem;
        font-weight: 700;
        color: var(--subtext);
        border-bottom: 3px solid transparent;
        margin-bottom: -2px;
        border-radius: 0;
        transition: color .2s, border-color .2s;
        white-space: nowrap;
        position: relative;
      }
      .desktop-nav-btn:hover { color: var(--accent); }
      .desktop-nav-btn.active {
        color: var(--accent);
        border-bottom-color: var(--accent);
      }
      .desktop-nav-badge {
        background: var(--danger);
        color: #fff;
        font-size: 0.5625rem;
        font-weight: 900;
        min-width: 16px;
        height: 16px;
        border-radius: 8px;
        display: flex; align-items: center; justify-content: center;
        padding: 0 3px;
      }
 
      /* Hide mobile bottom nav */
      #bottom-nav { display: none !important; }
 
      /* ── Content area: centered max-width ──────────────── */
      #main-content {
        max-width: 1200px;
        margin: 0 auto;
        padding-left: 24px;
        padding-right: 24px;
        padding-bottom: 60px;
        /* FIX 5: recalculate min-height for desktop chrome */
        min-height: calc(100dvh - var(--header-h-desktop) - var(--desktop-nav-h));
      }
 
      /* Slogan */
      #slogan-section { padding: 28px 0 16px; }
      .slogan-busca { font-size: 1.4rem; }
      .slogan-main  { font-size: 2.4rem; }
 
      /* Section titles */
      .section-title { padding: 0; font-size: 1.1rem; margin-top: 28px; }
 
      /* FIX 6: empty/state elements span full grid width */
      .trending-state,
      .empty-state,
      #no-results {
        grid-column: 1 / -1;
      }
 
      /* ── Scroll buttons ────────────────────────────────── */
      #favoritos-section .scroll-wrapper,
      #promo-section .scroll-wrapper,
      .comp-section .scroll-wrapper {
        display: flex;
        align-items: center;
        gap: 0;
      }
      .scroll-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 38px; height: 38px;
        border-radius: 50%;
        background: var(--surface);
        border: 1.5px solid var(--border);
        color: var(--text);
        font-size: 18px;
        font-weight: 900;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0,0,0,.1);
        transition: background .15s, transform .15s;
        z-index: 2;
        line-height: 1;
      }
      .scroll-btn:hover { background: var(--accent); color: #fff; transform: scale(1.08); }
      .scroll-btn.prev { margin-right: 6px; }
      .scroll-btn.next { margin-left: 6px; }
 
      .fav-scroll   { padding: 4px 0 10px; }
      .promo-scroll { padding: 4px 0 10px; }
      .comp-scroll  { padding: 4px 12px 12px 0; }
 
      .fav-card    { width: 130px; }
      .promo-banner { width: 380px; height: 160px; }
 
      /* ── Results grid ──────────────────────────────────── */
      #results-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 0 16px;
        align-items: start;
      }
      .product-card { margin: 8px 0; }
 
      /* ── Trending grid ─────────────────────────────────── */
      #trending-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 0 16px;
        align-items: start;
      }
 
      /* ── Mercado tab ───────────────────────────────────── */
      #mercado-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 0 16px;
        align-items: start;
      }
      .mercado-item { margin: 6px 0; }
      #ahorro-section { margin: 0 0 14px; }
      #btn-vaciar { margin: 16px 0 0; }
 
      /* Legal modal */
      .legal-modal { max-width: 680px; border-radius: 20px; margin: auto; }
      .legal-modal-overlay { align-items: center; }
 
      /* FIX 9: Toast — no bottom nav, allow wrapping */
      #toast {
        bottom: 32px;
        white-space: normal;
        text-align: center;
      }
 
      /* FIX 12: PWA install banner */
      #install-banner { bottom: 32px; max-width: 520px; }
 
      .comp-card { width: 220px; }
 
    } /* end @media 768px */
 
    @media (min-width: 1024px) {
      #results-list  { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
      #trending-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
      #mercado-list  { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
    }
 
    @media (min-width: 1400px) {
      #main-content        { max-width: 1400px; }
      .desktop-nav-inner   { max-width: 1400px; }
    }

    /* ────────────────────────────────────────
       WELCOME / LOCATION MODAL
    ──────────────────────────────────────── */
    #welcome-modal-overlay {
      position: fixed; inset: 0;
      background: rgba(0,0,0,.65);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      z-index: 1000;
      display: flex; align-items: center; justify-content: center;
      padding: 16px;
      opacity: 0; pointer-events: none;
      transition: opacity .3s;
    }
    #welcome-modal-overlay.open {
      opacity: 1; pointer-events: all;
    }
    #welcome-modal {
      background: var(--surface);
      border-radius: 24px;
      width: 100%; max-width: 420px;
      padding: 28px 24px 24px;
      box-shadow: 0 24px 64px rgba(0,0,0,.35);
      transform: scale(.93) translateY(12px);
      transition: transform .32s cubic-bezier(.34,1.56,.64,1);
      position: relative;
    }
    #welcome-modal-overlay.open #welcome-modal {
      transform: scale(1) translateY(0);
    }
    .wm-icon {
      width: 60px; height: 60px;
      background: linear-gradient(135deg, #2dbb54, #69b749);
      border-radius: 18px;
      display: flex; align-items: center; justify-content: center;
      margin: 0 auto 16px;
      box-shadow: 0 8px 24px rgba(45,187,84,.4);
      font-size: 28px;
    }
    .wm-title {
      font-size: 20px; font-weight: 900;
      text-align: center;
      color: var(--text);
      margin-bottom: 6px;
    }
    .wm-subtitle {
      font-size: 13px; color: var(--subtext);
      text-align: center; line-height: 1.5;
      margin-bottom: 22px;
    }
    .wm-subtitle strong { color: var(--accent); }
    .wm-field { margin-bottom: 14px; }
    .wm-label {
      display: block;
      font-size: 12px; font-weight: 800;
      color: var(--subtext);
      text-transform: uppercase; letter-spacing: .8px;
      margin-bottom: 6px;
    }
    .wm-input, .wm-select {
      width: 100%;
      background: var(--input-bg);
      border: 1.5px solid var(--border);
      border-radius: 12px;
      padding: 0 14px;
      height: 48px;
      font-family: var(--font);
      font-size: 15px; font-weight: 600;
      color: var(--text);
      outline: none;
      appearance: none;
      -webkit-appearance: none;
      transition: border-color .2s, box-shadow .2s;
    }
    .wm-select {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23636366' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 14px center;
      padding-right: 38px;
      cursor: pointer;
    }
    .wm-input:focus, .wm-select:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(45,187,84,.15);
    }
    .wm-select:disabled { opacity: .45; cursor: default; }
    .wm-btn-save {
      width: 100%;
      background: linear-gradient(135deg, #2dbb54, #69b749);
      color: #fff;
      border-radius: 14px;
      height: 52px;
      font-size: 16px; font-weight: 800;
      letter-spacing: .3px;
      border: none; cursor: pointer;
      transition: transform .15s, box-shadow .15s;
      box-shadow: 0 6px 20px rgba(45,187,84,.4);
      margin-top: 6px;
    }
    .wm-btn-save:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(45,187,84,.5); }
    .wm-btn-save:active { transform: scale(.98); }
    .wm-btn-save:disabled { opacity: .5; transform: none; cursor: not-allowed; }
    .wm-close-btn {
      position: absolute; top: 14px; right: 14px;
      background: var(--input-bg);
      border: none; border-radius: 50%;
      width: 32px; height: 32px;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; color: var(--subtext);
      font-size: 14px;
      transition: background .15s;
    }
    .wm-close-btn:hover { background: var(--border); }

    /* ────────────────────────────────────────
       NO-LOCATION MESSAGE
    ──────────────────────────────────────── */
    .no-location-msg {
      display: none;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      padding: 36px 24px;
      text-align: center;
    }
    .no-location-msg .nlm-icon { font-size: 38px; }
    .no-location-msg .nlm-title {
      font-size: 15px; font-weight: 800;
      color: var(--text);
    }
    .no-location-msg .nlm-text {
      font-size: 13px; color: var(--subtext);
      line-height: 1.5;
    }
    .nlm-btn {
      background: linear-gradient(135deg, #2dbb54, #69b749);
      color: #fff; border: none; cursor: pointer;
      border-radius: 12px;
      padding: 11px 22px;
      font-size: 14px; font-weight: 800;
      font-family: var(--font);
      transition: transform .15s, box-shadow .15s;
      box-shadow: 0 4px 14px rgba(45,187,84,.35);
    }
    .nlm-btn:hover { transform: translateY(-1px); }

    /* ────────────────────────────────────────
       PROFILE / GREETING
    ──────────────────────────────────────── */
    #greeting-bar {
      display: none;
      align-items: center;
      gap: 8px;
      padding: 8px 16px 2px;
    }
    #greeting-bar .greeting-avatar {
      width: 28px; height: 28px;
      background: linear-gradient(135deg, #2dbb54, #69b749);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 12px; font-weight: 900; color: #fff;
      flex-shrink: 0;
    }
    #greeting-bar .greeting-text {
      font-size: 13px; font-weight: 700;
      color: var(--text);
    }
    #greeting-bar .greeting-text span { color: var(--accent); }

    /* Desktop nav location chip */
    #desktop-location-chip {
      margin-left: auto;
      display: flex;
      align-items: center;
      gap: 6px;
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 5px 12px 5px 8px;
      cursor: pointer;
      transition: background .15s, border-color .15s;
      max-width: 260px;
    }
    #desktop-location-chip:hover {
      background: var(--input-bg);
      border-color: var(--accent);
    }
    #desktop-location-chip svg { flex-shrink: 0; color: var(--accent); }
    #desktop-location-chip .chip-loc-text {
      font-size: 12px; font-weight: 700;
      color: var(--text);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    #desktop-location-chip .chip-edit {
      font-size: 10px; color: var(--subtext);
      white-space: nowrap; flex-shrink: 0;
    }
    #desktop-greeting-text {
      font-size: 13px; font-weight: 700;
      color: var(--subtext);
      white-space: nowrap;
      flex-shrink: 0;
    }
    #desktop-greeting-text span { color: var(--accent); }

    /* Profile menu item styles */
    .menu-item-profile {
      background: linear-gradient(135deg, rgba(45,187,84,.08), rgba(105,183,73,.08));
      border-bottom: 1px solid var(--border);
    }
    .profile-info-mini {
      flex-direction: column;
      align-items: flex-start !important;
      gap: 2px !important;
    }
    .profile-info-mini .pm-name {
      font-size: 14px; font-weight: 800; color: var(--text);
    }
    .profile-info-mini .pm-loc {
      font-size: 11px; color: var(--subtext);
    }

    /* Menu button pill label */
    #menu-btn {
      width: auto !important;
      border-radius: 20px !important;
      padding: 0 10px !important;
      gap: 4px;
      font-size: 11px !important;
      font-weight: 800 !important;
      letter-spacing: .3px;
      color: var(--subtext) !important;
    }
    #menu-btn .menu-btn-label {
      font-size: 11px; font-weight: 800;
      letter-spacing: .3px; color: var(--subtext);
    }

    /* ────────────────────────────────────────
       PROMO DETAIL — GRID ON DESKTOP
    ──────────────────────────────────────── */
    @media (min-width: 768px) {
      #promo-products-list .slide-in {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 0 16px;
        align-items: start;
      }
      #promo-products-list .slide-in .product-card {
        margin: 8px 0;
      }
      #greeting-bar { display: none !important; }
    }
    @media (min-width: 1024px) {
      #promo-products-list .slide-in {
        grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
      }
    }
  
    /* ── TASA CHIP ────────────────────────────── */
    .tasa-chip {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      background: rgba(205,220,57,.1);
      border: 1px solid rgba(170,170,170,.8);
      border-radius: 20px;
      padding: 3px 9px;
      font-size: 11px;
      font-weight: 800;
      color: #AAAAAA;
      white-space: nowrap;
      flex-shrink: 0;
      letter-spacing: .2px;
    }
    .tasa-chip .tasa-label {
      font-size: 9px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: .5px;
      color: rgba(170,170,170,.8);
      margin-right: 2px;
    }
    /* ── TIEMPO DE ACTUALIZACIÓN ─────────────── */
    .price-updated {
      font-size: 10px;
      color: var(--subtext);
      opacity: .8;
      white-space: nowrap;
    }
    .price-updated::before { content: '·'; margin: 0 3px; }

    /* ── TIPO SELECTOR ────────────────────────────── */
    .search-bar-wrap {
      display: flex;
      align-items: stretch;
    }
    .tipo-chip {
      display: flex;
      align-items: center;
      gap: 5px;
      background: var(--input-bg);
      border-radius: 14px 0 0 14px;
      border-right: 1.5px solid var(--border);
      padding: 0 8px 0 10px;
      height: 44px;
      flex-shrink: 0;
      cursor: pointer;
      position: relative;
      user-select: none;
    }
    .tipo-chip .tipo-emoji { font-size: 15px; line-height: 1; }
    .tipo-chip select {
      background: transparent;
      border: none;
      outline: none;
      font-family: var(--font);
      font-size: 11.5px;
      font-weight: 800;
      color: var(--text);
      cursor: pointer;
      padding-right: 14px;
      -webkit-appearance: none;
      appearance: none;
      max-width: 100px;
    }
    .tipo-chip select option {
    color: var(--text) !important;
    background-color: var(--surface) !important;
    }
    @media (max-width: 600px) {
  .tipo-chip {
    padding: 0 15px 0 10px;
  }
  .tipo-chip select {
    width: 12px;
    color: transparent;
    padding-right: 0;
    margin-left: -5px;
  }
  .tipo-emoji {
    font-size: 18px;
  }
}    
    .tipo-chip::after {
      content: '';
      width: 0; height: 0;
      border-left: 4px solid transparent;
      border-right: 4px solid transparent;
      border-top: 5px solid var(--subtext);
      position: absolute;
      right: 5px;
      top: 50%;
      transform: translateY(-50%);
      pointer-events: none;
    }
    /* flatten left radius on search-bar when tipo chip is present */
    .search-bar-wrap .search-bar {
      border-radius: 0 14px 14px 0;
      flex: 1;
    }
    /* BETA badge */
    .beta-tag {
      font-size: 8px;
      font-weight: 900;
      background: var(--warning);
      color: #fff;
      border-radius: 3px;
      padding: 1px 4px;
      letter-spacing: .3px;
      vertical-align: super;
      margin-left: 2px;
      line-height: 1;
    }
    @media (max-width: 380px) {
  
  #search-area { 
    padding: 10px 12px 12px; 
  }
  
  
  .search-bar { 
    padding: 0 8px; 
    gap: 4px; 
  }
  
  
  .tipo-chip { 
    padding: 0 8px 0 6px; 
  }
  
  
  #search-input { 
    font-size: 13.5px; 
  }
  
  
  #scan-btn svg { 
    width: 22px; 
    height: 22px; 
  }
}
.comp-toggle-wrapper {
  display: flex;
  background: var(--input-bg);
  border-radius: 12px;
  margin: 0 16px 12px;
  padding: 4px;
}
.comp-toggle-btn {
  flex: 1;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--subtext);
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
}
.comp-toggle-btn.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow);
}
[data-theme="dark"] .comp-toggle-btn.active {
  background: #2a2a2a;
}
.missing-products {
  font-size: 10px;
  color: var(--subtext);
  margin-top: 6px;
  line-height: 1.3;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Máximo 2 líneas */
  -webkit-box-orient: vertical;
  overflow: hidden;
}    

