/* Second Navbar Styles */
.second-navbar {
    background-color: #f5f5f5;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin-bottom: 15px;
    height: 60px;
    display: flex;
    align-items: center;
}

.second-navbar .container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 15px;
    max-width: 1380px;
    margin: 0 auto;
    width: 100%;
    height: 100%;
}

/* Category navigation wrapper */
.second-nav-categories {
    position: relative;
    height: 100%;
}

/* Category Toggler Button */
.category-toggler {
    display: flex;
    align-items: center;
    background-color: #159abe;
    color: #fff;
    padding: 0 25px;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s;
    height: 100%;
    position: relative;
    border-radius: 0;
    outline: none;
}

.category-toggler:hover {
    background-color: #0f7a96;
}

.category-toggler .hamburger-icon {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    width: 18px;
    height: 14px;
    margin-right: 10px;
}

.category-toggler .hamburger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #fff;
    border-radius: 1px;
}

/* Category Menu */
.category-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 280px;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-top: none;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
}

/* Show menu when toggler is active */
.second-nav-categories:has(.category-toggler.active) .category-menu {
    display: block;
}

.category-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-menu ul li {
    border-bottom: 1px solid #f1f1f1;
}

.category-menu ul li:last-child {
    border-bottom: none;
}

.category-menu ul li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
}

.category-menu ul li a:hover {
    background-color: #f8f9fa;
}

.category-menu ul li a img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    object-fit: contain;
}

/* Navigation Links */
.second-navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
    margin-left: 30px;
}

.second-navbar-nav li {
    position: relative;
}

.second-navbar-nav li a {
    display: flex;
    align-items: center;
    padding: 0 18px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 14px;
    text-transform: uppercase;
    height: 100%;
}

.second-navbar-nav li a:hover {
    color: #159abe;
}

/* Right Side Elements */
.second-navbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.second-navbar-right .nav-item {
    padding: 0 15px;
    position: relative;
}

.second-navbar-right .nav-link {
    display: flex;
    align-items: center;
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.second-navbar-right .nav-link i {
    margin-right: 5px;
    font-size: 16px;
}

/* Icon items in navbar */
.second-navbar-right .nav-icon-item {
    padding: 0 10px;
}

.second-navbar-right .nav-icon {
    font-size: 22px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.second-navbar-right .nav-icon i {
    margin-right: 0;
    font-size: 22px;
}

/* Label for cart/compare count */
.second-navbar-right .label {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #159abe;
    color: #fff;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Dropdown menu */
.second-navbar-right .nav-item .sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px 0;
    z-index: 1000;
    display: none;
}

.second-navbar-right .nav-item:hover .sub-menu {
    display: block;
}

.second-navbar-right .nav-item .sub-menu li {
    list-style: none;
}

.second-navbar-right .nav-item .sub-menu li a {
    display: block;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.second-navbar-right .nav-item .sub-menu li a:hover {
    background-color: #f5f5f5;
    color: #159abe;
}

.second-navbar-right .nav-item .sub-menu .divider {
    height: 1px;
    background-color: #eee;
    margin: 5px 0;
}

/* Responsive */
@media (max-width: 991.98px) {
    .second-navbar {
        display: none;
    }
}

@media (min-width: 992px) {
    .second-navbar {
        display: flex !important;
    }
}

/* Laptop screens ONLY - does not affect desktop */
@media (min-width: 992px) and (max-width: 1399px) {
    /* Container adjustments */
    .second-navbar .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    /* Category toggler adjustments */
    .category-toggler {
        padding: 0 15px;
        font-size: 14px;
    }
    
    /* Navigation adjustments */
    .second-navbar-nav {
        margin-left: 15px;
    }
    
    .second-navbar-nav li a {
        padding: 0 12px;
        font-size: 13px;
    }
    
    /* Right side elements */
    .second-navbar-right .nav-item {
        padding: 0 10px;
    }
    
    .second-navbar-right .nav-link {
        font-size: 13px;
    }
    
    .second-navbar-right .nav-icon-item {
        padding: 0 5px;
    }
}
