/* Header Styles */
@keyframes headerSlideDown {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUp {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes glowPulse {
    0% { box-shadow: 0 0 5px rgba(110, 234, 0, 0.2); }
    50% { box-shadow: 0 0 18px rgba(110, 234, 0, 0.6); }
    100% { box-shadow: 0 0 5px rgba(110, 234, 0, 0.2); }
}

.custom-header {
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #23284a;
    animation: headerSlideDown 0.8s ease-out forwards;
}

/* Notification Bell Styles */
.notification-bell-wrapper { 
    position: relative; 
    margin-right: 18px; 
}

.notification-bell { 
    position: relative; 
    display: inline-block; 
    cursor: pointer; 
}

.notification-bell .fa-bell { 
    font-size: 1.7rem; 
    color: #ffc107; 
}

.noti-badge { 
    position: absolute; 
    top: -7px; 
    right: -7px; 
    background: #ff4d4f; 
    color: #fff; 
    border-radius: 50%; 
    padding: 2px 7px; 
    font-size: 0.9rem; 
    font-weight: bold; 
}

.noti-dropdown { 
    position: absolute; 
    right: 0; 
    top: 32px; 
    background: #23272f; 
    color: #fff; 
    min-width: 260px; 
    border-radius: 10px; 
    box-shadow: 0 4px 24px rgba(0,0,0,0.13); 
    padding: 0.7rem 0.5rem; 
    z-index: 1002; 
}

.noti-title { 
    font-weight: bold; 
    font-size: 1.1rem; 
    margin-bottom: 0.5rem; 
    text-align: center; 
}

.noti-list { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}

.noti-list li { 
    padding: 0.5rem 0.7rem; 
    border-bottom: 1px solid #333; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.noti-list li:last-child { 
    border-bottom: none; 
}

.noti-read-btn { 
    background: #6eea00; 
    color: #23272f; 
    border: none; 
    border-radius: 6px; 
    padding: 2px 10px; 
    font-size: 0.95rem; 
    cursor: pointer; 
    margin-left: 10px; 
}

.noti-read-btn:hover { 
    background: #fff; 
    color: #23272f; 
}

.noti-empty { 
    text-align: center; 
    color: #bbb; 
    padding: 1rem 0; 
}

/* Tag Suggest Styles */
.tag-suggest-item {
    background: grey;
    color: #fff;
    font-weight: 400;
    padding: 7px 12px;
    cursor: pointer;
    border-bottom: 1px solid #23272f;
    transition: background 0.13s;
    font-size: 0.97em;
    font-family: 'Inter', 'Roboto', 'Noto Sans', 'Segoe UI', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.tag-suggest-item:hover {
    background: #23272f;
    color: #43a047;
}

/* Filter Dropdown Styles */
#filterDropdown {
    background: #23272f !important;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    padding: 10px 8px 8px 8px !important;
    min-width: 180px;
    max-width: 260px;
    font-size: 0.98em;
}

#filterDropdown label {
    color: #bbb;
    font-weight: 500;
    font-size: 0.97em;
    margin-bottom: 2px;
}

#filterDropdown input[type="text"] {
    background: #181a20;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 8px;
    width: 100%;
    font-size: 0.97em;
    outline: none;
    box-sizing: border-box;
}

#filterDropdown input[type="text"]::placeholder {
    color: #bbb;
    opacity: 1;
}

#filterDropdown select {
    box-sizing: border-box;
    background: #181a20;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 8px;
    width: 100%;
    font-size: 0.97em;
    outline: none;
}

#filterDropdown input[type="text"]:focus,
#filterDropdown select:focus {
    background: #23272f;
    border: 1px solid #43a047;
}

#filterDropdown button[type="submit"] {
    background: #23272f;
    color: #fff;
    border: 1px solid #43a047;
    border-radius: 6px;
    padding: 7px 0;
    font-weight: 500;
    font-size: 0.97em;
    margin-top: 8px;
    width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
    display: block;
    cursor: pointer;
    transition: background 0.15s;
}

#filterDropdown button[type="submit"]:hover {
    background: #43a047;
    color: #fff;
}

#filterDropdown #tagFilterSuggestBox {
    background: #181a20;
    color: #fff;
    border: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.13);
    max-height: 120px;
    overflow-y: auto;
    z-index: 1005;
    margin-top: 0;
    padding: 0;
}

.header-row-1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    animation: fadeIn 0.8s ease-out 0.3s backwards;
}

.header-row-2 {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-left: 10px;
    animation: fadeIn 0.8s ease-out 0.5s backwards;
}

/* Logo Area */
.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: scaleUp 0.7s ease-out 0.2s backwards;
}

.logo-img {
    height: 50px;
    width: 50px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 16px;
    box-shadow: 0 0 10px #00ff99;
    background: #222;
    animation: waveText 1s ease-in-out infinite alternate;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: bold;
    background: linear-gradient(90deg, #00ff00, #33cc33, #009900, #33cc33, #00ff00);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: animateLogoText 6s linear infinite, waveText 1s ease-in-out infinite alternate;
    text-shadow: 0 0 5px #00ff00, 0 0 10px #33cc33, 0 0 15px #009900;
    padding: 4px 8px;
    border-radius: 6px;
    box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00 inset;
    background-color: #000;
    display: inline-block;
    transform-origin: bottom center;
    cursor: pointer;
}

@keyframes animateLogoText {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

@keyframes waveText {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-3px);
    }
}


/* Search Styles */
.custom-search {
    flex: 1 1 0;
    margin: 0 2vw;
    max-width: 600px;
    background: #23284a;
    border-radius: 12px;
    box-shadow: 0 0 0 2px #2bff00a0;
    padding: 0.2rem 1rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    animation: fadeIn 0.8s ease-out 0.4s backwards;
}

.custom-search input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    width: 100%;
    outline: none;
    padding: 0.7rem 0.5rem;
}

.custom-search button {
    background: none;
    border: none;
    color: #4caf50;
    font-size: 1.3rem;
    cursor: pointer;
    margin-left: 0.5rem;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: fadeIn 0.8s ease-out 0.6s backwards;
}

/* Custom Buttons */
.custom-btn {
    background: transparent;
    color: #fff;
    border: 2px solid #6eea00;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    justify-content: center;
    height: 45px;
}

.custom-btn:hover {
    background: #6eea00;
    color: #23284a;
}

.custom-btn i {
    font-size: 1.1rem;
}

/* Login/Logout Buttons */
.login-btn, .logout-btn {
    min-width: 130px;
}

/* Cart Button */
.cart-btn {
    min-width: 130px;
}

/* Category Button */
.category-btn {
    background: linear-gradient(90deg, #aaff7f 0%, #6eea00 100%);
    color: #fff;
    font-weight: bold;
    font-size: 1.05rem;
    border-radius: 12px;
    padding: 0.7rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    box-shadow: 0 0 12px #aaff7f80;
    position: relative;
    overflow: hidden;
    border: none;
    margin-right: 1.2rem;
    animation: scaleUp 0.6s ease-out 0.7s backwards, glowPulse 3s infinite 1.5s;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #aaff7f, #6eea00, #aaff7f);
    border-radius: 12px;
    z-index: -1;
    animation: glowing 2s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-btn:hover::before {
    opacity: 1;
}

.category-btn:hover {
    background: linear-gradient(90deg, #6eea00 0%, #aaff7f 100%);
    color: #23284a;
    box-shadow: 0 0 25px #aaff7f80;
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    gap: 1.2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1.1rem;
    border-radius: 4px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    min-width: 110px;
    justify-content: center;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #4caf50;
}

.nav-link i {
    font-size: 1.1rem;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    color: #141d2b;
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.dropdown-menu a:hover {
    background: #f4f6fc;
    color: #4caf50;
}

.dropdown-menu i {
    font-size: 1rem;
    color: #666;
}

.dropdown-menu a:hover i {
    color: #4caf50;
}

/* Animations */
@keyframes glowing {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Media Queries */
@media (min-width: 420px) and (max-width: 769px) {
    .header-row-1 {
        flex-direction: row !important;
        align-items: flex-start !important;
        flex-wrap: wrap;
    }
    .logo-area {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
    }
    .header-actions {
        order: 2;
        flex-shrink: 0;
        margin-left: 0.5rem;
        min-width: fit-content;
        max-width: 60vw;
    }
    .custom-search, .search-form {
        order: 3;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0.5rem 0 0 0 !important;
        flex-basis: 100% !important;
    }
}

@media (max-width: 768px) {
    .header-row-1 {
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: wrap;
    }
    .logo-area {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
    }
    .header-actions {
        order: 2;
        flex-shrink: 0;
        margin-left: 0.5rem;
        min-width: fit-content;
        max-width: 60vw;
        
    }
    .custom-search, .search-form {
        order: 3;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0.5rem 0 0 0 !important;
    }
    .logo-img {
        height: 35px;
    }
    .logo-text {
        font-size: 0.9rem;
    }
    .custom-btn,
    .login-btn, .logout-btn, .cart-btn {
        padding: 0.5rem 0.8rem;
        min-width: auto;
        font-size: 0.9rem;
        height: 40px;
    }
    .header-row-2 {
        justify-content: flex-start !important;
        padding-left: 0 !important;
    }
    .category-btn {
        margin-left: 0 !important;
        margin-right: 0.6rem;
    }
}

@media (max-width: 576px) {
    
    
    .header-row-1 {
        margin-bottom: 0.4rem;
        padding: 0.5rem 0.3rem;
    }
    .header-row-2 {
        padding-top: 0.4rem;
        padding-bottom: 0.4rem;
    }
    .logo-img {
        height: 25px;
    }
    .logo-text {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
    }
    .custom-btn,
    .login-btn, .logout-btn, .cart-btn {
        padding: 0.3rem 0.5rem;
        min-width: auto;
        font-size: 0.7rem;
        height: 30px;
        margin-right: 0.15rem;
    }
    .custom-search {
        margin: 0 1vw;
        height: 30px;
    }
    .custom-search input {
        padding: 0.3rem 0.3rem;
        font-size: 0.8rem;
        height: 30px;
    }
    .custom-search button {
        font-size: 0.9rem;
        width: 30px;
        height: 30px;
    }
    .header-actions {
        gap: 0.3rem;
    }
    nav ul {
        gap: 0.3rem;
    }
    .nav-link {
        padding: 0.2rem 0.4rem;
        min-width: auto;
        font-size: 0.7rem;
    }
    .category-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
        margin-right: 0.4rem;
        height: 28px;
    }
    .notification-bell .fa-bell {
        font-size: 1.3rem;
    }
    .noti-badge {
        font-size: 0.7rem;
        padding: 1px 5px;
        top: -5px;
        right: -5px;
    }
}

@media (max-width: 600px) {
    .noti-dropdown {
        left: 50%;
        right: auto;
        transform: translateX(-5%);
        min-width: 90vw;
        max-width: 98vw;
    }
}

@media (max-width: 400px) {
    .container {
        padding-left: 3px;
        padding-right: 3px;
    }
    .header-row-1 {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 0.4rem 0.2rem;
    }
    .custom-search, .search-form {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        margin-top: 0.3rem !important;
        margin-bottom: 0.3rem !important;
    }
    .header-actions {
        width: 100%;
        justify-content: space-between;
        padding: 0 0.2rem;
    }
    .header-row-2 {
        justify-content: flex-start !important;
        padding-left: 0 !important;
        padding-top: 0.3rem;
        padding-bottom: 0.3rem;
    }
    .category-btn {
        margin-left: 0 !important;
        margin-right: 0.3rem;
        font-size: 0.65rem;
        padding: 0.25rem 0.4rem;
        height: 26px;
    }
    .logo-area {
        padding-left: 0.2rem;
    }
    .nav-link {
        font-size: 0.65rem;
        padding: 0.2rem 0.3rem;
    }
}

.admin-header {
    display: flex;
    align-items: center;
    padding: 16px 24px 16px 24px;
    background: #111;
}

/* Animating header elements */
.custom-search {
    animation: fadeIn 0.8s ease-out 0.4s backwards;
}

.header-actions {
    animation: fadeIn 0.8s ease-out 0.6s backwards;
}

.category-btn {
    animation: scaleUp 0.6s ease-out 0.7s backwards, glowPulse 3s infinite 1.5s;
}

.category-icon {
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: backwards;
}

.category-icon:nth-child(2) { animation-delay: 0.8s; }
.category-icon:nth-child(3) { animation-delay: 0.9s; }
.category-icon:nth-child(4) { animation-delay: 1.0s; }
.category-icon:nth-child(5) { animation-delay: 1.1s; }
.category-icon:nth-child(6) { animation-delay: 1.2s; }