/* =====================================================================
   Tema público — limpio, legible y rápido. Sin fuentes externas
   (la tipografía del sistema carga al instante y se lee muy bien).
   ===================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f6f4;
  --bg-card: #ffffff;
  --ink: #1b1d21;
  --ink-2: #4a4f57;
  --ink-3: #6b7078;
  --line: #e6e5e1;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --accent-soft: #fff1e8;
  --ok: #15803d;
  --ok-soft: #ecfdf3;
  --err: #b91c1c;
  --err-soft: #fef2f2;
  --code-bg: #f3f2ef;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 4px 16px rgba(20, 20, 20, .05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-read: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --w: 1180px;
  --w-narrow: 720px;
  --font-head: var(--font);
  --fs-base: 17px;
  --fs-read: 19px;
  --hw: 800;
  --logo-h: 36px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --bg-soft: #1b1e23;
    --bg-card: #1b1e23;
    --ink: #eceae6;
    --ink-2: #b9b7b2;
    --ink-3: #8e8c88;
    --line: #2c3037;
    --accent: #fb8a4c;
    --accent-ink: #1b1d21;
    --accent-soft: #2e2019;
    --ok-soft: #10261a;
    --err-soft: #2a1414;
    --code-bg: #20242a;
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--fs-base)/1.6 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video, iframe { max-width: 100%; height: auto; }
img { border-radius: 6px; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }

.wrap { width: min(var(--w), 100% - 40px); margin-inline: auto; }
.wrap-narrow { width: min(var(--w-narrow), 100% - 40px); margin-inline: auto; }
.wrap-wide { width: min(1100px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--ink-3); }
main { min-height: 60vh; padding-bottom: 72px; }

/* ---------- Botones y formularios ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px;
  padding: 12px 20px; font: 600 16px/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--bg-soft); }

.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.form label small { font-weight: 400; color: var(--ink-3); }
.form input[type=text], .form input[type=email], .form input[type=url], .form input[type=search], .form textarea, .search-form input {
  width: 100%; font: 400 16px/1.4 var(--font); color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 13px;
}
.form input:focus, .form textarea:focus, .search-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--ink-2); }
.form .check input { margin-top: 4px; accent-color: var(--accent); }
.form-row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.form-title { margin: 0 0 4px; font-size: 20px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.notice { padding: 12px 16px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); margin: 0 0 18px; }
.notice-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.notice-error { background: var(--err-soft); border-color: transparent; color: var(--err); }

/* ---------- Cabecera ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.brand img { border-radius: 8px; height: var(--logo-h); width: auto; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--ink); background: var(--bg-soft); }
.header-tools { display: flex; gap: 4px; }
.nav-toggle { display: none; }
.search-panel { border-top: 1px solid var(--line); padding: 14px 0; background: var(--bg); }
.search-form { display: flex; gap: 10px; }
.search-inline { max-width: 560px; margin: 18px 0 8px; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-grid; }
  .main-nav { position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 8px 20px 16px; }
  .main-nav a { padding: 12px; font-size: 17px; }
  .header-tools { margin-left: auto; }
}

/* ---------- Portada ---------- */
.hero { padding: 64px 0 28px; }
.hero-title { font-size: clamp(32px, 5vw, 52px); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 16px; max-width: 18ch; font-weight: 800; }
.hero-lead { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); max-width: 60ch; margin: 0 0 22px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; }
.chips a { display: inline-block; padding: 6px 13px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.chips a:hover { color: var(--ink); border-color: var(--ink-3); }
.featured { margin-top: 24px; margin-bottom: 56px; }
.section-title { font-size: 24px; letter-spacing: -.015em; margin: 0 0 22px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.section-head a { font-weight: 600; text-decoration: none; }
.products-teaser { margin-top: 64px; }

/* ---------- Tarjetas ---------- */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3 { grid-template-columns: 1fr; } }

.card { display: flex; flex-direction: column; gap: 14px; }
.card-media { display: block; text-decoration: none; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--bg-soft); }
.card-media img, .card-media picture { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .35s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.card-placeholder { display: grid; place-items: center; height: 100%; font-size: 44px; font-weight: 800; color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--bg-soft)); }
.card-body { display: grid; gap: 6px; }
.kicker { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); text-decoration: none; margin: 0; }
.card-title { font-size: 19px; line-height: 1.3; letter-spacing: -.01em; margin: 0; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-excerpt { color: var(--ink-2); margin: 0; font-size: 15.5px; }
.meta { color: var(--ink-3); font-size: 14px; margin: 0; }

.card-big { display: grid; grid-template-columns: 1.25fr 1fr; gap: 36px; align-items: center; }
.card-big .card-title { font-size: clamp(24px, 3vw, 34px); line-height: 1.18; letter-spacing: -.02em; }
.card-big .card-excerpt { font-size: 17px; }
@media (max-width: 820px) { .card-big { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- Paginación ---------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 48px 0 0; }
.page-nums { display: flex; gap: 6px; }
.page-num, .page-link { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.page-num[aria-current] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.page-num:hover, .page-link:hover { border-color: var(--ink-3); color: var(--ink); }
.dots { align-self: center; color: var(--ink-3); }

/* ---------- Archivo ---------- */
.archive-header { padding: 48px 0 32px; }
.archive-title { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.02em; margin: 6px 0 10px; line-height: 1.1; }
.archive-desc { color: var(--ink-2); max-width: 65ch; font-size: 18px; }
.archive-desc p { margin: 0 0 8px; }

/* ---------- Migas ---------- */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 18px; font-size: 14px; color: var(--ink-3); }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; }
.breadcrumbs a { color: var(--ink-3); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }

/* ---------- Entrada ---------- */
.post-header { padding: 48px 0 28px; }
.post-title { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.12; letter-spacing: -.025em; margin: 10px 0 18px; font-weight: 800; text-wrap: balance; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; color: var(--ink-3); font-size: 15px; }
.post-meta a { color: var(--ink-2); text-decoration: none; }
.byline { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.avatar-sm { width: 30px; height: 30px; font-size: 14px; }
.avatar-lg { width: 64px; height: 64px; font-size: 26px; }
.post-cover { margin: 0 auto 40px; }
.post-cover img { width: 100%; border-radius: var(--radius); }

.post-layout { width: min(var(--w-narrow), 100% - 40px); margin: 0 auto; }
.post-layout.has-toc { width: min(1120px, 100% - 40px); display: grid; grid-template-columns: 250px minmax(0, var(--w-narrow)); gap: 56px; justify-content: center; }
.toc { font-size: 14.5px; }
.toc details { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow: auto; }
.toc summary { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); cursor: pointer; margin-bottom: 10px; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary { display: flex; align-items: baseline; gap: 8px; }
.toc-count { margin-left: auto; font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 12px; }
.toc li a { display: flex; gap: 6px; }
.toc .toc-num { color: var(--ink-3); font-size: .88em; }
.toc li a.active .toc-num { color: var(--accent); }
.toc ol { list-style: none; padding: 0 0 0 2px; margin: 0; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-3); text-decoration: none; line-height: 1.4; }
.toc li.toc-l3 a { padding-left: 28px; font-size: 13.5px; }
.toc li a:hover { color: var(--ink); }
.toc li a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
@media (max-width: 1060px) {
  .post-layout.has-toc { display: block; width: min(var(--w-narrow), 100% - 40px); }
  .toc { margin-bottom: 28px; }
  .toc details { position: static; max-height: none; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
  .toc summary { margin: 0; list-style: revert; }
  .toc details[open] summary { margin-bottom: 10px; }
}

/* Texto del artículo: tipografía de lectura, 18–19 px, interlineado amplio */
.prose { font-family: var(--font-read); font-size: var(--fs-read); line-height: 1.75; color: var(--ink); overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose > p + p { margin-top: 1.05em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--font-head); font-weight: var(--hw); letter-spacing: -.015em; line-height: 1.25; margin: 2em 0 .6em; }
.prose h2 { font-size: 1.5em; }
.prose h3 { font-size: 1.22em; }
.prose h4 { font-size: 1.05em; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.prose a:hover { text-decoration-color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 1.1em 0; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); color: var(--ink-2); font-style: italic; }
.prose img { display: block; margin: 1.8em auto; height: auto; }
.prose picture { display: block; }
.prose picture img { margin-inline: auto; }
.prose figure { margin: 1.8em 0; }
.prose figure img { margin: 0 auto; }
.prose figcaption { font-family: var(--font); font-size: 14px; color: var(--ink-3); text-align: center; margin-top: 10px; }
.prose .alignleft { float: left; margin: .4em 1.4em 1em 0; max-width: 50%; }
.prose .alignright { float: right; margin: .4em 0 1em 1.4em; max-width: 50%; }
.prose .aligncenter { margin-inline: auto; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose code { font-family: var(--mono); font-size: .86em; background: var(--code-bg); padding: .15em .4em; border-radius: 5px; }
.prose pre { font-family: var(--mono); font-size: 15px; line-height: 1.6; background: var(--code-bg); padding: 18px 20px; border-radius: 10px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--font); font-size: 15.5px; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--bg-soft); }
.prose::after { content: ""; display: table; clear: both; }
.prose-wide { font-size: 18px; }
@media (max-width: 620px) {
  .prose { font-size: 18px; line-height: 1.7; }
  .prose .alignleft, .prose .alignright { float: none; margin: 1.4em auto; max-width: 100%; }
}

/* Vídeo ligero */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; margin: 1.8em 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-lite img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; opacity: .92; }
.video-play { position: absolute; inset: 0; margin: auto; width: 72px; height: 50px; border: 0; border-radius: 14px; background: rgba(0, 0, 0, .72); cursor: pointer; transition: background .15s; }
.video-play::after { content: ""; position: absolute; left: 29px; top: 15px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.video-lite:hover .video-play { background: #e11d2a; }

/* Tarjeta de producto dentro de un artículo */
.product-inline { display: flex; gap: 20px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); font-family: var(--font); margin: 2em 0; }
.product-inline-img { flex: none; width: 120px; }
.product-inline-img img { margin: 0; border-radius: 8px; }
.product-inline p { margin: 0 0 6px; }
.product-inline-kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.product-inline-title { font-weight: 800; font-size: 19px; line-height: 1.3; }
.product-inline-tagline { color: var(--ink-2); font-size: 15px; }
.prose .product-inline a.btn { text-decoration: none; margin-top: 6px; }
@media (max-width: 520px) { .product-inline { flex-direction: column; align-items: flex-start; } }

/* Pie de la entrada */
.post-footer { margin-top: 48px; display: grid; gap: 28px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.tags a { font-size: 14px; color: var(--ink-2); text-decoration: none; padding: 4px 10px; border-radius: 6px; background: var(--bg-soft); }
.tags a:hover { color: var(--accent); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 16px 0; border-block: 1px solid var(--line); font-size: 15px; }
.share span { font-weight: 700; color: var(--ink-2); }
.share a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.share a:hover { color: var(--accent); }
.author-box { display: flex; gap: 18px; align-items: flex-start; padding: 22px; border-radius: var(--radius); background: var(--bg-soft); }
.author-box p { margin: 0 0 4px; }
.author-name { font-weight: 700; }
.author-name a { color: var(--ink); }

.related { margin-top: 72px; }

/* ---------- Comentarios ---------- */
.comments { margin-top: 72px; }
.comment-list, .comment-list .children { list-style: none; padding: 0; margin: 0; }
.comment-list .children { margin-left: 22px; padding-left: 20px; border-left: 2px solid var(--line); }
.comment article { padding: 18px 0; border-bottom: 1px solid var(--line); }
.comment-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.comment-author { margin: 0; font-weight: 700; }
.comment-author a { color: var(--ink); }
.comment-date { font-size: 13.5px; color: var(--ink-3); text-decoration: none; }
.comment-text { color: var(--ink); overflow-wrap: anywhere; }
.comment-text p { margin: 0 0 .6em; }
.reply-btn { font-size: 14px; }
.comment-form { margin-top: 36px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); }
.replying { font-size: 15px; font-weight: 400; color: var(--ink-2); }
@media (max-width: 620px) { .comment-list .children { margin-left: 6px; padding-left: 12px; } }

/* ---------- Productos ---------- */
.product-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); background: var(--bg-card); transition: border-color .15s, transform .15s; }
.product-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.product-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0; display: block; }
.product-card-body { display: grid; gap: 6px; padding: 18px; }
.product-card-title { font-weight: 800; font-size: 19px; line-height: 1.3; }
.price { font-weight: 800; font-size: 18px; color: var(--accent); }
.price s, .buy-price s { color: var(--ink-3); font-weight: 500; font-size: .8em; margin-right: 6px; }
.product { padding-top: 40px; }
.product-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: start; }
.product-cover { margin: 0 0 32px; }
.product-cover img { width: 100%; border-radius: var(--radius); }
.buy-box { position: sticky; top: 88px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); box-shadow: var(--shadow); }
.buy-price { font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 18px; }
.buy-points { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; color: var(--ink-2); font-size: 14px; }
.buy-points li::before { content: "✓ "; color: var(--ok); font-weight: 800; }
@media (max-width: 900px) { .product-grid { grid-template-columns: 1fr; gap: 28px; } .buy-box { position: static; } }
.access { padding-top: 56px; }
.access-box { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }

.notfound { padding: 72px 0 40px; }

/* ---------- Pie ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 48px 0 28px; font-size: 15px; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.brand-name { font-weight: 800; font-size: 18px; margin: 0 0 4px; }
.footer-brand p { margin: 0 0 8px; }
.social { display: flex; gap: 14px; flex-wrap: wrap; }
.social a, .footer-links a, .footer-links .linklike { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.social a:hover, .footer-links a:hover { color: var(--accent); }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 0; }
.footer-copy { margin-top: 28px; font-size: 14px; }

/* ---------- Aviso de cookies ---------- */
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 560px; margin-left: auto; background: var(--bg-card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0, 0, 0, .18); padding: 18px 20px; font-size: 15px; }
.cookie-bar p { margin: 0 0 14px; }
.cookie-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .88); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; object-fit: contain; }
.prose a.zoomable { cursor: zoom-in; }

@media print {
  .site-header, .site-footer, .share, .comments, .related, .post-nav, .toc, .cookie-bar { display: none !important; }
  .prose { font-size: 12pt; }
}

/* ---------- Bloques de publicidad / promoción (Panel → Publicidad) ---------- */
.promo-block { margin: 2em 0; font-family: var(--font); clear: both; }
.promo-block > .product-inline { margin: 0; }
.promo { padding: 22px 24px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.promo p { margin: 0 0 8px; font-size: 16px; line-height: 1.55; }
.promo .promo-kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.promo .promo-title { font-size: 21px; font-weight: 800; line-height: 1.25; color: var(--ink); }
.prose .promo a.btn { text-decoration: none; margin-top: 6px; }

/* =====================================================================
   Personalización (Panel → Apariencia)
   ===================================================================== */
h1, h2, h3, h4, .brand, .post-title, .hero-title, .archive-title, .card-title, .section-title, .product-card-title, .product-inline-title, .promo-title { font-family: var(--font-head); }
.post-title, .hero-title, .archive-title { font-weight: var(--hw); }

/* Cabecera: estilos y fija / no fija */
.header-static .site-header { position: relative; }
.header-accent .site-header { background: var(--accent); border-bottom-color: transparent; }
.header-dark .site-header { background: #111317; border-bottom-color: transparent; }
.header-accent .site-header, .header-dark .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
.header-accent .brand, .header-accent .main-nav > ul > li > a, .header-accent .icon-btn { color: var(--accent-ink); }
.header-dark .brand, .header-dark .main-nav > ul > li > a, .header-dark .icon-btn { color: #f3f4f6; }
.header-accent .main-nav > ul > li > a:hover, .header-accent .main-nav > ul > li > a[aria-current], .header-accent .icon-btn:hover { background: rgba(255,255,255,.14); color: var(--accent-ink); }
.header-dark .main-nav > ul > li > a:hover, .header-dark .main-nav > ul > li > a[aria-current], .header-dark .icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.brand-logo-only span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Submenús y botón destacado */
.main-nav li { position: relative; }
.main-nav .has-sub > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); opacity: .6; }
.main-nav .sub-menu { list-style: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; padding: 8px; margin: 0; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.12); display: none; flex-direction: column; gap: 2px; z-index: 60; }
.main-nav .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.main-nav .has-sub:hover > .sub-menu, .main-nav .has-sub:focus-within > .sub-menu { display: flex; }
.main-nav .sub-menu a { color: var(--ink-2); padding: 8px 12px; font-size: 14.5px; white-space: nowrap; }
.main-nav .sub-menu a:hover { background: var(--bg-soft); color: var(--ink); }
.main-nav a.nav-cta { background: var(--accent); color: var(--accent-ink) !important; font-weight: 600; margin-left: 6px; }
.main-nav a.nav-cta:hover { filter: brightness(1.08); background: var(--accent); }
.header-accent .main-nav a.nav-cta { background: var(--accent-ink); color: var(--accent) !important; }
@media (max-width: 820px) {
  .main-nav .sub-menu { position: static; display: flex; box-shadow: none; border: 0; padding: 0 0 0 14px; background: transparent; min-width: 0; }
  .main-nav .has-sub > a::after { display: none; }
  .main-nav a.nav-cta { margin: 6px 0 0; text-align: center; }
  .header-accent .main-nav, .header-dark .main-nav { background: var(--bg); }
  .header-accent .main-nav > ul > li > a, .header-dark .main-nav > ul > li > a { color: var(--ink-2); }
}

/* Barra de aviso */
.announce { background: var(--ink); color: var(--bg); font-size: 14.5px; text-align: center; position: relative; }
.announce-inner { padding: 9px 44px; }
.announce a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.announce-close { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; opacity: .75; padding: 6px 10px; }
.announce-close:hover { opacity: 1; }

/* Portada: columnas y lista */
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-4 { grid-template-columns: 1fr; } }
.post-list { display: grid; gap: 28px; }
.post-list .card { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: center; }
.post-list .card-title { font-size: 22px; }
@media (max-width: 700px) { .post-list .card { grid-template-columns: 1fr; gap: 12px; } }

/* Pie de página con columnas */
.footer-grid { display: grid; grid-template-columns: minmax(220px, 1.4fr) repeat(auto-fit, minmax(160px, 1fr)); gap: 32px 40px; }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.footer-col h2, .footer-title { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 0 0 12px; font-family: var(--font); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a, .footer-col .linklike { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.footer-col a:hover { color: var(--accent); }
.social-icons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.social-icons a { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); }
.social-icons a:hover { color: var(--accent); border-color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; font-size: 14px; }
.footer-bottom .footer-links { gap: 8px 18px; }.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Barra de administración (solo la ves tú con sesión en el panel) */
.admin-bar { position: fixed; left: 12px; bottom: 12px; z-index: 95; display: flex; gap: 4px; align-items: center; padding: 5px; border-radius: 12px; background: #16181c; color: #e5e7eb; font: 500 13px/1 var(--font); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.admin-bar a { color: #e5e7eb; text-decoration: none; padding: 7px 10px; border-radius: 8px; }
.admin-bar a:hover { background: #2a2d33; color: #fff; }
.admin-bar-live { color: #4ade80; padding: 7px 10px; cursor: help; }
@media print { .admin-bar { display: none !important; } }

/* =====================================================================
   Aviso de cookies (AEPD): «Aceptar» y «Rechazar» con el mismo peso.
   ===================================================================== */
.cc-banner { position: fixed; z-index: 100; left: 16px; right: 16px; bottom: 16px; margin: 0 auto; max-width: 760px; background: var(--bg-card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 18px 20px; font: 400 15px/1.5 var(--font); }
.cc-title { font-weight: 800; font-size: 17px; margin: 0 0 6px; font-family: var(--font-head); }
.cc-text { margin: 0 0 14px; color: var(--ink-2); }
.cc-text a { color: var(--accent); }
.cc-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.cc-btn { flex: 1 1 140px; justify-content: center; padding: 11px 16px; font-size: 15px; }
.cc-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.cc-modal { border: 0; border-radius: var(--radius); padding: 0; max-width: 560px; width: calc(100% - 32px); background: var(--bg-card); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.cc-modal::backdrop { background: rgba(0,0,0,.45); }
.cc-modal-inner { padding: 22px; font: 400 15px/1.5 var(--font); }
.cc-cat { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 10px; }
.cc-cat p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }
.cc-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; }
.cc-always { font-size: 13px; color: var(--ok); font-weight: 600; }
.cc-services { color: var(--ink-3); }
.cc-switch { position: relative; width: 44px; height: 24px; flex: none; }
.cc-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.cc-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .15s; }
.cc-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.cc-switch input:checked + span { background: var(--accent); }
.cc-switch input:checked + span::after { transform: translateX(20px); }
.cc-switch input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.cc-modal .cc-actions { margin-top: 16px; }
@media (max-width: 560px) { .cc-banner { left: 8px; right: 8px; bottom: 8px; padding: 16px; } .cc-btn { flex-basis: 100%; } }
@media print { .cc-banner { display: none !important; } }
.cookie-table-wrap { overflow-x: auto; margin: 1.4em 0; }
.prose .cookie-table { display: table; font-size: 14px; }
.prose .cookie-table code { font-size: 12.5px; }
.admin-bar ~ .cc-banner { bottom: 64px; }
.visit-count { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; align-self: center; }
.consent-ph { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.consent-ph .btn { display: inline-block; margin-top: 8px; }
