/* Nav enhancements - data-driven rewrite (2026-02-17) */

/* Sticky nav */
nav {
    position: sticky;
    top: 0;
    transition: box-shadow 0.3s ease;
}
nav.scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Nav bar background */
#mainmenu {
    background: #fff;
    border-bottom: 1px solid #eee;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Better top-level link styles */
#navmenu > li > a {
    padding: 0px 5px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    border-bottom: 2px solid transparent;
    display: inline-block;
}
#navmenu > li > a:hover {
    background-color: rgba(52, 143, 224, 0.06);
    border-bottom-color: #348fe0;
    text-decoration: none;
}

/* Mega-menu animation — fade only */
.mega-menu {
    display: block !important;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.35s ease, visibility 0.35s;
    pointer-events: none;
}
.mega-menu-parent.is-open .mega-menu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* Dynamic mega-menu positioning (JS-driven) */
@media screen and (min-width: 1025px) {
    /* JS-centered: menu is centered under parent */
    .mega-menu-parent.mega-menu-pos-center .mega-menu {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
    }
    /* JS-left: menu aligns to left edge of parent */
    .mega-menu-parent.mega-menu-pos-left .mega-menu {
        left: 0 !important;
        right: auto !important;
    }
    /* JS-right: menu aligns to right edge of parent */
    .mega-menu-parent.mega-menu-pos-right .mega-menu {
        left: auto !important;
        right: 0 !important;
    }
}

/* Badge pills */
.menu-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 5px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}
.menu-badge-new {
    background: #27ae60;
    color: #fff;
}
.menu-badge-sale {
    background: #e74c3c;
    color: #fff;
}
.menu-badge-seasonal {
    background: #f39c12;
    color: #fff;
}
.menu-badge-hot {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
}

/* Featured product card */
.mega-menu-featured {
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.mega-menu-featured:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}
.mega-menu-featured a {
    display: block;
    text-decoration: none;
    color: inherit;
}
.mega-menu-featured img {
    width: 100%;
    height: auto;
    display: block;
}
.mega-menu-featured-info {
    padding: 12px;
    text-align: center;
}
.mega-menu-featured-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #348fe0;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.mega-menu-featured-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}
.mega-menu-featured-price {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #d3303f;
}
.mega-menu-featured-retail {
    text-decoration: line-through;
    color: #999;
    font-weight: 400;
    font-size: 14px;
    margin-right: 4px;
}

/* Large screens */
@media screen and (min-width: 2560px) {
    #navmenu li a {
        font-size: 1.1em !important;
        padding: 10px 15px !important;
    }
}
