@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600&display=swap");

:root {
    --bg: #0a0a0a;
    --bg-2: #101010;
    --panel: #111111;
    --panel-2: #171717;
    --line: rgba(255, 255, 255, 0.08);
    --text: #f5f5f5;
    --muted: #a8a8a8;
    --accent: #ffffff;
    --danger: #ff6b6b;
    --ok: #95d5b2;
    --whatsapp-bg: linear-gradient(180deg, rgba(130, 36, 36, 0.5), rgba(84, 20, 20, 0.5));
    --whatsapp-color: #fff;
    --btn-text: #111111;
    --max: 1280px;
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
    color: var(--text);
    min-height: 100vh;
    transition: background-color .22s ease, color .18s ease, background .22s ease;
    --glass-border: rgba(11, 18, 32, 0.12);
    --glass-border-strong: rgba(11, 18, 32, 0.18);
    --glass-shadow: 0 18px 40px rgba(11, 18, 32, 0.06);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(var(--max), 94vw);
    margin: 0 auto;
}

.topbar {
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
}

.topbar-inner {
    padding-inline: 1%;
    margin-inline: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    overflow: hidden; /* clip content during height transition */
}

.topbar-inner .search {
    justify-self: start;
}

.topbar-inner .top-actions {
    justify-self: end;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
    font-size: clamp(0.92rem, 1.1vw, 1.1rem);
    font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
}

.brand-center {
    justify-self: center;
}

.brand-logo-image {
    width: auto;
    display: block;
    object-fit: contain;
}

html[data-theme="light"] .brand-logo-image {
    filter: invert(1);
}

.search {
    display: flex;
    align-items: center;
    background: var(--panel);
    border-radius: 999px;
    border: 1px solid var(--line);
    overflow: hidden;
    max-width: 420px;
    width: 100%;
}

.search input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    padding: 0.65rem 0.9rem;
    color: var(--text);
    min-width: 220px;
}

.search input::placeholder {
    color: rgba(242, 242, 242, 0.55);
}

.search button {
    border: 0;
    background: transparent;
    color: var(--text);
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: grid;
    place-items: center;
    margin-right: 2px;
}

.search button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.top-actions {
    display: flex;
    gap: 1vw;
    align-items: center;
    justify-content: flex-end;
    color: var(--muted);
    font-size: 0.92rem;
    flex-wrap: wrap;
}

.top-actions a:hover,
.nav-links a:hover {
    color: var(--text);
}

.btn,
.btn-outline,
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover,
.btn-outline:hover,
.btn-danger:hover {
    transform: translateY(-1px);
}

.btn {
    background: var(--accent);
    color: var(--btn-text);
}

#theme-toggle {
    transition: transform .28s ease, background .18s ease, color .18s ease;
}

html[data-theme="light"] #theme-toggle {
    transform: rotate(18deg) scale(1.02);
}

.btn-outline {
    background: transparent;
    color: var(--text);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border-color: rgba(255, 107, 107, 0.4);
}

.nav-wrap {
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.01);
}

.nav-links {
    min-height: 6.8vh;
    display: flex;
    gap: 1.4vw;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-links a {
    color: #d4d4d4;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.78rem;
    white-space: nowrap;
    padding: 0;
    border: 0;
    border-radius: 0;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #fff;
}

main {
    padding: 3vh 0 5vh;
}

.hero {
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 5vh 4vw;
    background: radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.05), transparent 20%),
        linear-gradient(145deg, var(--panel), var(--panel-2));
    overflow: hidden;
    position: relative;
}

.hero h1 {
    margin: 0 0 1vh;
    letter-spacing: -0.03em;
    font-size: clamp(1.9rem, 3.8vw, 3.5rem);
    max-width: 60vw;
}

.hero p {
    margin: 0 0 2vh;
    color: var(--muted);
    max-width: 58vw;
    line-height: 1.7;
}

/* Force readable text color for key hero/search/category elements */
.hero h1,
.hero p,
.hero .eyebrow,
.hero .hero-actions,
.search input,
.search button,
.category-strip p,
.category-links a,
.quick-link strong,
.quick-link span {
    color: var(--text);
}

.category-links a {
    background: linear-gradient(150deg, rgba(152, 205, 236, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--line);
    color: var(--text);
}

.quick-link span {
    color: var(--muted);
}

.hero-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.cards {
    margin-top: 2.5vh;
    display: grid;
    gap: 1rem;
}

.cards.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.cards.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.card {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015) 45%, rgba(255, 255, 255, 0.008)),
        linear-gradient(180deg, rgba(16, 16, 16, 0.92), rgba(10, 10, 10, 0.94));
    backdrop-filter: blur(6px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 26px rgba(0, 0, 0, 0.34);
    overflow: hidden;
    height: 100%;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.1), transparent 34%);
    opacity: 0.42;
    pointer-events: none;
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.card-link:hover {
    transform: translateY(-3px);
    border-color: rgba(205, 228, 244, 0.34);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.48);
}

.card-footer {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: .75rem;
    flex-wrap: wrap;
}

.badge-out {
    background: #5c1a1a;
    color: #e57373;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .75rem;
    font-weight: 600;
}

/* Light theme: make 'Sin stock' badge lighter red with white text for readability */
html[data-theme="light"] .badge-out {
    background: linear-gradient(180deg, #000000, #000000);
    color: #ffffff !important;
    border: 1px solid var(--glass-border-strong);
}

.card-image {
    min-height: 24vh;
    background:
        radial-gradient(circle at 26% 10%, rgba(186, 221, 244, 0.14), transparent 34%),
        radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.1), transparent 24%),
        linear-gradient(180deg, var(--panel), var(--panel-2));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-image .card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.card-image .badge {
    position: absolute;
    top: .55rem;
    left: .55rem;
    z-index: 2;
}

.card-body {
    padding: 1rem;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.card h3,
.card h4 {
    margin: 0 0 0.5rem;
}

.card-body p {
    margin: 0;
}

.muted {
    color: var(--muted);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-top: 2vh;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(1.4rem, 2.2vw, 2.1rem);
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    padding: 1.2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1rem;
}

/* Catalog layout: sidebar filters on the left, products on the right */
.catalog-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1rem;
    align-items: start;
}

.sidebar-filters {
    position: relative;
    padding: 0.8rem;
}

/* Desktop: sidebar stays in the normal flow (no fixed/sticky) */
@media (min-width: 780px) {
    .sidebar-filters {
        position: static;
        top: auto;
        left: auto;
        width: auto;
        align-self: start;
        max-height: none;
        overflow: visible;
        -webkit-overflow-scrolling: auto;
        z-index: auto;
    }

    .products-section {
        margin-left: 0;
    }
}

/* Make filters stack vertically and visually distinct */
.sidebar-filters .form-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

.sidebar-filters {
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.sidebar-filters .btn,
.sidebar-filters .btn-outline {
    width: 100%;
    display: block;
}

/* Separate visual style for the products area */
.catalog-grid {
    gap: 1.5rem;
}

/* Products layout: larger cards and 3 per row on desktop */
.products-section .cards.cols-4 {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.6rem;
}

.products-section .card {
    border-radius: 12px;
}

.products-section .card-image {
    min-height: 32vh;
}

.products-section .card-body {
    padding: 1.25rem;
    min-height: 260px;
}

/* Responsive adjustments for products grid */
@media (max-width: 1080px) {
    .products-section .cards.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 780px) {
    .products-section .cards.cols-4 {
        grid-template-columns: 1fr;
    }

    .products-section .card-image {
        min-height: 26vh;
    }

    .products-section .card-body {
        min-height: auto;
    }
}

/* Global pagination styles (desktop + baseline) */
.pagination {
    margin-top: 1.2rem;
    border-radius: 12px;
    padding: 0.6rem 0.9rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    z-index: 6;
}

.pagination-inner {
    display: grid;
    grid-template-columns: auto auto auto;
    justify-content: center;
    column-gap: 1rem;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
}

.pagination-btn {
    padding: 0.4rem 0.8rem;
    position: relative;
    z-index: 7;
    cursor: pointer;
    pointer-events: auto;
}

.page-numbers {
    justify-self: center;
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.page-num {
    min-width: 36px;
    height: 36px;
    padding: 0 0.6rem;
    border-radius: 8px;
    position: relative;
    z-index: 7;
    cursor: pointer;
    pointer-events: auto;
}

.page-num.active {
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.right-controls {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.page-jump input {
    width: 56px;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--text);
}

.page-jump .btn {
    padding: 0.45rem 0.7rem;
}

.ellipsis {
    color: var(--muted);
    padding: 0 6px;
}

.sr-only {
    position: absolute;
    left: -9999px;
}

/* Make prev/next prominent */
.pagination-btn.primary {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.pagination-btn.primary:hover {
    transform: translateY(-2px);
}

.page-num {
    background: transparent;
}

.page-num.active {
    background: rgba(255, 255, 255, 0.08);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* --- Replaced pagination styles (user provided) --- */
.pagination {
    margin-top: 20px;
    padding: 10px 14px;
    border-radius: 14px;
    backdrop-filter: blur(6px);
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--line);
}

.pagination-inner {
    display: grid;
    grid-template-columns: auto auto auto;
    justify-content: center;
    column-gap: 0.9rem;
    align-items: center;
    gap: 5vw;
    width: 100%;
}

/* BOTONES ANTERIOR / SIGUIENTE */
.pagination-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.12s ease;
    cursor: pointer;
    color: var(--text);
}

.pagination-btn:hover {
    background: rgba(255, 255, 255, 0.02);
    transform: translateY(-2px);
}

/* align prev/next and center numbers */
.pagination-inner>.pagination-btn:first-child {
    justify-self: start;
}

.pagination-inner>.page-numbers {
    justify-self: center;
}

.pagination-inner>.pagination-btn:last-child {
    justify-self: end;
}

/* NUMEROS */
.page-numbers {
    display: flex;
    gap: 8px;
}

.page-num {
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text);
    transition: all 0.12s ease;
}

.page-num:hover {
    border-color: rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.01);
    transform: translateY(-2px);
}

/* ACTIVO */
.page-num.active {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    color: var(--text);
    font-weight: 700;
    border-color: rgba(255, 255, 255, 0.06);
}

/* DESHABILITADO */
.pagination-btn.disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* ELLIPSIS */
.ellipsis {
    display: flex;
    align-items: center;
    padding: 0 6px;
    opacity: 0.5;
}

/* 📱 MOBILE */
@media (max-width: 600px) {
    .page-num {
        min-width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .pagination-btn {
        width: 34px;
        height: 34px;
    }
}

/* end user pagination styles */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}

label {
    display: block;
    margin-bottom: 0.35rem;
    color: #d4d4d4;
    font-size: 0.9rem;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-2);
    color: var(--text);
    padding: 0.78rem 0.85rem;
}

/* Ensure checkboxes and radios are not styled like text inputs and align with label text */
input[type="checkbox"],
input[type="radio"] {
    width: auto;
    padding: 0;
    height: auto;
    margin: 0 0.6rem 0 0;
    vertical-align: middle;
    display: inline-block;
}

/* When a label wraps a checkbox/radio, keep the control and text centered */
label > input[type="checkbox"],
label > input[type="radio"] {
    margin-right: 0.6rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 0.7rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.94rem;
}

.badge {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.74rem;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge.proceso {
    color: #ffe29a;
    border-color: rgba(255, 226, 154, 0.35);
}

.badge.realizado {
    color: #a8f0c4;
    border-color: rgba(168, 240, 196, 0.35);
}

.badge.pendiente {
    color: #b3d4ff;
    border-color: rgba(100, 180, 255, 0.35);
}

.badge.cancelado {
    color: #ffb3b3;
    border-color: rgba(255, 100, 100, 0.35);
}

.badge.revision {
    color: #ffc8a0;
    border-color: rgba(255, 160, 80, 0.35);
}

.flash {
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.7rem;
    border: 1px solid var(--line);
}

.flash.error {
    color: #ffd4d4;
    border-color: rgba(255, 107, 107, 0.3);
}

.flash.success {
    color: #ccf8e2;
    border-color: rgba(149, 213, 178, 0.35);
}

.footer {
    border-top: 1px solid var(--line);
    margin-top: 5vh;
    justify-content: space-between;
    gap: .75rem;
    margin-top: auto;
    padding-top: .45rem;
}

.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 64px;
    height: 64px;
    padding: 0.28rem;
    border-radius: 999px;
    font-size: 0;
    /* icon only */
    display: grid;
    place-items: center;
    z-index: 60;
    background: #ffffff;
    /* default (dark theme): white background */
    color: #000000;
    /* default icon color: black */
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
    transition: transform .16s ease, box-shadow .16s ease, opacity .12s ease, background .12s ease, color .12s ease;
}

.whatsapp-float:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}

.whatsapp-float img.whatsapp-icon {
    width: 30px;
    height: 30px;
    display: block;
    object-fit: contain;
    filter: brightness(0) saturate(100%) contrast(100%);
    /* default: make icon black */
}

.reveal {
    opacity: 0;
    transform: translateY(16px);
    animation: reveal 0.45s ease forwards;
}

.reveal.d2 {
    animation-delay: 0.12s;
}

.reveal.d3 {
    animation-delay: 0.2s;
}

@keyframes reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1080px) {
    .cards.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .cards.cols-3,
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .search {
        max-width: 100%;
    }
}

@media (max-width: 780px) {
    .topbar-inner {
        justify-content: space-between;
        min-height: 8vh;
    }

    .top-actions .desktop-only {
        display: none;
    }

    .brand-logo-image {
        height: 34px;
    }

    .search {
        max-width: 46px;
        border-radius: 999px;
    }

    .search input {
        display: none;
    }

    .hero h1,
    .hero p {
        max-width: 100%;
    }

    .cards.cols-4,
    .cards.cols-3,
    .grid-3,
    .form-grid,
    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        min-height: 6vh;
    }
}

/* Home minimal + liquid glass */
.home-shell {
    display: grid;
    gap: 2.5rem;
}

.home-shell>.section-head+.cards {
    margin-top: calc(-2.5rem + 0.6rem);
}

.home-glass {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)), #0d1016;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

.home-hero-min {
    position: relative;
    overflow: hidden;
    padding: clamp(1.2rem, 3.2vw, 2rem);
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1rem;
}

.home-hero-min::before {
    content: "";
    position: absolute;
    inset: auto -80px -100px auto;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(150, 209, 235, 0.32), transparent 72%);
    pointer-events: none;
}

.hero-copy {
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #c7def0;
    font-size: 0.72rem;
    font-weight: 600;
}

.home-hero-min h1 {
    margin: 0;
    font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
    line-height: 1.02;
    letter-spacing: -0.035em;
    font-size: clamp(2rem, 4.6vw, 3.8rem);
}

.home-hero-min p {
    margin: 0.8rem 0 0;
    color: #cad6e3;
    line-height: 1.65;
    max-width: 62ch;
}

.home-hero-min .hero-actions {
    margin-top: 1.15rem;
    gap: 0.65rem;
}

.hero-search {
    align-self: end;
    border: 1px solid rgba(182, 220, 241, 0.22);
    border-radius: 18px;
    padding: 1rem;
    background: linear-gradient(160deg, rgba(193, 225, 247, 0.2), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(14px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.hero-search label {
    margin: 0 0 0.5rem;
    color: #e9f3ff;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
}

.hero-search-row input {
    border-radius: 12px;
    background: rgba(2, 4, 8, 0.45);
}

.hero-search-row button {
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(181, 222, 247, 0.55), rgba(97, 150, 193, 0.45));
    color: #f6fbff;
    padding: 0 1rem;
    font-weight: 600;
    cursor: pointer;
}

.quick-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.quick-link {
    padding: 1rem;
    display: grid;
    gap: 0.38rem;
    background: linear-gradient(150deg, rgba(180, 218, 241, 0.16), rgba(255, 255, 255, 0.04));
    backdrop-filter: blur(12px);
    border: 1px solid rgba(180, 218, 241, 0.2);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.quick-link strong {
    font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
    font-size: 1.02rem;
}

.quick-link span {
    color: #c9d7e6;
    font-size: 0.88rem;
    line-height: 1.45;
}

.quick-link:hover {
    transform: translateY(-3px);
    border-color: rgba(175, 213, 239, 0.42);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.4);
}

.category-strip {
    padding: 1.2rem 1.2rem 1.4rem;
    display: grid;
    gap: 1rem;
}

.category-strip p {
    margin: 0;
    color: #d8e7f6;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

.cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    padding: 1.3rem 0.8rem 1.1rem;
    border: 1px solid rgba(176, 213, 236, 0.18);
    border-radius: 18px;
    background: linear-gradient(155deg, rgba(152, 205, 236, 0.1), rgba(255, 255, 255, 0.03));
    backdrop-filter: blur(12px);
    text-align: center;
    color: #e6f3ff;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.cat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(181, 223, 249, 0.42);
    background: linear-gradient(155deg, rgba(152, 205, 236, 0.18), rgba(255, 255, 255, 0.07));
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

.cat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(150deg, rgba(152, 205, 236, 0.28), rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(176, 213, 236, 0.26);
    flex-shrink: 0;
}

.cat-icon svg {
    width: 24px;
    height: 24px;
    stroke: #c7def5;
}

.cat-card strong {
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.promo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.promo-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 1.4rem;
    padding: clamp(1.2rem, 2.8vw, 2rem);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e8f2ff;
    transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.promo-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0.12;
    transition: opacity 0.26s ease;
    pointer-events: none;
}

.promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.22);
}

.promo-card:hover::before {
    opacity: 0.2;
}

.promo-card--cursos {
    background: linear-gradient(140deg, rgba(99, 179, 237, 0.14), rgba(16, 24, 40, 0.9));
}

.promo-card--cursos::before {
    background: radial-gradient(ellipse at top left, rgba(99, 179, 237, 0.6), transparent 65%);
}

.promo-card--software {
    background: linear-gradient(140deg, rgba(154, 117, 234, 0.14), rgba(16, 24, 40, 0.9));
}

.promo-card--software::before {
    background: radial-gradient(ellipse at top left, rgba(154, 117, 234, 0.6), transparent 65%);
}

.promo-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.07);
    position: relative;
    z-index: 1;
}

.promo-card-icon svg {
    width: 26px;
    height: 26px;
    stroke: #cce4ff;
}

.promo-card--software .promo-card-icon svg {
    stroke: #d8c5ff;
}

.promo-card-body {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.4rem;
}

.promo-card-eyebrow {
    margin: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    font-weight: 600;
    color: #90c8f0;
}

.promo-card--software .promo-card-eyebrow {
    color: #c3a8f5;
}

.promo-card-body h3 {
    margin: 0;
    font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.promo-card-body p {
    margin: 0;
    color: #b0c8e0;
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 46ch;
}

.promo-card--software .promo-card-body p {
    color: #c3b8d8;
}

.promo-card-cta {
    display: inline-block;
    margin-top: 0.3rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #a8d8f8;
    letter-spacing: 0.02em;
}

.promo-card--software .promo-card-cta {
    color: #c8aaff;
}

@media (max-width: 700px) {
    .promo-grid {
        grid-template-columns: 1fr;
    }
}

/* Quantity selector (product page) */
.qty-block {
    margin-top: 1.4rem;
    display: grid;
    gap: 0.6rem;
}

.producto-precio {
    margin: 0;
    font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
}

.qty-label {
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.qty-selector-wrap {
    position: relative;
    display: inline-block;
}

.qty-display {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.95rem;
    user-select: none;
    padding: 0.1rem 0;
    color: var(--text);
}

.qty-display strong {
    color: var(--text);
}

.qty-chevron {
    width: 16px;
    height: 16px;
    stroke: var(--muted);
    transition: transform 0.2s ease;
}

.qty-display[aria-expanded="true"] .qty-chevron {
    transform: rotate(180deg);
}

.qty-available {
    color: var(--muted);
    font-size: 0.85rem;
}

.qty-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 180px;
    background: #1a1f2b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.4rem 0;
    margin: 0;
    list-style: none;
    z-index: 100;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.qty-dropdown--open {
    display: block;
}

.qty-option {
    padding: 0.65rem 1.1rem;
    cursor: pointer;
    font-size: 0.92rem;
    border-left: 3px solid transparent;
    transition: background 0.15s ease;
    color: var(--text);
}

.qty-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.qty-option--active {
    border-left-color: var(--accent);
    color: var(--text);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.07);
}

.qty-option--more {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--muted);
    font-size: 0.88rem;
}

.qty-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Botón "Agregar al carrito": fondo blanco y texto oscuro — solo en modo claro */
html[data-theme="light"] .qty-actions .btn {
    background: #ffffff;
    color: #0b1220;
    border: 1px solid var(--glass-border-strong);
    box-shadow: 0 8px 20px rgba(11, 18, 32, 0.06);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

html[data-theme="light"] .qty-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(11, 18, 32, 0.08);
}

.qty-nostock {
    margin: 0;
    color: var(--danger);
    font-weight: 600;
}

.producto-desc {
    margin-top: 1.5rem;
}

.producto-desc h3 {
    margin: 0 0 0.75rem;
    font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.producto-desc p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
    max-width: 80ch;
}

.lottie-wrap {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.lottie-anim {
    width: min(480px, 100%);
    height: min(480px, 100vw);
}

.contact-band {
    margin-top: 0.2rem;
    padding: clamp(1rem, 2.8vw, 1.6rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.contact-band h3 {
    margin: 0;
    font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
    font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.contact-band p {
    margin: 0.45rem 0 0;
    color: #c7d7e7;
}

@media (max-width: 1100px) {
    .home-hero-min {
        grid-template-columns: 1fr;
    }

    .quick-nav {
        grid-template-columns: repeat(2, 1fr);
    }

    .cat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {

    /* Pagination styles */
    .pagination {
        margin-top: 1.2rem;
        border-radius: 12px;
        padding: 0.5rem 0.75rem;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
        border: 1px solid rgba(255, 255, 255, 0.03);
    }

    .pagination-inner {
        display: grid;
        grid-template-columns: auto auto auto;
        justify-content: center;
        column-gap: 0.6rem;
        align-items: center;
        gap: 0.6rem;
        width: 100%;
    }

    .pagination-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        padding: 0.32rem 0.6rem;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.06);
        background: transparent;
        color: var(--text);
        text-decoration: none;
        font-weight: 600;
        font-size: 0.95rem;
    }

    .pagination-btn.disabled {
        opacity: 0.5;
        pointer-events: none;
    }

    .page-numbers {
        display: flex;
        gap: 0.35rem;
        align-items: center;
        justify-self: center;
    }

    .page-jump input {
        vertical-align: middle;
        width: 56px;
        padding: 0.45rem 0.5rem;
        border-radius: 8px;
    }

    .page-jump .btn {
        padding: 0.45rem 0.7rem;
    }

    .sr-only {
        position: absolute;
        left: -9999px;
    }

    .right-controls {
        justify-self: end;
        display: flex;
        align-items: center;
        gap: 0.6rem;
    }

    .page-jump input {
        width: 56px;
        padding: 0.45rem 0.5rem;
        border-radius: 8px;
        border: 1px solid var(--line);
        background: var(--panel-2);
        color: var(--text);
    }

    .page-jump .btn {
        padding: 0.45rem 0.7rem;
    }

    .page-num {
        display: inline-flex;
        min-width: 34px;
        height: 34px;
        padding: 0 0.5rem;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        border: 1px solid transparent;
        color: var(--text);
        text-decoration: none;
        font-size: 0.95rem;
    }

    .page-num:hover {
        border-color: rgba(255, 255, 255, 0.06);
    }

    .page-num.active {
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.08);
        font-weight: 700;
    }

    .ellipsis {
        color: var(--muted);
        padding: 0 6px;
    }

    .page-jump input {
        vertical-align: middle;
        width: 56px;
        padding: 0.45rem 0.5rem;
        border-radius: 8px;
    }

    .page-jump .btn {
        padding: 0.45rem 0.7rem;
    }

    .sr-only {
        position: absolute;
        left: -9999px;
    }

    .quick-nav {
        grid-template-columns: 1fr;
    }

    .contact-band {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-search-row {
        grid-template-columns: 1fr;
    }
}

/* Light theme overrides */
html[data-theme="light"] {
    --bg: #f6f7f9;
    --bg-2: #ffffff;
    --panel: #ffffff;
    --panel-2: #f3f4f6;
    --line: rgba(0, 0, 0, 0.06);
    --text: #0b1220;
    --muted: #6b7280;
    --accent: #2563eb;
    --danger: #ef4444;
    --ok: #16a34a;
    --whatsapp-bg: var(--accent);
    --whatsapp-color: #ffffff;
    --btn-text: #ffffff;
    /* Darker accents for contrast on light theme */
    --glass-border: rgba(11, 18, 32, 0.12);
    --glass-border-strong: rgba(11, 18, 32, 0.22);
    --glass-shadow: 0 22px 48px rgba(11, 18, 32, 0.08);
}

/* Light theme component overrides for readability */
html[data-theme="light"] .search {
    background: var(--panel-2);
    border: 2px solid var(--glass-border-strong);
    box-shadow: none;
}

html[data-theme="light"] .search input {
    color: var(--text);
    background: transparent;
    border: 0;
    box-shadow: none;
    outline: none;
}

html[data-theme="light"] .search input:focus {
    outline: none;
    border: 0;
    box-shadow: none;
}

html[data-theme="light"] .search button {
    box-shadow: none;
}

html[data-theme="light"] .search input::placeholder {
    color: rgba(11, 18, 32, 0.45);
}

html[data-theme="light"] .search button {
    color: var(--text);
}

html[data-theme="light"] .card {
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--glass-border);
    color: var(--text);
    box-shadow: 0 10px 26px rgba(11, 18, 32, 0.04);
}

html[data-theme="light"] .card::before {
    background: linear-gradient(120deg, rgba(0, 0, 0, 0.03), transparent 34%);
    opacity: 0.12;
}

html[data-theme="light"] .card h3,
html[data-theme="light"] .card h4,
html[data-theme="light"] .card p {
    color: var(--text);
}

html[data-theme="light"] .btn {
    background: var(--accent);
    color: #fff;
    border-color: transparent;
}

html[data-theme="light"] .btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--glass-border);
}

html[data-theme="light"] .btn-danger {
    background: transparent;
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.12);
}

html[data-theme="light"] .nav-links a,
html[data-theme="light"] .top-actions a,
html[data-theme="light"] .top-actions {
    color: var(--text);
}

html[data-theme="light"] .badge {
    border-color: rgba(0, 0, 0, 0.06);
    color: var(--text);
}

/* Light theme tweaks for qty dropdown (quantity selector) */
html[data-theme="light"] .qty-dropdown {
    background: var(--panel-2);
    border: 1px solid var(--glass-border);
    box-shadow: 0 12px 30px rgba(11, 18, 32, 0.04);
    color: var(--text);
}

html[data-theme="light"] .qty-dropdown .qty-option {
    color: var(--text);
}

html[data-theme="light"] .qty-option:hover {
    background: rgba(11, 18, 32, 0.03);
}

html[data-theme="light"] .qty-option--active {
    background: rgba(11, 18, 32, 0.04);
    border-left-color: var(--accent);
}

html[data-theme="light"] .qty-option--more {
    border-top: 1px solid rgba(11, 18, 32, 0.04);
    color: var(--muted);
}

/* ── Toast / notificaciones flotantes ────────────────── */
#toast-stack {
    position: fixed;
    bottom: 5.75rem;
    right: 1.25rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    max-width: min(360px, 90vw);
}

.toast-item {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    background: var(--panel);
    font-size: 0.9rem;
    line-height: 1.45;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-item.toast-in {
    opacity: 1;
    transform: translateX(0);
}

.toast-item.success {
    color: #ccf8e2;
    border-color: rgba(149, 213, 178, 0.35);
}

.toast-item.error {
    color: #ffd4d4;
    border-color: rgba(255, 107, 107, 0.3);
}

.toast-item.warning {
    color: #ffe29a;
    border-color: rgba(255, 226, 154, 0.35);
}

/* ── Cart item thumbnail ─────────────────────────────── */
.cart-thumb-cell {
    width: 64px;
    padding-right: 0;
}

.cart-item-thumb {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    display: block;
}

.cart-item-thumb-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 1.4rem;
}

/* ── Cart quantity stepper ───────────────────────────── */
.qty-stepper {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.qty-step-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease;
    padding: 0;
    line-height: 1;
}

.qty-step-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
}

.qty-step-val {
    min-width: 28px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.qty-update-btn {
    font-size: 0.88rem;
    padding: 0.22rem 0.55rem;
    border-radius: 6px;
    opacity: 0.6;
    transition: opacity 0.15s ease;
    cursor: pointer;
}

.qty-update-btn:hover {
    opacity: 1;
}

.qty-remove-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.82rem;
}

html[data-theme="light"] .toast-item {
    background: var(--panel);
}


/* ─── Brand Banner ──────────────────────────────────────── */
.brand-banner {
    position: relative;
    width: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 220px;
    padding: 2.5rem 0;
    border-radius: 18px;
}

.topo-deco {
    position: absolute;
    top: 0;
    height: 100%;
    width: 42%;
    max-width: 440px;
    pointer-events: none;
}

.topo-deco--left {
    left: 0;
    display: none;
}

.topo-deco--right {
    right: 0;
    transform: scaleX(-1);
    display: none;
}

.brand-banner-center {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.brand-banner-logo {
    width: clamp(220px, 30vw, 360px);
    height: auto;
}

.brand-banner-tagline {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(0.58rem, 1.1vw, 0.7rem);
    font-weight: 500;
    letter-spacing: 0.38em;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    position: relative;
    top: -5vw;
}

@media (max-width: 600px) {
    .topo-deco {
        width: 55%;
        opacity: 0.6;
    }

    .brand-banner-logo {
        width: 190px;
    }
}

html[data-theme="light"] .pagination {
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border-color: var(--line);
}

/* ─── Hero Carousel ─────────────────────────────────────── */
.hero-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
    line-height: 0;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    display: none;
}

.carousel-slide.active {
    display: block;
}

.carousel-slide img {
    width: 100%;
    height: clamp(220px, 45vw, 540px);
    object-fit: cover;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    font-size: 2.2rem;
    line-height: 1;
    width: 48px;
    height: 64px;
    cursor: pointer;
    border-radius: 4px;
    transition: background .15s;
    z-index: 2;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.72);
}

.carousel-btn--prev {
    left: 12px;
}

.carousel-btn--next {
    right: 12px;
}

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    z-index: 2;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background .2s, border-color .2s;
}

.carousel-dot.active {
    background: #fff;
    border-color: #fff;
}





/* Additional light-theme fixes: ensure readable contrast and smooth transitions */
html[data-theme="light"] body,
html[data-theme="light"] .container,
html[data-theme="light"] .topbar,
html[data-theme="light"] .nav-wrap,
html[data-theme="light"] main,
html[data-theme="light"] .card,
html[data-theme="light"] .search,
html[data-theme="light"] .pagination {
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--line);
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
    color: rgba(11, 18, 32, 0.45);
}

html[data-theme="light"] table th,
html[data-theme="light"] table td {
    border-bottom: 1px solid var(--line);
    color: var(--text);
}

html[data-theme="light"] .card-image {
    background: linear-gradient(180deg, #f8fafc, #f3f4f6);
}

html[data-theme="light"] .hero {
    background: linear-gradient(145deg, #f7f9fb, #f3f4f6);
    border-color: var(--line);
    color: var(--text);
}

html[data-theme="light"] .flash {
    background: var(--panel-2);
    color: var(--text);
    border-color: var(--line);
}

html[data-theme="light"] .flash.error {
    color: #7f1d1d;
    border-color: rgba(239, 68, 68, 0.12);
}

html[data-theme="light"] .flash.success {
    color: #065f46;
    border-color: rgba(16, 185, 129, 0.12);
}

html[data-theme="light"] .whatsapp-float {
    background: #000000;
    /* black background in light theme */
    color: #ffffff;
    /* white icon in light theme */
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.18);
}

html[data-theme="light"] .whatsapp-float img.whatsapp-icon {
    filter: brightness(0) invert(1) saturate(200%);
}

/* Force light variants for home sections that used fixed dark backgrounds */
html[data-theme="light"] .home-glass,
html[data-theme="light"] .home-glass,
html[data-theme="light"] .home-glass.category-strip,
html[data-theme="light"] .home-glass.contact-band {
    /* more translucent glass: preserved sheen, stronger darker border for contrast */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(248, 250, 252, 0.42));
    background-color: rgba(255, 255, 255, 0.22);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(16px) saturate(120%);
    color: var(--text);
    transition: background .22s ease, box-shadow .22s ease, border-color .18s ease, color .18s ease;
}

/* subtle top sheen to emulate liquid glass (reduced opacity) */
html[data-theme="light"] .home-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.01));
    mix-blend-mode: overlay;
    opacity: 0.14;
}

/* stronger dark edge to make glass readable on white backgrounds */
html[data-theme="light"] .home-glass,
html[data-theme="light"] .home-glass.category-strip,
html[data-theme="light"] .home-glass.contact-band {
    box-shadow: var(--glass-shadow), 0 0 0 1px rgba(11, 18, 32, 0.02) inset;
}

html[data-theme="light"] .home-hero-min {
    /* keep hero visibly glassy but not stark white; add stronger border for contrast */
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(244, 246, 248, 0.60));
    border: 1px solid var(--glass-border-strong);
    box-shadow: 0 22px 48px rgba(11, 18, 32, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px) saturate(115%);
}

html[data-theme="light"] .home-hero-min h1 {
    color: var(--text);
}

html[data-theme="light"] .home-hero-min p,
html[data-theme="light"] .home-hero-min .eyebrow {
    color: var(--muted);
}

/* Light theme: promo-card colors — ensure readable pastel variants */
html[data-theme="light"] .promo-card {
    border-color: var(--glass-border);
    color: var(--text);
}

html[data-theme="light"] .promo-card--cursos {
    background: linear-gradient(140deg, rgba(99, 179, 237, 0.12), rgba(255, 255, 255, 0.92));
    border: 1px solid var(--glass-border-strong);
}

html[data-theme="light"] .promo-card--cursos::before {
    background: radial-gradient(ellipse at top left, rgba(99, 179, 237, 0.22), transparent 65%);
    opacity: 0.08;
}

html[data-theme="light"] .promo-card--software {
    background: linear-gradient(140deg, rgba(154, 117, 234, 0.10), rgba(255, 255, 255, 0.92));
    border: 1px solid var(--glass-border-strong);
}

html[data-theme="light"] .promo-card--software::before {
    background: radial-gradient(ellipse at top left, rgba(154, 117, 234, 0.18), transparent 65%);
    opacity: 0.08;
}

html[data-theme="light"] .promo-card-icon {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 248, 249, 0.96));
    border-color: var(--glass-border-strong);
    box-shadow: none;
}

html[data-theme="light"] .promo-card--cursos .promo-card-icon svg {
    stroke: var(--accent);
}

html[data-theme="light"] .promo-card--software .promo-card-icon svg {
    stroke: #7c3aed;
}

html[data-theme="light"] .promo-card-eyebrow {
    color: var(--muted);
}

html[data-theme="light"] .promo-card--cursos .promo-card-eyebrow {
    color: var(--accent);
}

html[data-theme="light"] .promo-card--software .promo-card-eyebrow {
    color: #7c3aed;
}

html[data-theme="light"] .promo-card-body h3 {
    color: var(--text);
}

html[data-theme="light"] .promo-card-body p {
    color: var(--muted);
}

html[data-theme="light"] .promo-card-cta {
    color: var(--accent);
}

html[data-theme="light"] .promo-card--software .promo-card-cta {
    color: #7c3aed;
}

/* Light theme: category card icons contrast fixes */
html[data-theme="light"] .cat-card {
    color: var(--text);
    background: linear-gradient(155deg, rgba(226, 235, 242, 0.95), rgba(245, 247, 249, 0.98));
    border: 1px solid rgba(11, 18, 32, 0.04);
    box-shadow: 0 8px 18px rgba(11, 18, 32, 0.04);
}

html[data-theme="light"] .cat-icon {
    background: linear-gradient(150deg, rgba(152, 205, 236, 0.20), rgba(245, 247, 249, 0.94));
    border-color: rgba(11, 18, 32, 0.06);
    box-shadow: 0 10px 22px rgba(11, 18, 32, 0.06);
}

html[data-theme="light"] .cat-icon svg {
    stroke: rgba(11, 18, 32, 0.6);
    opacity: 1;
}

html[data-theme="light"] .cat-card strong {
    color: var(--text);
}

/* Reveal animation may reveal dark elements — ensure children inherit light colors */
html[data-theme="light"] .reveal,
html[data-theme="light"] .reveal * {
    color: inherit;
}

/* Hero-search specific overrides */
html[data-theme="light"] .hero-search {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(250, 250, 251, 0.78));
    border: 1px solid rgba(11, 18, 32, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 6px 18px rgba(11, 18, 32, 0.04);
}

html[data-theme="light"] .hero-search label,
html[data-theme="light"] .hero-search .page-jump,
html[data-theme="light"] .hero-search input {
    color: var(--text);
}

html[data-theme="light"] .brand {
    color: var(--text);
}

/* Invert bitmap logo colors in light mode so it remains visible */
html[data-theme="light"] .brand-logo-image {
    filter: none;
    transition: transform .22s ease;
}

html[data-theme="light"] .brand-logo-image:hover {
    transform: scale(1.02);
}

html[data-theme="light"] .nav-links a,
html[data-theme="light"] .top-actions a {
    color: var(--text);
}

/* Buttons inside hero and home glass should appear white with soft dark border in light mode */
html[data-theme="light"] .home-glass .btn,
html[data-theme="light"] .home-glass .btn-outline,
html[data-theme="light"] .home-glass .btn-danger,
html[data-theme="light"] .home-glass .contact-band .btn,
html[data-theme="light"] .home-hero-min .hero-actions .btn,
html[data-theme="light"] .home-hero-min .hero-actions .btn-outline {
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--glass-border-strong);
    box-shadow: 0 8px 20px rgba(11, 18, 32, 0.06);
}

html[data-theme="light"] .home-glass .btn:hover,
html[data-theme="light"] .home-hero-min .hero-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(11, 18, 32, 0.08);
}

/* If a button should be outline (white text with dark frame), support that too */
html[data-theme="light"] .home-glass .btn-outline,
html[data-theme="light"] .home-hero-min .hero-actions .btn-outline {
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--glass-border-strong);
}

/* Sidebar filters: make the "Aplicar filtros" button match the white glass style */
html[data-theme="light"] .sidebar-filters .btn,
html[data-theme="light"] .sidebar-filters .btn-outline {
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--glass-border-strong);
    box-shadow: 0 8px 20px rgba(11, 18, 32, 0.06);
}

html[data-theme="light"] .sidebar-filters .btn:hover,
html[data-theme="light"] .sidebar-filters .btn-outline:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(11, 18, 32, 0.08);
}

html[data-theme="light"] .pagination-btn {
    border-color: var(--line);
    color: var(--text);
    background: transparent;
}

html[data-theme="light"] .search button {
    color: var(--text);
}

html[data-theme="light"] .quick-link {
    background: linear-gradient(150deg, rgba(180, 218, 241, 0.06), rgba(255, 255, 255, 0.02));
    border-color: rgba(0, 0, 0, 0.04);
}

/* Ensure initial render matches system preference (prevents flash/mix of themes) */
@media (prefers-color-scheme: light) {
    :root {
        --bg: #f6f7f9;
        --bg-2: #ffffff;
        --panel: #ffffff;
        --panel-2: #f3f4f6;
        --line: rgba(0, 0, 0, 0.06);
        --text: #0b1220;
        --muted: #6b7280;
        --accent: #2563eb;
        --danger: #ef4444;
        --ok: #16a34a;
        --whatsapp-bg: var(--accent);
        --whatsapp-color: #ffffff;
        --btn-text: #ffffff;
    }
}

/* Header shrink on scroll */
.topbar {
    transition: background-color .5s cubic-bezier(.4,0,.2,1), box-shadow .5s cubic-bezier(.4,0,.2,1), border-color .5s cubic-bezier(.4,0,.2,1);
    will-change: background-color, box-shadow;
}

.topbar .topbar-inner {
    transition: height .5s cubic-bezier(.4,0,.2,1);
    height: 14vh;
    min-height: unset;
}

.topbar .brand-logo-image {
    height: 7vh;
    width: auto;
    transition: height .5s cubic-bezier(.4,0,.2,1), transform .5s cubic-bezier(.4,0,.2,1);
    transform-origin: center center;
    will-change: height, transform;
    transform: scale(2.5);
}

.topbar.scrolled {
    background: rgba(0,0,0,0.82);
    border-bottom-color: rgba(255,255,255,0.06);
    box-shadow: 0 8px 20px rgba(0,0,0,0.22);
}

.topbar.scrolled .topbar-inner {
    height: 9vh;
}

.topbar.scrolled .brand-logo-image {
    height: 4.5vh;
    transform: scale(2.25);
}

/* make sure nav transitions smoothly if needed */
.nav-wrap {
    transition: margin-top .28s ease;
}

/* Light theme overrides */
html[data-theme="light"] .topbar.scrolled {
    background: rgba(255,255,255,0.98);
    border-bottom-color: rgba(11,18,32,0.06);
    box-shadow: 0 8px 20px rgba(11,18,32,0.06);
}

@media (max-width: 600px) {
    .topbar .topbar-inner { height: 10vh; }
    .topbar .brand-logo-image { height: 5.5vh; }
    .topbar.scrolled .topbar-inner { height: 7vh; }
    .topbar.scrolled .brand-logo-image { height: 3.5vh; transform: scale(0.85); }
}