/* ═══════════════════════════════════════════════════════════════
   VL HEADER · Vitalliance Pharma
   ═══════════════════════════════════════════════════════════════ */

.vl-header {
    width: 100%;
    background: #fff;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    color: #1a2238;
    box-shadow: 0 2px 20px rgba(60, 74, 112, 0.06);
    position: relative;
    z-index: 100;
}

.vl-header.is-sticky {
    position: sticky;
    top: 0;
    z-index: 999;
}

/* ─── Barra superior ─── */
.vl-header-topbar {
    background: #3c4a70;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 9px 0;
    text-align: center;
}

.vl-header-topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 22px;
}

/* ─── Header principal ─── */
.vl-header-main {
    border-bottom: 1px solid #e8eaef;
}

.vl-header-main-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    gap: 24px;
}

/* ─── Logo ─── */
.vl-header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.vl-header-logo img {
    display: block;
    width: auto;
    max-height: 70px;
}

.vl-header-logo-text {
    font-size: 24px;
    font-weight: 800;
    color: #3c4a70;
    letter-spacing: -0.8px;
}

/* ─── Buscador ─── */
.vl-header-search {
    flex: 1;
    max-width: 480px;
    position: relative;
    display: flex;
    align-items: center;
    background: #f7f8fa;
    border: 1px solid transparent;
    border-radius: 28px;
    padding: 0 20px;
    transition: all 0.3s;
}

.vl-header-search:focus-within {
    background: #fff;
    border-color: #75c4b1;
    box-shadow: 0 0 0 3px rgba(117, 196, 177, 0.15);
}

.vl-header-search-icon {
    color: #6b7280;
    flex-shrink: 0;
    margin-right: 10px;
}

.vl-header-search input[type="search"] {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 13px 0;
    font-size: 14px;
    font-family: inherit;
    color: #1a2238;
}

.vl-header-search input[type="search"]::placeholder {
    color: #9aa3ac;
}

/* ─── Acciones (teléfono + carrito) ─── */
.vl-header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    flex-shrink: 0;
}

.vl-header-tel {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #3c4a70;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
}

.vl-header-tel:hover {
    color: #75c4b1;
}

.vl-header-tel svg {
    color: #75c4b1;
}

.vl-header-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f7f8fa;
    color: #3c4a70;
    text-decoration: none;
    transition: all 0.3s;
}

.vl-header-cart:hover {
    background: #75c4b1;
    color: #fff;
    transform: translateY(-2px);
}

.vl-header-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: #75c4b1;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #fff;
}

/* ─── Navegación ─── */
.vl-header-nav {
    background: #fff;
    border-bottom: 1px solid #e8eaef;
}

.vl-header-nav-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 22px;
}

.vl-header-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.vl-header-menu li {
    margin: 0;
    padding: 0;
    position: relative;
}

.vl-header-menu li a {
    display: block;
    padding: 16px 0;
    color: #1a2238;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
}

.vl-header-menu li a::after {
    content: "";
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 0;
    height: 2.5px;
    border-radius: 3px;
    background: #75c4b1;
    transition: width 0.3s;
}

.vl-header-menu li a:hover {
    color: #3c4a70;
}

.vl-header-menu li a:hover::after,
.vl-header-menu li.current-menu-item a::after {
    width: 100%;
}

/* Submenús */
.vl-header-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid #e8eaef;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(60, 74, 112, 0.12);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s;
    z-index: 10;
    list-style: none;
    margin: 0;
}

.vl-header-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.vl-header-menu .sub-menu li a {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
}

.vl-header-menu .sub-menu li a::after {
    display: none;
}

.vl-header-menu .sub-menu li a:hover {
    background: #f7f8fa;
    color: #75c4b1;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .vl-header-main-inner {
        flex-wrap: wrap;
        gap: 14px;
        padding: 12px 16px;
    }
    .vl-header-search {
        order: 3;
        flex-basis: 100%;
        max-width: 100%;
    }
    .vl-header-menu {
        gap: 20px;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .vl-header-menu::-webkit-scrollbar { height: 0; }
    .vl-header-menu li a {
        padding: 14px 0;
        white-space: nowrap;
        font-size: 13px;
    }
}

@media (max-width: 600px) {
    .vl-header-topbar {
        font-size: 11px;
        padding: 7px 0;
    }
    .vl-header-logo img { max-height: 40px; }
    .vl-header-logo-text { font-size: 18px; }
    .vl-header-tel span { display: none; }
    .vl-header-tel { padding: 8px; }
    .vl-header-actions { gap: 12px; }
    .vl-header-cart { width: 38px; height: 38px; }
}

/* ─── Neutralizar estilos del tema ─── */
.vl-header button,
.vl-header a,
.vl-header input {
    font-family: inherit !important;
}
.vl-header ul,
.vl-header li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}
.vl-header a { text-decoration: none !important; }