/* Global header styles */
.header-wrapper {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999;
    background: linear-gradient(90deg, #ff5722, #ff7043);
}

/* Top Bar (desktop only) */
.header-top {
    color: #fff;
    font-size: 14px;
    padding: 6px 0;
}

.header-main {
    padding: 15px 0;
    color: #fff;
}

/* Search */
.header-search input {
    border-radius: 5px 0 0 5px;
    border: none;
}

.header-search button {
    border-radius: 0 5px 5px 0;
    background: #ff7043;
    border: 1px solid #fff;
    color: #fff;
}

.header-links a {
    color: #fff;
    text-decoration: none;
    margin-right: 15px;
}
.header-links a:hover {
    text-decoration: underline;
}

/* MOBILE STYLE — LIKE SHOPEE */
@media (max-width: 768px) {

    /* Hide desktop top bar */
    .header-top {
        display: none;
    }

    /* Compact mobile header */
    .header-main {
        padding: 10px 0;
    }

    .shopee-logo {
        font-size: 22px;
    }

    .header-search .input-group {
        height: 32px;
    }

    .header-search input {
        font-size: 13px;
    }

    .header-main .cart-icon {
        font-size: 22px;
    }
}

/* Default: Desktop */

.user-dropdown {
    position: relative;
    display: inline-block;
}

/* Tambahkan padding/buffer agar hover tidak putus */
.user-dropdown:hover .dropdown-menu-custom {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-area {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Dropdown dengan animasi dan buffer */
.dropdown-menu-custom {
    position: absolute;
    top: 45px;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 180px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);

    /* Trik: jangan tampilkan langsung */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: .2s ease;
    z-index: 999;
}

.dropdown-menu-custom a {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
}

.dropdown-menu-custom a:hover {
    background: #f5f5f5;
}