/* ─── Variables ─────────────────────────────────────────────────────────── */
:root {
    --bg-deep:      #060100;
    --bg:           #0061AC;
    --bg-soft:      #004f8c;
    --bg-mid:       #003d6e;
    --card:         #ffffff;
    --muted:        #64748b;
    --text:         #0f172a;
    --white:        #ffffff;
    --primary:      #0061AC;
    --primary-dark: #004d89;
    --accent:       #89D1ED;
    --line:         #e2e8f0;
    --radius:       8px;
    --shadow:       0 1px 4px rgba(0,0,0,.1);
    --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 62.5%; scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--text);
    background: #f1f5f9;
    font-size: 1.6rem;
    line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
p { margin-bottom: 1.4rem; }
p:last-child { margin-bottom: 0; }
ul { padding-left: 2rem; }

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container { width: min(116rem, 92%); margin: 0 auto; }

/* ─── Header ─────────────────────────────────────────────────────────────── */
.header {
    background: var(--bg);
    color: var(--white);
    border-bottom: 2px solid rgba(0,97,172,.15);
}
/* Solo en index: header y hero forman un bloque continuo */
.header--hero {
    background: linear-gradient(160deg, var(--bg-soft) 0%, var(--bg) 40%, var(--bg-deep) 100%);
    border-bottom: none;
    position: relative;
    overflow: hidden;
    min-height: 90vh;
}

/* ─── Nav ────────────────────────────────────────────────────────────────── */
.nav {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 2rem 0;
}
/* En index, sin separador interno */
.header--hero .nav { border-bottom: none; }
.logo {
    font-weight: 900;
    font-size: 2.2rem;
    letter-spacing: -.03em;
    color: var(--white);
    display: inline-flex;
    align-items: center;
    line-height: 1;
}
.logo span { color: var(--primary); }
.logo__img { max-width: 20rem; height: auto; max-height: 9rem; object-fit: contain; display: block; }
.main-menu {
    display: flex;
    gap: 2.8rem;
    align-items: center;
    margin-left: auto;
}
.main-menu a {
    color: rgba(255,255,255,.72);
    font-weight: 600;
    font-size: 1.5rem;
    transition: color .15s;
    letter-spacing: .01em;
}
.main-menu a:hover { color: var(--white); }
.main-menu a.active { color: var(--accent); }
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: .8rem;
    cursor: pointer;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 6px;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */
.hero {
    padding: 5.6rem 0 6.4rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.hero-inner { max-width: 78rem; }
.kicker {
    display: inline-flex;
    padding: .5rem 1.2rem;
    border: 1px solid rgba(0,97,172,.3);
    border-radius: 4px;
    color: var(--primary);
    background: rgba(0,97,172,.07);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 1.8rem;
}
/* Kicker sobre fondo azul (header) */
.header .kicker {
    border-color: rgba(255,255,255,.5);
    color: var(--white);
    background: rgba(255,255,255,.15);
}
h1 {
    font-size: clamp(3rem, 5vw, 5.2rem);
    line-height: 1.1;
    letter-spacing: -.03em;
    color: var(--white);
    margin-bottom: 1.6rem;
}
h2 {
    font-size: clamp(2.4rem, 3.5vw, 3.4rem);
    line-height: 1.15;
    letter-spacing: -.02em;
    margin-bottom: 1.2rem;
}
h3 {
    font-size: 1.85rem;
    line-height: 1.25;
    margin-bottom: .6rem;
}
.hero p {
    color: rgba(255,255,255,.68);
    font-size: 1.8rem;
    max-width: 64rem;
    line-height: 1.6;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 2.8rem;
}

/* ─── Hero: video de fondo local ────────────────────────────────────────── */

.hero-video-wrapper {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.hero-bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 177.78vh;
    height: 100vh;
    min-width: 100%;
    min-height: 56.25vw;
    object-fit: cover;
}
/* Capa oscura sobre el video para legibilidad del texto */
.hero-video-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        160deg,
        rgba(0, 20, 55, 0.82) 0%,
        rgba(0, 35, 85, 0.70) 50%,
        rgba(0, 10, 40, 0.88) 100%
    );
}
/* El nav y el hero quedan sobre el video y el overlay */
.header--hero .nav,
.header--hero .hero {
    position: relative;
    z-index: 2;
}
/* Más espacio vertical en el hero con video para efecto cinematográfico */
.header--hero .hero {
    padding: 7rem 0 11rem;
    border-bottom: none;
}
@media (max-width: 768px) {
    .header--hero { min-height: 75vh; }
    .hero-bg-video { display: none; }
    .header--hero .hero { padding: 4.8rem 0 7.2rem; }
}

/* ─── Page header (subpages) ─────────────────────────────────────────────── */
.page-header {
    padding: 3.6rem 0 4.4rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.page-header h1 { font-size: clamp(2.6rem, 4vw, 4.4rem); }
.page-header p {
    color: rgba(255,255,255,.62);
    font-size: 1.7rem;
    margin-top: .6rem;
}

/* ─── Breadcrumb ─────────────────────────────────────────────────────────── */
.breadcrumb {
    display: flex;
    gap: .8rem;
    align-items: center;
    font-size: 1.35rem;
    color: rgba(255,255,255,.45);
    margin-bottom: 1.6rem;
    flex-wrap: wrap;
}
.breadcrumb a { color: rgba(255,255,255,.45); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb-sep { color: rgba(255,255,255,.25); }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    padding: 1.1rem 2.2rem;
    border-radius: 6px;
    border: 0;
    font-family: var(--font);
    font-weight: 700;
    font-size: 1.5rem;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: background .15s, box-shadow .15s, border-color .15s, color .15s;
}
.btn-primary {
    background: var(--primary);
    color: var(--white);
}
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 3px 14px rgba(0,97,172,.35); }

/* btn-primary sobre fondo azul — usa blanco para que contraste */
.header .btn-primary {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.header .btn-primary:hover {
    background: var(--accent);
    color: var(--primary-dark);
    box-shadow: 0 4px 18px rgba(0,0,0,.2);
}
.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1.5px solid rgba(255,255,255,.3);
}
.btn-outline:hover { background: rgba(255,255,255,.07); }
/* Btn-outline en fondos claros (admin, secciones blancas sin clase) */
.admin-page .btn-outline {
    color: var(--primary);
    border-color: rgba(0,97,172,.4);
}
.admin-page .btn-outline:hover {
    background: rgba(0,97,172,.06);
    border-color: var(--primary);
}
.btn-ghost {
    background: rgba(255,255,255,.07);
    color: var(--white);
    border: 1px solid rgba(255,255,255,.12);
}
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-dark { background: var(--primary); color: var(--white); }
.btn-dark:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--primary); color: var(--white); }
.btn-secondary:hover { background: var(--primary-dark); }

/* Botones sobre fondo azul — fondo blanco para contraste */
.header .btn-dark,
.admin-header .btn-dark,
.header .btn-secondary,
.admin-header .btn-secondary {
    background: var(--white);
    color: var(--primary);
}
.header .btn-dark:hover,
.admin-header .btn-dark:hover,
.header .btn-secondary:hover,
.admin-header .btn-secondary:hover {
    background: var(--accent);
    color: var(--primary-dark);
}
.btn-danger { background: #ef4444; color: var(--white); }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: .7rem 1.4rem; font-size: 1.3rem; }

/* ─── Section ────────────────────────────────────────────────────────────── */
.section { padding: 5.6rem 0; }
.section-white  { background: #ffffff; }
.section-light  { background: #f1f5f9; }
.section-dark    { background: var(--bg); color: var(--white); }
.section-feature { background: #f8fafc; color: var(--text); }
.section-label {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: .8rem;
}
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 3rem;
}
.section-head .lead {
    color: var(--muted);
    font-size: 1.65rem;
    max-width: 56rem;
    margin-top: .6rem;
    line-height: 1.6;
}

/* ─── Why section ─────────────────────────────────────────────────────────── */
.why-intro { max-width: 72rem; margin-bottom: 3.6rem; }
.why-intro p { font-size: 1.7rem; color: var(--muted); line-height: 1.65; }
.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.6rem;
}
.why-card {
    padding: 2.4rem 2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    transition: box-shadow .2s, border-color .2s;
}
.why-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.09); border-color: #94a3b8; }
.icon-box {
    width: 4.8rem;
    height: 4.8rem;
    border-radius: 8px;
    background: rgba(0,97,172,.08);
    display: grid;
    place-items: center;
    margin-bottom: 1.6rem;
    color: var(--primary);
}
.why-card h3 { font-size: 1.75rem; margin-bottom: .6rem; }
.why-card p  { font-size: 1.45rem; color: var(--muted); }

/* ─── Categories ─────────────────────────────────────────────────────────── */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.6rem;
}
.category-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2.4rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: border-color .2s, box-shadow .2s;
}
.category-card:hover { border-color: var(--primary); box-shadow: 0 3px 14px rgba(0,0,0,.08); }
.cat-icon {
    width: 5.6rem;
    height: 5.6rem;
    border-radius: 50%;
    background: var(--bg);
    display: grid;
    place-items: center;
    color: var(--white);
    flex-shrink: 0;
}
.category-card h3 { font-size: 1.6rem; margin: 0; }
.category-card p  { font-size: 1.4rem; color: var(--muted); flex: 1; line-height: 1.5; }

/* ─── Products grid ──────────────────────────────────────────────────────── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.product-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, border-color .2s;
}
.product-card:hover { border-color: #94a3b8; box-shadow: 0 5px 22px rgba(0,0,0,.1); }
.product-img {
    height: 22rem;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .35s ease;
}
.product-card:hover .product-img img { transform: scale(1.04); }
.product-img-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #0369a1;
    padding: 2rem;
    text-align: center;
}
.product-img-placeholder svg { color: #0ea5e9; opacity: .55; }

/* ─── Stats bar ───────────────────────────────────────────────────────────── */
.section-stats {
    background: #ffffff;
    padding: 3.2rem 0;
    border-top: 3px solid var(--primary);
    border-bottom: 1px solid var(--line);
}
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.6rem;
    text-align: center;
}
.stats-row--single {
    grid-template-columns: 1fr;
    max-width: 28rem;
    margin-inline: auto;
}
.stat-item {
    padding: .8rem 1.2rem;
    border-right: 1px solid var(--line);
}
.stat-item:last-child { border-right: none; }
.stats-row--single .stat-item { border-right: none; }
.stat-num {
    display: block;
    font-size: clamp(2.8rem, 3.5vw, 4.2rem);
    font-weight: 900;
    color: var(--primary);
    line-height: 1.1;
    letter-spacing: -.03em;
}
.stat-label {
    display: block;
    font-size: 1.3rem;
    color: var(--muted);
    margin-top: .5rem;
    line-height: 1.4;
}
@media (max-width: 600px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .stat-item:nth-child(2) { border-right: none; }
    .stat-item:nth-child(3) { border-right: 1px solid var(--line); }
    .stat-item:nth-child(4) { border-right: none; }
}

/* ─── Product spotlight ───────────────────────────────────────────────────── */
.section-feature .section-label { color: var(--primary); }
.section-feature h2 { color: var(--text); }
.spotlight {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 6rem;
    align-items: center;
}
.spotlight-img {
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--line);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    box-shadow: 0 2px 20px rgba(0,0,0,.07);
}
.spotlight-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,.18));
    transition: transform .4s ease;
}
.spotlight-img:hover img { transform: scale(1.04); }
.spotlight-body > p {
    color: var(--muted);
    font-size: 1.65rem;
}
.spotlight-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: .9rem;
}
.spotlight-features li {
    padding-left: 2.2rem;
    position: relative;
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1.45;
}
.spotlight-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .6rem;
    width: .7rem;
    height: .7rem;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
}
/* Botón outline en secciones claras */
.section-feature .btn-outline,
.section-light .btn-outline,
.section-white .btn-outline {
    color: var(--primary);
    border-color: rgba(0,97,172,.4);
    background: transparent;
}
.section-feature .btn-outline:hover,
.section-light .btn-outline:hover,
.section-white .btn-outline:hover {
    background: rgba(0,97,172,.06);
    border-color: var(--primary);
}
@media (max-width: 860px) {
    .spotlight {
        grid-template-columns: 1fr;
        gap: 3.2rem;
    }
    .spotlight-img { aspect-ratio: 16/9; }
}
.product-img-placeholder span { font-size: 1.3rem; font-weight: 600; opacity: .65; }
.card-body { padding: 1.8rem 2rem; display: flex; flex-direction: column; flex: 1; }
.badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .8rem; }
.badge {
    display: inline-flex;
    padding: .35rem .9rem;
    border-radius: 4px;
    background: rgba(0,97,172,.08);
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
}
.card-title { font-size: 1.75rem; font-weight: 800; margin-bottom: .5rem; }
.card-desc {
    color: var(--muted);
    font-size: 1.45rem;
    flex: 1;
    margin-bottom: 1.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}
.card-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
/* Btn-ghost dentro de tarjeta de producto (fondo blanco en modo claro) */
.product-card .btn-ghost {
    background: transparent;
    color: var(--primary);
    border: 1px solid rgba(0,97,172,.35);
}
.product-card .btn-ghost:hover {
    background: rgba(0,97,172,.06);
    border-color: var(--primary);
    color: var(--primary);
}
[data-theme="dark"] .product-card .btn-ghost {
    color: var(--accent);
    border-color: rgba(137,209,237,.35);
    background: transparent;
}
[data-theme="dark"] .product-card .btn-ghost:hover {
    background: rgba(137,209,237,.08);
    border-color: var(--accent);
}

/* ─── Filter bar ─────────────────────────────────────────────────────────── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--line);
}
.filter-btn {
    padding: .75rem 1.6rem;
    border-radius: 4px;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--muted);
    font-family: var(--font);
    font-weight: 600;
    font-size: 1.4rem;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.filter-btn:hover { border-color: #94a3b8; color: var(--text); }
.filter-btn.active {
    background: var(--bg);
    border-color: var(--bg);
    color: var(--white);
}
.no-results { display: none; text-align: center; padding: 5rem 2rem; color: var(--muted); }
.no-results svg { margin: 0 auto 1.2rem; opacity: .3; }
.filter-bar.has-sub { margin-bottom: 0; border-bottom: none; padding-bottom: 1.2rem; }
.filter-bar--sub { margin-bottom: 2.4rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--line); padding-top: .8rem; }
.filter-bar--sub .sub-filter-group { display: flex; flex-wrap: wrap; gap: .6rem; }
.filter-bar--sub .filter-btn { font-size: 1.3rem; padding: .55rem 1.2rem; }

/* ─── Product detail ─────────────────────────────────────────────────────── */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4.8rem;
    align-items: start;
}
.product-detail-img {
    position: sticky;
    top: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
    display: grid;
    place-items: center;
}
.product-detail-img img { width: 100%; height: auto; display: block; object-fit: cover; border-radius: var(--radius); }
.product-detail-img-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    color: #0369a1;
    text-align: center;
    opacity: .65;
}
.detail-cat-badge {
    display: inline-flex;
    padding: .4rem 1.1rem;
    border-radius: 4px;
    border: 1px solid rgba(0,97,172,.25);
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
}
.product-detail-info h1 {
    font-size: clamp(2.6rem, 3.5vw, 3.8rem);
    color: var(--text);
    margin-bottom: 1.4rem;
}
/* ─── Ver más / Ver menos ─────────────────────────────────────────────────── */
.expandable {
    position: relative;
    transition: max-height .35s ease;
}
.expandable.collapsed {
    max-height: 11rem;
    overflow: hidden;
}
.expandable.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5rem;
    background: linear-gradient(to bottom, transparent, #f1f5f9);
    pointer-events: none;
}
.expand-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    padding: .5rem 0;
    margin-top: .4rem;
    transition: color .15s;
    font-family: var(--font);
}
.expand-btn:hover { color: var(--primary-dark); }
.expand-btn svg { transition: transform .25s; }
.expand-btn.open svg { transform: rotate(180deg); }

.full-desc {
    color: var(--muted);
    font-size: 1.65rem;
    line-height: 1.65;
    margin-bottom: 2.4rem;
}
.detail-block { margin-bottom: 2.4rem; }
.detail-block-label {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 1rem;
}
.features-list { list-style: none; padding: 0; }
.features-list li {
    padding: .9rem 0 .9rem 2.4rem;
    position: relative;
    border-bottom: 1px solid var(--line);
    font-size: 1.5rem;
    line-height: 1.5;
}
.features-list li:last-child { border-bottom: none; }
.features-list li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    border: 2px solid var(--primary);
}
.apps-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}
.app-tag {
    padding: .5rem 1.2rem;
    background: #f1f5f9;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text);
}
.detail-cta-box {
    margin-top: 3rem;
    padding: 2.4rem;
    background: var(--bg);
    border-radius: var(--radius);
    color: var(--white);
    border: 1px solid rgba(255,255,255,.06);
}
.detail-cta-box p { color: rgba(255,255,255,.65); margin-bottom: 1.6rem; font-size: 1.5rem; }
.detail-cta-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ─── CTA banner ─────────────────────────────────────────────────────────── */
.cta-banner {
    background: var(--bg);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius);
    padding: 3.6rem 4rem;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2.4rem;
    color: var(--white);
}
.cta-banner p { color: rgba(255,255,255,.75); font-size: 1.7rem; line-height: 1.55; }
.cta-banner .btn-primary {
    background: var(--white);
    color: var(--primary);
}
.cta-banner .btn-primary:hover {
    background: var(--accent);
    color: var(--primary-dark);
    box-shadow: 0 4px 18px rgba(0,0,0,.2);
}

/* ─── Contact ─────────────────────────────────────────────────────────────── */
.contact-layout {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 2.8rem;
    align-items: start;
}
.contact-panel {
    background: var(--bg);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius);
    padding: 2.8rem;
    color: var(--white);
}
.contact-panel h2 { color: var(--white); font-size: 2.4rem; margin-bottom: 1rem; }
.contact-panel > p { color: rgba(255,255,255,.6); font-size: 1.5rem; margin-bottom: 2.4rem; }
.contact-info-item {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    margin-bottom: 1.8rem;
}
.contact-info-item .ci-icon {
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 6px;
    background: rgba(0,97,172,.1);
    display: grid;
    place-items: center;
    color: var(--primary);
    flex-shrink: 0;
}
.contact-info-item strong { display: block; color: var(--white); font-size: 1.3rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .2rem; }
.contact-info-item span  { color: rgba(255,255,255,.6); font-size: 1.5rem; }
.form-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 3rem;
    box-shadow: var(--shadow);
}
.field { display: grid; gap: .5rem; margin-bottom: 1.6rem; }
label  { font-weight: 700; font-size: 1.4rem; color: var(--text); }
input, textarea, select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 1.1rem 1.3rem;
    font: inherit;
    font-size: 1.5rem;
    background: #fafafa;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
}
textarea { min-height: 12rem; resize: vertical; }
.notice {
    padding: 1.2rem 1.4rem;
    border-radius: 6px;
    background: #dcfce7;
    color: #14532d;
    font-weight: 700;
    font-size: 1.45rem;
    margin-bottom: 1.6rem;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.footer {
    background: var(--bg-deep);
    color: rgba(255,255,255,.55);
    padding: 4rem 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3.2rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.footer-brand .logo { font-size: 2rem; }
.footer-brand p {
    font-size: 1.4rem;
    color: rgba(255,255,255,.4);
    margin-top: 1rem;
    line-height: 1.6;
}
.footer-col h4 {
    color: var(--white);
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 1.4rem;
}
.footer-col a {
    display: block;
    font-size: 1.4rem;
    color: rgba(255,255,255,.45);
    margin-bottom: .8rem;
    transition: color .15s;
}
.footer-col a:hover { color: var(--white); }
.footer-col p {
    font-size: 1.4rem;
    color: rgba(255,255,255,.45);
    line-height: 1.55;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    padding: 2rem 0;
    font-size: 1.3rem;
    color: rgba(255,255,255,.3);
}

/* ─── WhatsApp float ─────────────────────────────────────────────────────── */
.whatsapp-float {
    position: fixed;
    bottom: 2.4rem;
    right: 2.4rem;
    width: 5.2rem;
    height: 5.2rem;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(37,211,102,.35);
    z-index: 9990;
    transition: transform .2s, box-shadow .2s, background .15s;
}
.whatsapp-float:hover { background: #20b958; transform: scale(1.1); box-shadow: 0 4px 20px rgba(37,211,102,.5); }
.whatsapp-float svg { color: var(--white); }

/* ─── Admin ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 1.2rem 1.3rem; vertical-align: top; font-size: 1.5rem; }
th { background: #f1f5f9; font-size: 1.3rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.inline-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.inline-actions form { margin: 0; }
.small { font-size: 1.3rem; }
.muted { color: var(--muted); }
.form { background: #fff; padding: 2.4rem; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { background: #fff; padding: 2.4rem; border: 1px solid var(--line); border-radius: var(--radius); }

/* ─── Delete PIN modal ────────────────────────────────────────────────────── */
.del-pin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s;
}
.del-pin-overlay.open { opacity: 1; pointer-events: all; }
.del-pin-modal {
    background: #fff;
    border-radius: 18px;
    padding: 3.2rem 3rem 2.8rem;
    width: min(44rem, 100%);
    position: relative;
    box-shadow: 0 28px 70px rgba(0,0,0,.35);
}
.del-pin-close {
    position: absolute;
    top: 1.2rem; right: 1.6rem;
    background: none; border: none;
    font-size: 2.6rem; line-height: 1;
    color: var(--muted); cursor: pointer;
    transition: color .15s;
}
.del-pin-close:hover { color: var(--text); }
.del-pin-modal h3 { font-size: 2rem; color: var(--text); margin-bottom: .6rem; text-align: center; }
.del-pin-modal > p { color: var(--muted); font-size: 1.4rem; line-height: 1.55; margin-bottom: 1.8rem; text-align: center; }
.del-pin-modal > p strong { color: #ef4444; }
.del-pin-error {
    display: none;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 8px;
    padding: .9rem 1.2rem;
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    text-align: center;
}
.del-pin-input {
    width: 100%;
    padding: 1.2rem 1.6rem;
    border: 2px solid var(--line);
    border-radius: 10px;
    font-size: 2.2rem;
    letter-spacing: .35em;
    text-align: center;
    margin-bottom: 1.8rem;
    font-family: monospace;
    color: var(--text);
    background: #f8fafc;
    transition: border-color .15s, box-shadow .15s;
    display: block;
}
.del-pin-input:focus {
    border-color: #ef4444;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(239,68,68,.18);
}
.del-pin-actions {
    display: flex;
    gap: 1rem;
}
.del-pin-actions .btn { flex: 1; justify-content: center; }
.del-pin-cancel {
    background: #f1f5f9;
    color: var(--text);
    border: 1px solid var(--line);
    padding: 1.1rem 2.2rem;
}
.del-pin-cancel:hover { background: #e2e8f0; }
/* Dark mode */
[data-theme="dark"] .del-pin-modal  { background: #0f1d32; }
[data-theme="dark"] .del-pin-input  { background: #0a1422; border-color: var(--line); color: var(--text); }
[data-theme="dark"] .del-pin-input:focus { background: #162b44; border-color: #ef4444; }
[data-theme="dark"] .del-pin-error  { background: rgba(239,68,68,.18); color: #fca5a5; }
[data-theme="dark"] .del-pin-cancel { background: #162b44; border-color: var(--line); color: var(--text); }

/* ─── Modal: aviso de inactividad ────────────────────────────────────────── */
.idle-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.70);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.idle-overlay.open {
    display: flex;
    animation: idleFadeIn .22s ease both;
}
@keyframes idleFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.idle-modal {
    background: #fff;
    border-radius: 18px;
    padding: 3.2rem 3rem 2.8rem;
    width: min(42rem, 100%);
    box-shadow: 0 28px 70px rgba(0,0,0,.35);
    text-align: center;
}
.idle-icon { font-size: 4rem; margin-bottom: 1.2rem; }
.idle-modal h3 { font-size: 2rem; color: var(--text); margin-bottom: .6rem; }
.idle-modal p { color: var(--muted); font-size: 1.45rem; line-height: 1.55; margin-bottom: 2rem; }
.idle-countdown {
    display: inline-block;
    font-size: 3.6rem;
    font-weight: 900;
    color: #ef4444;
    font-variant-numeric: tabular-nums;
    margin: .4rem 0 2rem;
    letter-spacing: .02em;
}
.idle-actions { display: flex; gap: 1rem; justify-content: center; }
.idle-actions .btn { flex: 1; justify-content: center; }
[data-theme="dark"] .idle-modal { background: #0f1d32; }

/* WhatsApp button */
.btn-wa {
    background: #25D366;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}
.btn-wa:hover { background: #1ebe5b; color: #fff; }
[data-theme="dark"] .btn-wa       { background: #1a9e4d; }
[data-theme="dark"] .btn-wa:hover { background: #25D366; }

/* ═══ ADMIN LOGIN ══════════════════════════════════════════════════════════ */
.admin-login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #040d1a 0%, #003264 55%, #0061AC 100%);
    padding: 2rem;
}
.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 4.4rem 4rem;
    width: min(44rem, 100%);
    box-shadow: 0 32px 80px rgba(0,0,0,.45);
}
.login-card .logo { display: flex; justify-content: center; margin-bottom: 2.8rem; }
.login-card .logo img { max-width: 17rem; }
.login-card h2 { font-size: 2.2rem; color: var(--text); margin-bottom: .4rem; text-align: center; }
.login-card > p { color: var(--muted); font-size: 1.45rem; margin-bottom: 2.4rem; text-align: center; }

/* ═══ ADMIN SHELL ══════════════════════════════════════════════════════════ */
.admin-page { background: #f0f4f8; min-height: 100vh; }
.admin-header {
    background: linear-gradient(90deg, #00234d 0%, #0050a0 100%);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 16px rgba(0,0,0,.3);
}
.admin-nav {
    display: flex;
    align-items: stretch;
    gap: 0;
    min-height: 7rem;
}
.admin-nav .logo {
    padding: 0 2.8rem 0 0;
    border-right: 1px solid rgba(255,255,255,.12);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.admin-nav .logo__img {
    max-width: 14rem;
    max-height: 4rem;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.admin-nav-actions {
    display: flex;
    gap: .8rem;
    margin-left: auto;
    align-items: center;
    padding-left: 2rem;
    border-left: 1px solid rgba(255,255,255,.1);
}

/* Tabs */
.admin-tabs {
    display: flex;
    flex: 1;
    align-items: stretch;
    padding: 0 1.6rem;
    gap: 0;
    overflow-x: auto;
}
.admin-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0 2rem;
    font-size: 1.45rem;
    color: rgba(255,255,255,.52);
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font);
    display: flex;
    align-items: center;
    gap: .6rem;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.admin-tab:hover { color: rgba(255,255,255,.85); }
.admin-tab.active { color: #fff; border-bottom-color: var(--accent); }
.tab-badge {
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    font-size: 1.05rem;
    padding: .15rem .6rem;
    font-weight: 700;
    line-height: 1.5;
    animation: tabBadgePop .3s ease both;
}
@keyframes tabBadgePop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* ═══ KPI METRICS BAR ══════════════════════════════════════════════════════ */
.admin-kpi-bar {
    background: #fff;
    border-bottom: 1px solid #dde3ea;
    padding: 1.6rem 0;
}
.admin-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.admin-kpi {
    background: #fff;
    padding: 1.8rem 2.4rem;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    border-right: 1px solid #f1f5f9;
    transition: background .15s;
}
.admin-kpi:last-child { border-right: none; }
.admin-kpi:hover { background: #fafbfd; }
.admin-kpi-icon {
    width: 4.8rem;
    height: 4.8rem;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.admin-kpi-icon.blue   { background: #dbeafe; color: #1d4ed8; }
.admin-kpi-icon.green  { background: #dcfce7; color: #15803d; }
.admin-kpi-icon.purple { background: #ede9fe; color: #7c3aed; }
.admin-kpi-icon.amber  { background: #fef3c7; color: #b45309; }
.admin-kpi-val  { font-size: 3rem; font-weight: 900; color: var(--text); line-height: 1; letter-spacing: -.04em; }
.admin-kpi-new  { font-size: 1.2rem; color: #1d4ed8; font-weight: 700; margin-top: .2rem; }
.admin-kpi-new.zero { color: var(--muted); font-weight: 400; }
.admin-kpi-label { font-size: 1.3rem; color: var(--muted); margin-top: .15rem; }
@media (max-width: 768px) {
    .admin-kpi-row { grid-template-columns: repeat(2, 1fr); }
    .admin-kpi:nth-child(2) { border-right: none; }
}

/* ═══ ADMIN CONTENT ════════════════════════════════════════════════════════ */
.admin-content { padding: 2.8rem 0 5rem; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeup .25s ease both; }
.admin-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2.4rem;
    padding-bottom: 1.6rem;
    border-bottom: 2px solid #edf0f3;
}
.admin-section-head h2 { font-size: 2.2rem; color: var(--text); margin: 0; }
.admin-count {
    font-size: 1.25rem;
    font-weight: 700;
    background: #f1f5f9;
    color: var(--muted);
    padding: .3rem 1rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
}
.admin-empty {
    text-align: center;
    padding: 6rem 2rem;
    background: #fff;
    border: 1px dashed #e2e8f0;
    border-radius: 16px;
}
.admin-empty p { font-size: 1.7rem; color: var(--muted); }

/* Sub-tabs pill style */
.leads-subtab-bar {
    display: inline-flex;
    gap: .4rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: .35rem;
    margin-bottom: 2.4rem;
}
.leads-subtab {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1.8rem;
    background: none;
    border: none;
    border-radius: 7px;
    font-size: 1.35rem;
    color: var(--muted);
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font);
    transition: background .15s, color .15s, box-shadow .15s;
    white-space: nowrap;
}
.leads-subtab:hover { background: #fff; color: var(--text); }
.leads-subtab.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,97,172,.3);
}

/* Message filter pills */
.msg-filter-bar { display: flex; gap: .5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.msg-filter-btn {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: var(--muted);
    padding: .5rem 1.4rem;
    border-radius: 999px;
    font-size: 1.3rem;
    cursor: pointer;
    font-family: var(--font);
    font-weight: 600;
    transition: all .15s;
}
.msg-filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.msg-filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.msg-filter-count { opacity: .75; }

/* Message cards */
.msg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(34rem, 1fr)); gap: 1.6rem; }
.msg-card {
    background: #fff;
    border: 1px solid #e8edf2;
    border-top: 3px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    transition: box-shadow .2s, transform .2s;
}
.msg-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.09); transform: translateY(-2px); }
.msg-card[data-status="Nuevo"]      { border-top-color: var(--primary); }
.msg-card[data-status="Contactado"] { border-top-color: #f59e0b; }
.msg-card[data-status="Venta"]      { border-top-color: #22c55e; }
.msg-card[data-status="No venta"]   { border-top-color: #94a3b8; }
.msg-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; margin-bottom: 1rem; }
.msg-card-name { font-weight: 700; font-size: 1.7rem; color: var(--text); }
.msg-card-date { font-size: 1.2rem; color: var(--muted); margin-top: .2rem; }
.msg-card-contact { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-bottom: .8rem; }
.msg-card-phone { font-size: 1.4rem; color: var(--primary); font-weight: 700; }
.msg-card-email { font-size: 1.3rem; color: var(--muted); }
.msg-card-interest {
    display: inline-flex;
    align-items: center;
    font-size: 1.25rem;
    background: #eff6ff;
    color: #1d4ed8;
    padding: .3rem 1rem;
    border-radius: 999px;
    margin-bottom: .8rem;
    font-weight: 600;
    border: 1px solid #bfdbfe;
}
.msg-card-body { font-size: 1.4rem; color: var(--text); line-height: 1.55; max-height: 7rem; overflow: hidden; margin: .4rem 0 .2rem; }
.msg-card-body.expanded { max-height: none; }
.msg-card-expand { font-size: 1.2rem; color: var(--primary); background: none; border: none; cursor: pointer; padding: 0; display: block; margin-bottom: .4rem; font-family: var(--font); font-weight: 600; }
.msg-card-meta { font-size: 1.2rem; color: var(--muted); margin: .2rem 0 .4rem; }
.msg-card-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid #f1f5f9;
}
.msg-card-actions form { margin: 0; }
.msg-status-form { display: flex; gap: .5rem; align-items: center; flex: 1; min-width: 0; }
.msg-status-form select {
    flex: 1;
    min-width: 0;
    padding: .55rem .9rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.3rem;
    background: #f8fafc;
    font-family: var(--font);
    cursor: pointer;
    transition: border-color .15s;
}
.msg-status-form select:focus { border-color: var(--primary); outline: none; background: #fff; }

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 1.15rem;
    font-weight: 700;
    padding: .3rem 1rem;
    border-radius: 999px;
    white-space: nowrap;
}
.status-badge.nuevo      { background: #dbeafe; color: #1e40af; }
.status-badge.contactado { background: #fef3c7; color: #92400e; }
.status-badge.venta      { background: #dcfce7; color: #15803d; }
.status-badge.no-venta   { background: #f1f5f9; color: #64748b; }
.status-badge.respondido { background: #dcfce7; color: #15803d; }
.status-badge.cerrado    { background: #dcfce7; color: #15803d; }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid #e2e8f0; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: 1.4rem; }
table thead tr { background: #f6f8fa; border-bottom: 2px solid #e2e8f0; }
table th { padding: 1.3rem 1.6rem; text-align: left; font-size: 1.15rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
table td { padding: 1.3rem 1.6rem; border-bottom: 1px solid #f4f6f8; vertical-align: middle; color: var(--text); }
table tbody tr:last-child td { border-bottom: none; }
table tbody tr:hover td { background: #f9fafb; }

/* ─── Pantalla de bloqueo de productos ──────────────────────────────────── */
.products-lock-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42rem;
    padding: 4rem 2rem;
}
.products-lock-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 3.6rem 3.2rem;
    max-width: 40rem;
    width: 100%;
    text-align: center;
    box-shadow: 0 6px 32px rgba(0,0,0,.1);
}
.products-lock-icon {
    width: 7.2rem;
    height: 7.2rem;
    border-radius: 50%;
    background: rgba(0,97,172,.08);
    display: grid;
    place-items: center;
    margin: 0 auto 1.8rem;
    color: var(--primary);
    border: 2px solid rgba(0,97,172,.15);
}
.products-lock-card h3 { font-size: 2rem; color: var(--text); margin-bottom: .8rem; }
.products-lock-card > p { font-size: 1.45rem; color: var(--muted); margin-bottom: 2rem; line-height: 1.6; }

@keyframes lockShake {
    0%, 100% { transform: translateX(0); }
    15%, 45%, 75% { transform: translateX(-6px); }
    30%, 60%, 90% { transform: translateX(6px); }
}
.lock-shake { animation: lockShake .45s ease; }

/* (leads-subtab-bar estilos definidos arriba en la sección ADMIN CONTENT) */

/* Products admin */
.products-admin-layout { display: grid; grid-template-columns: 36rem 1fr; gap: 2rem; align-items: start; }

/* ─── Animaciones ────────────────────────────────────────────────────────── */
@keyframes fadein  { from { opacity: 0; }                          to { opacity: 1; } }
@keyframes fadeout { from { opacity: 1; }                          to { opacity: 0; } }
@keyframes slideup { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeup  { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.hero-animate { animation: fadeup .45s ease both; }

/* ─── Producto detail - nuevos campos ───────────────────────────────────── */
.detail-price { font-size:2rem; font-weight:800; color:var(--primary); margin-bottom:.6rem; letter-spacing:-.01em; }
.detail-short-desc { font-size:1.7rem; color:var(--muted); line-height:1.65; margin-bottom:2rem; }
.detail-cta-primary { display:flex; gap:1rem; flex-wrap:wrap; margin-bottom:3rem; padding-bottom:2.4rem; border-bottom:1px solid var(--line); }

/* ─── Catálogo vacío ─────────────────────────────────────────────────────── */
.catalog-empty { text-align:center; padding:6rem 2rem; background:#fff; border:1px solid var(--line); border-radius:var(--radius); }
.catalog-empty svg { color:var(--muted); margin:0 auto 2rem; opacity:.4; }
.catalog-empty h2 { font-size:2rem; color:var(--text); margin-bottom:1rem; }
.catalog-empty p { font-size:1.5rem; color:var(--muted); max-width:48rem; margin:0 auto 2rem; line-height:1.6; }

/* ─── Recursos / enlaces del producto ───────────────────────────────────── */
.product-links { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .4rem; }
.product-link-btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .85rem 1.6rem;
    background: rgba(0,97,172,.07);
    border: 1px solid rgba(0,97,172,.2);
    border-radius: 6px;
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}
.product-link-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ─── Cotizar page ───────────────────────────────────────────────────────── */
.cotizar-layout { display:grid; grid-template-columns:28rem 1fr; gap:2.4rem; align-items:start; }
.cotizar-product-card { background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:2rem; box-shadow:var(--shadow); position:sticky; top:2rem; }
.cotizar-solo { max-width:56rem; margin:0 auto; }

/* ─── WA Lead Modal ─────────────────────────────────────────────────────── */
.wa-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(5,7,10,.78);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.6rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s;
}
.wa-modal-overlay.open { opacity: 1; pointer-events: all; }
.wa-modal {
    background: #fff;
    border-radius: var(--radius);
    padding: 2.8rem;
    max-width: 46rem;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(14px);
    transition: transform .25s;
}
.wa-modal-overlay.open .wa-modal { transform: translateY(0); }
.wa-modal-close {
    position: absolute; top: 1rem; right: 1.2rem;
    background: none; border: none;
    font-size: 2.4rem; cursor: pointer;
    color: var(--muted); line-height: 1;
    font-family: var(--font); padding: .2rem .5rem;
}
.wa-modal-close:hover { color: var(--text); }
.wa-modal-head { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.8rem; }
.wa-modal-icon {
    width: 4.4rem; height: 4.4rem; border-radius: 50%;
    background: #25D366; display: grid; place-items: center;
    color: #fff; flex-shrink: 0;
}
.wa-modal-title { font-size: 1.9rem; color: var(--text); margin-bottom: .2rem; }
.wa-modal-subtitle { font-size: 1.35rem; color: var(--muted); line-height: 1.45; }
.wa-acepto {
    display: flex; gap: .8rem; align-items: flex-start;
    padding: 1.2rem; background: #f8fafc;
    border-radius: 6px; border: 1px solid var(--line);
    margin-top: .4rem; margin-bottom: 0;
}
.wa-acepto input[type="checkbox"] { width: auto; margin-top: .2rem; flex-shrink: 0; }
.wa-acepto label { font-weight: 400; font-size: 1.3rem; cursor: pointer; line-height: 1.5; color: var(--text); }
@media (max-width: 480px) {
    .wa-modal { padding: 2rem 1.6rem; }
    .wa-modal-head { flex-direction: column; align-items: flex-start; gap: .8rem; }
}

/* ─── Popup provisional ──────────────────────────────────────────────────── */
.prov-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5,7,10,.78);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadein .2s ease;
}
.prov-overlay.hiding { animation: fadeout .18s ease forwards; }
.prov-modal {
    background: #fff;
    border-radius: var(--radius);
    padding: 3.2rem 3rem 2.8rem;
    max-width: 42rem;
    width: 100%;
    text-align: center;
    position: relative;
    animation: slideup .3s ease;
}
.prov-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: none;
    border: none;
    font-size: 2.4rem;
    cursor: pointer;
    color: var(--muted);
    line-height: 1;
    font-family: var(--font);
    padding: .2rem .5rem;
}
.prov-close:hover { color: var(--text); }
.prov-icon { font-size: 3.4rem; margin-bottom: 1.2rem; }
.prov-modal h2 { font-size: 2rem; color: var(--text); margin-bottom: 1.2rem; letter-spacing: -.02em; }
.prov-modal p { font-size: 1.5rem; color: var(--muted); margin-bottom: 1rem; line-height: 1.55; }
.prov-modal .btn { width: 100%; justify-content: center; margin-top: .8rem; }

/* ─── Página interna (header separado del contenido) ────────────────────── */
.page-inner-head {
    padding: 3.2rem 0 2.4rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 3.2rem;
}
.page-inner-head h1 {
    font-size: clamp(2.8rem, 4vw, 4rem);
    color: var(--text);
    margin-bottom: .4rem;
}
.page-inner-head p { font-size: 1.6rem; color: var(--muted); margin-bottom: 0; }
.page-inner-head .kicker { margin-bottom: 1rem; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
    .hamburger { display: flex; }
    .nav-side { display: none; }
    .main-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-soft);
        padding: 1.4rem 4%;
        flex-direction: column;
        gap: 0;
        border-top: 1px solid rgba(255,255,255,.08);
        z-index: 50;
    }
    .main-menu a { padding: 1.1rem 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 1.6rem; }
    .main-menu a:last-child { border-bottom: none; }
    .main-menu.open { display: flex; }
    .nav { position: relative; }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .product-detail-layout,
    .contact-layout,
    .products-admin-layout { grid-template-columns: 1fr; }
    .product-detail-img { position: static; }
    .cta-banner { grid-template-columns: 1fr; padding: 2.8rem; text-align: center; }
    .section-head { display: block; }
    .section-head .btn { margin-top: 1.2rem; }
}
@media (max-width: 600px) {
    .products-grid,
    .why-grid,
    .categories-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero { padding: 4rem 0 5rem; }
    .section { padding: 4rem 0; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .detail-cta-actions .btn { width: 100%; justify-content: center; }
    .cta-banner .btn { width: 100%; justify-content: center; }
    .admin-nav { flex-wrap: wrap; gap: .8rem; }
    .admin-nav-actions { margin-left: 0; }
    .msg-grid { grid-template-columns: 1fr; }
}

/* ─── Animaciones globales ────────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0);    }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0);     }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(.95); }
    to   { opacity: 1; transform: scale(1);   }
}

/* Clases de animación de entrada */
.fade-in    { animation: fadeIn  .45s ease both; }
.slide-up   { animation: slideUp .45s ease both; }
.slide-down { animation: slideDown .35s ease both; }
.scale-in   { animation: scaleIn .35s ease both; }

/* Delay escalonado para listas */
.anim-d1 { animation-delay: .05s; }
.anim-d2 { animation-delay: .10s; }
.anim-d3 { animation-delay: .15s; }
.anim-d4 { animation-delay: .20s; }

/* Clases activadas por IntersectionObserver */
.observe-me {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .5s ease, transform .5s ease;
}
.observe-me.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════════════
   THEME TOGGLE BUTTON
═══════════════════════════════════════════════════════════════════════════ */
.theme-toggle {
    width: 3.8rem;
    height: 3.8rem;
    border-radius: 8px;
    border: 1.5px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.82);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background .2s, color .2s, transform .25s;
    flex-shrink: 0;
    padding: 0;
}
.theme-toggle:hover {
    background: rgba(255,255,255,.18);
    color: #fff;
    transform: rotate(18deg);
}
/* Icono: luna visible en modo claro, sol visible en modo oscuro */
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   DARK MODE — paleta jerárquica con contraste WCAG AA
   Capas: base(#0b1524) → sec-light(#0b1524) → sec-white(#0f1d32)
          → card(#162b44) → elevado(#1c3254)
═══════════════════════════════════════════════════════════════════════════ */

[data-theme="dark"] {
    --text:   #d8eaf8;   /* ≈ 12:1 sobre card  */
    --muted:  #7da4c0;   /* ≈  5:1 sobre card  */
    --card:   #162b44;
    --line:   #1e3a58;
    --shadow: 0 2px 12px rgba(0,0,0,.6);
}

/* ── Cuerpo y secciones ─────────────────────────────────────────────────── */
[data-theme="dark"] body { background: #0b1524; color: var(--text); }

/* ── Secciones (alternancia visible: sec-white más claro que base) ───────── */
[data-theme="dark"] .section-white   { background: #0f1d32; }   /* +1 tono sobre base */
[data-theme="dark"] .section-light   { background: #0b1524; }   /* = base */
[data-theme="dark"] .section-feature { background: #0d1b30; }
[data-theme="dark"] .section-dark    { background: #071030; }
[data-theme="dark"] main.section-light,
[data-theme="dark"] main.section.section-light { background: #0b1524; }

/* ── Headings y texto en secciones ──────────────────────────────────────── */
[data-theme="dark"] h2,
[data-theme="dark"] h3              { color: var(--text); }
[data-theme="dark"] p               { color: var(--muted); }
[data-theme="dark"] .why-intro p,
[data-theme="dark"] .section-head .lead,
[data-theme="dark"] .sectors-head p { color: var(--muted); }

/* ── Stats bar ───────────────────────────────────────────────────────────── */
[data-theme="dark"] .section-stats {
    background: #060c1a;
    border-top-color: #1a6fc2;
    border-bottom-color: var(--line);
}
[data-theme="dark"] .stat-item     { border-right-color: var(--line); }
[data-theme="dark"] .stat-num      { color: var(--accent); }
[data-theme="dark"] .stat-label    { color: #4a6d8a; }

/* ── Why cards ───────────────────────────────────────────────────────────── */
[data-theme="dark"] .why-card           { background: var(--card); border-color: var(--line); }
[data-theme="dark"] .why-card h3        { color: var(--text); }
[data-theme="dark"] .why-card p         { color: var(--muted); }
[data-theme="dark"] .icon-box           { background: rgba(0,97,172,.22); color: var(--accent); }

/* ── Category cards ──────────────────────────────────────────────────────── */
[data-theme="dark"] .category-card      { background: var(--card); border-color: var(--line); }
[data-theme="dark"] .category-card h3   { color: var(--text); }
[data-theme="dark"] .category-card p    { color: var(--muted); }
[data-theme="dark"] .category-card:hover { border-color: #3a70ab; box-shadow: 0 3px 14px rgba(0,0,0,.4); }

/* ── Product cards ───────────────────────────────────────────────────────── */
[data-theme="dark"] .product-card       { background: var(--card); border-color: var(--line); }
[data-theme="dark"] .product-card:hover { border-color: #3a70ab; box-shadow: 0 5px 22px rgba(0,0,0,.45); }
[data-theme="dark"] .product-img        { border-bottom-color: var(--line); }
[data-theme="dark"] .card-title         { color: var(--text); }
[data-theme="dark"] .card-desc          { color: var(--muted); }
[data-theme="dark"] .badge              { color: var(--accent); background: rgba(137,209,237,.1); border-color: rgba(137,209,237,.22); }

/* ── Carrusel ────────────────────────────────────────────────────────────── */
[data-theme="dark"] .carousel-wrapper        { border-color: var(--line); box-shadow: 0 2px 20px rgba(0,0,0,.55); }
[data-theme="dark"] .carousel-slide          { background: var(--card); }
[data-theme="dark"] .carousel-slide-img      { background: #0d1b2e; border-right-color: var(--line); }
[data-theme="dark"] .carousel-img-ph         { background: linear-gradient(145deg,#0f1d32 0%,#152840 100%); border-color: rgba(137,209,237,.18); color: rgba(137,209,237,.4); }
[data-theme="dark"] .carousel-slide-body h3  { color: var(--text); }
[data-theme="dark"] .carousel-slide-body > p { color: var(--muted); }
[data-theme="dark"] .slide-badge             { background: rgba(0,97,172,.28); color: var(--accent); }
[data-theme="dark"] .carousel-btn            { background: var(--card); border-color: var(--line); color: var(--muted); }
[data-theme="dark"] .carousel-btn:hover      { background: var(--primary); border-color: var(--primary); color: #fff; }
[data-theme="dark"] .carousel-dot            { background: var(--line); }
[data-theme="dark"] .carousel-dot.active     { background: var(--accent); }
[data-theme="dark"] .carousel-header h2      { color: var(--text); }
[data-theme="dark"] .carousel-progress       { background: var(--accent); }

/* ── Botones outline sobre secciones oscuras ─────────────────────────────── */
[data-theme="dark"] .section-white .btn-outline,
[data-theme="dark"] .section-light .btn-outline,
[data-theme="dark"] .section-feature .btn-outline,
[data-theme="dark"] .carousel-slide-body .btn-outline {
    color: var(--accent);
    border-color: rgba(137,209,237,.4);
    background: rgba(137,209,237,.06);
}
[data-theme="dark"] .section-white .btn-outline:hover,
[data-theme="dark"] .section-light .btn-outline:hover,
[data-theme="dark"] .section-feature .btn-outline:hover,
[data-theme="dark"] .carousel-slide-body .btn-outline:hover {
    background: rgba(137,209,237,.14);
    border-color: var(--accent);
}

/* ── Galería de sectores ─────────────────────────────────────────────────── */
[data-theme="dark"] .sector-img-ph   { background: linear-gradient(145deg,#0f1d32 0%,#152840 100%); color: rgba(137,209,237,.35); }
[data-theme="dark"] .sector-card     { box-shadow: 0 2px 16px rgba(0,0,0,.5); }

/* ── Formularios ─────────────────────────────────────────────────────────── */
[data-theme="dark"] label            { color: var(--text); }
[data-theme="dark"] .field-hint      { color: var(--muted); }
[data-theme="dark"] .form            { background: #0f1d32; border-color: var(--line); }
[data-theme="dark"] .panel           { background: #0f1d32; border-color: var(--line); }
[data-theme="dark"] input:not([type="file"]),
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: #0a1422;
    border-color: var(--line);
    color: var(--text);
}
[data-theme="dark"] input:not([type="file"])::placeholder,
[data-theme="dark"] textarea::placeholder { color: #354f68; }
[data-theme="dark"] input:not([type="file"]):focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
    border-color: #1a6fc2;
    background: #0f1d32;
    outline: none;
    box-shadow: 0 0 0 3px rgba(26,111,194,.22);
}

/* ── Expandable ──────────────────────────────────────────────────────────── */
[data-theme="dark"] .expandable.collapsed::after { background: linear-gradient(to bottom, transparent, #0b1524); }
[data-theme="dark"] .expand-btn { color: var(--accent); }

/* ── Notices ─────────────────────────────────────────────────────────────── */
[data-theme="dark"] .notice { background: #0f1d32; border-color: var(--line); color: var(--text); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
[data-theme="dark"] .footer              { background: #050b18; }
[data-theme="dark"] .footer h4           { color: rgba(255,255,255,.88); }
[data-theme="dark"] .footer-brand p      { color: rgba(255,255,255,.55); }
[data-theme="dark"] .footer-grid a       { color: rgba(255,255,255,.52); }
[data-theme="dark"] .footer-grid a:hover { color: #fff; }
[data-theme="dark"] .footer-bottom       { border-top-color: rgba(255,255,255,.07); color: rgba(255,255,255,.3); }

/* ── Modales ─────────────────────────────────────────────────────────────── */
[data-theme="dark"] .wa-modal-overlay  { background: rgba(0,0,0,.82); }
[data-theme="dark"] .wa-modal          { background: #0f1d32; border-color: var(--line); }
[data-theme="dark"] .wa-modal h3       { color: var(--text); }
[data-theme="dark"] .wa-modal p        { color: var(--muted); }
[data-theme="dark"] .prov-overlay      { background: rgba(0,0,0,.82); }
[data-theme="dark"] .prov-modal        { background: #0f1d32; border-color: var(--line); }
[data-theme="dark"] .prov-modal h2     { color: var(--text); }
[data-theme="dark"] .prov-modal p      { color: var(--muted); }

/* ── Producto detalle ────────────────────────────────────────────────────── */
[data-theme="dark"] .product-detail-img             { background: transparent; }
[data-theme="dark"] .product-detail-img-placeholder { background: #0f1d32; }
[data-theme="dark"] .detail-block-label             { color: var(--muted); }
[data-theme="dark"] .full-desc                      { color: var(--muted); }
[data-theme="dark"] .features-list li               { color: var(--text); }
[data-theme="dark"] .features-list li::before       { background: var(--accent); }
[data-theme="dark"] .app-tag                        { background: rgba(137,209,237,.1); color: var(--accent); border-color: rgba(137,209,237,.2); }
[data-theme="dark"] .detail-cat-badge               { background: rgba(0,97,172,.3); color: var(--accent); }
[data-theme="dark"] .detail-price                   { color: var(--accent); }
[data-theme="dark"] .product-link-btn               { background: #0f1d32; border-color: var(--line); color: var(--text); }
[data-theme="dark"] .product-link-btn:hover         { background: var(--card); border-color: #3a70ab; }

/* ── Admin panel ─────────────────────────────────────────────────────────── */
[data-theme="dark"] .admin-page             { background: #060c1a; }
[data-theme="dark"] .admin-kpi-bar          { background: #0b1524; border-bottom-color: var(--line); }
[data-theme="dark"] .admin-kpi              { background: #0f1d32; border-right-color: var(--line); }
[data-theme="dark"] .admin-kpi:hover        { background: var(--card); }
[data-theme="dark"] .admin-kpi-val          { color: var(--text); }
[data-theme="dark"] .admin-kpi-label        { color: var(--muted); }
[data-theme="dark"] .admin-kpi-new          { color: #5ba8df; }
[data-theme="dark"] .admin-kpi-new.zero     { color: #354f68; }
[data-theme="dark"] .admin-section-head     { border-bottom-color: var(--line); }
[data-theme="dark"] .admin-section-head h2  { color: var(--text); }
[data-theme="dark"] .admin-count            { background: #0f1d32; border-color: var(--line); color: var(--muted); }
[data-theme="dark"] .admin-empty            { background: #0f1d32; border-color: var(--line); }
[data-theme="dark"] .admin-empty p          { color: var(--muted); }
[data-theme="dark"] .leads-subtab-bar       { background: #0f1d32; border-color: var(--line); }
[data-theme="dark"] .leads-subtab           { color: var(--muted); }
[data-theme="dark"] .leads-subtab:hover     { background: var(--card); color: var(--text); }
[data-theme="dark"] .leads-subtab.active    { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(0,97,172,.4); }
[data-theme="dark"] .msg-filter-btn         { background: #0f1d32; border-color: var(--line); color: var(--muted); }
[data-theme="dark"] .msg-filter-btn:hover   { border-color: #3a70ab; color: var(--accent); }
[data-theme="dark"] .msg-filter-btn.active  { background: var(--primary); border-color: var(--primary); color: #fff; }
[data-theme="dark"] .msg-card               { background: #0f1d32; border-color: var(--line); }
[data-theme="dark"] .msg-card:hover         { box-shadow: 0 6px 24px rgba(0,0,0,.5); }
[data-theme="dark"] .msg-card-name          { color: var(--text); }
[data-theme="dark"] .msg-card-date          { color: var(--muted); }
[data-theme="dark"] .msg-card-phone         { color: var(--accent); }
[data-theme="dark"] .msg-card-email         { color: var(--muted); }
[data-theme="dark"] .msg-card-interest      { background: rgba(0,97,172,.22); color: var(--accent); border-color: rgba(0,97,172,.38); }
[data-theme="dark"] .msg-card-body          { color: var(--text); }
[data-theme="dark"] .msg-card-meta          { color: var(--muted); }
[data-theme="dark"] .msg-card-actions       { border-top-color: var(--line); }
[data-theme="dark"] .msg-status-form select { background: #0a1422; color: var(--text); border-color: var(--line); }
[data-theme="dark"] .table-wrap             { border-color: var(--line); }
[data-theme="dark"] table                   { background: #0f1d32; }
[data-theme="dark"] table thead tr          { background: #0a1422; border-bottom-color: var(--line); }
[data-theme="dark"] table th                { color: #4a6d8a; }
[data-theme="dark"] table td                { border-bottom-color: var(--line); color: var(--text); }
[data-theme="dark"] table td strong         { color: var(--text); }
[data-theme="dark"] table tbody tr:hover td { background: var(--card); }
[data-theme="dark"] .status-badge.nuevo     { background: rgba(30,64,175,.28); color: #93c5fd; }
[data-theme="dark"] .status-badge.contactado { background: rgba(146,64,14,.28); color: #fcd34d; }
[data-theme="dark"] .status-badge.venta     { background: rgba(21,128,61,.28); color: #86efac; }
[data-theme="dark"] .status-badge.no-venta  { background: rgba(51,65,85,.35); color: #94a3b8; }
[data-theme="dark"] .products-lock-card     { background: #0f1d32; border-color: var(--line); }
[data-theme="dark"] .products-lock-card h3  { color: var(--text); }
[data-theme="dark"] .products-lock-card > p { color: var(--muted); }
[data-theme="dark"] .products-lock-icon     { background: rgba(0,97,172,.22); border-color: rgba(0,97,172,.38); }

/* Admin login */
[data-theme="dark"] .admin-login    { background: linear-gradient(145deg,#030810 0%,#081830 55%,#0d2550 100%); }
[data-theme="dark"] .login-card     { background: #0f1d32; border-color: var(--line); box-shadow: 0 24px 64px rgba(0,0,0,.6); }
[data-theme="dark"] .login-card h2  { color: var(--text); }
[data-theme="dark"] .login-card > p { color: var(--muted); }

/* ─── Carousel image placeholder ─────────────────────────────────────────── */
.carousel-img-ph {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    width: 100%;
    height: 100%;
    min-height: 30rem;
    background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px dashed rgba(0,97,172,.22);
    border-radius: 8px;
    color: rgba(0,97,172,.38);
    text-align: center;
    padding: 2rem;
}
.carousel-img-ph span {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
/* Con imagen: eliminar placeholder, sin márgenes */
.carousel-img-ph:has(img) {
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
    gap: 0;
}
.carousel-slide-img:has(img) {
    padding: 0;
    background: transparent;
}
.carousel-img-ph img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ─── Galería de sectores ────────────────────────────────────────────────── */
.sectors-head {
    text-align: center;
    max-width: 62rem;
    margin: 0 auto 4rem;
}
.sectors-head p { color: var(--muted); font-size: 1.7rem; margin: 0; }
.sectors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}
.sector-card {
    display: block;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    transition: box-shadow .3s, transform .3s;
}
.sector-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,.16);
    transform: translateY(-3px);
}
/* Imagen real (cuando se agregue) */
.sector-card > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .55s ease;
}
.sector-card:hover > img { transform: scale(1.06); }
/* Placeholder mientras no hay imagen */
.sector-img-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #dbeafe 0%, #bfdbfe 60%, #93c5fd 100%);
    color: rgba(0,97,172,.35);
}
/* Overlay con texto — siempre visible, se intensifica al hover */
.sector-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.8rem 2.4rem 2.2rem;
    background: linear-gradient(to top,
        rgba(0,10,30,.82) 0%,
        rgba(0,10,30,.18) 55%,
        transparent 100%);
    transition: background .35s;
}
.sector-card:hover .sector-overlay {
    background: linear-gradient(to top,
        rgba(0,10,30,.92) 0%,
        rgba(0,10,30,.35) 55%,
        rgba(0,10,30,.08) 100%);
}
.sector-overlay h3 {
    color: #ffffff;
    font-size: 2rem;
    margin: 0 0 .4rem;
    line-height: 1.2;
    text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.sector-overlay p {
    color: rgba(255,255,255,.75);
    font-size: 1.45rem;
    margin: 0;
    line-height: 1.4;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .3s ease, opacity .3s ease;
}
.sector-card:hover .sector-overlay p {
    max-height: 5rem;
    opacity: 1;
}
.sector-cta {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: .02em;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .3s ease .05s, transform .3s ease .05s;
}
.sector-card:hover .sector-cta {
    opacity: 1;
    transform: translateY(0);
}
@media (max-width: 640px) {
    .sectors-grid { grid-template-columns: 1fr; }
    .sector-card { aspect-ratio: 16/9; transform: none !important; }
    .sector-overlay p, .sector-cta {
        max-height: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ─── Carousel ───────────────────────────────────────────────────────────── */
.carousel-header {
    margin-bottom: 2.8rem;
}
.carousel-header h2 { color: var(--text); }
.carousel-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: 0 2px 16px rgba(0,0,0,.07);
}
/* Barra de progreso autoplay */
.carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--primary);
    z-index: 10;
    border-radius: 0 2px 0 0;
}
.carousel-progress.running {
    animation: carouselTick 4s linear forwards;
}
@keyframes carouselTick {
    from { width: 0; }
    to   { width: 100%; }
}
.carousel-track {
    display: flex;
    transition: transform .5s cubic-bezier(.25,.46,.45,.94);
    will-change: transform;
}
.carousel-slide {
    min-width: 100%;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    min-height: 44rem;
    background: #ffffff;
}
.carousel-slide-img {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    background: rgba(0,97,172,.04);
    border-right: 1px solid var(--line);
    overflow: hidden;
}
.carousel-icon-box {
    width: 14rem;
    height: 14rem;
    border-radius: 50%;
    background: rgba(0,97,172,.08);
    border: 2px solid rgba(0,97,172,.18);
    display: grid;
    place-items: center;
    color: var(--primary);
    transition: transform .3s ease, background .3s ease;
}
.carousel-slide:hover .carousel-icon-box {
    transform: scale(1.06);
    background: rgba(0,97,172,.13);
}
.carousel-slide-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.2rem;
    padding: 4.8rem 5.6rem 4.8rem 4rem;
}
.slide-badge {
    display: inline-block;
    padding: .4rem 1rem;
    background: rgba(0,97,172,.1);
    color: var(--primary);
    border-radius: 4px;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    align-self: flex-start;
}
.slide-badge--accent {
    background: rgba(0,97,172,.08);
    color: var(--primary-dark);
}
.carousel-slide-body h3 {
    font-size: clamp(2rem, 2.8vw, 2.8rem);
    color: var(--text);
    line-height: 1.2;
    margin: 0;
}
.carousel-slide-body > p {
    color: var(--muted);
    font-size: 1.6rem;
    line-height: 1.65;
    max-width: 46rem;
    margin: 0;
}
.carousel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}
/* ─── Controles del carrusel ─────────────────────────────────────────────── */
.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2.4rem;
}
.carousel-btn {
    width: 4.4rem;
    height: 4.4rem;
    border-radius: 50%;
    border: 1.5px solid var(--line);
    background: #ffffff;
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
    flex-shrink: 0;
    padding: 0;
    box-shadow: var(--shadow);
}
.carousel-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 3px 12px rgba(0,97,172,.3);
}
.carousel-dots {
    display: flex;
    gap: 1rem;
    align-items: center;
}
.carousel-dot {
    width: .9rem;
    height: .9rem;
    border-radius: 50%;
    background: #cbd5e1;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .25s, transform .25s;
}
.carousel-dot.active {
    background: var(--primary);
    transform: scale(1.35);
}
/* ─── Carousel responsive ───────────────────────────────────────────────── */
@media (max-width: 860px) {
    .carousel-slide {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .carousel-slide-img {
        min-height: 24rem;
        border-right: none;
        border-bottom: 1px solid var(--line);
        padding: 3rem;
    }
    .carousel-slide-body {
        padding: 3.2rem 2.4rem;
    }
    .carousel-slide-body h3 { font-size: 2.2rem; }
}
@media (max-width: 480px) {
    .carousel-slide-img { min-height: 18rem; }
    .carousel-actions .btn { width: 100%; justify-content: center; }
}

/* ─── Hover: elevación ────────────────────────────────────────────────────── */
.hover-lift {
    transition: transform .25s ease, box-shadow .25s ease;
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,97,172,.16);
}

/* Cards con hover-lift automático */
.why-card,
.category-card,
.product-card {
    transition: transform .25s ease, box-shadow .25s ease, border-color .2s ease;
}
.why-card:hover,
.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0,0,0,.1);
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,97,172,.14);
    border-color: var(--primary);
}

/* ─── Botones ─────────────────────────────────────────────────────────────── */
.btn {
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease !important;
    cursor: pointer;
}
.btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 18px rgba(0,97,172,.2);
}
.btn:active {
    transform: translateY(0) scale(.98) !important;
    box-shadow: none !important;
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0,97,172,.35) !important;
}

/* ─── Formularios ─────────────────────────────────────────────────────────── */
input, select, textarea {
    transition: border-color .25s ease, box-shadow .25s ease !important;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #0061AC !important;
    box-shadow: 0 0 0 3px rgba(0,97,172,.12) !important;
    background: var(--white) !important;
}

/* ─── WhatsApp flotante ───────────────────────────────────────────────────── */
.whatsapp-float {
    transition: transform .25s ease, box-shadow .25s ease, background .2s ease !important;
    animation: scaleIn .5s ease .8s both;
}
.whatsapp-float:hover {
    transform: scale(1.12) !important;
    box-shadow: 0 6px 24px rgba(37,211,102,.55) !important;
}

/* ─── Admin cards y tablas ────────────────────────────────────────────────── */
.msg-card {
    transition: box-shadow .2s ease, border-left-color .2s ease;
}
.msg-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,.1);
}
table tr {
    transition: background-color .15s ease;
}
table tr:hover {
    background-color: #f8fafc;
}
.admin-tab {
    transition: color .2s ease, border-bottom-color .2s ease;
}
.status-badge {
    transition: opacity .2s ease;
}

/* ─── Header / Nav ────────────────────────────────────────────────────────── */
.main-menu a {
    position: relative;
}
.main-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .25s ease;
}
.main-menu a:hover::after,
.main-menu a.active::after {
    transform: scaleX(1);
}

/* ─── Accesibilidad: reducir movimiento ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
    .observe-me {
        opacity: 1;
        transform: none;
    }
}

/* ─── Campo hint en admin ─────────────────────────────────────────────────── */
.field-hint {
    font-size: 1.3rem;
    color: var(--muted);
    margin: .2rem 0 .6rem;
    line-height: 1.4;
}

/* ─── Categorías: tarjetas y subcategorías ───────────────────────────────── */
.cat-card {
    background: #fff;
    border: 1px solid #d1d9e0;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    margin-bottom: 1.6rem;
    overflow: hidden;
    box-shadow: 0 1px 5px rgba(0,0,0,.05);
    transition: box-shadow .2s;
}
.cat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.09); }

.cat-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.6rem;
    background: #f4f7fa;
    border-bottom: 1px solid #e2e8f0;
    gap: 1.2rem;
}
.cat-card-info { display: flex; align-items: center; gap: .9rem; flex: 1; min-width: 0; }
.cat-card-name { font-size: 1.55rem; font-weight: 700; color: var(--text); }
.cat-sub-count {
    font-size: 1.15rem;
    font-weight: 500;
    color: #5b6f83;
    background: #dde3eb;
    padding: .2rem .75rem;
    border-radius: 20px;
    white-space: nowrap;
}
.cat-card-actions { display: flex; gap: .5rem; flex-shrink: 0; }
/* Botones de categoría: compactos */
.cat-card-actions .btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid rgba(0,97,172,.35);
    padding: .45rem 1rem;
    font-size: 1.25rem;
}
.cat-card-actions .btn-secondary:hover { background: rgba(0,97,172,.07); border-color: var(--primary); }
.cat-card-actions .btn-danger { padding: .45rem 1rem; font-size: 1.25rem; }

.cat-edit-form {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: 1rem 1.6rem;
    background: #fffbeb;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
}
.cat-edit-form input {
    flex: 1;
    min-width: 16rem;
    padding: .65rem 1rem;
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 1.4rem;
    color: var(--text);
    background: #fff;
}

/* Lista de subcategorías — indentada dentro de la tarjeta */
.sub-list { padding: 0 1.6rem 0 2.8rem; }
.sub-item { border-bottom: 1px solid #f0f4f8; }
.sub-item:last-child { border-bottom: none; }
.sub-empty { font-size: 1.3rem; padding: .9rem 0; color: var(--muted); font-style: italic; }

.sub-item-view {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .65rem 0;
    gap: 1rem;
}
.sub-name {
    font-size: 1.35rem;
    color: #374151;
    font-weight: 500;
}
.sub-name::before {
    content: '·';
    color: var(--primary);
    font-size: 2rem;
    line-height: 0;
    vertical-align: middle;
    margin-right: .55rem;
}
.sub-actions { display: flex; gap: .4rem; flex-shrink: 0; }
/* Botones de subcategoría: muy pequeños, estilo ghost */
.sub-actions .btn-secondary {
    background: transparent;
    color: #64748b;
    border: 1px solid #cbd5e1;
    padding: .28rem .75rem;
    font-size: 1.15rem;
    border-radius: 5px;
}
.sub-actions .btn-secondary:hover { color: var(--primary); border-color: rgba(0,97,172,.5); background: rgba(0,97,172,.04); }
.sub-actions .btn-danger {
    background: transparent;
    color: #ef4444;
    border: 1px solid #fca5a5;
    padding: .28rem .75rem;
    font-size: 1.15rem;
    border-radius: 5px;
}
.sub-actions .btn-danger:hover { background: #fef2f2; }

.sub-item-edit {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .4rem 0 .7rem;
    flex-wrap: wrap;
}
.sub-item-edit input {
    flex: 1;
    min-width: 14rem;
    padding: .55rem .9rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 1.3rem;
    color: var(--text);
    background: #fff;
}

/* Agregar subcategoría — dentro de la tarjeta */
.sub-add-wrap {
    padding: .8rem 1.6rem 1rem;
    border-top: 1px dashed #d1d9e0;
    background: #f9fbfc;
}
.admin-page .sub-add-wrap .btn-outline {
    color: var(--primary);
    border-color: rgba(0,97,172,.4);
    border-style: dashed;
    font-size: 1.25rem;
    padding: .45rem 1.1rem;
}
.admin-page .sub-add-wrap .btn-outline:hover { border-style: solid; background: rgba(0,97,172,.05); }
.sub-add-form {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-top: .7rem;
    flex-wrap: wrap;
}
.sub-add-form input {
    flex: 1;
    min-width: 14rem;
    padding: .6rem 1rem;
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 1.35rem;
    color: var(--text);
    background: #fff;
}

/* Panel "Nueva categoría" */
.cat-add-panel {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    background: #f0f9ff;
    border: 1px dashed #93c5fd;
    border-radius: var(--radius);
    padding: 1.6rem 2rem;
    margin-bottom: 2rem;
}
.cat-add-panel .field-group {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    flex: 1;
    min-width: 18rem;
}
.cat-add-panel label {
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
}
.cat-add-panel input {
    padding: .8rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1.4rem;
    color: var(--text);
    background: #fff;
}

/* Dark mode — categorías */
[data-theme="dark"] .cat-card            { background: var(--card); border-color: #1e3a5f; border-left-color: var(--primary); }
[data-theme="dark"] .cat-card-head       { background: #0a1422; border-bottom-color: var(--line); }
[data-theme="dark"] .cat-card-name       { color: var(--text); }
[data-theme="dark"] .cat-sub-count       { background: #162b44; color: #8fa8c0; }
[data-theme="dark"] .cat-card-actions .btn-secondary { color: var(--accent); border-color: rgba(137,209,237,.3); }
[data-theme="dark"] .cat-card-actions .btn-secondary:hover { background: rgba(137,209,237,.08); }
[data-theme="dark"] .cat-edit-form       { background: #0d1c2e; border-bottom-color: var(--line); }
[data-theme="dark"] .sub-item            { border-bottom-color: #1a2e45; }
[data-theme="dark"] .sub-name            { color: #c9d8e8; }
[data-theme="dark"] .sub-actions .btn-secondary { color: #8fa8c0; border-color: #2a4060; }
[data-theme="dark"] .sub-actions .btn-secondary:hover { color: var(--accent); }
[data-theme="dark"] .sub-actions .btn-danger { border-color: #7f1d1d; color: #f87171; }
[data-theme="dark"] .sub-actions .btn-danger:hover { background: #2d0a0a; }
[data-theme="dark"] .sub-add-wrap        { background: #0a1828; border-top-color: #1e3a5f; }
[data-theme="dark"] .cat-add-panel       { background: #0d1c2e; border-color: #1e4a7a; }
[data-theme="dark"] .cat-add-panel input,
[data-theme="dark"] .cat-edit-form input,
[data-theme="dark"] .sub-item-edit input,
[data-theme="dark"] .sub-add-form input  { background: #0a1422; border-color: var(--line); color: var(--text); }