/* Navbar Styles */

/* --- Top Utility Bar --- */
.top-bar {
    background-color: #131921;
    /* Amazon Top Bar Color */
    color: #fff;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar .container-contents {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    /* Full width as requested */
    padding: 0 40px;
}

.top-links-left a,
.top-links-right a {
    color: #ccc;
    margin-right: 20px;
    font-weight: 400;
}

.top-links-left a:hover,
.top-links-right a:hover {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.top-links-right a:last-child {
    margin-right: 0;
}

.highlight {
    color: #84C44C !important;
    /* Brand Green */
    font-weight: 600;
}

.login-btn {
    font-weight: 600;
}

/* --- Main Header --- */
.main-header {
    background-color: #fff;
    /* Walmart Vibrant Blue */
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 9999;
    /* Increased to stay above overlay (9998) */
}

.header-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    max-width: 100%;
    /* Full width as requested */
    padding: 0 40px;
}

.brand-logo {
    height: 60px;
    /* More compact logo for more search space */
    width: auto;
    /* filter: brightness(0) invert(1); */
    /* Ensure visibility on blue background */
    transition: all 0.3s ease;
}

/* Search Bar */
.search-wrapper {
    flex: 1;
    /* Make search bar take all available space */
    max-width: none;
}

.search-container {
    position: relative;
    width: 100%;
    margin: 0;
}

.search-input {
    width: 100%;
    padding: 12px 60px 12px 25px;
    border: none;
    border-radius: 50px;
    border: 1px solid #575656;
    font-size: 16px;
    font-family: var(--font-heading);
    transition: all 0.3s ease;
    background-color: #fff;
    color: #333;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px #84C44C;
    /* Amazon Orange glow */
    border: none;
}

.search-btn {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    width: 44px;
    background: #00afef;
    /* Walmart Darker Blue for button */
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-btn:hover {
    background: #003060;
    transform: scale(1.05);
}

/* Shop All Icon Only */
.shop-all-btn {
    background: none !important;
    border: none !important;
    color: #fff !important;
    font-size: 22px !important;
    padding: 10px !important;
    min-width: unset !important;
    width: auto !important;
    box-shadow: none !important;
}

.shop-all-btn i {
    margin: 0 !important;
}

.shop-all-btn:hover {
    color: #84C44C !important;
}

/* Cart */
.cart-box {
    display: flex;
    align-items: center;
    background: transparent;
    padding: 5px 15px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #000000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-box:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.cart-icon {
    position: relative;
    margin-right: 12px;
    font-size: 26px;
    color: #000;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: #84C44C;
    /* Brand Green Badge */
    color: #000;
    font-size: 12px;
    font-weight: 700;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cart-info {
    display: flex;
    flex-direction: column;
}

.cart-label {
    font-size: 11px;
    font-weight: 400;
    color: rgba(46, 46, 46, 0.8);
    text-transform: none;
}

.cart-total {
    font-size: 14px;
    font-weight: 700;
    color: #000000;
}

.divider {
    color: #000000;
    margin: 0 5px;
}

/* Mobile Menu Button (Hidden by default) */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-color);
    cursor: pointer;
    padding: 5px;
}

/* --- Main Navbar (Menu) --- */
.main-navbar {
    background-color: #232f3e;
    position: relative;
    z-index: 9999;
    /* Increased to stay above overlay */
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
}

.main-navbar .container-contents {
    width: 100%;
    max-width: 100%;
    padding: 0 40px;
}

.nav-container-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-menu {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    min-width: 100%;
    overflow: visible;
}

.nav-item {
    position: relative;
    flex-shrink: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    color: #fff !important;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom-color: #84C44C;
}

.nav-item:hover>.nav-link {
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom-color: #84C44C;
}

.nav-link i {
    margin-left: 8px;
    font-size: 10px;
    opacity: 0.8;
}

/* --- Mega Menu Styling --- */
.nav-item {
    position: static;
    flex-shrink: 0;
    /* Required for full-width mega child */
}

.mega-menu-custom {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-top: 3px solid #84C44C;
    display: none;
    z-index: 1000;
    padding: 40px 0;
    max-height: 70vh;
    overflow-y: auto;
}

.nav-item:hover .mega-menu-custom {
    display: block;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr) 2fr;
    gap: 70px;
    max-width: 100%;
    margin: 0;
    padding: 0 40px;
}

.mega-column-title {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin-bottom: 15px;
    display: block;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
}

.mega-group {
    margin-bottom: 35px;
}

.mega-group-title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin-bottom: 16px;
    display: block;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
}

.mega-links-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.mega-links-list li {
    margin-bottom: 10px;
}

.mega-links-list li a {
    color: #333;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
}

.mega-links-list li a:hover {
    color: #84C44C;
    padding-left: 5px;
}

.mega-recommendation {
    padding-left: 10px;
    /* background: #fbfbfb; */
    margin: -40px 0;
    padding-top: 40px;
    padding-bottom: 40px;
}

.recommend-header {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin-bottom: 25px;
    letter-spacing: 0.2px;
}

.recommend-images {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recommend-img-wrapper {
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    height: 250px;
}

.recommend-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.recommend-img-wrapper:hover img {
    transform: scale(1.1);
}



.recommend-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.recommend-img-wrapper:hover img {
    transform: scale(.995);
}

.mega-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px 25px 40px;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.mega-menu-title {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.mega-see-all {
    font-size: 16px;
    font-weight: 600;
    color: #00AFEF;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    /* Animation for flowing colors */
    animation: flowing-colors 3s ease-in-out infinite;
    background: linear-gradient(90deg, #00AFEF, #84C44C, #00AFEF, #111, #00AFEF);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mega-see-all:hover {
    /* Keep the hover effect but maintain the animation */
    gap: 12px;
    animation-duration: 1.5s;
    /* Speed up on hover */
}

/* Flowing colors animation */
@keyframes flowing-colors {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.mega-visual-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 30px 40px 0 40px;
    border-top: 1px solid #eee;
    margin-top: 30px;
}

.mega-visual-card {
    position: relative;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none !important;
    display: block;
}

.mega-visual-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mega-visual-card:hover img {
    transform: scale(1.1);
}

.mega-visual-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.6) 100%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    color: #fff;
    z-index: 2;
}

.mega-visual-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Pagination Arrows */
.nav-arrow-btn {
    background: transparent;
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.nav-arrow-btn:hover {
    color: #84C44C;
    transform: scale(1.2);
}

.nav-arrow-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    transform: none;
}

.nav-arrow-btn.prev-btn {
    margin-right: 15px;
}

.nav-arrow-btn.next-btn {
    margin-left: 15px;
}

/* Hide arrows on mobile by default (controlled by JS/Media Queries) */
@media (max-width: 1200px) {
    .nav-arrow-btn {
        display: none !important;
    }
}

/* --- Desktop Dropdown Styles --- */
.dropdown-menu-custom {
    position: absolute;
    top: 100%;
    left: 0;
    width: 260px;
    background-color: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border-top: 3px solid #84C44C;
    display: none;
    /* ✅ FIX */
    transform: translateY(10px);
    transition: transform 0.25s ease;
    z-index: 1000;
    border-radius: 0 0 8px 8px;
    padding: 10px 0;
}

/* Custom Scrollbar for Dropdowns */
.dropdown-menu-custom::-webkit-scrollbar,
.nested-dropdown::-webkit-scrollbar,
.deep-nested-dropdown::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu-custom::-webkit-scrollbar-track,
.nested-dropdown::-webkit-scrollbar-track,
.deep-nested-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.dropdown-menu-custom::-webkit-scrollbar-thumb,
.nested-dropdown::-webkit-scrollbar-thumb,
.deep-nested-dropdown::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.dropdown-menu-custom::-webkit-scrollbar-thumb:hover,
.nested-dropdown::-webkit-scrollbar-thumb:hover,
.deep-nested-dropdown::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.nav-item:hover>.dropdown-menu-custom {
    display: block;
    /* ✅ FIX */
    transform: translateY(0);
}

.dropdown-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-item {
    position: relative;
}

.dropdown-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 25px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
    line-height: 1.4;
    white-space: normal;
}

.dropdown-item a:hover {
    background-color: #f8f9fa;
    color: #0071dc;
    padding-left: 30px;
}

/* Nested Dropdowns */
.nested-dropdown,
.deep-nested-dropdown {
    position: absolute;
    top: 0;
    left: 100%;
    width: 250px;
    background-color: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border-left: 3px solid #0071dc;
    display: none;
    transform: translateX(10px);
    transition: transform 0.25s ease;
    z-index: 1001;
    border-radius: 0 8px 8px 8px;
    padding: 10px 0;
}

.scrollable-dropdown {
    max-height: 500px;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.dropdown-item:hover>.nested-dropdown,
.dropdown-item:hover>.deep-nested-dropdown {
    display: block;
    transform: translateX(0);
}

.nested-dropdown.open-left,
.deep-nested-dropdown.open-left {
    left: auto;
    right: 100%;
    border-left: none;
    border-right: 3px solid #0071dc;
    border-radius: 8px 0 8px 8px;
    transform: translateX(-10px);
}

.dropdown-item:hover>.nested-dropdown.open-left,
.dropdown-item:hover>.deep-nested-dropdown.open-left {
    transform: translateX(0);
}

/* Hide Pagination Arrows */
#navPrevBtn,
#navNextBtn {
    display: none !important;
}


/* --- Mobile Sidebar Styles --- */
.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 310px;
    height: 100%;
    background-color: #fff;
    z-index: 10005;
    overflow: hidden;
    /* Required for panels */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
}

.mobile-sidebar.active {
    left: 0;
}

.sidebar-header {
    background-color: #131921;
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
}

.sidebar-img {
    height: 35px;
    width: auto;
}

.close-sidebar-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.sidebar-menu {
    padding: 0;
    list-style: none;
}

.sidebar-item {
    border-bottom: 1px solid #f1f1f1;
}

.sidebar-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
}

.sidebar-link:hover {
    background-color: #f9f9f9;
    color: #0071dc;
}

.sidebar-main-container {
    height: 100%;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-main-container.slide-out {
    transform: translateX(-100%);
}

.sidebar-link-wrapper {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f1f1f1;
}

.sidebar-link-wrapper .sidebar-link {
    flex: 1;
    border-bottom: none;
    padding-right: 10px;
}

.sidebar-arrow {
    padding: 15px 20px;
    color: #999;
    cursor: pointer;
    border-left: 1px solid #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sidebar-arrow:hover {
    background-color: #f8f9fa;
    color: #0071dc;
}

/* Submenu Panel */
.sidebar-submenu-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 10;
    transform: translateX(100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
}

.sidebar-submenu-panel.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.sidebar-back-btn {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    color: #230b9e;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.sidebar-back-btn i {
    font-size: 14px;
}

.sidebar-submenu-title {
    padding: 20px;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    border-bottom: 1px solid #f1f1f1;
}

.sidebar-submenu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
}

.sidebar-submenu-list li a {
    display: block;
    padding: 15px 20px;
    color: #555;
    text-decoration: none;
    border-bottom: 1px solid #f9f9f9;
    transition: all 0.2s;
}

.sidebar-submenu-list li a:hover {
    background-color: #f8f9fa;
    color: #0071dc;
    padding-left: 25px;
}

/* Mobile Account Dropdown */
.mobile-account-wrapper {
    display: none;
    position: relative;
}

@media (max-width: 1200px) {
    .mobile-account-wrapper {
        display: block;
    }
}

.mobile-account-btn {
    background: none;
    border: none;
    font-size: 26px;
    color: #000;
    cursor: pointer;
    padding: 5px;
}

.mobile-account-dropdown {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background-color: #fff;
    z-index: 10001;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow-y: auto;
}

.mobile-account-dropdown.active {
    right: 0;
}

.dropdown-header-mobile {
    padding: 20px;
    background-color: #131921;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

.mobile-account-links {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.mobile-account-links li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.mobile-account-links li a i {
    margin-right: 15px;
    color: #0071dc;
}

/* Recommendation Section in Sidebar */
.sidebar-recommend-section {
    padding: 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    margin-top: auto;
    /* Push to bottom */
}

.sidebar-recommend-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-recommend-grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.sidebar-recommend-item {
    width: 60px;
}

.sidebar-recommend-item img {
    width: 100%;
    height: 60px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 5px;
}