/* my-php-website/assets/css/header.css (Final Corrected Version) */
:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --dark-color: #1a202c;
    --light-color: #ffffff;
    --hover-bg-color: #f4f7fc;
    --border-color-light: #e2e8f0;
}

@keyframes aurora-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    padding-top: 175px; 
}

/* --- General Header Structure --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.top-bar {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: aurora-gradient 15s ease infinite;
    color: var(--light-color);
    text-align: center;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 500;
}

.header-bottom {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* ================================================================
   DESKTOP STYLES (Default for screens > 767px)
   ================================================================ */
.desktop-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.site-title { flex-shrink: 0; }
.site-title .logo {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.search-bar-container {
    display: flex;
    flex-grow: 1;
    align-items: center;
    border-radius: 50px;
    width: 100%;
    max-width: 550px;
    margin: 0 30px;
    background: var(--light-color);
    border: 1px solid var(--border-color-light);
    overflow: hidden;
}
.category-dropdown {
    padding: 12px 22px;
    border: none;
    background-color: #f8f9fa;
    cursor: pointer;
    outline: none;
    font-size: 15px;
    border-right: 1px solid var(--border-color-light);
}
.search-input {
    border: none;
    padding: 12px 20px;
    width: 100%;
    outline: none;
    font-size: 15px;
    background: transparent;
}
.search-icon {
    padding: 12px 35px;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    color: var(--light-color);
    cursor: pointer;
    border: none;
    font-size: 16px;
}

.header-icons { display: flex; align-items: center; gap: 25px; flex-shrink: 0; }
.header-icons a { color: var(--dark-color); text-decoration: none; font-size: 22px; }

.desktop-nav { display: flex; justify-content: center; padding-bottom: 15px; }
.desktop-nav .nav-menu { list-style-type: none; display: flex; margin: 0; padding: 0; }
.desktop-nav .nav-menu > li { margin: 0 10px; position: relative; /* === ড্রপডাউনের জন্য এটি জরুরি === */ }
.desktop-nav .nav-menu a {
    color: var(--dark-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}
.desktop-nav .nav-menu > li > a:hover { background-color: var(--hover-bg-color); }
.desktop-nav .fa-chevron-down { font-size: 0.7em; }

/* === নতুন কোড: ড্রপডাউন মেনুর স্টাইল যোগ করা হয়েছে === */
.desktop-nav .dropdown-menu {
    position: absolute;
    top: 110%;
    left: 0;
    list-style-type: none;
    padding: 10px;
    margin-top: 10px;
    background: var(--light-color);
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.desktop-nav .nav-menu > li:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.desktop-nav .dropdown-menu a {
    font-size: 15px;
    padding: 12px 15px;
    border-radius: 8px;
}

.desktop-nav .dropdown-menu a:hover {
    background-color: var(--primary-color);
    color: var(--light-color);
}
/* === নতুন কোড শেষ === */

.mobile-header-container, .mobile-nav-sidebar, .overlay { display: none; }

/* ================================================================
   MOBILE & TABLET STYLES (For screens <= 767px)
   ================================================================ */
@media (max-width: 767px) {
    body {
        padding-top: 95px;
    }
    
    .desktop-header-container, .desktop-nav { display: none; }
    .header-bottom { padding: 0; }
    
    .mobile-header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 20px;
        width: 100%;
        box-sizing: border-box;
    }
    .site-title .logo { font-size: 28px; }
    
    .mobile-header-right { display: flex; align-items: center; gap: 20px; }
    .mobile-header-icons { display: flex; gap: 20px; }
    .mobile-header-icons a { font-size: 22px; color: var(--dark-color); }
    
    .hamburger-menu { width: 28px; height: 20px; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; }
    .hamburger-menu .bar { display: block; width: 100%; height: 3px; background-color: var(--dark-color); border-radius: 2px; transition: all 0.3s ease-in-out; }
    .hamburger-menu.active .bar:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
    .hamburger-menu.active .bar:nth-child(2) { opacity: 0; }
    .hamburger-menu.active .bar:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
    
    .overlay { display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 1999; opacity: 0; visibility: hidden; transition: opacity 0.3s ease; }
    .overlay.active { opacity: 1; visibility: visible; }
    
    .mobile-nav-sidebar { display: block; position: fixed; top: 0; left: 0; width: 280px; height: 100%; background: var(--light-color); z-index: 2000; transform: translateX(-100%); transition: transform 0.4s ease; padding: 20px; overflow-y: auto; box-shadow: 5px 0 15px rgba(0,0,0,0.1); box-sizing: border-box; }
    .mobile-nav-sidebar.active { transform: translateX(0); }
    
    .mobile-nav-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; border-bottom: 1px solid #eee; }
    #close-menu { font-size: 24px; cursor: pointer; color: #555; }

    .mobile-sidebar-actions input { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box; margin: 20px 0; }
    
    .mobile-nav-sidebar .nav-menu { list-style: none; padding: 0; margin: 0; }
    .mobile-nav-sidebar .nav-menu a { display: flex; justify-content: space-between; align-items: center; padding: 15px 10px; font-size: 16px; color: var(--dark-color); text-decoration: none; border-radius: 5px; }
    .mobile-nav-sidebar .dropdown-menu { display: none; list-style: none; padding-left: 20px; }
}
/* my-php-website/assets/css/header.css ফাইলের শেষে যোগ করুন */

/* === নতুন: আইকন কাউন্টার বা ব্যাজের জন্য স্টাইল === */

/* কাউন্টারকে সঠিকভাবে পজিশন করার জন্য আইকনের প্যারেন্ট 'a' ট্যাগকে relative করা হচ্ছে */
.header-icons a,
.mobile-header-icons a {
    position: relative;
    display: inline-block; /* এটি আবশ্যক */
}

.header-icon-count {
    position: absolute;
    top: -8px; /* আইকনের উপরে পজিশন */
    right: -10px; /* আইকনের ডানে পজিশন */
    background-color: #dc3545; /* লাল রঙ */
    color: white;
    border-radius: 50%; /* গোলাকার করার জন্য */
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1; /* ভার্টিকালি সেন্টারে রাখার জন্য */
    border: 1px solid white; /* একটি সাদা বর্ডার */
    box-shadow: 0 1px 3px rgba(0,0,0,0.2); /* হালকা শ্যাডো */
}

/* মোবাইল আইকনের জন্য কাউন্টারের পজিশন একটু অ্যাডজাস্ট করা */
.mobile-header-icons .header-icon-count {
    top: -6px;
    right: -8px;
    width: 18px;
    height: 18px;
    font-size: 11px;
}
