:root {
    --tc-primary:  #0d6efd;
    --tc-dark:     #212529;
    --tc-bg:       #e7e7e7;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    background-color: var(--tc-bg);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ── Logo en navbar ─────────────────────────────────────────── */
.navbar-logo {
    height: 24px;
    max-height: 24px;
    width: auto;
    object-fit: contain;
}

/* ── Dropdown de 3 niveles (Marca → Línea → Sublínea) ────────────────────── */
.dropdown-submenu {
    position: relative;
}

/* Fila de línea: enlace + botón toggle móvil */
.nav-linea-row {
    display: flex;
    align-items: stretch;
}
.nav-linea-row > .nav-linea-link {
    flex: 1;
    min-width: 0;
    padding-right: 0.25rem !important;
}

/* Botón toggle (solo visible en móvil) */
.nav-sub-toggle {
    display: none;
    padding: 0.35rem 0.6rem;
    background: none;
    border: none;
    border-left: 1px solid rgba(255,255,255,.1);
    color: rgba(255,255,255,.55);
    cursor: pointer;
    line-height: 1;
    border-radius: 0 4px 4px 0;
    flex-shrink: 0;
}
.nav-sub-toggle:hover { color: #fff; background: rgba(255,255,255,.08); }

/* Desktop: submenú hacia la derecha, abre solo con hover */
@media (min-width: 992px) {
    .dropdown-submenu > .dropdown-menu {
        top: 0;
        left: 100%;
        margin-top: -1px;
        display: none;
    }
    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
    }
    /* Flecha derecha en el link de la línea */
    .nav-linea-link::after {
        content: "";
        display: inline-block;
        float: right;
        margin-top: 5px;
        border-top: .3em solid transparent;
        border-bottom: .3em solid transparent;
        border-left: .3em solid currentColor;
        border-right: none;
    }
}

/* Móvil: submenú hacia abajo, abre con botón toggle */
@media (max-width: 991.98px) {
    .nav-sub-toggle { display: flex; align-items: center; }
    .dropdown-submenu > .dropdown-menu {
        position: static !important;
        left: 0;
        display: none;
        padding-left: 0.75rem;
        border: none;
        border-left: 2px solid rgba(255,255,255,.15);
        box-shadow: none;
        border-radius: 0;
        margin: 0 0 0 0.75rem;
    }
    .dropdown-submenu.open > .dropdown-menu { display: block; }
}

/* ── Estado activo en navbar ─────────────────────────────────────────────── */
.navbar .nav-link.nav-active {
    color: #ffc107 !important;
    font-weight: 600;
}
.dropdown-item.nav-active {
    color: #ffc107 !important;
    font-weight: 600;
    background: rgba(255, 193, 7, 0.08);
}
/* ── Estado activo en navbar ─────────────────────────────────────────────── */

.swatch-orange {
    background-color: #fd7e14 !important;
    color: #fff !important;
}
.swatch-intel {
    background-color: #0071c5 !important;
    color: #fff !important;
}
.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(100%);
}

/* ── Product cards ─────────────────────────────────────────────── */
.producto-card {
    transition: box-shadow 0.15s, transform 0.15s;
}
.producto-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.12) !important;
    transform: translateY(-2px);
}

.producto-foto-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    cursor: pointer;
    background: #f5f5f5;
}
.producto-foto {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}
.producto-foto-wrap:hover .producto-foto {
    transform: scale(1.06);
}

.foto-count-badge {
    position: absolute;
    bottom: 6px;
    right: 8px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 10px;
    backdrop-filter: blur(2px);
}

.producto-nombre {
    font-size: 1.0rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}