/* ════════════════════════════════════════════════════════════════════════
   bo-tienda.css — Tienda (mirror of iOS TiendaView): artdriver catalog from
   the public `catalog_products` table → search + category filter → order draft
   → "Pedido a artdriver" (copied to clipboard). Tokens only (DESIGN.md).
   ════════════════════════════════════════════════════════════════════════ */

.bo-tienda { position: relative; }

/* Sponsor header */
.bo-td-sponsor {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-tertiary); border: 1px solid rgba(var(--crimson-rgb), 0.35);
  border-radius: var(--radius-md); padding: 14px; margin-bottom: 14px;
}
.bo-td-sponsor .ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--crimson-rgb), 0.16); color: var(--crimson); font-size: 18px; flex: 0 0 auto; }
.bo-td-sponsor h3 { font-size: 17px; font-weight: 900; }
.bo-td-sponsor p { font-size: 12px; color: var(--text-secondary); }

/* Search + filter chips */
.bo-td-controls { display: grid; gap: 10px; margin-bottom: 14px; }
.bo-td-search { display: flex; align-items: center; gap: 8px; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: 11px; padding: 0 12px; }
.bo-td-search i { color: var(--text-muted); font-size: 13px; }
.bo-td-search input { flex: 1; font-family: inherit; font-size: 15px; color: var(--text-primary); background: none; border: none; outline: none; padding: 12px 0; }
.bo-td-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.bo-td-chip { font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 7px 13px; border-radius: 999px; background: var(--bg-tertiary); border: 1px solid var(--border-color); color: var(--text-secondary); }
.bo-td-chip:hover { color: var(--text-primary); }
.bo-td-chip.on { background: rgba(var(--crimson-rgb), 0.14); border-color: var(--crimson); color: var(--text-primary); }

/* Product grid */
.bo-td-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bo-td-card { display: flex; flex-direction: column; gap: 8px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 10px; }
.bo-td-img { height: 104px; border-radius: 11px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.bo-td-img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.bo-td-img .ph { color: #b9b1a4; font-size: 26px; }
.bo-td-name { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.25; }
.bo-td-cat { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.bo-td-card .grow { flex: 1; }

.bo-td-add { font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--crimson); width: 100%; padding: 9px; border: none; border-radius: 10px; background: rgba(var(--crimson-rgb), 0.14); }
.bo-td-add:hover { background: rgba(var(--crimson-rgb), 0.2); }
.bo-td-step { display: flex; align-items: center; justify-content: space-between; padding: 5px 6px; border-radius: 10px; background: rgba(var(--crimson-rgb), 0.14); }
.bo-td-step button { width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer; background: var(--bg-card); color: var(--crimson); font-size: 13px; display: grid; place-items: center; }
.bo-td-step .q { font-family: 'Space Mono', monospace; font-size: 15px; font-weight: 700; }

.bo-td-state { text-align: center; padding: 40px 16px; color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.bo-td-state i { display: block; font-size: 26px; color: var(--text-muted); margin-bottom: 8px; }

/* Order bar */
.bo-td-orderbar { position: sticky; bottom: 12px; margin-top: 14px; display: none; }
.bo-td-orderbar.show { display: block; }
.bo-td-orderbar button {
  width: 100%; font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer;
  color: #fff; background: var(--crimson); border: none; border-radius: 14px; padding: 15px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.bo-td-orderbar button:hover { background: #b53333; }

/* Order modal */
.bo-td-overlay { position: fixed; inset: 0; z-index: 1000; display: none; align-items: flex-start; justify-content: center; background: rgba(0,0,0,0.66); backdrop-filter: blur(4px); padding: 24px 16px; overflow-y: auto; }
.bo-td-overlay.open { display: flex; }
.bo-td-modal { width: 100%; max-width: 460px; margin: auto; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-lg, 24px); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.7); overflow: hidden; }
.bo-td-mhead { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-color); }
.bo-td-mhead h3 { font-size: 18px; font-weight: 800; }
.bo-td-mhead .x { background: none; border: none; color: var(--text-secondary); font-size: 18px; cursor: pointer; }
.bo-td-mbody { padding: 16px 20px; display: grid; gap: 10px; }
.bo-td-orow { display: flex; align-items: center; gap: 12px; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: 12px; padding: 11px 12px; }
.bo-td-orow .nm { font-size: 14px; font-weight: 600; }
.bo-td-orow .ct { font-size: 11px; color: var(--text-muted); }
.bo-td-orow .ostep { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.bo-td-orow .ostep button { background: none; border: none; cursor: pointer; font-size: 20px; }
.bo-td-orow .ostep .minus { color: var(--text-muted); }
.bo-td-orow .ostep .plus { color: var(--crimson); }
.bo-td-orow .ostep .q { font-family: 'Space Mono', monospace; font-weight: 700; min-width: 20px; text-align: center; }
.bo-td-note { font-family: inherit; font-size: 15px; color: var(--text-primary); background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: 11px; padding: 12px; outline: none; width: 100%; }
.bo-td-note:focus { border-color: var(--crimson); }
.bo-td-send { width: 100%; font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer; color: #fff; background: var(--crimson); border: none; border-radius: 12px; padding: 14px; margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.bo-td-send:hover { background: #b53333; }
.bo-td-send:disabled { opacity: 0.5; cursor: default; }
