/* User Menu Styles */
.header-actions {
    
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-actions span {
    color: #aaff7f;
    font-weight: bold;
    margin-right: 10px;
}

/* Search Form Styles */
.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    max-width: 600px;
    margin: 0 2rem;
}

.search-form input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid #23284a;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-form input:focus {
    outline: none;
    border-color: #6eea00;
    box-shadow: 0 0 0 3px rgba(110, 234, 0, 0.1);
}

.search-form button {
    background: #23284a;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.search-form button:hover {
    background: #6eea00;
}

/* Category Button Styles (chỉ giữ lại nếu có style riêng biệt, ưu tiên style ở header.css) */
.category-btn i {
    font-size: 1.1rem;
}

/* Media Queries */
@media (max-width: 768px) {
    .header-actions {
        gap: 0.5rem;
        justify-content:space-between; ;
    }
    
    .search-form {
        margin: 0 1rem;
    }
    
    .search-form input {
        padding: 0.6rem 0.8rem;
    }
    
    .search-form button {
        padding: 0.6rem 1rem;
    }
    
    .category-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .header-actions {
        justify-content: flex-end;
        
    }
    
    .search-form {
        
        max-width: 100%;
        
    }
    
    .category-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 800px) {
    .user-menu {
        min-width: 140px;
        font-size: 0.95rem;
        right: 0;
        left: auto;
    }
    .user-menu a {
        padding: 0.5rem 1rem;
    }
    .user-info {
        font-size: 0.95rem;
        padding: 0.5rem 1rem 0.2rem 1rem;
    }
    .user-icon-btn {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}

@media (max-width: 600px) {
  .user-menu {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    min-width: 90vw !important;
    max-width: 98vw !important;
    box-sizing: border-box;
  }
  
  .user-menu a {
    font-size: 0.9rem !important;
    padding: 0.5rem 1rem !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
  }
  
  .user-info {
    font-size: 0.9rem !important;
    padding: 0.5rem 1rem 0.2rem 1rem !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
  }
  
  .user-balance {
    font-size: 0.9rem !important;
    padding: 0.5rem 1rem 0.2rem 1rem !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
    flex-wrap: wrap !important;
  }
}

@media (width: 414px) {
  .user-menu {
    left: -130% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: max-content !important;
    min-width: unset !important;
    max-width: 98vw !important;
    box-sizing: border-box;
    border-radius: 10px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

@media (min-width: 420px) and (max-width: 769px) {
  .header-row-1 {
    flex-direction: row !important;
    align-items: flex-start !important;
    flex-wrap: wrap !important;
  }
  .logo-area {
    order: 1 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  .header-actions {
    order: 2 !important;
    flex-shrink: 0 !important;
    margin-left: 0.5rem !important;
    min-width: fit-content !important;
    max-width: 60vw !important;
    position: static !important;
  }
  .custom-search, .search-form {
    order: 3 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0.5rem 0 0 0 !important;
    flex-basis: 100% !important;
  }
}

@media (max-width: 400px) {
  .header-row-1 {
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: relative !important;
  }
  .logo-area {
    justify-content: flex-start !important;
    align-items: center !important;
    width: auto !important;
    margin-right: auto !important;
    display: flex !important;
  }
  .header-actions {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    gap: 0.2rem !important;
    min-width: unset !important;
    max-width: 60vw !important;
    flex-shrink: 1 !important;
    flex-wrap: nowrap !important;
    z-index: 10 !important;
  }
  .custom-btn,
  .cart-btn,
  .login-btn,
  .logout-btn {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.75rem !important;
    min-width: unset !important;
    height: 28px !important;
  }
  .user-icon-btn {
    width: 30px !important;
    height: 30px !important;
    font-size: 1rem !important;
    margin-left: 0.2rem !important;
  }
  .notification-bell-wrapper {
    display: none !important;
  }
  .logo-text {
    font-size: 0.7rem !important;
    padding: 2px 4px !important;
    text-align: left !important;
    margin-left: 0 !important;
  }
  .user-menu a {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.8rem !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
    display: flex !important;
    flex-wrap: wrap !important;
  }
  .user-info {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.8rem 0.2rem 0.8rem !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
  }
  .user-balance {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.8rem 0.2rem 0.8rem !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
    flex-wrap: wrap !important;
  }
  .user-menu i {
    font-size: 0.95rem !important;
  }
}

/* User Dropdown Styles */
.user-dropdown {
    position: relative;
    display: inline-block;
}
.user-icon-btn {
    background: #23284a;
    color: #6eea00;
    border: 2px solid #6eea00;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-left: 0.5rem;
}
.user-icon-btn:hover {
    background: #6eea00;
    color: #23284a;
}
.user-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 120%;
    background: #23284a;
    min-width: 200px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    z-index: 1001;
    padding: 0.7rem 0;
    animation: fadeIn 0.2s;
}
.user-dropdown.open .user-menu {
    display: block;
}
.user-menu a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 1.2rem;
    color: #fff;
    text-decoration: none;
    font-size: 1.05rem;
    transition: background 0.2s;
    white-space: nowrap;
}
.user-menu a:hover {
    background: rgba(110,234,0,0.08);
    color: #6eea00;
}
.user-menu i {
    font-size: 1.1rem;
}
.user-info {
    padding: 0.7rem 1.2rem 0.3rem 1.2rem;
    color: #aaff7f;
    font-size: 1rem;
    font-weight: bold;
    border-bottom: 1px solid #333;
    margin-bottom: 0.3rem;
}
.user-balance {
    padding: 0.7rem 1.2rem 0.3rem 1.2rem;
    color: #43a047;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1rem;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}