/* =============================================================
   mirobotaspirador.com — hoja de estilos unica
   1. Tokens · 2. Reset · 3. Utilidades · 4. Tipografia
   5. Componentes · 6. Secciones · 7. Efectos · 8. Responsive
   ============================================================= */

/* 1. Tokens ---------------------------------------------------- */
:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef1f4;
  --text: #131a22;
  --text-soft: #566171;
  --border: #dde3ea;
  --accent: #0ea5a4;
  --accent-2: #0b7f7e;
  --accent-ink: #ffffff;
  --accent-soft: #d7f2f0;
  --gold: #f5a524;
  --good: #16a34a;
  --bad: #dc2626;
  --shadow: 0 6px 24px rgba(20, 33, 46, .08);
  --shadow-lg: 0 18px 50px rgba(20, 33, 46, .14);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1180px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
:root[data-theme="dark"] {
  --bg: #0e141b;
  --surface: #161f29;
  --surface-2: #1e2935;
  --text: #eaf0f6;
  --text-soft: #9aa8b8;
  --border: #2a3644;
  --accent: #2dd4bf;
  --accent-2: #14b8a6;
  --accent-ink: #06231f;
  --accent-soft: #123b38;
  --shadow: 0 6px 24px rgba(0, 0, 0, .4);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e141b; --surface: #161f29; --surface-2: #1e2935;
    --text: #eaf0f6; --text-soft: #9aa8b8; --border: #2a3644;
    --accent: #2dd4bf; --accent-2: #14b8a6; --accent-ink: #06231f;
    --accent-soft: #123b38;
    --shadow: 0 6px 24px rgba(0,0,0,.4); --shadow-lg: 0 18px 50px rgba(0,0,0,.5);
  }
}

/* 2. Reset ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--sans);
  font-size: 16px; line-height: 1.6;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.1; letter-spacing: -0.02em; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* 3. Utilidades ------------------------------------------------ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: fixed; top: -100px; left: 1rem; padding: .6rem 1rem; background: var(--accent); color: var(--accent-ink); z-index: 9999; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.muted { color: var(--text-soft); }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-head { text-align: center; max-width: 60ch; margin-inline: auto; margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.section-head p { color: var(--text-soft); margin-top: .6rem; font-size: 1.05rem; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); margin-bottom: .5rem; }

/* 4. Tipografia + enlaces ------------------------------------- */
.link-accent { color: var(--accent-2); font-weight: 700; }
.link-accent:hover { text-decoration: underline; }

/* 5. Componentes ---------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.4rem; border-radius: 999px; font-weight: 700; transition: transform .25s var(--ease-out), background .25s var(--ease-out), box-shadow .25s var(--ease-out); }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(14,165,164,.35); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-amazon { background: var(--gold); color: #201a00; box-shadow: 0 6px 18px rgba(245,165,36,.35); }
.btn-amazon:hover { background: #ffb733; }
.btn-block { width: 100%; justify-content: center; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 800; letter-spacing: .02em; }
.badge-offer { background: var(--bad); color: #fff; }
.badge-featured { background: var(--accent-soft); color: var(--accent-2); }
.badge-demo { background: var(--gold); color: #201a00; }

.stars { display: inline-flex; align-items: center; gap: .1rem; color: var(--gold); }
.stars svg { width: 1em; height: 1em; flex: none; }

/* Nav ---------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 900; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 66px; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 900; font-size: 1.15rem; letter-spacing: -.03em; }
.brand .logo-mark { width: 32px; height: 32px; flex: none; }
.nav-links { display: flex; align-items: center; gap: .3rem; }
.nav-links a { padding: .5rem .8rem; border-radius: 10px; color: var(--text-soft); font-weight: 600; font-size: .95rem; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.nav-cta, .nav-links a.nav-cta:hover { background: var(--accent); color: var(--accent-ink); }
.nav-tools { display: flex; align-items: center; gap: .4rem; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.icon-btn svg { width: 20px; height: 20px; }
.nav-toggle { display: none; }

/* Product card ------------------------------------------------ */
.card-grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.pcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out); position: relative; }
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pcard-media { position: relative; aspect-ratio: 4/3; background: var(--surface-2); overflow: hidden; }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; }
.pcard-badges { position: absolute; top: .7rem; left: .7rem; display: flex; flex-direction: column; gap: .35rem; z-index: 2; }
.pcard-body { padding: 1.1rem 1.1rem 1.3rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.pcard-brand { font-size: .8rem; font-weight: 700; color: var(--accent-2); text-transform: uppercase; letter-spacing: .06em; }
.pcard-title { font-size: 1.08rem; font-weight: 800; line-height: 1.25; }
.pcard-title a:hover { color: var(--accent-2); }
.pcard-meta { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--text-soft); }
.pcard-specs { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .2rem; }
.chip { font-size: .74rem; font-weight: 700; padding: .25rem .55rem; border-radius: 8px; background: var(--surface-2); color: var(--text-soft); border: 1px solid var(--border); }
.pcard-price { display: flex; align-items: baseline; gap: .5rem; margin-top: auto; padding-top: .4rem; }
.price-now { font-size: 1.4rem; font-weight: 900; letter-spacing: -.03em; }
.price-was { font-size: .95rem; color: var(--text-soft); text-decoration: line-through; }
.pcard-actions { display: flex; gap: .5rem; margin-top: .3rem; }
.pcard-actions .btn { flex: 1; padding: .7rem 1rem; font-size: .92rem; }
.compare-add { flex: none !important; width: 44px; padding: 0 !important; }

/* Hero --------------------------------------------------------- */
.hero { position: relative; padding-block: clamp(3rem, 8vw, 6rem); overflow: hidden; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); letter-spacing: -.04em; }
.hero h1 .hl { color: var(--accent-2); }
.hero-lead { font-size: 1.15rem; color: var(--text-soft); margin-top: 1.1rem; max-width: 48ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 1.8rem; font-size: .9rem; color: var(--text-soft); }
.hero-trust span { display: inline-flex; align-items: center; gap: .4rem; }
.hero-trust svg { width: 18px; height: 18px; color: var(--accent-2); flex: none; }
.hero-visual { position: relative; }
.hero-halo { position: absolute; inset: -30% -20% -20% -10%; background: radial-gradient(45% 45% at 60% 40%, color-mix(in srgb, var(--accent) 40%, transparent), transparent 70%); filter: blur(90px); pointer-events: none; z-index: 0; }
.hero-card { position: relative; z-index: 1; }

/* Trust / how we choose --------------------------------------- */
.how-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.how-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.how-item .ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent-2); margin-bottom: .9rem; }
.how-item .ico svg { width: 24px; height: 24px; }
.how-item h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.how-item p { font-size: .95rem; color: var(--text-soft); }

/* Category entries -------------------------------------------- */
.cat-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cat-card { display: flex; flex-direction: column; gap: .4rem; padding: 1.5rem; border-radius: var(--radius); background: linear-gradient(140deg, var(--surface), var(--surface-2)); border: 1px solid var(--border); transition: transform .3s var(--ease-out); }
.cat-card:hover { transform: translateY(-4px); }
.cat-card h3 { font-size: 1.2rem; }
.cat-card .arrow { margin-top: .6rem; font-weight: 800; color: var(--accent-2); }

/* Ficha (product page) ---------------------------------------- */
.ficha { display: grid; gap: 2.2rem; grid-template-columns: 1fr; }
.ficha-top { display: grid; gap: 2rem; grid-template-columns: 1fr; }
.gallery-main { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.ficha-head h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.ficha-brand { color: var(--accent-2); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: .9rem; }
.ficha-rating { display: flex; align-items: center; gap: .5rem; margin: .7rem 0; color: var(--text-soft); font-size: .95rem; }
.ficha-price { display: flex; align-items: baseline; gap: .7rem; margin: 1rem 0 .4rem; }
.ficha-price .price-now { font-size: 2rem; }
.price-note { font-size: .82rem; color: var(--text-soft); margin-bottom: 1.1rem; }
.ficha-buy { display: flex; flex-wrap: wrap; gap: .7rem; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.3rem, 3vw, 2rem); box-shadow: var(--shadow); }
.panel h2 { font-size: 1.4rem; margin-bottom: 1.1rem; }
.panel + .panel { margin-top: 1.6rem; }

/* Radar chart -------------------------------------------------- */
.radar-wrap { display: grid; gap: 1.4rem; grid-template-columns: 1fr; align-items: center; }
.radar-box { display: grid; place-items: center; }
.radar-legend { display: grid; gap: .5rem; }
.radar-legend .row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem .7rem; border-radius: 10px; background: var(--surface-2); }
.radar-legend .row b { font-size: 1rem; color: var(--accent-2); }
.editor-note { font-size: .8rem; color: var(--text-soft); font-style: italic; margin-top: .4rem; }

/* Spec table --------------------------------------------------- */
.spec-group { margin-bottom: 1.4rem; }
.spec-group h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-soft); margin-bottom: .5rem; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: left; padding: .6rem .3rem; border-bottom: 1px solid var(--border); font-size: .95rem; }
.spec-table th { font-weight: 600; color: var(--text-soft); width: 55%; }
.spec-table td { font-weight: 700; }

/* Pros / cons -------------------------------------------------- */
.pc-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
.pc-col h3 { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; margin-bottom: .7rem; }
.pc-col h3 svg { width: 1.2em; height: 1.2em; flex: none; }
.pc-col.pros h3 { color: var(--good); }
.pc-col.cons h3 { color: var(--bad); }
.pc-col ul { list-style: none; display: grid; gap: .5rem; }
.pc-col li { display: flex; gap: .5rem; font-size: .95rem; }
.pc-col li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; margin-top: .5rem; flex: none; }
.pc-col.pros li::before { background: var(--good); }
.pc-col.cons li::before { background: var(--bad); }
.ideal-line { margin-top: 1.2rem; padding: 1rem 1.2rem; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 12px 12px 0; font-weight: 600; }
:root[data-theme="dark"] .ideal-line { color: var(--text); }

.editorial-body p { margin-bottom: 1rem; color: var(--text); }
.editorial-body p:last-child { margin-bottom: 0; }

/* Reviews ------------------------------------------------------ */
.review { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .3rem; font-size: .9rem; }
.review-head b { font-weight: 800; }

/* Comparator --------------------------------------------------- */
.cmp-bar { position: sticky; top: 66px; z-index: 500; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); margin-bottom: 1.6rem; }
.cmp-slots { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.cmp-slot { position: relative; display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); min-width: 180px; }
.cmp-slot img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; flex: none; }
.cmp-slot .t { font-size: .82rem; font-weight: 700; line-height: 1.2; }
.cmp-remove { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; background: var(--bad); color: #fff; display: grid; place-items: center; font-size: 14px; line-height: 1; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.cmp-empty { color: var(--text-soft); font-size: .9rem; padding: .6rem; }
.cmp-table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.cmp-table { width: 100%; border-collapse: collapse; background: var(--surface); min-width: 640px; }
.cmp-table th, .cmp-table td { padding: .8rem 1rem; border-bottom: 1px solid var(--border); text-align: center; font-size: .92rem; }
.cmp-table th:first-child, .cmp-table td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); font-weight: 600; color: var(--text-soft); }
.cmp-table .prod-head { font-weight: 800; font-size: 1rem; }
.cmp-table .best { color: var(--good); font-weight: 900; }
.cmp-table .best::after { content: " ★"; font-size: .8em; }
.cmp-search { position: relative; margin-bottom: 1.2rem; }
.cmp-search input { width: 100%; padding: .85rem 1rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.cmp-results { display: grid; gap: .5rem; margin-top: .5rem; }
.cmp-result { display: flex; align-items: center; gap: .7rem; padding: .5rem .7rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; }
.cmp-result:hover { border-color: var(--accent); }
.cmp-result img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }

/* Guide / article --------------------------------------------- */
.article { max-width: 760px; margin-inline: auto; }
.article h2 { font-size: 1.6rem; margin: 2rem 0 .8rem; }
.article h3 { font-size: 1.25rem; margin: 1.6rem 0 .6rem; }
.article p { margin-bottom: 1rem; }
.article ul { margin: 0 0 1rem 1.2rem; display: grid; gap: .4rem; }
.pick { display: flex; gap: 1rem; align-items: center; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 1rem; box-shadow: var(--shadow); }
.pick img { width: 90px; height: 90px; border-radius: 12px; object-fit: cover; flex: none; }
.pick .pick-body { flex: 1; }
.pick .pick-tag { font-size: .78rem; font-weight: 800; color: var(--accent-2); text-transform: uppercase; }

/* Filters ------------------------------------------------------ */
.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.6rem; align-items: center; }
.filter-bar select { padding: .6rem .9rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: .92rem; }

/* Disclosure / demo banner ------------------------------------ */
.disclosure { font-size: .82rem; color: var(--text-soft); background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: .8rem 1rem; margin-top: 1.2rem; }
.demo-banner { background: var(--gold); color: #201a00; text-align: center; font-size: .88rem; font-weight: 700; padding: .55rem 1rem; }
.demo-banner a { text-decoration: underline; }

/* Footer ------------------------------------------------------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding-block: 3rem 2rem; margin-top: 3rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr; }
.footer-grid h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-soft); margin-bottom: .9rem; }
.footer-grid ul { list-style: none; display: grid; gap: .5rem; }
.footer-grid a { color: var(--text-soft); font-size: .92rem; }
.footer-grid a:hover { color: var(--accent-2); }
.footer-brand p { color: var(--text-soft); font-size: .92rem; margin-top: .7rem; max-width: 34ch; }
.footer-legal { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--border); font-size: .8rem; color: var(--text-soft); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }

/* 7. Efectos --------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* 8. Responsive ------------------------------------------------ */
@media (min-width: 720px) {
  .pc-grid { grid-template-columns: 1fr 1fr; }
  .radar-wrap { grid-template-columns: 320px 1fr; }
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.1fr .9fr; }
  .ficha-top { grid-template-columns: 1fr 1fr; }
  .ficha-main-grid { display: grid; grid-template-columns: 1fr; gap: 1.6rem; }
}
@media (max-width: 860px) {
  .nav-links { position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--border); padding: 1rem var(--gutter); gap: .2rem; transform: translateY(-120%); transition: transform .3s var(--ease-out); box-shadow: var(--shadow-lg); }
  .nav-links.open { transform: none; }
  .nav-links a { padding: .8rem; }
  .nav-toggle { display: grid; }
  .footer-grid { grid-template-columns: 1fr; }
}
