/* ============================================
   HEADER STYLES -Bir Gurme Adam Platform
   Modular structure using Bootstrap classes
   ============================================ */

/* === Navbar Styles - Minimal Overrides === */
:root {
   
    --secondary-color: #6B7280;
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;
    --white-color: #FFFFFF;
    --black-color: #000000;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --text-color: #111827;
    --text-light: #4B5563;
}

/* Custom transitions for dropdown menus */
.dropdown-menu {
    transition: opacity 0.2s, transform 0.2s;
    transform-origin: top center;
    margin-top: 0 !important;
}

/* Bootstrap overrides */
.nav-link {
    font-weight: 500;
    color: var(--white);
    transition: color 0.3s ease;
}
.nav-link:hover, .nav-item.active .nav-link {
  text-decoration: none!important;
  color: var(--primary-color);
}
.nav-pills .nav-link.active, 
.nav-pills .show > .nav-link {
    background-color: var(--primary-color);
}

/* Avatar placeholder for user accounts */
.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-transform: uppercase;
}

/* Mobile menu customizations */
.offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Accordion customizations in mobile menu */
#mobileMenuAccordion .accordion-button {
    padding: 1rem 1.25rem;
}

#mobileMenuAccordion .accordion-button:not(.collapsed) {
    color: var(--primary-color);
    background-color: var(--gray-100);
}

#mobileMenuAccordion .accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0, 0, 0, 0.125);
}

/* Fix for Bootstrap's dropdown toggle arrow */
.dropdown-toggle::after {
    vertical-align: 0.175em;
}

/* Add shadow to dropdown menus */
.dropdown-menu {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Ensure proper spacing in navbar */
.bottom-navbar .nav-link {
    padding: 0.75rem 1rem;
}

@media (max-width: 991.98px) {
    .mobile-menu-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-search-toggle {
        width: 40px;
        height: 40px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Badges on cart and wishlist buttons */
.icon-btn-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.65rem;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.35rem;
}

/* ----- Variables (override Bootstrap if needed) ----- */
:root {
  --header-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  --header-transition: all 0.3s ease;
}

/* ----- 1. GENERAL HEADER STYLES ----- */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background-color: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 7, 19, 0.7);
  z-index: -1;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header.scrolled::before {
  background: rgba(3, 7, 19, 0.9);
}

.site-header.scrolled {
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

/* ----- 2. TOP BAR ----- */
.header-top-bar {
  background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.9), rgba(var(--secondary-rgb), 0.9));
  color: var(--white);
  font-size: var(--font-size-xs);
  padding: 0.5rem 0;
  position: relative;
}

.header-top-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.top-link {
  color: var(--white);
  text-decoration: none;
  transition: var(--transition-base);
  opacity: 0.85;
}

.top-link:hover {
  opacity: 1;
  color: var(--white);
}

.header-contacts i, 
.header-top-menu i {
  margin-right: 0.5rem;
}

/* ----- 3. MAIN HEADER ----- */
.header-main {
  padding: 1rem 0;
  background-color: rgba(3, 7, 19, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Logo */
.logo-text {
  color: var(--white);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-xl);
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, #fff, #ff5c7f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* Main Navigation */
.main-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-base);
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  transform: translateY(-2px);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 20px;
  height: 2px;
  background: var(--primary-color);
  transform: translateX(-50%);
  border-radius: 2px;
}

.nav-link i {
  margin-right: 6px;
  font-size: 1.1em;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
}

.header-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.header-icon-btn {
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.3s ease;
}

.header-icon-btn:hover {
  color: var(--white);
}

.header-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-right: 0.375rem;
}

.header-icon-text {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.header-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  background-color: var(--primary-color);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: var(--font-weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0 0.25rem;
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.3);
}

/* User Dropdown */
.user-dropdown {
  min-width: 240px;
  border: none;
  border-radius: var(--border-radius-md);
  background-color: var(--dark-bg);
  color: var(--text-white);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  margin-top: 0.5rem !important;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  height: 300px;
  z-index: 999999999999999!important;
}

.user-dropdown-header {
  background: rgba(var(--primary-rgb), 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto;
  overflow: hidden;
  border: 2px solid rgba(var(--primary-rgb), 0.3);
}

.user-menu-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: all 0.2s ease;
}

.user-menu-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--white);
}

.user-menu-item i {
  font-size: 1.1rem;
  margin-right: 0.75rem;
  opacity: 0.8;
}

.dropdown-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0.25rem 0;
}

/* Mobile Menu */
.mobile-menu-toggle {
  background: none;
  color: rgba(255, 255, 255, 0.85);
  border: none;
  font-size: 1.25rem;
  transition: all 0.3s ease;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle:hover {
  color: var(--white);
}

.mobile-menu {
  background-color: var(--dark-bg);
  color: var(--text-white);
  width: 300px;
  max-width: 80vw;
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-item {
  margin-bottom: 0.5rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 0.875rem 1rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-item.active .mobile-nav-link {
  background-color: rgba(var(--primary-rgb), 0.1);
  color: var(--white);
}

.mobile-nav-link i {
  opacity: 0.8;
  margin-right: 0.75rem;
}

.mobile-account-menu h6 {
  color: rgba(255, 255, 255, 0.6);
  padding: 0 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

/* Media Queries */
@media (max-width: 991.98px) {
  .header-main {
    padding: 0.75rem 0;
  }
  
  .site-logo img {
    width: 80px !important;
    height: 80px !important;
  }
  
  .logo-text {
    font-size: var(--font-size-lg);
  }
}

@media (max-width: 767.98px) {
  .header-top-bar {
    display: none;
  }
  
  .site-logo img {
    width: 70px !important;
    height: 70px !important;
  }
  
  .header-main {
    padding: 0.5rem 0;
    border-bottom: none;
  }
}

@media (max-width: 1199px) {
  .category-toggle {
    padding: 0.75rem 1rem;
    font-size: var(--font-size-sm);
  }
  
  .nav-link {
    padding: 1rem 0.75rem;
  }
  
  .promo-link {
    font-size: var(--font-size-sm);
    padding: 0.75rem 0.75rem;
  }
  
  .has-submenu .submenu {
    width: 600px;
  }
}

@media (max-width: 991px) {
  .header-search,
  .header-nav {
    display: none;
  }
  
  .user-name {
    display: none !important;
  }
  
  .mobile-menu {
    width: 280px;
  }
}

@media (max-width: 767px) {
  .logo-img {
    max-height: 36px;
  }
  
  .cart-dropdown {
    width: 280px;
  }
  
  .action-icon {
    font-size: 1.25rem;
  }
  
  .cart-sidebar {
    max-width: 320px;
  }
  
  .header-top {
    font-size: 0.7rem;
  }
  
  .header-top-links li {
    margin-left: 0.5rem;
  }
}

@media (max-width: 575px) {
  .header-top-info li:not(:first-child) {
    display: none;
  }
  
  .cart-dropdown {
    right: -50px;
  }
  
  .header-top-links {
    display: flex;
    flex-wrap: wrap;
  }
  
  .mobile-menu {
    width: 260px;
  }
}

@media (max-width: 420px) {
  .header-top-links li:not(:last-child) {
    display: none;
  }
  
  .action-count {
    min-width: 16px;
    height: 16px;
    font-size: 10px;
  }
  
  .mobile-menu {
    width: 100%;
  }
}

/* 
 * Header Component Styles
 * This file contains modular styles for header components that extend Bootstrap
 * It uses the site's design system colors defined in CSS variables
 */

/* ===== Common Header Variables ===== */
:root {
    /* Colors are inherited from main CSS variables in style.css */
    --header-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --header-transition: all 0.3s ease;
}

/* ===== 1. Top Bar Styles ===== */
.top-bar {
    background-color: var(--primary);
    color: var(--white);
    font-size: 0.875rem;
}

.top-bar a {
    color: var(--white);
    text-decoration: none;
    transition: var(--header-transition);
}

.top-bar a:hover {
    opacity: 0.8;
}

.top-bar .language-selector .dropdown-menu {
    min-width: 120px;
}

.announcement-slider {
    overflow: hidden;
}

.announcement-slider .announcement-item {
    padding: 0.5rem 0;
}

/* ===== 2. Main Header Styles ===== */
.main-header {
    background-color: var(--white);
    box-shadow: var(--header-shadow);
    padding: 1rem 0;
}

.main-header .logo img {
    max-height: 50px;
}

.search-form {
    position: relative;
}

.search-form .form-control {
    border-radius: 50px;
    padding-left: 1rem;
    border-color: var(--gray-200);
}

.search-form .btn {
    position: absolute;
    right: 0;
    top: 0;
    border-radius: 0 50px 50px 0;
    height: 100%;
}

/* Account and Cart icons */
.header-icons .nav-link {
    color: var(--gray-700);
    transition: var(--header-transition);
    position: relative;
}

.header-icons .nav-link:hover {
    color: var(--primary);
}

.header-icons .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.65rem;
}

/* ===== 3. User Account Dropdown ===== */
.user-dropdown .dropdown-menu {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 250px;
}

.user-dropdown .dropdown-item {
    padding: 0.75rem 1rem;
    transition: var(--header-transition);
}

.user-dropdown .dropdown-item:hover {
    background-color: var(--gray-100);
}

.user-dropdown .dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-dropdown .user-info {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

/* ===== 4. Navigation Styles ===== */
.navbar {
    padding: 0;
}

.navbar .nav-link {
    padding: 1rem 0.75rem;
    color: var(--gray-700);
    transition: var(--header-transition);
}

.navbar .nav-link:hover {
    color: var(--primary);
}

.mega-menu {
    border-radius: 0 0 0.5rem 0.5rem;
    margin-top: 0;
    border-top: 1px solid var(--gray-200);
    background-color: var(--white);
    padding: 1.25rem 0;
    left: 0;
    right: 0;
    width: 100%;
    box-shadow: var(--header-shadow);
}

.mega-menu h6 {
    color: var(--gray-900);
    font-weight: bold;
    margin-bottom: 0.75rem;
}

.mega-menu h6 a {
    color: inherit;
    text-decoration: none;
}

.mega-menu ul li a {
    color: var(--gray-600);
    text-decoration: none;
    transition: var(--header-transition);
    font-size: 0.875rem;
}

.mega-menu ul li a:hover {
    color: var(--primary);
}

/* ===== 5. Bottom Menu Styles ===== */
.bottom-navbar {
    background-color: var(--primary);
}

.bottom-navbar .nav-link {
    color: var(--white);
    padding: 0.75rem 1rem;
    transition: var(--header-transition);
}

.bottom-navbar .nav-link:hover {
    opacity: 0.9;
}

.bottom-navbar .dropdown-menu {
    margin-top: 0;
    border: none;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: var(--header-shadow);
}

/* ===== 6. Mobile Menu Styles ===== */
.mobile-menu-toggle {
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--header-transition);
}

.mobile-menu-toggle:hover {
    color: var(--primary);
}

.offcanvas-header {
    border-bottom: 1px solid var(--gray-200);
}

.offcanvas .list-group-item {
    padding: 0.75rem 1rem;
    border-left: none;
    border-right: none;
    transition: var(--header-transition);
}

.offcanvas .list-group-item:hover {
    background-color: var(--gray-100);
}

.offcanvas .list-group-item i {
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}

.offcanvas .accordion-button {
    padding: 0.75rem 1rem;
}

.offcanvas .accordion-button:not(.collapsed) {
    background-color: var(--gray-100);
    color: var(--primary);
}

/* ===== 7. Responsive Styles ===== */
@media (max-width: 991.98px) {
    .main-header {
        padding: 0.75rem 0;
    }
    
    .main-header .logo img {
        max-height: 40px;
    }
    
    .search-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        z-index: 1000;
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 767.98px) {
    .top-bar {
        font-size: 0.75rem;
    }
    
    .announcement-slider {
        max-width: 200px;
    }
}

@media (min-width: 992px) {
    .navbar-nav .dropdown:hover .dropdown-menu {
        display: block;
    }
}

/* Mobile Menu & Cart Offcanvas */
.mobile-menu,
.cart-offcanvas {
  background-color: #030713;
  color: var(--white);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.offcanvas-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.offcanvas-title {
  color: var(--white);
  font-weight: var(--font-weight-semibold);
}

.btn-close {
  filter: invert(1) brightness(200%);
}

.mobile-search .form-control {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.mobile-search .form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.mobile-search .btn {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.dropdown-item {
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--white);
}

.badge.bg-primary {
  background-color: var(--primary-color) !important;
}

/* Cart Items */
.cart-header,
.cart-footer {
  border-color: rgba(255, 255, 255, 0.1);
}

.cart-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-item-title,
.cart-item-price {
  color: var(--white);
}

.cart-item-info small {
  color: rgba(255, 255, 255, 0.6);
}

.cart-total-text {
  color: rgba(255, 255, 255, 0.7);
}

.cart-total-price {
  color: var(--white);
  font-weight: var(--font-weight-bold);
}

.btn-checkout {
  background: linear-gradient(135deg, var(--primary-color), #ff5c7f);
  border: none;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.btn-checkout:hover {
  background: linear-gradient(135deg, #ff5c7f, var(--primary-color));
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.4);
}

.btn-continue-shopping {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.btn-continue-shopping:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--white);
}

/* Header Backdrop Effect */
.header-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: #030713;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
} 