/* =============================================================================
   referedmkt — Theme "default"
   Dark-first, premium cybersec/tech vibe. Toggle claro/oscuro con localStorage.
   Paleta: indigo eléctrico + dorado + rojo alert + mint success.
   ============================================================================= */

:root {
    color-scheme: dark;

    /* Surface system */
    --bg: #0a0e1a;
    --bg-elevated: #0f1423;
    --surface: #141a2e;
    --surface-hover: #1c2440;
    --surface-glass: rgba(20, 26, 46, 0.7);
    --border: #202844;
    --border-strong: #2d3760;

    /* Text */
    --text: #eef1fa;
    --text-muted: #8b93ad;
    --text-subtle: #5b647f;
    --text-on-primary: #ffffff;

    /* Accents */
    --primary: #6366f1;
    --primary-hover: #7a7df5;
    --primary-soft: rgba(99, 102, 241, 0.14);
    --secondary: #a855f7;
    --accent: #fbbf24;
    --accent-soft: rgba(251, 191, 36, 0.14);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.14);
    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.14);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.45);
    --glow-primary: 0 0 40px rgba(99, 102, 241, 0.28);
    --glow-accent: 0 0 24px rgba(251, 191, 36, 0.35);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --gradient-card: linear-gradient(180deg, var(--surface) 0%, var(--bg-elevated) 100%);
    --gradient-hero: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    --gradient-text: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 50%, #f9a8d4 100%);

    /* Spacing */
    --s-1: 0.5rem;
    --s-2: 1rem;
    --s-3: 1.5rem;
    --s-4: 2rem;
    --s-5: 3rem;
    --s-6: 4.5rem;

    /* Shape */
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 28px;

    --container: 1200px;
    --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 140ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 420ms cubic-bezier(0.4, 0, 0.2, 1);

    --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

[data-theme="light"] {
    color-scheme: light;
    --bg: #fafbfc;
    --bg-elevated: #ffffff;
    --surface: #ffffff;
    --surface-hover: #f4f6fb;
    --surface-glass: rgba(255, 255, 255, 0.82);
    --border: #e5e7eb;
    --border-strong: #cbd1dc;
    --text: #0f172a;
    --text-muted: #475569;
    --text-subtle: #94a3b8;
    --primary-soft: rgba(99, 102, 241, 0.08);
    --accent-soft: rgba(251, 191, 36, 0.10);
    --danger-soft: rgba(239, 68, 68, 0.08);
    --success-soft: rgba(16, 185, 129, 0.08);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.14);
    --glow-primary: 0 0 40px rgba(99, 102, 241, 0.18);
    --glow-accent: 0 0 24px rgba(251, 191, 36, 0.22);
    --gradient-card: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    --gradient-hero: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99, 102, 241, 0.10) 0%, transparent 60%);
    --gradient-text: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    font-size: 18px; /* Base escalado ~112% respecto al default 16. Todo usa rem. */
}
body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    background-image: var(--gradient-hero);
    background-repeat: no-repeat;
    background-size: 100% 900px;
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color var(--transition), color var(--transition);
    min-height: 100vh;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 var(--s-2); letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.55rem, 2.6vw, 2rem); margin-top: var(--s-5); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 var(--s-2); }

a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; height: auto; display: block; }
code, pre { font-family: var(--font-mono); font-size: 0.92em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--s-3); }
.muted { color: var(--text-muted); }

/* ==== HEADER ==== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface-glass);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition), border-color var(--transition);
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--s-2) 0;
    gap: var(--s-3);
    flex-wrap: wrap;
}
.site-brand {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text);
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.site-brand:hover { text-decoration: none; color: var(--text); }
.site-brand::before {
    content: "";
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--gradient-primary);
    box-shadow: var(--glow-primary);
}
.site-nav { display: flex; gap: var(--s-1); flex-wrap: wrap; align-items: center; }
.site-nav a {
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    position: relative;
    transition: color var(--transition-fast), background var(--transition-fast);
}
.site-nav a:hover {
    color: var(--text);
    background: var(--surface-hover);
    text-decoration: none;
}
.site-nav a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: transform var(--transition);
}
.site-nav a:hover::after { transform: translateX(-50%) scaleX(1); }

.theme-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    padding: 0;
}
.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ==== BREADCRUMB ==== */
.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: var(--s-3) 0;
    display: flex;
    gap: var(--s-1);
    font-size: 0.88rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.breadcrumb li + li::before { content: "›"; margin-right: var(--s-1); color: var(--text-subtle); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); text-decoration: none; }

/* ==== HERO ==== */
.hero {
    padding: var(--s-6) 0 var(--s-5);
    text-align: center;
    position: relative;
    animation: fadeInUp 640ms var(--transition-slow) both;
}
.hero h1 {
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: var(--s-2);
    filter: drop-shadow(0 0 40px rgba(99, 102, 241, 0.25));
}
.hero-sub {
    color: var(--text-muted);
    max-width: 58ch;
    margin: 0 auto var(--s-3);
    font-size: 1.1rem;
}

/* ==== BUTTONS ==== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 0.98rem;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1;
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background: var(--gradient-primary);
    background-size: 200% 100%;
    color: var(--text-on-primary);
    box-shadow: var(--shadow-md), var(--glow-primary);
}
.btn-primary:hover {
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(99, 102, 241, 0.5);
    text-decoration: none;
    color: var(--text-on-primary);
}
.btn-primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 620ms;
}
.btn-primary:hover::after { transform: translateX(100%); }

/* ==== SECTIONS + CARDS ==== */
.section { margin: var(--s-6) 0; }
.section > h2 { display: flex; align-items: center; gap: var(--s-1); }
.section > h2::before {
    content: "";
    width: 4px;
    height: 1em;
    background: var(--gradient-primary);
    border-radius: 2px;
    box-shadow: var(--glow-primary);
}

.grid { display: grid; gap: var(--s-3); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.product-card, .article-card {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    animation: fadeInUp 540ms var(--transition-slow) both;
    position: relative;
}
.product-card:hover, .article-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lg);
}
.product-card:focus-within, .article-card:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Card-link pattern: el <a> del titulo cubre todo el card con ::before,
   haciendo clickeable toda el area. Otros links dentro (chip categoria)
   tienen z-index mayor para capturar sus propios clicks. */
.product-card-link::before,
.article-card-link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}
.product-card-cat-chip {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.65rem;
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid transparent;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    backdrop-filter: blur(6px);
    transition: all var(--transition-fast);
    max-width: calc(100% - 1.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-card-cat-chip:hover {
    background: var(--primary);
    color: var(--text-on-primary);
    text-decoration: none;
    transform: translateY(-1px);
}
.product-card-body {
    padding: var(--s-3);
    position: relative;
    z-index: 2;
}
.product-card-link {
    color: var(--text);
    text-decoration: none;
}
.product-card-link:hover { color: var(--text); text-decoration: none; }
.product-card-title { margin-top: 0.5rem; }
.grid-cards > *:nth-child(1) { animation-delay: 40ms; }
.grid-cards > *:nth-child(2) { animation-delay: 80ms; }
.grid-cards > *:nth-child(3) { animation-delay: 120ms; }
.grid-cards > *:nth-child(4) { animation-delay: 160ms; }
.grid-cards > *:nth-child(5) { animation-delay: 200ms; }
.grid-cards > *:nth-child(6) { animation-delay: 240ms; }

.article-card-link { display: block; padding: var(--s-3); color: var(--text); }
.article-card-link:hover { text-decoration: none; color: var(--text); }
.product-card-logo { max-height: 44px; margin-bottom: var(--s-1); filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3)); }
[data-theme="light"] .product-card-logo { filter: none; }
.product-card-title, .article-card-title {
    font-size: 1.15rem;
    margin: var(--s-1) 0;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.product-card-brand {
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin: 0;
}
.product-card-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.2rem 0.6rem;
    background: var(--accent-soft);
    border-radius: 99px;
    margin: var(--s-1) 0;
}
.product-card-desc, .article-card-excerpt { color: var(--text-muted); font-size: 0.95rem; line-height: 1.55; }
.product-card-price {
    font-weight: 800;
    font-size: 1.1rem;
    margin-top: var(--s-2);
    letter-spacing: -0.02em;
    color: var(--text);
}

.article-card-img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}
.article-card time {
    display: inline-block;
    margin-top: var(--s-1);
    font-size: 0.82rem;
    color: var(--text-subtle);
}

.category-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-1); }
.category-list a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 99px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}
.category-list a:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
    text-decoration: none;
    transform: translateY(-1px);
}

/* ==== PRODUCT PAGE ==== */
.product-header {
    display: flex;
    gap: var(--s-4);
    align-items: flex-start;
    margin: var(--s-4) 0 var(--s-5);
    flex-wrap: wrap;
    padding: var(--s-4);
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    animation: fadeInUp 640ms var(--transition-slow) both;
}
.product-logo { max-height: 120px; filter: drop-shadow(0 10px 30px rgba(0,0,0,0.3)); }
[data-theme="light"] .product-logo { filter: none; }
.product-brand {
    color: var(--primary);
    margin: 0 0 0.3rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}
.product-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
    font-weight: 800;
    font-size: 1.1rem;
    padding: 0.35rem 0.8rem;
    background: var(--accent-soft);
    border-radius: 99px;
    box-shadow: var(--glow-accent);
}
.product-price {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pros-cons {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-3);
    margin: var(--s-4) 0;
}
@media (min-width: 720px) { .pros-cons { grid-template-columns: 1fr 1fr; } }
.pros-cons section {
    padding: var(--s-3);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
}
.pros-cons section:first-child {
    border-left: 3px solid var(--success);
    background: linear-gradient(135deg, var(--success-soft), transparent 60%);
}
.pros-cons section:last-child {
    border-left: 3px solid var(--danger);
    background: linear-gradient(135deg, var(--danger-soft), transparent 60%);
}
.pros-cons ul { padding-left: 1.3rem; }
.pros-cons li { margin: 0.3rem 0; }

.specs {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.specs th, .specs td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
.specs tr:last-child th, .specs tr:last-child td { border-bottom: none; }
.specs th {
    width: 32%;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--bg-elevated);
}

.cta-band {
    background: var(--gradient-card);
    padding: var(--s-4);
    border-radius: var(--radius-lg);
    text-align: center;
    margin-top: var(--s-5);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.cta-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    opacity: 0.6;
    pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: var(--s-2); }

/* ==== ARTICLE ==== */
.article {
    max-width: 820px;
    margin: 0 auto;
}
.article-header { margin: var(--s-4) 0 var(--s-5); }
.article-header h1 {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    max-width: 22ch;
}
.article-subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 60ch;
}
.article-meta {
    color: var(--text-muted);
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 99px;
}
.article-meta strong { color: var(--text); font-weight: 600; }
.article-hero {
    width: 100%;
    aspect-ratio: 21/9;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-top: var(--s-3);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}
.article-body {
    max-width: 72ch;
    margin: 0 auto;
    font-size: 1.08rem;
    line-height: 1.8;
}
.article-body h2 {
    margin-top: var(--s-5);
    padding-top: var(--s-2);
    border-top: 1px solid var(--border);
}
.article-body h3 { margin-top: var(--s-4); }
.article-body blockquote {
    border-left: 4px solid var(--primary);
    background: var(--primary-soft);
    padding: var(--s-2) var(--s-3);
    margin: var(--s-3) 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text);
    font-style: italic;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body pre {
    background: var(--bg-elevated);
    padding: var(--s-2);
    border-radius: var(--radius);
    overflow-x: auto;
    border: 1px solid var(--border);
    margin: var(--s-3) 0;
}
.article-body code {
    background: var(--surface);
    padding: 0.12em 0.4em;
    border-radius: 4px;
    border: 1px solid var(--border);
}
.article-body pre code { background: transparent; padding: 0; border: none; }
.article-body ul, .article-body ol { padding-left: 1.4rem; }
.article-body li { margin: 0.3rem 0; }
.article-body img { border-radius: var(--radius); margin: var(--s-3) 0; }
.article-body a { text-decoration: underline; text-underline-offset: 3px; }

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--s-3) 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 0.95em;
}
.article-body table th,
.article-body table td {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
.article-body table th {
    background: var(--bg-elevated);
    font-weight: 700;
    color: var(--text);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.article-body table tr:last-child td { border-bottom: none; }
.article-body table tr:hover td { background: var(--surface-hover); }

.related-products { margin-top: var(--s-5); }

/* Prose: contenido renderizado desde Markdown en otros campos (bio, category desc, etc).
   Hereda el look del article-body pero mas compacto. */
.author-bio,
.category-description {
    color: var(--text);
    line-height: 1.7;
    max-width: 70ch;
}
.author-bio p,
.category-description p { margin: 0 0 var(--s-2); }
.author-bio ul, .author-bio ol,
.category-description ul, .category-description ol { padding-left: 1.4rem; }
.author-bio blockquote,
.category-description blockquote {
    border-left: 3px solid var(--primary);
    background: var(--primary-soft);
    padding: 0.6rem 1rem;
    margin: var(--s-2) 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text);
}
.author-bio code,
.category-description code {
    background: var(--surface);
    padding: 0.1em 0.35em;
    border-radius: 4px;
    border: 1px solid var(--border);
}
.author-bio a,
.category-description a { text-decoration: underline; text-underline-offset: 3px; }

/* ==== CATEGORY GROUP (catalogo agrupado por categoria) ==== */
.category-group { margin: var(--s-5) 0; }
.category-group-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-2);
    flex-wrap: wrap;
    margin-bottom: var(--s-2);
    padding-bottom: var(--s-1);
    border-bottom: 1px solid var(--border);
}
.category-group-header h2 {
    display: flex;
    align-items: center;
    gap: var(--s-1);
    margin: 0;
    font-size: clamp(1.4rem, 2.2vw, 1.75rem);
}
.category-group-header h2::before {
    content: "";
    width: 4px;
    height: 1.1em;
    background: var(--gradient-primary);
    border-radius: 2px;
    box-shadow: var(--glow-primary);
}
.category-group-header h2 a {
    color: var(--text);
    text-decoration: none;
}
.category-group-header h2 a:hover {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.category-group-more {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.3rem 0.7rem;
    border-radius: 99px;
    border: 1px solid var(--border);
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.category-group-more:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-soft);
    text-decoration: none;
}
.category-group-desc {
    color: var(--text-muted);
    max-width: 70ch;
    margin: 0 0 var(--s-3);
}

/* ==== FILTERS BAR ==== */
.filters-bar {
    display: flex;
    gap: var(--s-2);
    align-items: flex-end;
    flex-wrap: wrap;
    padding: var(--s-3);
    margin: var(--s-3) 0 var(--s-4);
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
}
.filters-bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: var(--s-3);
    right: var(--s-3);
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    opacity: 0.6;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 150px;
    flex: 1;
}
.filter-group-sort { min-width: 200px; }
.filter-group label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.filter-group select {
    /* Reset del estilo nativo del navegador */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    padding: 0.65rem 2.4rem 0.65rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 0;
    width: 100%;

    /* Arrow custom: SVG inline chevron-down con currentColor simulado */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b93ad' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 14px;
}
.filter-group select:hover {
    border-color: var(--border-strong);
    background-color: var(--surface-hover);
}
.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.filter-group select option {
    background: var(--bg-elevated);
    color: var(--text);
    padding: 0.5rem;
}
.filter-clear {
    align-self: center;
    padding: 0.65rem 1rem;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.filter-clear::before {
    content: "×";
    font-size: 1.3em;
    line-height: 1;
    color: currentColor;
}
.filter-clear:hover {
    color: var(--danger);
    border-color: var(--danger);
    background: var(--danger-soft);
    text-decoration: none;
}

.empty-state {
    padding: var(--s-5);
    text-align: center;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    font-size: 1.05rem;
}
.empty-state a { font-weight: 600; }

@media (max-width: 640px) {
    .filters-bar {
        padding: var(--s-2);
        gap: var(--s-1);
    }
    .filter-group { min-width: 100%; }
}

/* ==== PAGINATION ==== */
.pagination {
    margin: var(--s-5) 0;
    display: flex;
    gap: var(--s-1);
    flex-wrap: wrap;
    justify-content: center;
}
.pagination a, .pagination .current {
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 600;
    background: var(--surface);
    color: var(--text);
    transition: all var(--transition-fast);
}
.pagination a:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
    text-decoration: none;
}
.pagination .current {
    background: var(--gradient-primary);
    color: var(--text-on-primary);
    border-color: transparent;
    box-shadow: var(--glow-primary);
}

/* ==== NEWSLETTER ==== */
.newsletter-block {
    position: relative;
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--s-4);
    margin: var(--s-5) 0 var(--s-3);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.newsletter-block h2 { margin-top: 0; }
.newsletter-desc { color: var(--text-muted); max-width: 50ch; }
.newsletter-form { display: flex; gap: var(--s-1); flex-wrap: wrap; margin: var(--s-2) 0; }
.newsletter-form input[type="email"] {
    flex: 1;
    min-width: 240px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    background: var(--bg-elevated);
    color: var(--text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.newsletter-legal { margin: 0; color: var(--text-subtle); }

.visually-hidden {
    position: absolute !important;
    width: 1px !important; height: 1px !important;
    padding: 0 !important; margin: -1px !important;
    overflow: hidden !important; clip: rect(0,0,0,0) !important;
    white-space: nowrap !important; border: 0 !important;
}

/* ==== SEARCH + COMPARE ==== */
.search-form {
    display: flex;
    gap: var(--s-1);
    margin: var(--s-3) 0 var(--s-4);
    flex-wrap: wrap;
}
.search-form input[type="search"] {
    flex: 1;
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    transition: all var(--transition-fast);
}
.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.compare-table {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.compare-table th, .compare-table td {
    padding: 0.85rem 1rem !important;
    border-bottom: 1px solid var(--border) !important;
    color: var(--text);
}
.compare-table thead th { background: var(--bg-elevated); }

/* ==== DISCLOSURE + FOOTER ==== */
.affiliate-disclosure {
    background: var(--accent-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: var(--s-2) 0;
    margin-top: var(--s-6);
}
.affiliate-disclosure small { color: var(--text-muted); }

.site-footer {
    border-top: 1px solid var(--border);
    padding: var(--s-4) 0 var(--s-5);
    margin-top: var(--s-3);
    font-size: 0.92rem;
    color: var(--text-muted);
    text-align: center;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--primary); }

/* ==== 404 ==== */
.error-page { text-align: center; padding: var(--s-6) 0; }
.error-page h1 {
    font-size: clamp(5rem, 14vw, 9rem);
    margin-bottom: 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 60px rgba(99, 102, 241, 0.5));
}

/* ==== ANIMATIONS ==== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==== RESPONSIVE ==== */
@media (max-width: 640px) {
    .hero { padding: var(--s-5) 0 var(--s-4); }
    .product-header { padding: var(--s-3); }
    .article-body { font-size: 1rem; }
    .site-brand { font-size: 1.05rem; }
    .site-nav a { font-size: 0.9rem; padding: 0.35rem 0.65rem; }
}

::selection { background: var(--primary-soft); color: var(--text); }

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 2px;
}
