:root {
  --ink: #1b1340;
  --violet: #5b3df5;
  --violet-2: #3b22c4;
  --lime: #c8f53c;
  --lime-ink: #2c3a00;
  --bg: #f3f1fb;
  --card: #ffffff;
  --muted: #6e6890;
  --line: #e4e0f5;
  --same: #14866d;
  --same-bg: #dcf6ee;
  --alt: #8a4b00;
  --alt-bg: #ffecd1;
  --r: 18px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: "Inter", system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; padding-bottom: 90px; }
h1, h2, h3, .brand, .go, .price { font-family: "Space Grotesk", "Inter", sans-serif; }
button { font: inherit; cursor: pointer; }
a { color: var(--violet); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* Barra superior */
.bar { background: var(--ink); color: #fff; }
.bar-in { height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 20px; display: flex; align-items: center; gap: 8px; letter-spacing: -.3px; }
.mark { width: 28px; height: 28px; border-radius: 9px; background: var(--lime); color: var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.biz, .zone, .tab, .brand { white-space: nowrap; flex-shrink: 0; }
.bar-in { gap: 10px; }
@media (min-width: 761px) and (max-width: 1100px) {
  .bar-in { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 8px; }
  .bar-in .topsearch { order: 10; flex: 1 1 100%; max-width: none; }
}
.biz { margin-left: auto; margin-right: 0; color: var(--ink); background: var(--lime); text-decoration: none; font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 999px; letter-spacing: .2px; }
.biz:hover { background: #fff; }
.zone { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #fff; border-radius: 999px; padding: 6px 14px; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.zone .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(200,245,60,.25); }

/* Escenario */
.stage { background: radial-gradient(1200px 400px at 80% -10%, #7d63ff 0%, transparent 60%), linear-gradient(160deg, var(--violet) 0%, var(--violet-2) 100%); color: #fff; padding: 46px 0 36px; }
.kicker { margin: 0 0 10px; text-transform: uppercase; letter-spacing: 1.5px; font-size: 12px; font-weight: 700; color: var(--lime); }
.stage h1 { margin: 0 0 24px; font-size: clamp(26px, 4vw, 42px); line-height: 1.1; font-weight: 700; }
.stage h1 em { font-style: normal; color: #d9d1ff; }
.finder { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 999px; padding: 6px 6px 6px 18px; max-width: 760px; color: var(--muted); box-shadow: 0 20px 40px rgba(20,10,80,.35); }
.finder input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 16px; color: var(--ink); padding: 10px 0; background: transparent; }
.finder button { background: var(--lime); color: var(--lime-ink); border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 700; font-family: "Space Grotesk", sans-serif; }
.finder button:hover { filter: brightness(.95); }
.pills { display: flex; gap: 8px; margin-top: 18px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.pills a { flex: none; color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 500; }
.pills a:hover { background: rgba(255,255,255,.12); }

/* Franja de supermercados */
.ribbon { display: flex; align-items: center; gap: 14px; margin-top: -18px; background: var(--card); border-radius: var(--r); padding: 12px 16px; box-shadow: 0 8px 24px rgba(40,20,120,.08); flex-wrap: wrap; position: relative; }
.ribbon-title { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; }
.markets { display: flex; flex-wrap: wrap; gap: 6px; }
.mk { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 600; }
.mk .av { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; }
.mk small { color: var(--muted); font-weight: 500; }
.mk.off { opacity: .45; text-decoration: line-through; text-decoration-color: rgba(0,0,0,.3); }

/* Tablero */
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 12px; flex-wrap: wrap; }
.board-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.seg { display: inline-flex; background: #e8e4fa; border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--ink); color: #fff; }
.notice { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.listsearch { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding: 5px 5px 5px 16px; margin-bottom: 14px; color: var(--muted); transition: border-color .15s, box-shadow .15s; }
.listsearch:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(91,61,245,.12); }
.listsearch input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 15px; color: var(--ink); padding: 8px 0; }
.listsearch button { border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: inherit; font-weight: 600; font-size: 14px; padding: 9px 18px; cursor: pointer; }
.listsearch button:hover { background: var(--violet); }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(310px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.board.ranking { grid-auto-flow: row; grid-template-columns: 1fr; overflow: visible; }
.hint { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.hint-step { background: var(--card); border: 1px dashed #cfc6f7; border-radius: var(--r); padding: 18px; color: var(--muted); display: flex; gap: 12px; align-items: center; }
.hint-step b { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; font-family: "Space Grotesk"; }

.col { background: var(--card); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.col-head { padding: 12px 14px; color: #fff; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.col-head small { font-weight: 500; opacity: .9; }
.col-body { padding: 6px; display: flex; flex-direction: column; gap: 4px; max-height: 640px; overflow-y: auto; }
.col-empty { padding: 18px; color: var(--muted); font-size: 13px; }

.item { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; }
.item:hover { background: #f7f5ff; }
.item img { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 10px; }
.item .nm { font-size: 13px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .nm a { color: inherit; text-decoration: none; }
.item .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.item .right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.price { font-weight: 700; font-size: 17px; }
.plus { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 18px; line-height: 1; }
.plus:hover { background: var(--violet); }
.plus.in { background: var(--lime); color: var(--lime-ink); }
.flag { display: inline-block; font-size: 10px; font-weight: 700; background: var(--lime); color: var(--lime-ink); padding: 1px 6px; border-radius: 6px; margin-left: 4px; vertical-align: middle; }
.board.ranking .item { background: var(--card); border: 1px solid var(--line); grid-template-columns: 56px 1fr 120px auto; }
.storedot { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
.storedot i { width: 8px; height: 8px; border-radius: 50%; }

.loading { grid-column: 1 / -1; text-align: center; padding: 50px; color: var(--muted); }
.pulse { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; }
.pulse span { width: 10px; height: 10px; border-radius: 50%; background: var(--violet); animation: b 1s infinite ease-in-out; }
.pulse span:nth-child(2) { animation-delay: .15s; } .pulse span:nth-child(3) { animation-delay: .3s; }
@keyframes b { 0%, 100% { transform: scale(.5); opacity: .4; } 50% { transform: scale(1); opacity: 1; } }

/* Barra inferior */
.dock { position: fixed; left: 0; right: 0; bottom: 0; background: var(--ink); color: #fff; z-index: 30; box-shadow: 0 -8px 30px rgba(20,10,60,.3); }
.dock[hidden] { display: none; }
.dock-in { display: flex; align-items: center; gap: 16px; height: 70px; }
.dock-info b { font-family: "Space Grotesk"; font-size: 20px; color: var(--lime); }
.dock-best { flex: 1; font-size: 14px; color: #d4cff0; }
.dock-best b { color: #fff; }
.go { background: var(--lime); color: var(--lime-ink); border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 700; }
.go:disabled { opacity: .5; cursor: default; }
.wide { width: 100%; }
.ghost { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--muted); }
.x { background: none; border: 0; font-size: 28px; line-height: 1; color: var(--muted); padding: 0 4px; }

/* Panel lateral */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--card); z-index: 45; transform: translateX(105%); transition: transform .25s ease; display: flex; flex-direction: column; padding: 18px; box-shadow: -10px 0 40px rgba(20,10,60,.2); }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-head h3 { margin: 0; font-size: 22px; }
.scrim { position: fixed; inset: 0; background: rgba(27,19,64,.45); z-index: 40; }
.scrim[hidden] { display: none; }
.basket { list-style: none; padding: 0; margin: 14px 0; overflow-y: auto; flex: 1; }
.basket li { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.basket img { width: 48px; height: 48px; object-fit: contain; }
.basket .n { font-size: 13px; font-weight: 600; line-height: 1.2; }
.basket .s { font-size: 12px; color: var(--muted); }
.basket li.empty { display: block; text-align: center; color: var(--muted); border: 0; padding: 30px 0; }
.qty { display: flex; align-items: center; gap: 6px; background: var(--bg); border-radius: 999px; padding: 3px; }
.qty button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: #fff; font-weight: 700; }
.podium { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.podium .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; }
.rank { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--bg); font-size: 14px; }
.rank .pos { font-family: "Space Grotesk"; font-weight: 700; color: var(--muted); }
.rank b { font-family: "Space Grotesk"; }
.rank small { display: block; color: var(--muted); font-size: 11px; }
.rank.first { background: var(--ink); color: #fff; }
.rank.first .pos, .rank.first small { color: var(--lime); }

/* Hojas modales */
.sheet { position: fixed; inset: 0; background: rgba(27,19,64,.55); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 60; overflow: auto; }
.sheet[hidden] { display: none; }
.sheet-box { background: var(--card); border-radius: 24px; padding: 22px; width: 100%; max-width: 1240px; }
.sheet-box.small { max-width: 420px; }
.sheet-box h3 { margin: 0 0 6px; font-size: 22px; }
.sheet-box p { color: var(--muted); margin: 0; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
#cpForm { display: flex; gap: 8px; margin-top: 16px; }
#cpForm input { flex: 1; min-width: 0; border: 2px solid var(--line); border-radius: 999px; padding: 10px 16px; font: inherit; font-size: 18px; letter-spacing: 3px; outline-color: var(--violet); }

/* Comparativa */
.verdict { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 16px; }
.vbox { border-radius: 16px; padding: 14px 16px; background: var(--bg); }
.vbox span { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; }
.vbox b { display: block; font-family: "Space Grotesk"; font-size: 22px; margin-top: 4px; }
.vbox.win { background: var(--ink); color: #fff; } .vbox.win span { color: var(--lime); }
.scroll { overflow-x: auto; }
table.cmp { border-collapse: separate; border-spacing: 0 6px; width: 100%; min-width: 820px; font-size: 13px; }
.cmp th { text-align: left; padding: 6px 10px; font-size: 13px; white-space: nowrap; }
.cmp th i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.cmp td { background: var(--bg); padding: 10px; vertical-align: top; }
.cmp td:first-child { border-radius: 12px 0 0 12px; font-weight: 600; min-width: 170px; }
.cmp td:last-child { border-radius: 0 12px 12px 0; }
.cmp td small { display: block; color: var(--muted); font-weight: 500; }
.cmp td.best { background: #e6fbef; }
.cell { display: grid; grid-template-columns: 38px 1fr; gap: 8px; min-width: 160px; }
.cell img { width: 38px; height: 38px; object-fit: contain; background: #fff; border-radius: 8px; }
.cell .p { font-family: "Space Grotesk"; font-weight: 700; font-size: 16px; }
.cell .nm a { color: var(--ink); text-decoration: none; }
.cell select { width: 100%; font-size: 12px; margin-top: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; }
.tag { display: inline-block; font-size: 10px; font-weight: 700; border-radius: 6px; padding: 1px 6px; text-transform: uppercase; letter-spacing: .4px; }
.tag.igual { background: var(--same-bg); color: var(--same); }
.tag.similar { background: var(--alt-bg); color: var(--alt); }
.adj { color: var(--alt); font-size: 11px; }
.na { color: var(--muted); font-style: italic; }
.cmp tfoot td { background: var(--ink); color: #fff; font-family: "Space Grotesk"; font-weight: 700; font-size: 16px; }
.cmp tfoot td small { color: #bdb6e6; font-family: "Inter"; }
.cmp tfoot td.win { background: var(--lime); color: var(--lime-ink); }
.cmp tfoot td.win small { color: var(--lime-ink); }
.legend { font-size: 12px; color: var(--muted); margin-top: 12px; line-height: 1.6; }

.foot { color: var(--muted); font-size: 12px; padding: 30px 16px; }
.muted { color: var(--muted); font-size: 14px; }
.kbd { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 15px; vertical-align: middle; }

/* Pestañas */
.tabs { display: flex; gap: 4px; background: rgba(255,255,255,.08); border-radius: 999px; padding: 4px; }
.tab { color: #d4cff0; text-decoration: none; padding: 6px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.tab.on { background: #fff; color: var(--ink); }
.count { background: var(--lime); color: var(--lime-ink); border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }

/* Lo básico */
.basics { background: var(--card); border-radius: var(--r); margin-top: 18px; padding: 18px; border: 1px solid var(--line); }
.basics-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.basics h2 { margin: 0 0 4px; font-size: 20px; }
.basics p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.brow { display: grid; grid-template-columns: 26px 120px 1fr 90px; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; }
.brow .pos { font-family: "Space Grotesk"; font-weight: 700; color: var(--muted); }
.brow .nm { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.brow .nm i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.brow .track { height: 12px; background: var(--bg); border-radius: 999px; overflow: hidden; position: relative; }
.brow .fill { height: 100%; border-radius: 999px; background: #b7a9ff; }
.brow.first .fill { background: var(--violet); }
.brow .val { text-align: right; font-family: "Space Grotesk"; font-weight: 700; }
.brow .miss { grid-column: 3 / 5; font-size: 12px; color: var(--alt); margin-top: -4px; }
.brow.first .val { color: var(--violet); }
.btable { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 14px; min-width: 700px; }
.btable th, .btable td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.btable td.min { background: #e6fbef; font-weight: 700; }
.btable small { display: block; color: var(--muted); font-weight: 500; }
.btable td.na { color: var(--muted); font-style: italic; }

/* Cesta */
.cart-hero { background: linear-gradient(160deg, var(--violet) 0%, var(--violet-2) 100%); color: #fff; padding: 30px 0 46px; }
.cart-hero h1 { margin: 0 0 6px; font-size: clamp(24px, 3.5vw, 34px); }
.cart-hero p { margin: 0; color: #d9d1ff; max-width: 720px; }
.empty-cart { background: var(--card); border-radius: var(--r); padding: 40px; text-align: center; margin-top: -24px; position: relative; }
.empty-cart .go { text-decoration: none; display: inline-block; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 10px; overflow-x: auto; margin-top: -26px; position: relative; padding-bottom: 6px; }
.scard { background: var(--card); border: 2px solid transparent; border-radius: 16px; padding: 12px 14px; text-align: left; box-shadow: 0 8px 20px rgba(40,20,120,.08); display: flex; flex-direction: column; gap: 2px; }
.scard .who { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.scard .who i { width: 10px; height: 10px; border-radius: 50%; }
.scard .tot { font-family: "Space Grotesk"; font-weight: 700; font-size: 22px; }
.scard small { color: var(--muted); font-size: 11px; }
.scard .crown { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--violet); }
.scard.sel { border-color: var(--violet); }
.scard.best .tot { color: var(--violet); }
.scard.combo { background: var(--ink); color: #fff; cursor: default; }
.scard.combo small { color: #bdb6e6; }
.cart-head { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 10px; gap: 10px; }
.cart-head h2 { margin: 0; font-size: 20px; }
.rows { display: flex; flex-direction: column; gap: 8px; }
/* Cesta: tu producto | tu precio | → | en el súper elegido | su precio | ahorro */
.crow, .crow-head { display: grid; grid-template-columns: minmax(0, 1fr) 92px 24px minmax(0, 1.2fr) 100px 96px; gap: 12px; align-items: center; }
.crow { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.crow-head { padding: 4px 12px 2px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.crow-head small { display: block; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 11px; }
.crow-head .r { text-align: right; }
.crow .mycost { text-align: right; font-family: "Space Grotesk"; font-weight: 700; font-size: 18px; color: var(--muted); }
.crow .mycost small, .crow .save small { display: block; font-family: "Inter"; font-weight: 500; font-size: 11px; color: var(--muted); }
.crow .save { text-align: right; font-family: "Space Grotesk"; font-weight: 700; font-size: 16px; border-radius: 10px; padding: 6px 8px; }
.crow .save.up { background: #e3f6ec; color: #13774f; }
.crow .save.up small { color: #13774f; }
.crow .save.down { background: #fdeaea; color: #b42318; }
.crow .save.down small { color: #b42318; }
.crow .save.even { color: var(--muted); }
.crow.total-row { background: #f6f4ff; border-color: #d9d2fb; }
.crow.total-row .mine { grid-template-columns: 22px 48px 1fr; }
.crow.total-row .n small { display: block; font-weight: 500; font-size: 12px; }
.crow.total-row .mycost, .crow.total-row .cost { font-size: 20px; }
.crow .mine { display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: center; }
.crow img { width: 48px; height: 48px; object-fit: contain; }
.crow .n { font-weight: 600; font-size: 14px; line-height: 1.25; }
.crow .s { font-size: 12px; color: var(--muted); }
.crow .arrow { color: var(--muted); text-align: center; font-size: 18px; }
.crow .there { display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: center; }
.crow .there select { width: 100%; max-width: 360px; font-size: 12px; margin-top: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 3px; background: #fff; }
.crow .cost { text-align: right; font-family: "Space Grotesk"; font-weight: 700; font-size: 18px; }
.crow .cost small { display: block; font-family: "Inter"; font-weight: 500; font-size: 11px; color: var(--alt); }
.crow.none { background: #faf9fd; }
.crow .nothing { color: var(--muted); font-size: 13px; font-style: italic; }
.mine .qty { margin-top: 4px; width: max-content; }
.rm { background: none; border: 0; color: var(--muted); font-size: 12px; text-decoration: underline; margin-left: 6px; }
.tag.none { background: #ece9f6; color: var(--muted); }
.cart-total { display: flex; justify-content: flex-end; gap: 16px; align-items: baseline; padding: 14px 12px; font-size: 15px; }
.cart-total b { font-family: "Space Grotesk"; font-size: 26px; }
.toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 70; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.dock .go { text-decoration: none; }

/* Buscador superior */
.bar-in { gap: 14px; }
.topsearch { flex: 1 1 160px; min-width: 120px; max-width: 520px; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 0 14px; color: #bdb6e6; }
.topsearch input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: #fff; font: inherit; padding: 9px 0; }
.topsearch input::placeholder { color: #9d95c9; }
.topsearch:focus-within { background: #fff; color: var(--muted); }
.topsearch:focus-within input { color: var(--ink); }

/* Cestas automáticas */
.auto { background: radial-gradient(900px 300px at 85% -20%, #7d63ff 0%, transparent 60%), linear-gradient(160deg, var(--violet) 0%, var(--violet-2) 100%); color: #fff; padding: 22px 0 36px; }
.auto h1 { margin: 0 0 14px; font-size: clamp(20px, 2.6vw, 28px); line-height: 1.15; max-width: 760px; }
/* Cestas sugeridas: una sola fila que se desliza a izquierda y derecha */
.auto-row { position: relative; }
.auto-cards { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scroll-behavior: smooth;
  padding: 2px 2px 8px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.35) transparent; }
.auto-cards::-webkit-scrollbar { height: 6px; }
.auto-cards::-webkit-scrollbar-thumb { background: rgba(255,255,255,.35); border-radius: 6px; }
.acard { flex: 0 0 196px; scroll-snap-align: start; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); border-radius: 14px; padding: 11px 12px; color: #fff; text-align: left; display: flex; flex-direction: column; gap: 4px; transition: background .15s, transform .15s; }
.acard:hover { background: rgba(255,255,255,.18); transform: translateY(-2px); }
.acard .top { display: flex; align-items: center; gap: 8px; }
.acard .ico { width: 28px; height: 28px; flex: none; border-radius: 9px; background: var(--lime); color: var(--lime-ink); display: grid; place-items: center; font-size: 15px; }
.acard b { font-family: "Space Grotesk"; font-size: 15px; line-height: 1.15; }
.acard span.txt { color: #d9d1ff; font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.acard em { font-style: normal; margin-top: auto; padding-top: 2px; font-weight: 700; color: var(--lime); font-size: 12px; }
.scroll-btn { position: absolute; top: 50%; transform: translateY(-60%); width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: #fff; color: var(--ink); font-size: 18px; box-shadow: 0 6px 16px rgba(20,10,60,.3); z-index: 2; }
.scroll-btn.prev { left: -10px; } .scroll-btn.next { right: -10px; }
.scroll-btn[hidden] { display: none; }
.auto-where { background: #f6f4ff; border: 1px solid #e1dbfb; border-radius: 14px; padding: 10px 12px; margin: 10px 0 4px; font-size: 14px; }
.auto-where small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.auto-opts { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; padding-bottom: 2px; }
.aopt { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 10px; font: inherit; font-size: 12px; cursor: pointer; color: var(--ink); min-width: 92px; }
.aopt .nm { display: flex; align-items: center; gap: 5px; font-weight: 600; }
.aopt i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.aopt b { font-family: "Space Grotesk"; font-size: 14px; }
.aopt small { margin: 0; font-size: 11px; }
.aopt.on { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(91,61,245,.12); }
.aopt:hover { border-color: var(--violet); }
.autolist { list-style: none; padding: 0; margin: 12px 0; max-height: 50vh; overflow: auto; font-size: 13px; }
.autolist li { display: grid; grid-template-columns: 36px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.autolist img { width: 36px; height: 36px; object-fit: contain; }
.autolist small { display: block; color: var(--muted); }
.autolist .miss { color: var(--muted); font-style: italic; grid-column: 2 / 4; }
.sheet-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }

/* Tienda */
.shop { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; margin-top: 22px; align-items: start; }
.cats { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.cats h3 { margin: 4px 4px 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.cat { border-radius: 10px; }
.cat > button { width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.cat > button:hover { background: var(--bg); }
.cat > button .chev { color: var(--muted); transition: transform .15s; }
.cat.open > button .chev { transform: rotate(90deg); }
.cat.open > button { background: var(--bg); }
.cat ul { list-style: none; margin: 2px 0 6px; padding: 0 0 0 10px; display: none; }
.cat.open ul { display: block; }
.cat li button { width: 100%; text-align: left; background: none; border: 0; padding: 6px 10px; border-radius: 8px; font-size: 13px; color: var(--muted); }
.cat li button:hover { color: var(--ink); background: var(--bg); }
.cat li button.on { color: var(--violet); font-weight: 700; background: #ece8ff; }
.filters { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
.check, .radio { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 6px; cursor: pointer; }
.check i { width: 9px; height: 9px; border-radius: 50%; }
.check small { color: var(--muted); margin-left: auto; }
.check input, .radio input { accent-color: var(--violet); }

.listing { min-width: 0; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.list-head h2 { margin: 0; font-size: 22px; }
.subcats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.subcats button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.subcats button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 6px; position: relative; transition: box-shadow .15s; }
.pcard:hover { box-shadow: 0 10px 26px rgba(40,20,120,.1); }
.pcard .pimg { height: 140px; display: grid; place-items: center; }
.pcard .pimg img { max-width: 100%; max-height: 140px; object-fit: contain; }
.pcard .st { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 700; color: #fff; padding: 2px 8px; border-radius: 999px; }
.pcard .best { position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 700; background: var(--lime); color: var(--lime-ink); padding: 2px 7px; border-radius: 6px; }
.pcard .nm { font-size: 13px; font-weight: 600; line-height: 1.3; min-height: 34px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .nm a { color: inherit; text-decoration: none; }
.pcard .meta { font-size: 12px; color: var(--muted); }
.pcard .foot2 { display: flex; justify-content: space-between; align-items: flex-end; margin-top: auto; }
.pcard .price { font-size: 20px; }
.addbtn { border: 0; background: var(--ink); color: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 13px; }
.addbtn:hover { background: var(--violet); }
.addbtn.in { background: var(--lime); color: var(--lime-ink); }
.more { display: block; margin: 16px auto 0; }

/* Ofertas y "¿buen momento?" */
.pcard .best.off { background: #ff4d6d; color: #fff; }
.was { color: var(--muted); font-size: 13px; font-weight: 500; }
.verdict { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; width: max-content; background: var(--bg); color: var(--muted); }
.verdict.good { background: #dcf6ee; color: #14866d; }
.verdict.bad { background: #ffe3e3; color: #b42323; }
.pdate { font-size: 10px; color: #a29dbd; text-align: right; margin-top: -2px; }
.pimg { border: 0; background: none; padding: 0; cursor: pointer; }
.linklike { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.linklike:hover { color: var(--violet); }
.st.inline { position: static; display: inline-block; vertical-align: middle; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.deals-cat > button { color: #e0244a; }
.sheet-box.mid { max-width: 640px; }
.detail { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: start; margin: 10px 0; }
.detail img { width: 140px; height: 140px; object-fit: contain; }
.price.big { font-size: 28px; }
.answer { border-radius: 14px; padding: 12px 14px; background: var(--bg); margin: 10px 0; }
.answer b { display: block; font-family: "Space Grotesk"; font-size: 17px; }
.answer span { font-size: 13px; color: var(--muted); }
.answer.good { background: #dcf6ee; } .answer.good b { color: #14866d; }
.answer.bad { background: #ffe3e3; } .answer.bad b { color: #b42323; }
.sheet h4 { margin: 14px 0 4px; font-size: 14px; }
.spark { width: 100%; height: auto; background: var(--bg); border-radius: 12px; }
.spark text { font-size: 11px; fill: var(--muted); font-family: Inter, sans-serif; }

/* Cesta: motivos, comprado, acciones */
.why { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.why b { color: var(--ink); font-weight: 600; }
.nope { border: 0; background: none; color: #b42323; font-size: 12px; text-decoration: underline; padding: 4px 0 0; cursor: pointer; }
.tag.offer { background: #ffe3e9; color: #e0244a; }
.crow .mine { grid-template-columns: 22px 48px 1fr; }
.tick input { width: 18px; height: 18px; accent-color: #14866d; cursor: pointer; }
.crow.done { opacity: .55; }
.crow.done .mine .n { text-decoration: line-through; }
.cart-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.wa { background: #25d366; color: #fff; border: 0; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13px; }
.wa:hover { background: #1ebe5a; }
.saved { list-style: none; padding: 0; margin: 12px 0; }
.saved li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.saved small { display: block; color: var(--muted); font-size: 12px; }
.saved-act { display: flex; gap: 4px; }
.go.sm, .ghost.sm { padding: 5px 12px; font-size: 13px; }
.budget-in { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; }
.budget-in input { width: 140px; font: inherit; font-size: 28px; font-family: "Space Grotesk"; border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px; }
.budget-in span { font-size: 26px; font-family: "Space Grotesk"; }
.budget-quick { display: flex; gap: 6px; }
.empty-cart .ghost { margin-left: 8px; }

@media (max-width: 900px) {
  .shop { grid-template-columns: 1fr; }
  .cats { position: static; max-height: none; }
  .topsearch { order: 4; flex-basis: 100%; max-width: none; }
}

@media (max-width: 760px) {
  .tabs { order: 3; }
  .bar-in { flex-wrap: wrap; height: auto; padding: 8px 16px; gap: 8px; }
  .brow { grid-template-columns: 22px 1fr 80px; }
  .brow .track { display: none; }
  .brow .miss { grid-column: 2 / 4; }
  /* Móvil: tu producto arriba, el del súper debajo y los tres importes en una fila */
  .crow { grid-template-columns: 1fr 1fr 1fr; }
  .crow .mine, .crow .there, .crow > .nothing, .crow > div:has(> .tag.none) { grid-column: 1 / -1; }
  .crow .mine { order: 1; } .crow .there, .crow > .nothing, .crow > div:has(> .tag.none) { order: 2; }
  .crow .mycost { order: 3; text-align: left; } .crow .cost { order: 4; text-align: left; } .crow .save { order: 5; }
  .crow .mycost::before { content: "Tu precio"; display: block; font: 600 11px Inter; color: var(--muted); }
  .crow .cost::before { content: "Allí"; display: block; font: 600 11px Inter; color: var(--muted); }
  .crow-head { display: none; }
  .detail { grid-template-columns: 1fr; }
  .cart-head { flex-direction: column; align-items: flex-start; }
  .crow .arrow { display: none; }
}

@media (max-width: 760px) {
  .stage { padding: 30px 0 32px; }
  .finder { flex-wrap: wrap; border-radius: 20px; padding: 10px; }
  .finder svg { display: none; }
  .finder button { width: 100%; }
  .board { grid-auto-flow: row; grid-template-columns: 1fr; overflow: visible; }
  .board.ranking .item { grid-template-columns: 48px 1fr auto; }
  .board.ranking .item .storecol { display: none; }
  .dock-best { display: none; }
  .dock-in { justify-content: space-between; }
}
