/* ============================================================
   Josbyte System — Sitio público
   Paleta azul clara + modo oscuro + animaciones propias
   ============================================================ */

:root {
    --bg: #f4f6fc;
    --bg-soft: #ecf0fb;
    --card: #ffffff;
    --border: #e3e8f7;
    --text: #0c1730;
    --muted: #64748b;
    --azul: #2451e0;
    --azul-fuerte: #16316b;
    --azul-suave: #eaefff;
    --azul-100: #dbe4ff;
    --cian: #14c7b8;
    --nav-bg: rgba(255,255,255,.82);
    --nav-bg-scroll: rgba(255,255,255,.96);
    --radius: 18px;
    --max-width: 1180px;
    --sombra: 0 10px 30px rgba(10, 23, 58, .08);
    --sombra-hover: 0 20px 46px rgba(36, 81, 224, .18);
    color-scheme: light;
}
@keyframes jbSheen{ 0%{ background-position:0% 50%; } 100%{ background-position:200% 50%; } }

/* ---------- Modo oscuro ----------
   Se activa con [data-theme="dark"] en <html>, ya sea manual (botón) o
   heredado del sistema operativo del usuario (prefers-color-scheme). */
html[data-theme="dark"] {
    --bg: #060b1a;
    --bg-soft: #0a1730;
    --card: #11234a;
    --border: #223055;
    --text: #eef2ff;
    --muted: #93a3c9;
    --azul: #5b7fff;
    --azul-fuerte: #9db4ff;
    --azul-suave: #16316b;
    --azul-100: #223a6e;
    --cian: #2be0cf;
    --nav-bg: rgba(6,11,26,.78);
    --nav-bg-scroll: rgba(6,11,26,.94);
    --sombra: 0 10px 30px rgba(0,0,0,.35);
    --sombra-hover: 0 20px 46px rgba(91,127,255,.24);
    color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; width: 100%; }
body {
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    transition: background .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; transition: color .2s ease; }
ul { list-style: none; }
img { transition: transform .35s ease, filter .3s ease; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }

body { animation: pageFade .45s ease; }
@keyframes pageFade { from { opacity: 0; } to { opacity: 1; } }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }
section { padding: 88px 0; position: relative; }
.section-soft { background: var(--bg-soft); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 800;
    letter-spacing: .1em; text-transform: uppercase; color: var(--azul-fuerte);
    background: var(--azul-suave); padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--azul); }
.section-head h2 { font-size: 2.05rem; margin-bottom: 10px; color: var(--text); }
.section-head p { color: var(--muted); }

/* ---------- Resalte de texto ---------- */
.gradient-text { position: relative; color: var(--azul-fuerte); white-space: nowrap; }
.gradient-text::after {
    content: ''; position: absolute; left: 2px; right: 2px; bottom: 2px; height: .32em;
    background: var(--azul-100); border-radius: 4px; z-index: -1;
    transform-origin: left; animation: subrayado .7s .15s cubic-bezier(.4, 0, .2, 1) both;
}
@keyframes subrayado { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Fondo sutil ---------- */
.bg-deco {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image: radial-gradient(circle, rgba(36,81,224,.13) 1.4px, transparent 1.4px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 0%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 65% 55% at 50% 0%, #000 0%, transparent 75%);
}
.bg-glow {
    position: fixed; z-index: 0; pointer-events: none; width: 640px; height: 640px; top: -280px; right: -220px;
    background: radial-gradient(circle, rgba(36,81,224,.16), transparent 68%);
    filter: blur(8px); animation: respirar 10s ease-in-out infinite;
}
@keyframes respirar { 0%, 100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.12); opacity: 1; } }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: .95rem;
    border: none; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
    position: relative; overflow: hidden;
}
.btn-primary { background: var(--azul); color: #fff; box-shadow: 0 8px 20px rgba(36,81,224,.28); }
.btn-primary::before {
    content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.35) 48%, transparent 66%);
    transform: translateX(-120%); transition: transform .6s ease;
}
.btn-primary:hover { background: var(--azul-fuerte); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(36,81,224,.38); }
.btn-primary:hover::before { transform: translateX(120%); }
.btn-primary.agregado { background: #16a34a; box-shadow: 0 8px 20px rgba(22,163,74,.28); }
.btn-outline { background: var(--card); color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--azul); color: var(--azul-fuerte); transform: translateY(-2px); box-shadow: var(--sombra); }
.btn-light { background: #fff; color: var(--azul-fuerte); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(255,255,255,.35); }
.btn-small { padding: 10px 18px; font-size: .85rem; }
.btn-block { width: 100%; text-align: center; }
.btn:active { transform: scale(.97); }

/* ---------- Interruptor de tema (claro / oscuro) ---------- */
.theme-toggle {
    display: flex; align-items: center; justify-content: center; width: 42px; height: 42px;
    border-radius: 50%; border: 1.5px solid var(--border); background: var(--card); color: var(--muted);
    cursor: pointer; transition: border-color .18s ease, color .18s ease, transform .3s ease;
    position: relative; overflow: hidden;
}
.theme-toggle:hover { border-color: var(--azul); color: var(--azul); }
.theme-toggle svg { position: absolute; transition: transform .4s cubic-bezier(.4,0,.2,1), opacity .3s ease; }
.theme-toggle .ico-sun { opacity: 1; transform: rotate(0deg) scale(1); }
.theme-toggle .ico-moon { opacity: 0; transform: rotate(-70deg) scale(.4); }
html[data-theme="dark"] .theme-toggle .ico-sun { opacity: 0; transform: rotate(70deg) scale(.4); }
html[data-theme="dark"] .theme-toggle .ico-moon { opacity: 1; transform: rotate(0deg) scale(1); }

/* ---------- Navbar ---------- */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: var(--nav-bg); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow .25s ease, background .25s ease;
}
.navbar.scrolled { box-shadow: 0 8px 24px rgba(20,33,62,.08); background: var(--nav-bg-scroll); }
.navbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand img { height: 30px; width: auto; }
.logo-dark { display: block; }
.logo-light { display: none; }
html[data-theme="dark"] .logo-dark { display: none; }
html[data-theme="dark"] .logo-light { display: block; }

.nav-links { display: flex; gap: 26px; }
.mobile-access { display: none; }
.nav-links a { font-size: .9rem; color: var(--muted); font-weight: 600; position: relative; padding-bottom: 4px; }
.nav-links a::after {
    content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; border-radius: 2px;
    background: var(--azul); transition: width .25s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--azul-fuerte); }

.nav-actions { display: flex; align-items: center; gap: 10px; position: relative; }
.access-dropdown { position: relative; }
.access-dropdown > button {
    display: flex; align-items: center; gap: 6px; background: var(--azul-suave); color: var(--azul-fuerte);
    padding: 10px 18px; border-radius: 999px; border: 1px solid transparent; font-size: .86rem;
    font-weight: 700; cursor: pointer; transition: background .18s ease;
}
.access-dropdown > button:hover { background: var(--azul-100); }
.access-dropdown > button svg { transition: transform .2s ease; }
.access-dropdown.open > button svg { transform: rotate(180deg); }
.access-menu {
    position: absolute; right: 0; top: calc(100% + 10px); background: var(--card);
    border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 20px 44px rgba(20,33,62,.16);
    width: 200px; padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all .18s ease;
}
.access-dropdown.open .access-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.access-menu a { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 9px; font-size: .88rem; color: var(--text); font-weight: 600; }
.access-menu a:hover { background: var(--azul-suave); color: var(--azul-fuerte); }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { width: 22px; height: 2.5px; border-radius: 2px; background: var(--text); transition: transform .25s ease, opacity .25s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Carrito (ícono en la navbar) ---------- */
.cart-link { position: relative; display: flex; align-items: center; padding: 8px; border-radius: 10px; color: var(--text); transition: background .18s ease, transform .18s ease; }
.cart-link:hover { background: var(--azul-suave); color: var(--azul-fuerte); }
.jb-cart-badge {
    display: none; align-items: center; justify-content: center; position: absolute; top: 0; right: 0;
    background: var(--azul); color: #fff; font-size: .64rem; font-weight: 800; min-width: 17px; height: 17px;
    border-radius: 999px; padding: 0 4px; border: 2px solid var(--card);
}
.jb-cart-badge.bump { animation: bump .35s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }

/* ---------- Hero ---------- */
@keyframes jbHeroGlow{ 0%,100%{ transform:translate(0,0) scale(1); opacity:.7; } 50%{ transform:translate(-16px,10px) scale(1.08); opacity:1; } }
.hero { padding: 120px 0 96px; text-align: center; position: relative; }
.hero::after{
    content:''; position:absolute; z-index:-1; top:-40px; right:8%; width:360px; height:360px; border-radius:50%;
    background: radial-gradient(circle, rgba(20,199,184,.16), transparent 70%);
    animation: jbHeroGlow 9s ease-in-out infinite; pointer-events:none;
}
.hero h1 { font-size: 3.1rem; max-width: 780px; margin: 0 auto 18px; line-height: 1.15; color: var(--text); }
.hero p { color: var(--muted); max-width: 560px; margin: 0 auto 32px; font-size: 1.05rem; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.badge-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.badge-row span {
    display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 600; color: var(--text);
    border: 1px solid var(--border); padding: 8px 16px; border-radius: 999px; background: var(--card);
    box-shadow: var(--sombra); animation: flotar 5s ease-in-out infinite;
}
.badge-row span:nth-child(2) { animation-delay: -1.6s; }
.badge-row span:nth-child(3) { animation-delay: -3.2s; }
@keyframes flotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.badge-row svg { color: var(--azul); flex-shrink: 0; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.grid.reveal > * { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.grid.reveal.visible > * { opacity: 1; transform: translateY(0); }
.grid.reveal.visible > *:nth-child(1) { transition-delay: .03s; }
.grid.reveal.visible > *:nth-child(2) { transition-delay: .09s; }
.grid.reveal.visible > *:nth-child(3) { transition-delay: .15s; }
.grid.reveal.visible > *:nth-child(4) { transition-delay: .21s; }
.grid.reveal.visible > *:nth-child(n+5) { transition-delay: .26s; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 28px; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .25s ease; position: relative;
    box-shadow: var(--sombra);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--sombra-hover); border-color: var(--azul-100); }
.card .icon {
    width: 52px; height: 52px; border-radius: 15px;
    background: var(--azul-suave); color: var(--azul-fuerte);
    display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
    transition: transform .28s ease, background .28s ease, color .28s ease;
}
.card:hover .icon { transform: scale(1.08) rotate(-4deg); background: var(--azul); color: #fff; }
.card h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--text); }
.card p { color: var(--muted); font-size: .92rem; }
.card .price { font-size: 1.7rem; font-weight: 800; margin: 10px 0; color: var(--text); }
.card .price span { font-size: .85rem; font-weight: 500; color: var(--muted); }
.card ul { margin: 14px 0 18px; }
.card ul li { font-size: .89rem; padding: 5px 0; color: var(--text); display: flex; align-items: center; gap: 8px; }
.card ul li svg { color: var(--azul); flex-shrink: 0; }
.card.featured { border-color: var(--azul); box-shadow: 0 20px 44px rgba(36,81,224,.2); position: relative; }
.card.featured::after {
    content: ''; position: absolute; inset: -1.5px; border-radius: calc(var(--radius) + 1.5px); z-index: -1;
    background: linear-gradient(135deg, var(--azul), var(--cian)); opacity: .5;
}
.tag {
    display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    color: var(--azul-fuerte); background: var(--azul-suave); padding: 5px 12px; border-radius: 999px; margin-bottom: 12px;
}

/* ---------- Sobre nosotros ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 54px; align-items: center; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid h2 { font-size: 2.1rem; margin-bottom: 14px; color: var(--text); }
.about-grid p { color: var(--muted); margin-bottom: 14px; }
.stat-box { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
.stat-box div { text-align: center; padding: 16px 8px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--sombra); }
.stat-box strong { display: block; font-size: 1.9rem; color: var(--azul-fuerte); }
.stat-box span { font-size: .76rem; color: var(--muted); font-weight: 600; }
.about-visual {
    aspect-ratio: 4/3; border-radius: 22px; position: relative; overflow: hidden;
    background: linear-gradient(150deg, var(--azul-suave), var(--card) 65%);
    border: 1px solid var(--border); box-shadow: var(--sombra);
    display: flex; align-items: center; justify-content: center;
}
.about-visual::before {
    content: ''; position: absolute; width: 220%; height: 220%; left: -60%; top: -60%;
    background-image: radial-gradient(circle, rgba(36,81,224,.14) 1.6px, transparent 1.6px);
    background-size: 22px 22px; animation: girar-suave 40s linear infinite;
}
@keyframes girar-suave { to { transform: rotate(360deg); } }
.about-visual img { position: relative; z-index: 1; width: 130px; height: auto; filter: drop-shadow(0 12px 24px rgba(36,81,224,.25)); }

/* ---------- Ubicación ---------- */
.location-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
@media (max-width: 860px) { .location-grid { grid-template-columns: 1fr; } }
.map-embed { width: 100%; height: 100%; min-height: 320px; border: 0; border-radius: var(--radius); box-shadow: var(--sombra); }
html[data-theme="dark"] .map-embed { filter: invert(90%) hue-rotate(180deg) contrast(85%) brightness(.95); }
.location-card { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.location-card:last-child { border-bottom: none; }
.location-card .icon {
    width: 42px; height: 42px; border-radius: 12px; background: var(--azul-suave); color: var(--azul-fuerte);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.location-card h4 { font-size: .98rem; margin-bottom: 4px; color: var(--text); }
.location-card p { font-size: .88rem; color: var(--muted); }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; margin-bottom: 6px; color: var(--muted); font-weight: 600; }
.field input, .field textarea, .field select {
    width: 100%; padding: 13px 14px; border: 1.5px solid var(--border); border-radius: 12px;
    font-size: .95rem; background: var(--card); color: var(--text); transition: border-color .18s ease, box-shadow .18s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 4px rgba(36,81,224,.12); }

/* ---------- CTA ---------- */
.cta {
    background: linear-gradient(135deg, var(--azul), #4c8dff); color: #fff; text-align: center;
    border-radius: 28px; padding: 64px 30px; margin: 0 24px; position: relative; overflow: hidden;
    box-shadow: 0 24px 50px rgba(36,81,224,.28);
}
.cta::before {
    content: ''; position: absolute; inset: 0; opacity: .5;
    background-image: radial-gradient(circle, rgba(255,255,255,.18) 1.6px, transparent 1.6px);
    background-size: 24px 24px;
}
.cta h2 { font-size: 1.95rem; margin-bottom: 10px; position: relative; }
.cta p { color: rgba(255,255,255,.85); margin-bottom: 26px; position: relative; }
.cta .btn { position: relative; }

/* ---------- Footer ---------- */
footer { background: linear-gradient(160deg,#060b1a,#11234a); color: #a9b6d6; padding: 54px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 34px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
footer h5 { color: #fff; font-size: .85rem; margin-bottom: 14px; letter-spacing: .02em; }
footer li { font-size: .85rem; margin-bottom: 9px; }
footer .foot-line { display: flex; align-items: center; gap: 9px; }
footer .foot-line svg { color: #6f8fd6; flex-shrink: 0; }
footer a:hover { color: #fff; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
    width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.06);
    display: flex; align-items: center; justify-content: center; color: #a9b6d6; transition: background .18s ease, color .18s ease;
}
.footer-social a:hover { background: var(--azul); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 18px; font-size: .8rem; text-align: center; color: #7c8bb0; }

/* ---------- Categorías (pills de filtro) ---------- */
.cat-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 0 40px; }
.cat-filters button {
    padding: 10px 20px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--card);
    color: var(--muted); font-size: .86rem; font-weight: 700; cursor: pointer; transition: all .2s ease;
}
.cat-filters button:hover { border-color: var(--azul); color: var(--azul-fuerte); }
.cat-filters button.active { background: var(--azul); color: #fff; border-color: var(--azul); box-shadow: 0 8px 18px rgba(36,81,224,.3); }

/* ---------- Tarjetas de producto/servicio/curso ---------- */
.prod-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    display: flex; flex-direction: column; box-shadow: var(--sombra);
}
.prod-card:hover { transform: translateY(-8px); box-shadow: var(--sombra-hover); border-color: var(--azul-100); }

.cat-tile {
    aspect-ratio: 4/3; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(150deg, var(--azul-suave), var(--bg-soft) 60%, var(--card));
}
.cat-tile::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(circle, rgba(36,81,224,.16) 1.4px, transparent 1.4px);
    background-size: 20px 20px;
}
.cat-tile .cat-tile-ico {
    position: relative; z-index: 1; width: 72px; height: 72px; border-radius: 20px;
    background: var(--card); color: var(--azul); display: flex; align-items: center; justify-content: center;
    box-shadow: 0 14px 30px rgba(36,81,224,.18); transition: transform .3s ease;
}
.prod-card:hover .cat-tile .cat-tile-ico { transform: scale(1.08) rotate(-5deg); background: var(--azul); color: #fff; }
.prod-cat {
    position: absolute; top: 12px; left: 12px; font-size: .66rem; font-weight: 800; letter-spacing: .04em;
    text-transform: uppercase; color: var(--azul-fuerte); background: var(--card);
    padding: 5px 11px; border-radius: 999px; box-shadow: var(--sombra); z-index: 2;
}
.prod-body { padding: 20px 22px 22px; flex: 1; display: flex; flex-direction: column; }
.prod-body h3 { font-size: 1rem; margin-bottom: 6px; color: var(--text); }
.prod-body p { color: var(--muted); font-size: .86rem; flex: 1; }
.prod-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.prod-foot .price { font-size: 1.18rem; font-weight: 800; color: var(--text); }
.prod-foot .price span { font-size: .72rem; font-weight: 500; color: var(--muted); }

/* ---------- Bloque de categoría (servicios/cursos) ---------- */
.cat-section { margin-bottom: 64px; }
.cat-section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.cat-section-head h2 { font-size: 1.4rem; color: var(--text); }
.cat-section-head span { color: var(--muted); font-size: .85rem; font-weight: 600; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
    position: fixed; bottom: 24px; right: 24px; z-index: 200; width: 58px; height: 58px; border-radius: 50%;
    background: #25D366; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 26px rgba(37,211,102,.42);
    transition: transform .2s ease; animation: flotar 4.5s ease-in-out infinite;
}
.wa-float:hover { transform: scale(1.1); animation-play-state: paused; }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ---------- Hero: retícula sutil ---------- */
.hero { position: relative; }
.hero::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background-image: linear-gradient(rgba(36,81,224,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(36,81,224,.06) 1px, transparent 1px);
    background-size: 46px 46px; mask-image: radial-gradient(ellipse 60% 60% at 50% 30%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 30%, #000 30%, transparent 100%);
}

/* ---------- Alertas ---------- */
.alert { padding: 13px 18px; border-radius: 12px; font-size: .86rem; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #ecfdf5; color: #0f766e; border: 1px solid #a7f3d0; }
html[data-theme="dark"] .alert-error { background: rgba(239,68,68,.12); color: #fca5a5; border-color: rgba(239,68,68,.3); }
html[data-theme="dark"] .alert-success { background: rgba(20,184,166,.12); color: #5eead4; border-color: rgba(20,184,166,.3); }

/* ---------- Carrito ---------- */
.prod-check { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); margin: 12px 0 6px; cursor: pointer; }
.prod-check input { accent-color: var(--azul); width: 15px; height: 15px; }

.cart-item { display: flex; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--border); align-items: center; transition: background .2s ease; }
.cart-item:hover { background: var(--bg-soft); }
.cart-item-ico {
    width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0; background: var(--azul-suave); color: var(--azul-fuerte);
    display: flex; align-items: center; justify-content: center;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info strong { font-size: .92rem; display: block; color: var(--text); }
.cart-item-info .meta { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.cart-item-info .unit { font-size: .8rem; margin-top: 4px; color: var(--azul-fuerte); font-weight: 700; }
.qty-stepper { display: flex; align-items: center; gap: 2px; background: var(--bg-soft); border-radius: 999px; padding: 4px; }
.qty-stepper button {
    width: 28px; height: 28px; border-radius: 50%; border: none; background: var(--card); color: var(--azul-fuerte);
    font-size: 1rem; font-weight: 800; cursor: pointer; box-shadow: 0 1px 3px rgba(20,33,62,.12); transition: transform .12s ease;
}
.qty-stepper button:hover { transform: scale(1.08); }
.qty-stepper span { min-width: 26px; text-align: center; font-weight: 700; font-size: .88rem; }
.cart-item-total { min-width: 92px; text-align: right; font-weight: 800; color: var(--text); }
.cart-item-remove {
    width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: #cbd5e1; transition: background .18s ease, color .18s ease;
}
.cart-item-remove:hover { background: #fef2f2; color: #dc2626; }
.cart-empty { padding: 60px 24px; text-align: center; }
.cart-empty .ico { width: 84px; height: 84px; border-radius: 50%; background: var(--azul-suave); color: var(--azul-fuerte); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.cart-empty p { color: var(--muted); margin-bottom: 18px; font-weight: 600; }
.cart-summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: .9rem; color: var(--muted); }
.cart-summary-total { display: flex; justify-content: space-between; margin: 14px 0; padding-top: 14px; border-top: 1px dashed var(--border); font-size: 1.15rem; font-weight: 800; color: var(--text); }
.cart-success { grid-column: 1/-1; text-align: center; padding: 56px 24px; }
.cart-success .ico { width: 78px; height: 78px; border-radius: 50%; background: #ecfdf5; color: #0f766e; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; animation: pop .4s cubic-bezier(.3,1.6,.5,1); }
html[data-theme="dark"] .cart-success .ico { background: rgba(20,184,166,.15); color: #5eead4; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* ---------- Contador animado ---------- */
.stat-box strong[data-count] { display: inline-block; }

/* ---------- Acordeón de preguntas frecuentes ---------- */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: border-color .2s ease; }
.faq-item.open { border-color: var(--azul-100); }
.faq-q {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 18px 22px; background: none; border: none; cursor: pointer; text-align: left;
    font-size: .95rem; font-weight: 700; color: var(--text);
}
.faq-q svg { flex-shrink: 0; color: var(--azul); transition: transform .3s ease; }
.faq-item.open .faq-q svg { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; padding: 0 22px; }
.faq-item.open .faq-a { max-height: 240px; padding: 0 22px 20px; }
.faq-a p { color: var(--muted); font-size: .9rem; line-height: 1.6; }

/* ---------- Nav responsive ---------- */
@media (max-width: 1024px) {
    .hero h1 { font-size: 2.6rem; }
}
@media (max-width: 860px) {
    .wrap { padding: 0 20px; }
    .nav-links {
        position: fixed; top: 70px; left: 0; right: 0; background: var(--card);
        flex-direction: column; padding: 10px 24px 18px; gap: 4px; border-bottom: 1px solid var(--border);
        max-height: 0; overflow: hidden; overflow-y: auto; transition: max-height .3s ease;
        box-shadow: 0 14px 30px rgba(20,33,62,.16); z-index: 99;
    }
    .nav-links.open { max-height: calc(100vh - 70px); }
    .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--bg-soft); }
    /* En móvil el acceso a "Soy Cliente / Soy Empleado" vive dentro del menú,
       así el navbar no se llena de botones y no se desborda. */
    .access-dropdown { display: none; }
    .mobile-access { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; padding-top: 6px; }
    .mobile-access a { display: flex; align-items: center; gap: 9px; padding: 12px 0; border-bottom: 1px solid var(--bg-soft); font-weight: 700; color: var(--azul-fuerte); }
    .nav-actions { gap: 6px; }
    .hamburger { display: flex; }
    .hero h1 { font-size: 2.1rem; }
    .hero { padding: 90px 0 60px; }
    section { padding: 60px 0; }
    .cta { margin: 0; border-radius: 20px; padding: 44px 22px; }
    #carritoLayout { grid-template-columns: 1fr !important; gap: 24px !important; }
}
@media (max-width: 600px) {
    .about-grid, .location-grid, .contact-grid { gap: 30px; }
    .stat-box { grid-template-columns: 1fr; gap: 10px; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-social { justify-content: center; }
    .foot-line { justify-content: center; }
    .cart-item { flex-wrap: wrap; }
    .cart-item-total { order: 5; margin-left: auto; }
}
@media (max-width: 480px) {
    .wrap { padding: 0 16px; }
    section { padding: 48px 0; }
    .hero { padding: 84px 0 44px; }
    .hero h1 { font-size: 1.75rem; }
    .hero p { font-size: .95rem; }
    .section-head h2 { font-size: 1.6rem; }
    .about-grid h2 { font-size: 1.7rem; }
    .brand img { height: 24px; }
    .cta { padding: 36px 18px; }
    .cta h2 { font-size: 1.5rem; }
    .nav-actions { gap: 4px; }
}
