/* Techsupport Costa Rica — Design system
   Marca: azul #0A92D6 · tinta #0B1724 · acento #8ECBDE · Manrope (titulares) + Ubuntu (texto) */
:root {
  --brand: #0a92d6;
  --brand-600: #0879b2;
  --brand-50: #e8f5fc;
  --accent: #8ecbde;
  --ink: #0b1724;
  --ink-2: #13253a;
  --text: #24303d;
  --muted: #5f6b78;
  --line: #e2e8ef;
  --bg: #ffffff;
  --bg-alt: #f4f7fa;
  --ok: #128a52;
  --warn: #c27a00;
  --danger: #c62f3b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(11, 23, 36, .06), 0 8px 24px rgba(11, 23, 36, .06);
  --shadow-lg: 0 20px 50px rgba(11, 23, 36, .18);
  --font-head: 'Manrope', 'Ubuntu', system-ui, sans-serif;
  --font-body: 'Ubuntu', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .h3 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.25rem); font-weight: 800; }
h3, .h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.ico { flex: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.hp { position: absolute; left: -9999px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 24px; } }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { font-family: var(--font-head); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: .75em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .8em 1.4em; border-radius: 999px; border: 1px solid transparent; font-family: var(--font-head); font-weight: 700; font-size: .95rem; cursor: pointer; text-decoration: none !important; transition: background .15s, border-color .15s, transform .15s, box-shadow .15s; white-space: nowrap; }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(10, 146, 214, .3); }
.btn--primary:hover { background: var(--brand-600); transform: translateY(-1px); }
.btn--primary:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand-600); }
.btn--on-dark, .section--dark .btn--ghost, .hero .btn--ghost, .page-hero .btn--ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.btn--sm { padding: .5em 1em; font-size: .85rem; }
.btn--block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: inherit; cursor: pointer; position: relative; }
.icon-btn:hover { background: rgba(255,255,255,.08); text-decoration: none; }

/* ---------- Header ---------- */
.staging-bar { background: #fff4d6; color: #6b4b00; text-align: center; font-size: .8rem; padding: 4px 16px; }
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ink); color: #fff; }
.topbar { background: #071019; font-size: .82rem; color: rgba(255,255,255,.75); }
.topbar__in { display: flex; gap: 22px; align-items: center; min-height: 36px; overflow-x: auto; scrollbar-width: none; }
.topbar a, .topbar span { color: inherit; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.topbar a:hover { color: #fff; text-decoration: none; }
.topbar__support { margin-left: auto; color: var(--accent) !important; font-weight: 500; }
@media (max-width: 900px) { .topbar__addr { display: none !important; } .topbar__in > a:first-child span { display: none; } }
.navbar { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; flex: none; }
.brand__logo { height: 52px; width: auto; display: block; }
/* Logo oficial (JPG con fondo blanco): se muestra sin alteraciones sobre una placa blanca en fondos oscuros */
.nav { margin-left: auto; }
.nav > ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a { color: rgba(255,255,255,.85); font-family: var(--font-head); font-weight: 600; font-size: .95rem; padding: 10px 14px; border-radius: 8px; display: flex; align-items: center; gap: 8px; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.07); text-decoration: none; }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--brand); }
.has-sub { position: relative; }
.sub { position: absolute; top: 100%; left: 0; min-width: 300px; list-style: none; margin: 0; padding: 8px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s; }
.has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.sub a { color: var(--text); font-weight: 600; }
.sub a:hover { background: var(--brand-50); color: var(--brand-600); }
.sub .ico { color: var(--brand); }
.nav-actions { display: flex; align-items: center; gap: 4px; }
.install-btn { color: #fff; border-color: rgba(255,255,255,.3); }
.cart-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.menu-toggle { display: none; }
@media (max-width: 980px) {
  .menu-toggle { display: inline-grid; }
  .navbar { gap: 8px; }
  .nav-actions { margin-left: auto; }
  .nav { position: fixed; inset: 0 0 0 auto; top: 0; width: min(86vw, 360px); background: var(--ink); padding: 84px 16px 24px; transform: translateX(100%); transition: transform .25s; overflow-y: auto; box-shadow: var(--shadow-lg); z-index: 60; }
  .nav.is-open { transform: none; }
  .nav > ul { flex-direction: column; }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; background: transparent; box-shadow: none; padding: 0 0 0 10px; min-width: 0; }
  .sub a { color: rgba(255,255,255,.75); font-weight: 500; }
  .sub a:hover { background: rgba(255,255,255,.07); color: #fff; }
  .install-btn span { display: none; }
  .brand__logo { height: 36px; }
}
body.nav-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero { background: radial-gradient(1000px 500px at 85% -10%, rgba(10,146,214,.35), transparent 60%), radial-gradient(600px 400px at -10% 110%, rgba(142,203,222,.15), transparent 60%), var(--ink); color: #fff; padding: clamp(56px, 9vw, 112px) 0; position: relative; overflow: hidden; }
/* Fondo de la portada sin líneas: solo el azul y el collage de video */
.hero__in { position: relative; z-index: 1; }
.hero__copy { max-width: 820px; }
.hero h1 { color: #fff; }
.hero .lead { color: rgba(255,255,255,.75); }
.hero .eyebrow { color: var(--accent); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 0; color: rgba(255,255,255,.8); font-size: .9rem; }
.hero__trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero__trust .ico { color: var(--accent); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot--ok { background: #2ad47e; box-shadow: 0 0 0 4px rgba(42,212,126,.18); }

/* ---------- KPIs ---------- */
.kpis { background: var(--ink-2); color: #fff; border-top: 1px solid rgba(255,255,255,.06); }
.kpis__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.kpis__grid--3 { grid-template-columns: repeat(3, 1fr); }
.kpis__grid > div { padding: 26px 16px; border-left: 1px solid rgba(255,255,255,.08); }
.kpis__grid > div:first-child { border-left: 0; }
.kpis strong { display: block; font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: #fff; line-height: 1.1; }
.kpis--compact strong { font-size: 1.35rem; }
.kpis span { color: rgba(255,255,255,.65); font-size: .9rem; }
@media (max-width: 760px) { .kpis__grid, .kpis__grid--3 { grid-template-columns: 1fr 1fr; } .kpis__grid > div:nth-child(odd) { border-left: 0; } .kpis__grid--3 > div:last-child { grid-column: 1 / -1; } }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--tight { padding: 40px 0 72px; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--ink); color: rgba(255,255,255,.8); }
.section--dark h2, .section--dark h3 { color: #fff; }
.section__head { max-width: 720px; margin-bottom: 40px; }
.section__head p:last-child { color: var(--muted); font-size: 1.05rem; }
.section__head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section__head--row h2 { margin-bottom: 0; }
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--services { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid--products { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
@media (max-width: 980px) { .grid--4 { grid-template-columns: 1fr 1fr; } .grid--3 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid--4 { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.split--center { align-items: center; }
.split--wide { grid-template-columns: 1.6fr 1fr; }
@media (max-width: 900px) { .split, .split--wide { grid-template-columns: 1fr; gap: 32px; } }
.stack > * + * { margin-top: 16px; }

/* ---------- Cards ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); position: relative; }
.card--flat { box-shadow: none; }
.card--flat .ico { color: var(--brand); margin-bottom: 14px; }
.card--flat p { color: var(--muted); margin: 0; }
.card--dark { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); box-shadow: none; }
.card--dark p { margin: 0; }
.service-card { display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.service-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.service-card p { color: var(--muted); flex: 1; }
.service-card h3 a { color: var(--ink); }
.service-card__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--brand-50); color: var(--brand); margin-bottom: 18px; }
.service-card__icon--lg { width: 68px; height: 68px; border-radius: 16px; flex: none; }
.stretched::after { content: ""; position: absolute; inset: 0; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 700; color: var(--brand-600); font-size: .9rem; }
.service-row { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: start; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.service-row h2 { font-size: 1.35rem; }
.service-row h2 a { color: var(--ink); }
@media (max-width: 760px) { .service-row { grid-template-columns: 1fr; } }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tags li { font-size: .82rem; padding: 4px 10px; border-radius: 999px; background: var(--bg-alt); color: var(--muted); }

/* ---------- Page hero ---------- */
.page-hero { background: radial-gradient(800px 400px at 90% -20%, rgba(10,146,214,.3), transparent 60%), var(--ink); color: rgba(255,255,255,.8); padding: 48px 0 56px; }
.page-hero--slim { padding: 32px 0 36px; }
.page-hero h1 { color: #fff; font-size: clamp(1.75rem, 3.6vw, 2.75rem); }
.page-hero .lead { color: rgba(255,255,255,.72); margin-bottom: 0; }
.page-hero__row { display: flex; gap: 24px; align-items: flex-start; }
.page-hero .service-card__icon { background: rgba(10,146,214,.18); color: var(--accent); }
@media (max-width: 600px) { .page-hero__row { flex-direction: column; gap: 16px; } }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; margin-bottom: 18px; color: rgba(255,255,255,.55); }
.crumbs a { color: rgba(255,255,255,.75); }

/* ---------- Features, SLA, FAQ ---------- */
.feature-list { display: grid; gap: 4px; }
.feature { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.feature p { color: var(--muted); margin: 0; }
.feature h3 { margin-bottom: .3em; }
.feature__check { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-50); color: var(--brand); flex: none; }
.aside-stack { display: grid; gap: 20px; position: sticky; top: 130px; }
.outcome { background: var(--ink); color: rgba(255,255,255,.8); border: 0; }
.outcome h2 { color: var(--accent); }
.outcome p { margin: 0; font-size: 1.05rem; color: #fff; }
.table-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 20px 16px; box-shadow: var(--shadow); }
.sla-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.sla-table caption { text-align: left; font-family: var(--font-head); font-weight: 700; color: var(--ink); padding: 14px 0 8px; }
.sla-table th, .sla-table td { text-align: left; padding: 12px 8px 12px 0; border-bottom: 1px solid var(--line); }
.sla-table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.sla-table tbody th { font-weight: 500; }
.sla-table tr:last-child > * { border-bottom: 0; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; }
.steps li::before { content: counter(s, decimal-leading-zero); grid-row: span 2; font-family: var(--font-head); font-weight: 800; color: var(--brand); font-size: 1.1rem; }
.steps b { font-family: var(--font-head); color: var(--ink); }
.steps span { color: var(--muted); font-size: .95rem; }
.faq { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font-family: var(--font-head); font-weight: 700; color: var(--ink); padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; line-height: 1; }
.faq[open] summary::after { content: "–"; }
.faq p { color: var(--muted); }
.cta-band { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta-band h2 { margin: 0; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; font-weight: 500; }
.checklist .ico { color: var(--ok); }
.contact-list p { display: flex; gap: 12px; align-items: flex-start; }
.contact-list .ico { color: var(--brand); margin-top: 2px; }
address { font-style: normal; }

/* ---------- Pills / status ---------- */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; font-family: var(--font-head); white-space: nowrap; }
.pill--low { background: #e8f4ee; color: #1b6e46; }
.pill--med { background: #e8f2fb; color: #0d5f91; }
.pill--high { background: #fff3df; color: #8a5600; }
.pill--crit { background: #fde8ea; color: #a8222e; }
.pill--ok { background: #e3f6ec; color: #11713f; }
.pill--bad { background: #fde8ea; color: #a8222e; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-size: .9rem; font-weight: 500; color: var(--ink); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { width: 100%; padding: 11px 14px; border: 1px solid #cfd8e2; border-radius: var(--radius-sm); background: #fff; font-size: 1rem; font-weight: 400; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(10,146,214,.18); }
input.invalid, select.invalid, textarea.invalid { border-color: var(--danger); }
textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .form-row, .form-row--3 { grid-template-columns: 1fr; } }
.form-msg { margin: 0; font-size: .92rem; min-height: 1.2em; }
.form-msg.is-error { color: var(--danger); }
.form-msg.is-ok { color: var(--ok); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--text); }
.check input { margin-top: 4px; }
.file-drop { border: 1.5px dashed #b8c6d4; border-radius: var(--radius-sm); padding: 16px; background: var(--bg-alt); cursor: pointer; position: relative; }
.file-drop > span { display: flex; gap: 8px; align-items: center; color: var(--brand-600); font-weight: 600; }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop:focus-within { border-color: var(--brand); }
.file-name { color: var(--muted); font-weight: 400; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.card { padding: 24px; }
legend { font-family: var(--font-head); font-weight: 800; color: var(--ink); font-size: 1.1rem; display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 18px; float: left; width: 100%; }
legend + * { clear: both; }
.step-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .85rem; }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
@media (max-width: 640px) { .radio-cards { grid-template-columns: 1fr; } }
.radio-card { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.radio-card span { display: grid; }
.radio-card small { color: var(--muted); font-weight: 400; }
.radio-card input { margin-top: 5px; }
.tabs { display: flex; gap: 6px; padding: 4px; background: var(--bg-alt); border-radius: 999px; margin-bottom: 18px; width: fit-content; max-width: 100%; }
.tab { border: 0; background: transparent; padding: 9px 16px; border-radius: 999px; font-family: var(--font-head); font-weight: 700; font-size: .9rem; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.tab.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.pay-info { background: var(--bg-alt); border-radius: var(--radius-sm); padding: 18px; margin-bottom: 16px; }
.pay-info dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 12px 0; }
.pay-info dt { color: var(--muted); font-size: .9rem; }
.pay-info dd { margin: 0; font-weight: 700; color: var(--ink); word-break: break-word; }
.copy { cursor: pointer; border-bottom: 1px dashed var(--brand); }
.copy::after { content: " ⧉"; color: var(--brand); font-weight: 400; }
.prio { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.prio legend { font-size: .9rem; font-weight: 500; font-family: var(--font-body); margin-bottom: 6px; }
.prio__opt { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.prio__opt input { position: absolute; opacity: 0; }
.prio__opt .pill { padding: 7px 14px; font-size: .85rem; opacity: .55; border: 2px solid transparent; }
.prio__opt input:checked + .pill { opacity: 1; border-color: currentColor; }
.prio__opt input:focus-visible + .pill { outline: 3px solid var(--accent); }
.toggle { display: flex; align-items: center; gap: 8px; font-weight: 400; white-space: nowrap; }

/* ---------- Store ---------- */
.store-toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 16px; }
.search { position: relative; flex: 1 1 280px; display: block; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 44px !important; border-radius: 999px !important; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font-size: .88rem; font-weight: 500; cursor: pointer; }
.chip:hover { border-color: var(--brand); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.stock--order { background: #fff7e6; color: #b45309; }
/* Subcategorías (estructura de Intcomex) */
.chips--sub { flex-basis: 100%; gap: 6px; padding-top: 2px; }
.chips--sub[hidden], .chip[hidden] { display: none; }
.chip--sm { padding: 5px 11px; font-size: .8rem; background: var(--brand-50); border-color: transparent; }
.chip--sm .muted { font-size: .75rem; margin-left: 2px; }
.chip--sm.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip--sm.is-active .muted { color: rgba(255,255,255,.8); }
.product { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.product__media { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #f4f7fa, #e8eef4); display: grid; place-items: center; }
.product__media img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.product__placeholder { color: #9fb4c8; }
.stock { position: absolute; top: 12px; left: 12px; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.stock--ok { background: #e3f6ec; color: #11713f; }
.stock--out { background: #eef1f4; color: #6a7683; }
.product__body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.product__cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); font-weight: 700; margin-bottom: 6px; }
.product__name { font-size: 1rem; font-weight: 700; margin-bottom: 10px; flex: 1; }
.product__price { font-family: var(--font-head); font-size: 1.25rem; font-weight: 800; color: var(--ink); margin-bottom: 14px; }
.product__price small { font-size: .72rem; color: var(--muted); font-weight: 500; }
.product__actions { display: flex; gap: 8px; }
.product__actions .btn { flex: 1; }
.product.is-hidden { display: none; }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); background: var(--bg-alt); border-radius: var(--radius); }
.notice { margin-top: 24px; padding: 14px 18px; border-radius: var(--radius-sm); background: #fff8e6; color: #6b4b00; font-size: .9rem; }
.modal { border: 0; border-radius: 16px; padding: 28px; width: min(640px, calc(100vw - 32px)); max-height: 88vh; box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(11,23,36,.6); }
.modal__close { position: absolute; top: 10px; right: 10px; }
.modal__close .icon-btn:hover { background: var(--bg-alt); }
.specs { width: 100%; border-collapse: collapse; margin: 14px 0 20px; font-size: .94rem; }
.specs th, .specs td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { color: var(--muted); font-weight: 500; width: 40%; padding-right: 12px; }

/* ---------- Checkout ---------- */
.checkout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.checkout__form { display: grid; gap: 20px; }
.checkout__summary { position: sticky; top: 130px; }
@media (max-width: 960px) { .checkout { grid-template-columns: 1fr; } .checkout__summary { position: static; } }
.checkout > .empty, .checkout > .success { grid-column: 1 / -1; }
.cart-list { list-style: none; margin: 0; padding: 0; }
.cart-item { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item__name { font-weight: 500; color: var(--ink); }
.cart-item__unit { font-size: .85rem; color: var(--muted); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty button { border: 0; background: none; width: 32px; height: 32px; cursor: pointer; font-size: 1.1rem; color: var(--ink); }
.qty span { min-width: 26px; text-align: center; font-weight: 700; }
.cart-item__total { font-weight: 700; color: var(--ink); text-align: right; min-width: 100px; }
.cart-item__rm { border: 0; background: none; color: var(--muted); font-size: .8rem; cursor: pointer; padding: 0; text-decoration: underline; }
@media (max-width: 560px) { .cart-item { grid-template-columns: 1fr auto; } .cart-item__total { grid-column: 2; text-align: right; } }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 0 0 20px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; text-align: right; font-weight: 500; }
.totals .totals__grand { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; color: var(--ink); border-top: 1px solid var(--line); padding-top: 12px; }
.success { text-align: center; padding: 40px 24px; }
.success__icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: #e3f6ec; color: var(--ok); margin-bottom: 16px; }
.success .hero__cta { justify-content: center; }

/* ---------- Portal ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 560px) 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } }
.auth__aside { padding: 24px; border-left: 3px solid var(--brand); }
.dashboard { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
.dash-nav { display: grid; gap: 4px; position: sticky; top: 130px; }
.dash-link { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--radius-sm); border: 0; background: none; text-align: left; font-family: var(--font-head); font-weight: 600; color: var(--muted); cursor: pointer; }
.dash-link:hover { background: var(--bg-alt); color: var(--ink); }
.dash-link.is-active { background: var(--brand-50); color: var(--brand-600); }
.dash-main { min-width: 0; }
@media (max-width: 860px) {
  .dashboard { grid-template-columns: 1fr; gap: 20px; }
  .dash-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; }
  .dash-link { white-space: nowrap; }
}
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap > p { padding: 24px; margin: 0; }
.data { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 640px; }
.data th, .data td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data th { background: var(--bg-alt); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.data tr:last-child td { border-bottom: 0; }
.data .num { text-align: right; white-space: nowrap; }
.data .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.err-note { color: var(--danger); font-size: .8rem; }

/* ---------- Footer ---------- */
.site-footer { background: #071019; color: rgba(255,255,255,.7); padding: 64px 0 24px; font-size: .94rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }
.site-footer h2 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: rgba(255,255,255,.8); }
.site-footer a:hover { color: #fff; }
.footer__brand .brand__logo { margin-bottom: 18px; }
.site-footer address p { display: flex; gap: 10px; align-items: flex-start; }
.site-footer address .ico { color: var(--brand); margin-top: 3px; }
.footer__legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 40px; padding-top: 20px; font-size: .82rem; color: rgba(255,255,255,.5); }
.footer__legal p { margin: 0; }

/* ---------- FAB, toast, iOS hint ---------- */
.fab { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 70; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.fab__btn { width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 30px rgba(10,146,214,.45); transition: transform .15s; }
.fab__btn:hover { transform: scale(1.05); }
.fab__wa { order: 1; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 8px 24px rgba(37,211,102,.45); transition: transform .15s; }
.fab__wa:hover { transform: scale(1.06); text-decoration: none; }
.fab__btn { order: 2; }
.fab__menu { order: 0; }
.fab__btn[aria-expanded="true"] { background: var(--ink); }
.fab__menu { display: grid; gap: 4px; background: #fff; border-radius: 14px; padding: 8px; box-shadow: var(--shadow-lg); min-width: 230px; }
.fab__menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--ink); font-weight: 500; }
.fab__menu a:hover { background: var(--brand-50); text-decoration: none; }
.fab__menu .ico { color: var(--brand); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; z-index: 80; box-shadow: var(--shadow-lg); font-size: .92rem; max-width: calc(100vw - 32px); }
.ios-hint { position: fixed; left: 16px; right: 16px; bottom: 16px; background: #fff; border-radius: 14px; padding: 14px 14px 14px 18px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow-lg); z-index: 90; }
.ios-hint p { margin: 0; font-size: .92rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .fab { display: none; } }

/* Pasarela de logos de clientes y aliados */
.section__head--center, .logos .section__head { margin-left: auto !important; margin-right: auto !important; text-align: center; margin-bottom: 28px; }
.logos { overflow: hidden; }
.logos__track { display: flex; width: max-content; animation: logos-scroll 40s linear infinite; }
.logos__track:hover { animation-play-state: paused; }
.logos__row { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0 14px; }
.logos__item { flex: 0 0 auto; box-sizing: border-box; width: 180px; height: 112px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; box-shadow: var(--shadow); }
.logos__item img { display: block; width: 100%; height: 100%; object-fit: contain; filter: grayscale(.15); transition: filter .2s, transform .2s; }
.logos__item:hover img { filter: none; transform: scale(1.05); }
@keyframes logos-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .logos__track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; } .logos__row[aria-hidden="true"], .logos__item--dup { display: none; } .logos__row { flex-wrap: wrap; justify-content: center; } }
@media (max-width: 560px) { .logos__item { width: 140px; height: 90px; } .logos__row { gap: 16px; } }

/* Alegra Partner */
.alegra { background: linear-gradient(135deg, #e9faf7 0%, #f4f7fa 60%); }
.alegra__box { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: center; }
.alegra__brand { background: #fff; border: 1px solid #c9eee7; border-radius: 20px; padding: 40px 32px; text-align: center; box-shadow: var(--shadow); display: grid; gap: 22px; justify-items: center; }
.alegra__brand img { width: 100%; max-width: 360px; height: auto; }
.alegra__badge { display: inline-flex; align-items: center; gap: 8px; background: #00b19d; color: #fff; font-family: var(--font-head); font-weight: 800; font-size: .95rem; padding: 10px 18px; border-radius: 999px; letter-spacing: .01em; }
.alegra__body h2 { margin-top: 4px; }
.checklist--inline { grid-template-columns: repeat(3, 1fr); margin: 20px 0 24px; }
.checklist--inline li { padding: 12px 14px; font-size: .92rem; }
.alegra__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.btn--alegra { background: #00b19d; color: #fff; box-shadow: 0 6px 18px rgba(0, 177, 157, .32); }
.btn--alegra:hover { background: #009886; transform: translateY(-1px); }
@media (max-width: 900px) { .alegra__box { grid-template-columns: 1fr; gap: 28px; } .checklist--inline { grid-template-columns: 1fr; } }
/* Collage de video de trabajos reales detrás de la portada, difuminado con el azul */
.hero__media { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hero__video { position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px); object-fit: cover; filter: blur(3px) saturate(.85) brightness(.9); opacity: .55; }
.hero__media::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--ink) 0%, rgba(11,23,36,.92) 30%, rgba(11,23,36,.62) 62%, rgba(8,58,96,.55) 100%),
              linear-gradient(to bottom, rgba(10,146,214,.18), rgba(11,23,36,.55)); }
@media (max-width: 760px) { .hero__video { opacity: .4; } .hero__media::after { background: linear-gradient(180deg, rgba(11,23,36,.82), rgba(11,23,36,.9)), rgba(10,146,214,.12); } }
@media (prefers-reduced-motion: reduce) { .hero__video { display: none; } }
/* Sello Alegra Certified Partner en el pie de página */
.footer__partner { display: inline-block; margin-top: 14px; opacity: .9; transition: opacity .2s; }
.footer__partner:hover { opacity: 1; }
.footer__partner img { display: block; width: 190px; height: auto; }

/* Ficha de producto (/tienda/producto/{id}/{nombre}) */
.product__name a { color: inherit; text-decoration: none; }
.product__name a:hover { color: var(--brand); }
.product__media-link { display: contents; }
.mono { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; }
.pdp__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: start; }
.pdp__media { position: sticky; top: 96px; }
.pdp__zoom { position: relative; display: block; width: 100%; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 16px; cursor: zoom-in; box-shadow: var(--shadow); }
.pdp__zoom img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.pdp__zoom-hint { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; background: rgba(11,23,36,.75); color: #fff; font-size: .8rem; padding: 6px 10px; border-radius: 999px; }
.pdp__placeholder { display: grid; place-items: center; aspect-ratio: 1; background: var(--bg-alt); border-radius: 16px; color: var(--muted); }
.pdp__title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 6px 0 14px; }
.pdp__ids { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0 0 20px; }
.pdp__ids dt { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pdp__ids dd { margin: 2px 0 0; font-weight: 600; }
.pdp__buy { padding: 22px 24px; }
.pdp__price { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--ink); margin: 0; }
.pdp__price small { font-size: .85rem; font-weight: 500; color: var(--muted); }
.stock--inline { position: static !important; display: inline-block; }
.pdp__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.pdp__perks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; color: var(--muted); }
.pdp__perks li { display: flex; align-items: center; gap: 8px; }
.pdp__perks .ico { color: var(--ok); }
.pdp__details { margin-top: 48px; }
.pdp__desc { max-width: 820px; margin-bottom: 32px; }
.spec-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; margin: 16px 0 12px; }
.spec-group { padding: 18px 22px; }
.spec-group h3 { font-size: 1rem; margin: 0 0 4px; color: var(--brand-600); }
.spec-group .specs { margin: 0; }
.modal--image { max-width: min(96vw, 1100px); padding: 18px; background: #fff; }
.modal--image img { display: block; max-width: 100%; max-height: 82vh; margin: 0 auto; object-fit: contain; }
@media (max-width: 900px) { .pdp__grid { grid-template-columns: 1fr; gap: 24px; } .pdp__media { position: static; } }
/* Panel de productos (/admin?tab=productos) */
.admin-tabs { display: flex; gap: 6px; margin-top: 14px; }
.admin-tabs a { color: rgba(255,255,255,.75); padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); font-weight: 600; text-decoration: none; }
.admin-tabs a[aria-current="page"] { background: #fff; color: var(--ink); border-color: #fff; }
.ap-table td { vertical-align: middle; }
.ap-table tr.is-off td { opacity: .55; }
.ap-thumb { display: block; width: 52px; height: 52px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.ap-thumb--empty { background: var(--bg-alt); }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; background: #c9d1da; border-radius: 999px; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.modal--wide { width: min(96vw, 980px); max-width: none; max-height: 92vh; overflow: auto; }
.input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; background: #fff; color: var(--text); }
.input:focus { outline: 2px solid var(--brand-50); border-color: var(--brand); }
.input--sm { padding: 6px 10px; width: auto; min-width: 200px; font-weight: 600; }
.input[readonly] { background: var(--bg-alt); color: var(--muted); }
.h4 { font-size: 1.05rem; margin: 0; }
.ap-specs-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.spec-edit { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px 12px; margin: 0 0 12px; }
.spec-edit legend { display: flex; align-items: center; gap: 8px; padding: 0 6px; }
.spec-row { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 8px; margin-top: 8px; }
.btn--ai { background: linear-gradient(135deg, #6d4aff, #0a92d6); color: #fff; }
.btn--ai[disabled] { opacity: .5; cursor: not-allowed; }
.ai-box { border: 1px dashed #8b7bff; background: #f6f4ff; border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 14px; }
.spec-groups--sm { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.spec-groups--sm .spec-group { padding: 10px 14px; }
.ok-note { color: var(--ok); font-weight: 600; }
.modal__foot { position: sticky; bottom: -1px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 0 4px; background: #fff; border-top: 1px solid var(--line); margin-top: 10px; }
.form-msg.is-ok { color: var(--ok); }
@media (max-width: 640px) { .spec-row { grid-template-columns: 1fr auto; } .spec-row [data-v] { grid-column: 1 / 2; } .input--sm { min-width: 0; } }
#ap-form label.row { display: flex; flex-direction: row; align-items: center; gap: 10px; font-weight: 500; } /* ap-check */
#ap-form label.row input[type=checkbox] { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; }
.ap-table .actions { display: flex; flex-wrap: nowrap; gap: 6px; }
.ap-table td:last-child { white-space: nowrap; }

/* Redes sociales (Contacto corporativo y pie de página) */
.social { margin-top: 22px; }
.social__title { font-weight: 700; color: var(--ink); margin: 0 0 10px; }
.social__links { display: flex; flex-wrap: wrap; gap: 10px; }
.social__btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; color: #fff; font-weight: 700; text-decoration: none !important; transition: transform .15s, box-shadow .15s; }
.social__btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.social__btn--fb { background: #1877f2; }
.social__btn--ig { background: linear-gradient(45deg, #f58529, #dd2a7b 50%, #8134af 80%, #515bd4); }
.social__btn--wa { background: #25d366; }
.footer__social { display: flex; gap: 12px; }
.footer__social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; }
.footer__social a:hover { background: rgba(255,255,255,.18); }