/* Webs — estilos base del sitio público (blog, tienda y componentes de los temas).
   Todo se apoya en variables --w-* que define Diseño; los temas las sobrescriben o añaden estilos encima. */
:root {
  --w-primary: #2563eb; --w-primary-contrast: #fff; --w-accent: #f59e0b; --w-accent-contrast: #111827;
  --w-bg: #fff; --w-surface: #f6f7f9; --w-text: #1f2937; --w-muted: #6b7280; --w-border: #e5e7eb;
  --w-header-bg: #fff; --w-header-text: #1f2937; --w-footer-bg: #111827; --w-footer-text: #e5e7eb;
  --w-font-heading: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --w-font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --w-font-size: 16px; --w-container: 1160px; --w-radius: 10px; --w-logo-height: 40px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--w-bg); color: var(--w-text); font-family: var(--w-font-body); font-size: var(--w-font-size); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--w-font-heading); line-height: 1.25; margin: 0 0 .5em; }
a { color: var(--w-primary); }
img { max-width: 100%; height: auto; }
.w-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.w-container { width: 100%; max-width: var(--w-container); margin: 0 auto; padding: 0 20px; }
.w-container.w-narrow, .w-narrow { max-width: 820px; }
.w-main { min-height: 50vh; padding: 28px 0 56px; }
.w-main > .w-container:first-child, .w-main > .w-narrow:first-child { padding-top: 0; }
.w-prose { font-size: 1.05em; line-height: 1.75; }
.w-prose img { border-radius: var(--w-radius); }
.w-prose h2 { margin-top: 1.6em; } .w-prose blockquote { margin: 1.2em 0; padding: .2em 1em; border-left: 4px solid var(--w-primary); color: var(--w-muted); }
.w-prose pre { background: var(--w-surface); padding: 12px 14px; border-radius: var(--w-radius); overflow: auto; }

/* Botones */
.w-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--w-border); border-radius: var(--w-radius); background: var(--w-bg); color: var(--w-text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2; transition: filter .15s, border-color .15s; }
.w-btn:hover { border-color: var(--w-text); }
.w-btn:disabled { opacity: .5; cursor: not-allowed; }
.w-btn-primary { background: var(--w-primary); border-color: var(--w-primary); color: var(--w-primary-contrast); }
.w-btn-primary:hover { filter: brightness(.92); border-color: var(--w-primary); }
.w-btn-sm { padding: 7px 12px; font-size: .9em; }
.w-btn-block { display: flex; width: 100%; }
.w-icon-btn { border: 0; background: none; color: var(--w-muted); cursor: pointer; font-size: 1.2em; padding: 6px; border-radius: 8px; }
.w-icon-btn:hover { color: #b42318; background: var(--w-surface); }

/* Cabecera */
.w-header { background: var(--w-header-bg); color: var(--w-header-text); border-bottom: 1px solid var(--w-border); z-index: 50; }
.w-header.is-sticky { position: sticky; top: 0; }
.w-header a { color: inherit; text-decoration: none; }
.w-header-in { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.w-brand { display: inline-flex; align-items: center; font-family: var(--w-font-heading); font-weight: 700; font-size: 1.3em; }
.w-logo { height: var(--w-logo-height); width: auto; display: block; }
.w-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.w-nav a { padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.w-nav a:hover, .w-nav a.is-active { background: color-mix(in srgb, var(--w-header-text) 8%, transparent); }
.w-cart-link { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.w-cart-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--w-accent); color: var(--w-accent-contrast); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.w-burger { display: none; margin-left: auto; border: 1px solid var(--w-border); background: none; color: inherit; border-radius: 8px; width: 40px; height: 40px; font-size: 1.3em; cursor: pointer; }

/* Pie */
.w-footer { background: var(--w-footer-bg); color: var(--w-footer-text); padding: 44px 0 24px; }
.w-footer a { color: inherit; opacity: .85; text-decoration: none; } .w-footer a:hover { opacity: 1; text-decoration: underline; }
.w-footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.w-footer h3 { font-size: 1em; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.w-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.w-social { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.w-social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--w-footer-text) 30%, transparent); display: inline-grid; place-items: center; font-size: 1.2em; opacity: 1; }
.w-social a:hover { background: color-mix(in srgb, var(--w-footer-text) 14%, transparent); text-decoration: none; }
.w-copy { margin-top: 32px; padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--w-footer-text) 20%, transparent); font-size: .9em; opacity: .75; }

/* Estructura de contenido */
.w-pagehead { padding: 8px 0 18px; } .w-pagehead h1 { font-size: 2em; margin-bottom: .2em; } .w-pagehead p { margin: 0; color: var(--w-muted); }
.w-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 6px 0 18px; }
.w-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.w-chip { padding: 5px 13px; border-radius: 99px; border: 1px solid var(--w-border); color: var(--w-text); text-decoration: none; font-size: .92em; }
.w-chip:hover { border-color: var(--w-text); } .w-chip.is-current { background: var(--w-primary); border-color: var(--w-primary); color: var(--w-primary-contrast); }
.w-search { display: flex; border: 1px solid var(--w-border); border-radius: var(--w-radius); overflow: hidden; background: var(--w-bg); }
.w-search input { border: 0; padding: 9px 12px; font: inherit; background: transparent; color: inherit; min-width: 190px; outline: 0; }
.w-search button { border: 0; background: var(--w-surface); padding: 0 12px; cursor: pointer; color: inherit; font-size: 1.1em; }
.w-sort { display: inline-flex; align-items: center; gap: 8px; color: var(--w-muted); font-size: .92em; }
.w-sort select { padding: 8px 10px; border: 1px solid var(--w-border); border-radius: var(--w-radius); background: var(--w-bg); color: var(--w-text); font: inherit; }
.w-grid { display: grid; gap: 22px; } .w-grid-2 { grid-template-columns: repeat(2, 1fr); } .w-grid-3 { grid-template-columns: repeat(3, 1fr); } .w-grid-4 { grid-template-columns: repeat(4, 1fr); }
.w-empty { text-align: center; padding: 56px 16px; color: var(--w-muted); }
.w-meta { color: var(--w-muted); font-size: .88em; margin: 0 0 .4em; } .w-meta a { color: inherit; }
.w-muted { color: var(--w-muted); } .w-warn { color: #b45309; } .w-right { text-align: right; }
.w-back { margin: 24px 0 0; } .w-back a { text-decoration: none; }
.w-notice { padding: 11px 14px; border-radius: var(--w-radius); background: #fef3c7; color: #92400e; margin: 0 0 16px; }
.w-notice-bad { background: #fee2e2; color: #991b1b; } .w-notice-ok { background: #dcfce7; color: #166534; }
.w-flash { max-width: var(--w-container); margin: 14px auto 0; padding: 0 20px; }
.w-lead { font-size: 1.15em; color: var(--w-muted); }

/* Tarjetas */
.w-card { background: var(--w-bg); border: 1px solid var(--w-border); border-radius: var(--w-radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.w-card:hover { box-shadow: 0 10px 30px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.w-card-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--w-surface); overflow: hidden; }
.w-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.w-card-ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--w-muted); font-size: 2.4em; min-height: 120px; }
.w-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.w-card-title { font-size: 1.08em; margin: 0; } .w-card-title a { color: inherit; text-decoration: none; } .w-card-title a:hover { color: var(--w-primary); }
.w-card-text { margin: 0; color: var(--w-muted); font-size: .95em; }
.w-more { margin-top: auto; padding-top: 6px; font-weight: 600; text-decoration: none; }
.w-badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .75em; font-weight: 700; background: var(--w-surface); color: var(--w-text); }
.w-card-media .w-badge { position: absolute; top: 10px; left: 10px; }
.w-badge-sale { background: var(--w-accent); color: var(--w-accent-contrast); } .w-badge-out { background: #111827; color: #fff; left: auto; right: 10px; }
.w-badge-ok { background: #dcfce7; color: #166534; } .w-badge-wait { background: #fef3c7; color: #92400e; }
.w-price { margin: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.w-price-now { font-weight: 700; font-size: 1.1em; } .w-price-old { color: var(--w-muted); font-size: .92em; } .w-price-lg .w-price-now { font-size: 1.7em; }
.w-add { margin-top: auto; padding-top: 8px; }

/* Entrada */
.w-article-head h1 { font-size: 2.3em; } .w-article-cover { width: 100%; border-radius: var(--w-radius); margin: 8px 0 24px; }
.w-related { margin-top: 44px; } .w-related h2 { margin-bottom: 16px; }

/* Paginación */
.w-pager { display: flex; justify-content: center; gap: 6px; margin: 30px 0 0; flex-wrap: wrap; }
.w-pager-link { min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 1px solid var(--w-border); border-radius: var(--w-radius); text-decoration: none; color: var(--w-text); }
.w-pager-link:hover { border-color: var(--w-text); } .w-pager-link.is-current { background: var(--w-primary); border-color: var(--w-primary); color: var(--w-primary-contrast); }

/* Tienda */
.w-shop-layout { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
.w-side-title { font-size: .9em; text-transform: uppercase; letter-spacing: .06em; color: var(--w-muted); }
.w-side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.w-side-list a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--w-text); text-decoration: none; }
.w-side-list a:hover { background: var(--w-surface); } .w-side-list a.is-current { background: var(--w-surface); font-weight: 700; color: var(--w-primary); }
.w-crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--w-muted); font-size: .9em; margin-bottom: 16px; } .w-crumbs a { color: inherit; }
.w-product { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.w-product-media { border-radius: var(--w-radius); overflow: hidden; background: var(--w-surface); aspect-ratio: 1; display: grid; place-items: center; }
.w-product-media img { width: 100%; height: 100%; object-fit: cover; }
.w-product-info h1 { font-size: 2em; }
.w-buy { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.w-qty input, .w-qty-input { width: 80px; padding: 10px; border: 1px solid var(--w-border); border-radius: var(--w-radius); font: inherit; background: var(--w-bg); color: inherit; }
.w-facts { list-style: none; padding: 16px 0 0; margin: 0; border-top: 1px solid var(--w-border); display: grid; gap: 4px; color: var(--w-muted); font-size: .92em; } .w-facts span { font-weight: 600; color: var(--w-text); margin-right: 6px; }
.w-product-desc { margin-top: 40px; }

/* Pasos, carrito y checkout */
.w-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 26px; counter-reset: s; flex-wrap: wrap; }
.w-steps li { display: flex; align-items: center; gap: 8px; color: var(--w-muted); font-size: .92em; }
.w-steps li + li::before { content: ""; width: 28px; height: 2px; background: var(--w-border); margin-right: 8px; }
.w-step-n { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--w-surface); border: 1px solid var(--w-border); font-size: .85em; font-weight: 700; flex: none; }
.w-steps .is-current { color: var(--w-text); font-weight: 700; } .w-steps .is-current .w-step-n { background: var(--w-primary); border-color: var(--w-primary); color: var(--w-primary-contrast); }
.w-steps .is-done .w-step-n { background: #dcfce7; border-color: #86efac; color: #166534; }
.w-table-wrap { overflow-x: auto; }
.w-table { width: 100%; border-collapse: collapse; } .w-table th { text-align: left; font-size: .8em; text-transform: uppercase; letter-spacing: .05em; color: var(--w-muted); }
.w-table th, .w-table td { padding: 12px 10px; border-bottom: 1px solid var(--w-border); vertical-align: middle; } .w-table th.w-right { text-align: right; }
.w-line { display: flex; align-items: center; gap: 12px; } .w-line a { color: inherit; text-decoration: none; }
.w-line-img { width: 60px; height: 60px; border-radius: 8px; background: var(--w-surface); overflow: hidden; display: grid; place-items: center; flex: none; color: var(--w-muted); } .w-line-img img { width: 100%; height: 100%; object-fit: cover; }
.w-cart-foot { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-top: 20px; flex-wrap: wrap; }
.w-summary dl, .w-totals { margin: 0 0 14px; display: grid; gap: 6px; } .w-summary dl > div, .w-totals > div { display: flex; justify-content: space-between; gap: 18px; } .w-summary dt, .w-summary dd, .w-totals dt, .w-totals dd { margin: 0; }
.w-total { font-weight: 700; font-size: 1.15em; padding-top: 8px; border-top: 1px solid var(--w-border); }
.w-cart-foot .w-summary { min-width: 300px; }
.w-box { border: 1px solid var(--w-border); border-radius: var(--w-radius); background: var(--w-bg); padding: 20px; margin-bottom: 18px; }
.w-box h2 { font-size: 1.1em; display: flex; align-items: center; gap: 10px; }
.w-checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; } .w-checkout-side { position: sticky; top: 90px; }
.w-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; } .w-span-2 { grid-column: 1 / -1; }
.w-field { display: flex; flex-direction: column; gap: 5px; font-size: .9em; font-weight: 600; }
.w-field input, .w-field textarea, .w-field select { padding: 10px 12px; border: 1px solid var(--w-border); border-radius: var(--w-radius); font: inherit; font-weight: 400; background: var(--w-bg); color: inherit; width: 100%; }
.w-field input:focus, .w-field textarea:focus, .w-search:focus-within, .w-qty input:focus, .w-qty-input:focus { outline: 2px solid color-mix(in srgb, var(--w-primary) 35%, transparent); border-color: var(--w-primary); }
.w-options { display: grid; gap: 10px; margin-bottom: 12px; }
.w-option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--w-border); border-radius: var(--w-radius); cursor: pointer; }
.w-option:has(input:checked) { border-color: var(--w-primary); background: color-mix(in srgb, var(--w-primary) 6%, var(--w-bg)); }
.w-option-body { flex: 1; display: grid; } .w-option-body small { color: var(--w-muted); font-weight: 400; } .w-option-price { font-weight: 700; } .w-option-icon { font-size: 1.5em; color: var(--w-primary); }
.w-check { display: flex; gap: 8px; align-items: center; font-size: .92em; margin-top: 8px; }
.w-mini { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; font-size: .92em; } .w-mini li { display: flex; justify-content: space-between; gap: 12px; }
.w-instructions { background: var(--w-surface); border-radius: var(--w-radius); padding: 14px 16px; margin: 12px 0; } .w-instructions h2 { font-size: 1em; }
.w-status { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }

/* Rejillas responsivas */
@media (max-width: 960px) {
  .w-grid-3, .w-grid-4 { grid-template-columns: repeat(2, 1fr); } .w-shop-layout { grid-template-columns: 1fr; } .w-sidebar { display: none; }
  .w-product, .w-checkout { grid-template-columns: 1fr; } .w-checkout-side { position: static; }
  .w-footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .w-burger { display: inline-grid; place-items: center; }
  .w-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--w-header-bg); border-bottom: 1px solid var(--w-border); padding: 10px 20px 16px; margin: 0; }
  .w-header { position: relative; } .w-header.is-sticky { position: sticky; } .w-header.nav-open .w-nav { display: flex; }
  .w-grid-2, .w-grid-3, .w-grid-4, .w-fields, .w-footer-cols { grid-template-columns: 1fr; }
  .w-pagehead h1, .w-article-head h1 { font-size: 1.7em; } .w-search input { min-width: 0; width: 100%; } .w-search { flex: 1; }
  .w-table thead { display: none; } .w-table, .w-table tbody, .w-table tr, .w-table td { display: block; width: 100%; }
  .w-table tr { padding: 10px 0; border-bottom: 1px solid var(--w-border); } .w-table td { border: 0; padding: 4px 0; } .w-table td[data-label]::before { content: attr(data-label) ": "; color: var(--w-muted); }
  .w-table td.w-right { text-align: left; }
}
