/* ============================================================
   Valhalla Peptides — Mega Menu CSS (CC#2)
   Tokens: bg #0A0A0A | gold #D4AF37 | text #F5F5F5
   Targets: .vp-nav (top nav), .vp-mega* (custom mega panel)
   ============================================================ */

/* All top-level nav links + mega panel links: same neutral white */
.vp-nav .vp-nav-link,
.vp-mega-wrap .vp-mega-link,
.vp-mega a,
.vp-mega-all a,
.vp-mega-item a,
.vp-mega-item .vp-mega-title {
    color: #F5F5F5 !important;
    transition: color 0.3s ease;
    text-decoration: none;
}

/* Hover: gold across the board */
.vp-nav .vp-nav-link:hover,
.vp-nav .vp-nav-link:focus-visible,
.vp-mega-wrap .vp-mega-link:hover,
.vp-mega-wrap .vp-mega-link:focus-visible,
.vp-mega a:hover,
.vp-mega a:focus-visible,
.vp-mega-all a:hover,
.vp-mega-all a:focus-visible,
.vp-mega-item a:hover .vp-mega-title,
.vp-mega-item a:focus-visible .vp-mega-title {
    color: #D4AF37 !important;
}

/* Mega panel "Výskum" eyebrow on each category card */
.vp-mega-item .vp-mega-overtitle {
    color: #D4AF37 !important;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem !important;
    font-weight: 500;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
    display: block;
    margin-bottom: 0.25rem;
}

/* "Všetky peptidy" header link inside the mega panel — slightly accented */
.vp-mega-all a {
    font-family: 'Fraunces', serif;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}

.vp-mega-all a:hover {
    color: #D4AF37 !important;
}

/* Mega panel category card icon picks up gold on hover via parent <a> */
.vp-mega-item a:hover .vp-mega-icon,
.vp-mega-item a:focus-visible .vp-mega-icon {
    color: #D4AF37;
}

.vp-mega-item .vp-mega-icon {
    color: #C9A055;
    transition: color 0.3s ease;
}

/* Chevron toggle button colors */
.vp-mega-wrap .vp-mega-toggle {
    color: #F5F5F5;
    transition: color 0.3s ease, transform 0.3s ease;
}

.vp-mega-wrap .vp-mega-toggle:hover,
.vp-mega-wrap.open .vp-mega-toggle {
    color: #D4AF37;
}

.vp-mega-wrap.open .vp-mega-toggle svg {
    transform: rotate(180deg);
}

/* ============================================================
   Desktop nav layout fix (CC#2 Block C — launch blocker)
   Was: nav items rendered on top of each other (no flex layout).
   Fix: enforce horizontal flex row with nowrap + gap from 769px up.
   Mobile (≤768px) hides .vp-nav entirely via header.css.
   ============================================================ */

@media (min-width: 769px) {
    .vp-nav {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        gap: 1.25rem;
        width: 100%;
    }

    .vp-nav .vp-nav-link {
        white-space: nowrap;
        font-family: 'Inter', sans-serif;
        font-weight: 500;
    }

    /* Mega-wrap is the container for "Kúpiť peptidy" + chevron + dropdown.
       Keep it positioned so the .vp-mega panel can anchor under it. */
    .vp-mega-wrap {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
    }

    /* Mega dropdown panel: position absolutely under the wrap, full width */
    .vp-mega-wrap .vp-mega {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        min-width: min(960px, 92vw);
        background: #0A0A0A;
        border: 1px solid rgba(212, 175, 55, 0.18);
        border-radius: 4px;
        padding: 1.5rem;
        z-index: 950;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .vp-mega-wrap.open .vp-mega {
        opacity: 1;
        visibility: visible;
    }

    .vp-mega-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 0.5rem 1rem;
        margin-top: 0.75rem;
    }
}

@media (min-width: 1025px) {
    .vp-nav {
        gap: 1.5rem;
    }
}
