/* --------------------------------------- Navbar --------------------------------------- */
.navbar-top {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Menyebarkan elemen navbar dengan jarak merata */
    background-color: #ffffff;
    color: #99bc85;
    padding: 10px 20px;
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    flex-wrap: wrap;
}

.menu-icon {
    cursor: pointer;
    font-size: 24px;
    margin-right: 20px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.menu-icon:hover {
    color: #4a7c5b;
    transform: scale(1.2) rotate(10deg);
}

.logo-user {
    text-align: center;
    display: block;
    max-width: 110px;
    pointer-events: none;
    flex-shrink: 0; /* Pastikan logo tidak mengecil */
}

.logo-user img {
    width: 30px;
    height: auto;
    margin-right: 15px;
}

.search-bar {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 500px;
    margin-left: 12px;
    flex-grow: 1;
}

.search-input-wrapper {
    position: relative;
    flex-grow: 1;
}

.search-input {
    border: 1.5px solid #e0e0e0;
    outline: none;
    padding: 8px 16px;
    padding-left: 40px;
    border-radius: 20px;
    background-color: #f8f9fa;
    width: 100%;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;
    color: #333;
    transition: all 0.2s ease;
}

.search-input:hover {
    background-color: #f1f3f4;
    border-color: #d3d3d3;
}

.search-input:focus {
    background-color: #fff;
    border-color: #88b06a;
    box-shadow: 0 2px 8px rgba(136, 176, 106, 0.15);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #88b06a;
    font-size: 16px;
}

.search-input:focus + .search-icon {
    color: #6a8f54;
}

.link-section {
    display: flex;
    align-items: center;
    margin: 0 15px;
    font-size: 17px;
}

.link-icon {
    color: #99bc85;
    margin: 0 15px;
    cursor: pointer;
    font-size: 22px;
    transition: all 0.3s ease-out;
}

.link-icon:hover {
    color: #d9cab3;
    transform: scale(1.2) rotate(-8deg);
    text-shadow: 0 2px 8px rgba(217, 202, 179, 0.4);
    filter: drop-shadow(0 4px 12px rgba(217, 202, 179, 0.2));
}

.link-section a.active .link-icon,
.link-section i.active {
    color: #d9cab3;
    font-weight: bold;
    transform: scale(1.2);
    transition: all 0.3s ease;
}

.link-section {
    position: relative;
}

#for-badge-count-cart {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
    padding: 3px 6px;
    border-radius: 50%;
    background-color: #ff3b30;
    color: white;
}

#for-badge-count-wishlist {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
    padding: 3px 6px;
    border-radius: 50%;
    background-color: #ff3b30;
    color: white;
}

.notification-section {
    display: inline-flex;
    align-items: center;
    margin: 0 15px;
    font-size: 17px;
    position: relative;
}

.notification-icon {
    position: relative;
    margin: 0 15px;
    cursor: pointer;
    font-size: 22px;
    color: #99bc85;
    transition: color 0.3s;
}

.notification-icon:hover {
    animation: bellShake 0.5s ease-in-out;
    color: #d9cab3;
}

@keyframes bellShake {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(10deg);
    }
    50% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(5deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

#notificationCount {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff3b30;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 50%;
    pointer-events: none;
}

.notification-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 10px;
    background-color: #fff;
    min-width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    border-radius: 8px;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    transform: translateY(5px);
    opacity: 0;
    transition: all 0.25s ease-out;
}

.notification-dropdown.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.notification-item {
    padding: 12px 20px;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: #f2f2f2;
}

.notification-item.read {
    color: #999;
    background-color: #e0e0e0;
    font-weight: normal;
}

.notification-item.unread {
    background-color: #f2f2f2;
    font-weight: bold;
}

.notification-item i {
    margin-right: 10px;
    color: #555;
}

.notification-dropdown .no-notifications {
    text-align: center;
    padding: 12px;
    color: #999;
    font-size: 14px;
}

.notification-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-top: 1px solid #ddd;
    background: #f8f8f8;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.see-all-link {
    color: #007bff;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

.mark-all-text {
    font-size: 14px;
    color: #007bff;
    cursor: pointer;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
}

.see-all-link:hover,
.mark-all-text:hover {
    color: #0056b3;
}

#wishlistCount {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #ff0000;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 50%;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}

.user-pp {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.user-pp:hover {
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 44px;
    right: 0;
    width: 160px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    z-index: 1001;
    overflow: hidden;
    animation: fadeIn 0.2s ease-out forwards;
}

.user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #2f2f2f;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease;
}

.user-dropdown .dropdown-item i {
    margin-right: 8px;
    font-size: 14px;
    color: #6b7280;
    transition: color 0.25s ease;
}

.user-dropdown .dropdown-item:hover {
    background: #99bc85;
    color: #ffffff;
}

.user-dropdown .dropdown-item:hover i {
    color: #ffffff;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.guest-enter {
    display: inline-block;
    padding: 7px 18px;
    margin: 0 4px;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.guest-enter:first-of-type {
    color: #fff;
    background-color: #99bc85;
    box-shadow: 0 1px 3px rgba(153, 188, 133, 0.3);
}

.guest-enter:last-of-type {
    color: #99bc85;
    background-color: #fff;
    border-color: #99bc85;
}

.guest-enter:first-of-type:hover {
    background-color: #87a573;
    transform: translateY(-1px);
}

.guest-enter:last-of-type:hover {
    background-color: #ddffdd;
}

.guest-enter:active {
    transform: translateY(0);
}

.guest-enter:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(153, 188, 133, 0.4);
}

.main-content {
    margin-left: 220px;
    padding: 20px;
    transition: margin-left 0.3s ease;
}

@media (max-width: 991px) {
    .navbar-top {
        padding: 10px 15px;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .menu-icon {
        margin-right: 15px;
    }

    .logo-user {
        max-width: 90px;
        margin-right: 10px;
    }

    .logo-user img {
        width: 25px;
        margin-right: 10px;
    }

    .search-bar {
        order: 3;
        margin-top: 10px;
        margin-left: 0;
        max-width: 100%;
    }

    .search-input {
        padding: 8px 12px;
        padding-left: 35px;
        font-size: 13px;
    }

    .search-icon {
        left: 10px;
        font-size: 14px;
    }

    .link-section,
    .notification-section {
        margin: 0 10px;
        font-size: 16px;
    }

    .link-icon,
    .notification-icon {
        margin: 0 8px;
        font-size: 20px;
    }

    .guest-enter {
        padding: 6px 14px;
        margin: 0 3px;
        font-size: 0.82rem;
    }

    .user-pp {
        width: 35px;
        height: 35px;
    }

    .main-content {
        margin-left: 0;
        padding: 15px;
    }
}

@media (max-width: 767px) {
    .navbar-top {
        padding: 8px 10px;
        justify-content: space-between;
    }

    .menu-icon {
        margin-right: 10px;
        font-size: 22px;
    }

    .logo-user {
        max-width: 80px;
        margin-right: 5px;
    }

    .logo-user img {
        width: 22px;
        margin-right: 8px;
    }

    .search-bar {
        order: 3;
        margin-top: 8px;
        width: 100%;
        padding: 0 5px;
    }

    .search-input {
        padding: 7px 10px;
        padding-left: 30px;
        font-size: 12px;
    }

    .search-icon {
        left: 8px;
        font-size: 13px;
    }

    .link-section,
    .notification-section {
        margin: 0 5px;
        font-size: 15px;
    }

    .link-icon,
    .notification-icon {
        margin: 0 5px;
        font-size: 18px;
    }

    #for-badge-count-cart,
    #for-badge-count-wishlist,
    #notificationCount {
        font-size: 10px;
        padding: 2px 5px;
        top: -3px;
        right: -3px;
    }

    .guest-enter {
        padding: 5px 10px;
        margin: 0 2px;
        font-size: 0.75rem;
    }

    .user-pp {
        width: 30px;
        height: 30px;
    }

    .user-dropdown {
        width: 140px;
        font-size: 12px;
        right: 0;
        top: 38px;
    }

    .user-dropdown .dropdown-item {
        padding: 6px 10px;
        font-size: 12px;
    }

    .user-dropdown .dropdown-item i {
        font-size: 12px;
    }

    .notification-dropdown {
        min-width: 240px;
        right: 0;
    }

    .notification-item {
        padding: 10px 15px;
        font-size: 13px;
    }

    .notification-dropdown .no-notifications {
        padding: 10px;
        font-size: 13px;
    }

    .notification-footer {
        padding: 6px 10px;
    }

    .see-all-link,
    .mark-all-text {
        font-size: 13px;
    }

    .main-content {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .navbar-top {
        padding: 6px 8px;
    }

    .menu-icon {
        font-size: 20px;
        margin-right: 8px;
    }

    .logo-user {
        max-width: 70px;
        margin-right: 0;
    }

    .logo-user img {
        width: 20px;
        margin-right: 6px;
    }

    .search-bar {
        margin-top: 6px;
        padding: 0;
    }

    .search-input {
        padding: 6px 8px;
        padding-left: 25px;
        font-size: 11px;
    }

    .search-icon {
        left: 6px;
        font-size: 12px;
    }

    .link-section,
    .notification-section {
        margin: 0 3px;
    }

    .link-icon,
    .notification-icon {
        margin: 0 3px;
        font-size: 16px;
    }

    .guest-enter {
        padding: 4px 8px;
        margin: 0 1px;
        font-size: 0.7rem;
    }

    .user-pp {
        width: 28px;
        height: 28px;
    }

    .user-dropdown {
        width: 120px;
        top: 36px;
    }

    .user-dropdown .dropdown-item {
        padding: 5px 8px;
        font-size: 11px;
    }

    .user-dropdown .dropdown-item i {
        font-size: 11px;
    }

    .notification-dropdown {
        min-width: 200px;
    }

    .notification-item {
        padding: 8px 10px;
        font-size: 12px;
    }
}
