:root {
  --bg: #eef1f5; --card: #ffffff; --ink: #16202c; --muted: #5d6b7c; --line: #dde3ea;
  --brand: #1f6fd1; --brand-ink: #ffffff; --brand-soft: #e7f0fc; --head: #0f2a4a; --price: #0a8a3a; --hot: #e8590c;
  --buy: #12805c; --buy-soft: #e3f4ec; --check: #a15c00; --check-soft: #fdf1dc; --avoid: #b42318; --avoid-soft: #fdeceb;
  --chip: #f1eee9; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.04);
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1520; --card: #172231; --ink: #e8eef6; --muted: #98a7b9; --line: #263548;
    --brand: #5aa2ff; --brand-soft: #17304f; --head: #08182b; --price: #3fd07f; --hot: #ff8a3d; --buy: #4cc796; --buy-soft: #173328; --check: #f0b14a; --check-soft: #3a2c14;
    --avoid: #ff7b6e; --avoid-soft: #3d1c19; --chip: #2a2723; --shadow: none;
  }
}
:root[data-theme="dark"] { --bg: #0e1520; --card: #172231; --ink: #e8eef6; --muted: #98a7b9; --line: #263548; --brand: #5aa2ff; --brand-soft: #17304f; --head: #08182b; --price: #3fd07f; --hot: #ff8a3d; --buy: #4cc796; --buy-soft: #173328; --check: #f0b14a; --check-soft: #3a2c14; --avoid: #ff7b6e; --avoid-soft: #3d1c19; --chip: #2a2723; --shadow: none; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* header */
.top { background: var(--head); border-bottom: 3px solid var(--hot); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.3rem; color: #fff; text-decoration: none; letter-spacing: -.02em; display: flex; align-items: center; gap: 6px; }
.logo span { color: var(--hot); }
.logo-mark { color: var(--hot); font-size: 1.4rem; line-height: 1; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a { color: #dce6f2; text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: .95rem; }
.top nav a:hover { background: rgba(255,255,255,.1); }
.top nav .nav-cta { background: var(--hot); color: #fff; font-weight: 600; }

/* hero */
.hero { padding: 28px 0 8px; }
.hero h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: -.02em; }
.hero p { margin: 0; color: var(--muted); max-width: 680px; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; padding: 16px 0 40px; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } .side { order: -1; } }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 0 10px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; font-size: 1.25rem; }
.sec-head a { font-size: .92rem; text-decoration: none; }

/* deal card */
.deals { display: grid; gap: 12px; }
.deal { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.deal-thumb { position: relative; width: 96px; height: 96px; border-radius: 10px; background: var(--chip); display: grid; place-items: center; font-size: 2.6rem; }
.rank { position: absolute; top: -6px; left: -6px; background: var(--hot); color: var(--brand-ink); font-size: .8rem; font-weight: 700; border-radius: 999px; min-width: 24px; height: 24px; display: grid; place-items: center; }
.deal-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .82rem; }
.verdict { font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.v-buy { color: var(--buy); background: var(--buy-soft); }
.v-check { color: var(--check); background: var(--check-soft); }
.v-avoid { color: var(--avoid); background: var(--avoid-soft); }
.store { color: var(--muted); font-weight: 600; }
.deal-title { margin: 4px 0 2px; font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price { font-size: 1.45rem; font-weight: 800; color: var(--price); letter-spacing: -.01em; }
.was { color: var(--muted); }
.pct { background: var(--hot); color: #fff; font-weight: 700; font-size: .85rem; padding: 1px 7px; border-radius: 6px; }
.pct.sm { font-size: .75rem; }
.why { margin: 6px 0 0; }
.watch { margin: 6px 0 0; font-size: .92rem; color: var(--muted); }
.deal-actions { margin-top: 10px; }
.btn { display: inline-block; background: var(--brand); color: var(--brand-ink); text-decoration: none; font-weight: 600; padding: 8px 14px; border-radius: 8px; font-size: .95rem; }
.btn:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
@media (max-width: 520px) { .deal { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 12px; } .deal-thumb { width: 64px; height: 64px; font-size: 1.9rem; } }

/* compare row */
.cmp-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.cmp-label { font-size: .78rem; color: var(--muted); margin-right: 2px; }
.cmp { font-size: .8rem; text-decoration: none; color: var(--ink); background: var(--chip); border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.cmp:hover { border-color: var(--brand); color: var(--brand); }

/* side */
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.box h3 { margin: 0 0 8px; font-size: 1.02rem; }
.box-sub { background: var(--brand-soft); border-color: transparent; }
.box-sub ul { padding-left: 18px; margin: 0 0 12px; }
.top10 { padding-left: 22px; }
.top10 li { margin: 4px 0; }
.top10.compact li a { color: var(--ink); text-decoration: none; font-weight: 600; display: block; line-height: 1.3; }
.top10.compact li span { color: var(--muted); font-size: .85rem; }
.t10-price { font-weight: 700; }

/* post cards */
.posts { display: grid; gap: 12px; }
.post-card { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.post-card:hover { border-color: var(--brand); }
.post-card-emoji { font-size: 2rem; width: 56px; height: 56px; display: grid; place-items: center; background: var(--chip); border-radius: 10px; }
.post-card h3 { margin: 2px 0 4px; font-size: 1.05rem; line-height: 1.3; }
.post-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.kicker { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--brand); font-weight: 700; }

/* post */
.post { max-width: 820px; padding: 24px 0 48px; }
.post h1 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); line-height: 1.2; margin: 4px 0 8px; letter-spacing: -.02em; }
.dek { font-size: 1.1rem; color: var(--muted); margin-top: 0; }
.post h2 { margin: 28px 0 10px; font-size: 1.3rem; }
.count { font-size: .85rem; background: var(--chip); color: var(--muted); padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.sub { color: var(--muted); font-size: .92rem; }
.prose p, .prose li { max-width: 72ch; }
.traps { list-style: none; padding: 0; display: grid; gap: 10px; }
.trap { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; background: var(--avoid-soft); border-radius: var(--radius); padding: 12px; }
.trap p { margin: 4px 0 0; }
.trap-emoji { font-size: 1.6rem; }
.lock { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; background: var(--brand-soft); border-radius: var(--radius); padding: 16px; margin: 20px 0; }
.lock-icon { font-size: 1.6rem; }
.lock p { margin: 4px 0 10px; }
.lot-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0 8px; }
.lot-facts div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.lot-facts span { display: block; font-size: .8rem; color: var(--muted); }
.lot-facts strong { font-size: 1.35rem; }
.lot-facts .hl { background: var(--buy-soft); border-color: transparent; }
.lot-facts .hl strong { color: var(--buy); }
.risk { background: var(--check-soft); border-radius: var(--radius); padding: 4px 16px 8px; margin-top: 20px; }
.risk h2 { margin-top: 12px; font-size: 1.1rem; }

/* report table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.rtable { border-collapse: collapse; width: 100%; font-size: .9rem; min-width: 760px; }
.rtable th, .rtable td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.rtable thead th { background: var(--chip); font-size: .8rem; color: var(--muted); position: sticky; top: 0; }
.rtable tbody th { font-weight: 700; min-width: 170px; }
.row-comprar td:last-child { color: var(--buy); font-weight: 700; }
.row-evitar td:last-child { color: var(--avoid); font-weight: 700; }
.row-verificar td:last-child { color: var(--check); font-weight: 700; }
.row-cmp summary { font-weight: 500; font-size: .78rem; color: var(--brand); cursor: pointer; margin-top: 4px; }
.row-cmp .cmp-row { margin-top: 6px; max-width: 320px; }
.method { margin-top: 28px; }

.foot { border-top: 1px solid var(--line); background: var(--card); padding: 20px 0; color: var(--muted); font-size: .9rem; }
.foot .fine { font-size: .8rem; }

/* hero tag */
.hero-tag { display: inline-block; font-size: .8rem; font-weight: 700; vertical-align: middle; color: var(--hot); background: var(--card); border: 1px solid var(--line); padding: 2px 10px; border-radius: 999px; letter-spacing: 0; }

/* images */
.deal-thumb { overflow: hidden; background: #fff; }
.shot { width: 100%; height: 100%; object-fit: contain; display: block; }
.emo { font-size: inherit; }

/* Slickdeals-style tile grid */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(15,42,74,.12); border-color: var(--brand); }
.tile-img { position: relative; aspect-ratio: 1 / 1; background: #fff; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.tile-img .emo { font-size: 4rem; }
.tile-img .shot { padding: 6px; }
.tile-pct { position: absolute; top: 8px; left: 8px; background: var(--hot); color: #fff; font-weight: 800; font-size: .85rem; padding: 2px 8px; border-radius: 6px; }
.tile-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.tile-body .verdict { align-self: flex-start; font-size: .72rem; }
.tile-title { margin: 2px 0 0; font-size: .95rem; line-height: 1.3; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.tile-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.tile-price .price { font-size: 1.25rem; }
.tile-price .was { font-size: .85rem; }
.tile-store { font-size: .8rem; color: var(--muted); font-weight: 600; }
@media (max-width: 520px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .tile-img .emo { font-size: 3rem; } }

/* Mercado Libre carousel */
.carousel { margin: 8px 0 4px; }
.car-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 210px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 10px; scrollbar-width: thin; }
.car-tile { scroll-snap-align: start; }
.car-nav { display: flex; gap: 6px; }
.car-btn { width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.car-btn:hover { border-color: var(--brand); color: var(--brand); }
.aff-note { font-size: .78rem; color: var(--muted); margin: 2px 0 0; }
@media (max-width: 520px) { .car-track { grid-auto-columns: 46%; } .car-nav { display: none; } }

/* our own category art (no third-party photos) */
.art { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(145deg, hsl(var(--h) 85% 94%), hsl(var(--h) 70% 82%)); }
.art .emo { font-size: 3.6rem; filter: drop-shadow(0 4px 6px rgba(0,0,0,.12)); }
.deal-thumb .art .emo { font-size: 2.4rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .art { background: linear-gradient(145deg, hsl(var(--h) 35% 24%), hsl(var(--h) 40% 16%)); } }
:root[data-theme="dark"] .art { background: linear-gradient(145deg, hsl(var(--h) 35% 24%), hsl(var(--h) 40% 16%)); }
.aff-more { margin: 4px 0 0; font-weight: 600; }
.aff-more a { text-decoration: none; }
