:root {
  --bg: #eef1f4; --card: #fff; --ink: #1c2530; --muted: #6b7785;
  --line: #e0e4e9; --accent: #0b6e4f; --accent-d: #08583f; --accent-soft: #e6f2ee;
  --chapter: #4a5560; --chapter-d: #353e47; --gold: #c8922b;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.55 -apple-system, "Segoe UI", Roboto, Helvetica, sans-serif;
  color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -.3px; }

/* ---------- Cabecera tipo portal ---------- */
.site-head { background: var(--card); border-bottom: 3px solid var(--accent); }
.head-row { max-width: 1100px; margin: 0 auto; display: flex; align-items: center;
  gap: 20px; padding: 12px 24px; }
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand:hover { text-decoration: none; }
.brand-mark { font-weight: 800; font-size: 22px; color: var(--accent); letter-spacing: -.5px; }
.brand-mark .amp { color: var(--gold); margin: 0 1px; }
.brand-tag { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; }
.topnav { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 14px; }
.topnav a { color: var(--ink); font-weight: 600; }
.topnav .muted { color: var(--muted); font-weight: 500; }
.nav-account { color: var(--accent) !important; }
.btn-login { background: var(--accent); color: #fff !important; padding: 7px 15px; border-radius: 7px; }
.btn-login:hover { text-decoration: none; background: var(--accent-d); }

.head-title { background: linear-gradient(90deg, var(--accent), var(--accent-d));
  color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .5px; }
.head-title { display: flex; align-items: center; gap: 16px;
  padding: 9px 24px; max-width: 1100px; margin: 0 auto; }
.head-title strong { opacity: .85; }
.head-title .search { margin-left: auto; display: flex; gap: 6px; }
.search input { width: 300px; max-width: 38vw; padding: 7px 11px; border: 0; border-radius: 7px;
  font-size: 14px; }
.search button { padding: 7px 14px; border: 0; border-radius: 7px; background: var(--gold);
  color: #fff; font-weight: 700; cursor: pointer; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 24px; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(120deg, #16324a, #0b6e4f);
  border-radius: 0; margin: -24px -24px 24px; }
.hero-inner { max-width: 1100px; margin: 0 auto; padding: 38px 24px; color: #fff; }
.hero h1 { margin: 0 0 8px; font-size: 30px; }
.hero p { margin: 0; font-size: 17px; max-width: 720px; opacity: .92; }
.hero strong { color: #ffe08a; }

/* ---------- Tarjetas de producto ---------- */
.productos { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px; margin-bottom: 36px; }
.prod { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--accent);
  border-radius: 10px; padding: 20px; display: flex; flex-direction: column; }
.prod:hover { text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-2px);
  transition: .15s; }
.prod-premeti { border-top-color: #16324a; }
.prod-auto { border-top-color: var(--gold); }
.prod-doc { border-top-color: #7a4ea8; }
.prod-badge { align-self: flex-start; font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .5px; color: var(--accent); background: var(--accent-soft); padding: 3px 9px;
  border-radius: 20px; margin-bottom: 10px; }
.prod-premeti .prod-badge { color: #16324a; background: #e6edf3; }
.prod-auto .prod-badge { color: #8a6212; background: #faf0d8; }
.prod-doc .prod-badge { color: #7a4ea8; background: #efe8f6; }
.prod h2 { margin: 0 0 8px; font-size: 18px; color: var(--ink); }
.prod p { margin: 0 0 14px; font-size: 13.5px; color: var(--muted); flex: 1; }
.prod-link { font-weight: 700; font-size: 14px; color: var(--accent); }

/* ---------- Secciones ---------- */
.section-title { font-size: 20px; margin: 0 0 4px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.lead { color: var(--muted); margin: 4px 0 16px; }
.bases-section { margin-bottom: 36px; }
.info-block { background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 20px 24px; margin-bottom: 18px; }
.info-block p { color: var(--muted); margin: 8px 0 0; }
.info-block em { color: #a06b1a; font-style: normal; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: block; }
.card:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(11,110,79,.1); text-decoration: none; }
.card-code { font-family: ui-monospace, monospace; font-weight: 700; color: var(--accent); font-size: 17px; }
.card-name { margin: 6px 0 4px; font-weight: 600; font-size: 14px; }
.card-meta { color: var(--muted); font-size: 12.5px; }
.owned { background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 20px; margin-left: 8px; vertical-align: middle; text-transform: uppercase; }

/* ---------- Catálogo: barra capítulo + 2 columnas ---------- */
.chapter-bar { background: linear-gradient(90deg, var(--chapter), var(--chapter-d)); color: #fff;
  border-radius: 8px; padding: 11px 18px; display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; }
.chapter-code { font-family: ui-monospace, monospace; font-weight: 800; font-size: 18px; }
.chapter-name { font-weight: 600; text-transform: uppercase; letter-spacing: .5px; font-size: 15px; opacity: .95; }

.cat-layout { display: grid; grid-template-columns: 1fr 250px; gap: 22px; align-items: start; }
.cat-main { min-width: 0; }
@media (max-width: 860px) { .cat-layout { grid-template-columns: 1fr; } }

.crumb { font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
.crumb .sep { margin: 0 6px; color: var(--line); }

.grid { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; }
.grid th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: #f7f9fa; }
.grid td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.grid tr:last-child td { border-bottom: 0; }
.grid tr.chapter { background: #f3f6f8; }
.grid tr.chapter td.code a { color: var(--ink); font-weight: 700; }
.grid tr:hover { background: var(--accent-soft); }
.grid td.code { white-space: nowrap; font-family: ui-monospace, monospace; }
.grid td.ud, .grid th.ud { text-align: center; color: var(--muted); white-space: nowrap; }
.grid td.num, .grid th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Sidebar catálogo ---------- */
.cat-aside { display: flex; flex-direction: column; gap: 14px; }
.bono { background: linear-gradient(160deg, #16324a, #0b6e4f); color: #fff; border-radius: 10px;
  padding: 16px; text-align: center; }
.bono-top { font-size: 12.5px; opacity: .9; }
.bono-price { font-size: 17px; margin: 8px 0 12px; }
.bono-price strong { color: #ffe08a; font-size: 22px; }
.bono-btn { display: block; background: var(--gold); color: #fff !important; font-weight: 700;
  padding: 9px; border-radius: 7px; }
.bono-btn:hover { text-decoration: none; filter: brightness(1.05); }
.aside-box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.aside-box h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--accent); }
.aside-muted { color: var(--muted); font-size: 13px; margin: 0; }

/* ---------- Ficha concepto ---------- */
.concept-head { display: flex; justify-content: space-between; align-items: center; gap: 24px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 16px; }
.ud-line { color: var(--muted); margin: 0; }
.price-box { background: var(--accent); color: #fff; font-size: 22px; font-weight: 700;
  padding: 10px 18px; border-radius: 10px; white-space: nowrap; }
.long-text { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px;
  white-space: pre-wrap; }
h2.section-title, section > h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); margin: 22px 0 10px; }
.empty { color: var(--muted); font-style: italic; }

/* ---------- Login ---------- */
.login-box { max-width: 380px; margin: 30px auto; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 26px; }
.login-box h1 { margin-top: 0; font-size: 22px; }
.login-box label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 4px; }
.login-box input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; }
.login-box button { width: 100%; margin-top: 20px; padding: 11px; border: 0; border-radius: 8px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }
.login-box .hint { color: var(--muted); font-size: 13px; text-align: center; margin: 16px 0 0; }
.form-error { background: #fdecec; color: #c0392b; border: 1px solid #f5c6cb; padding: 10px 12px;
  border-radius: 8px; font-size: 14px; }

/* ---------- Footer ---------- */
.foot { background: var(--chapter-d); color: #c8d0d8; margin-top: 40px; }
.foot-inner { max-width: 1100px; margin: 0 auto; padding: 18px 24px; display: flex; justify-content: space-between;
  align-items: center; gap: 16px; font-size: 13px; flex-wrap: wrap; }
.foot-inner a { color: #fff; }
.foot-inner nav { display: flex; gap: 18px; }
