
@import url('main.css');

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Prevent horizontal scroll on small devices */
html, body {
  max-width: 100%;
  /* overflow-x: hidden; */
}

/* Header Container */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--secondary-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Navigation Container */
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

/* Logo Styles */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1001;
}

.logo-img {
  height: 50px;
  width: auto;
  transition: transform 0.3s ease;
  display: block;
}

.logo-favicon {
  height: 40px;
  width: auto;
  display: none;
  transition: transform 0.3s ease;
}

.logo:hover .logo-img,
.logo:hover .logo-favicon {
  transform: scale(1.05);
}

/* Hamburger Menu */
#menuToggle {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 1100;
  position: relative;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--text-color);
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

/* Navigation Center */
.nav-center {
  display: flex;
  align-items: center;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-center > li {
  position: relative;
}

.nav-center > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  text-transform:capitalize;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border-radius: var(--border-radius);
  position: relative;
}

.nav-center > li > a:hover {
  color: var(--primary-color);
  background-color: rgba(0, 230, 0, 0.05);
}

/* Dropdown Arrow Icon */
.dropdown-arrow {
  font-size: 10px;
  margin-left: 3px;
  transition: transform 0.3s ease;
  color: var(--primary-color);
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

/* Quote Button */
.quote-btn {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 8px 18px;
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius);
  font-weight: 400;
  text-transform:capitalize;
  font-size: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.quote-btn:hover {
  background-color: transparent;
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 230, 0, 0.3);
}

/* Search Toggle Button */
.search-toggle-btn {
  background: transparent;
  border: none;
  color: var(--primary-color);
  font-size: 18px;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-toggle-btn:hover {
  background-color: rgba(0, 230, 0, 0.1);
  color: var(--primary-color);
  transform: scale(1.1);
}

/* ============================================
   DROPDOWN MENU STYLES
   ============================================ */

/* Products Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  opacity: 0;
  visibility: hidden;
  background-color: var(--secondary-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-top: 3px solid var(--primary-color);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  min-width: 220px;
  z-index: 999;
  transition: all 0.3s ease;
  transform: translateY(-10px);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Products Mega Menu */
.products-mega-menu {
  min-width: 220px;
  max-width: 250px;
  width: auto;
}

.nav-dropdown-content {
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Parent Category Item */
.parent-category-item {
  position: relative;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 0;
  margin-bottom: 0;
}

.parent-category-item:last-child {
  border-bottom: none;
}

.parent-category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  text-transform:capitalize;
  letter-spacing: 0.5px;
  border-radius: 0;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
}

/* Arrow indicator for items with nested dropdowns */
.parent-category-item.has-nested .parent-category-link::after {
  content: '>';
  font-weight: 700;
  color: var(--primary-color);
  margin-left: auto;
  padding-left: 10px;
  font-size: 14px;
  transition: transform 0.3s ease;
}

.parent-category-link:hover {
  background-color: rgba(0, 230, 0, 0.05);
  color: var(--primary-color);
}

.parent-category-item.has-nested:hover .parent-category-link::after {
  transform: translateX(3px);
}

/* Subcategory Dropdown - Side Positioning */
.subcategory-dropdown {
  display: none;
}

/* Nested Side Dropdown */
.nested-side-dropdown {
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 220px;
  background-color: var(--secondary-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-top: 3px solid var(--primary-color);
  border-radius: var(--border-radius);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.parent-category-item.has-nested:hover .nested-side-dropdown {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.nested-dropdown-container {
  padding: 8px 0;
}

.subcategory-link {
  display: block;
  padding: 10px 15px;
  color: var(--gray-dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  text-transform: capitalize;
  border-radius: 0;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.subcategory-link:last-child {
  border-bottom: none;
}

.subcategory-link:hover {
  background-color: rgba(0, 230, 0, 0.08);
  color: var(--primary-color);
  transform: translateX(5px);
  padding-left: 20px;
}

/* Empty Dropdown State */
.nav-dropdown-empty {
  padding: 30px;
  text-align: center;
  color: var(--gray-dark);
}

.nav-dropdown-empty p {
  font-size: 14px;
  margin: 0;
}

/* ============================================
   NAVIGATION RIGHT - USER & CART
   ============================================ */

.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Icon Links */
.icon-link {
  position: relative;
  color: var(--text-color);
  font-size: 20px;
  padding: 10px;
  border-radius: 50%;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.icon-link:hover {
  background-color: rgba(0, 230, 0, 0.1);
  color: var(--primary-color);
  transform: scale(1.1);
}

/* Cart Count Badge */
.cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* User Profile Menu */
.user-profile-menu {
  position: relative;
}

.user-profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color) 0%, #00b300 100%);
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 230, 0, 0.2);
}

.user-profile-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 230, 0, 0.4);
}

/* User Profile Dropdown */
.user-profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background-color: var(--secondary-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-top: 3px solid var(--primary-color);
  border-radius: var(--border-radius);
  min-width: 250px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 999;
}

.user-profile-menu:hover .user-profile-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-profile-header {
  padding: 20px;
  border-bottom: 1px solid var(--gray-medium);
  background: linear-gradient(135deg, rgba(0, 230, 0, 0.05) 0%, rgba(0, 179, 0, 0.05) 100%);
}

.user-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-color);
  margin-bottom: 5px;
}

.user-email {
  font-size: 13px;
  color: var(--gray-dark);
  margin-bottom: 8px;
}

.user-role {
  display: inline-block;
  padding: 4px 12px;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  font-size: 11px;
  font-weight: 700;
  text-transform:capitalize;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.user-profile-dropdown a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.user-profile-dropdown a:last-child {
  border-bottom: none;
}

.user-profile-dropdown a:hover {
  background-color: rgba(0, 230, 0, 0.05);
  color: var(--primary-color);
  padding-left: 25px;
}

.user-profile-dropdown a i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.dashboard-link {
  background-color: rgba(0, 230, 0, 0.08);
  font-weight: 600;
}

.logout-link {
  color: #dc3545 !important;
}

.logout-link:hover {
  background-color: rgba(220, 53, 69, 0.05) !important;
  color: #dc3545 !important;
}

/* ============================================
   CART DROPDOWN STYLES
   ============================================ */

.cart-dropdown-container {
  position: relative;
}

.cart-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background-color: var(--secondary-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-top: 3px solid var(--primary-color);
  border-radius: var(--border-radius);
  width: 360px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 999;
  display: flex;
  flex-direction: column;
}

.cart-dropdown-container:hover .cart-dropdown,
.cart-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cart-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--gray-medium);
  background: linear-gradient(135deg, rgba(0, 230, 0, 0.05) 0%, rgba(0, 179, 0, 0.05) 100%);
}

.cart-dropdown-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
}

.cart-dropdown-close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--gray-dark);
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  transition: all 0.3s ease;
}

.cart-dropdown-close-btn:hover {
  color: var(--primary-color);
  transform: rotate(90deg);
}

.cart-dropdown-count {
  font-size: 12px;
  color: var(--gray-dark);
  background-color: var(--gray-light);
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
}

.cart-dropdown-items {
  max-height: 300px;
  overflow-y: auto;
  padding: 8px;
  flex-grow: 1;
}

.cart-dropdown-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--gray-dark);
  display: none; /* Hidden by default */
}

.cart-dropdown-empty.visible {
  display: block;
}

.cart-dropdown-empty i {
  font-size: 48px;
  color: var(--gray-medium);
  margin-bottom: 15px;
}

.cart-dropdown-empty p {
  font-size: 14px;
  margin: 0;
}

.cart-dropdown-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--gray-medium);
  margin-top: auto;
}

.cart-dropdown-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
}

.cart-dropdown-total-amount {
  color: var(--primary-color);
  font-size: 18px;
}

.cart-dropdown-view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  text-transform:capitalize;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.cart-dropdown-view-btn:hover {
  background-color: #00b300;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 230, 0, 0.3);
}

/* Cart Item in Dropdown */
.cart-item-dropdown {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border-radius: var(--border-radius);
}

.cart-item-dropdown:hover {
  background-color: rgba(0, 230, 0, 0.03);
}

.cart-item-dropdown:last-child {
  border-bottom: none;
}

.cart-item-image-container {
  flex-shrink: 0;
  width: 65px;
  height: 65px;
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid var(--gray-medium);
}

.cart-item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0; /* Prevents flex item from overflowing */
}

.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-color);
}

.cart-item-quantity {
  font-size: 12px;
  color: var(--gray-dark);
  margin-bottom: 5px;
}

.cart-dropdown-item-remove {
  background: transparent;
  border: none;
  color: var(--gray-dark);
  cursor: pointer;
  font-size: 14px;
  padding: 5px;
  margin-left: 10px;
  transition: all 0.3s ease;
}

.cart-dropdown-item-remove:hover {
  color: #dc3545; /* red */
  transform: scale(1.2);
}


/* ============================================
   SEARCH BAR STYLES
   ============================================ */

.search-bar {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  background-color: var(--secondary-color);
  z-index: 998;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.search-bar.active {
  max-height: 150px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.search-close-btn-top {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: 2px solid var(--gray-medium);
  color: var(--text-color);
  font-size: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.search-close-btn-top:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--secondary-color);
  transform: rotate(90deg);
}

.search-bar-container {
  width: 50%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
}

.search-form {
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--gray-light);
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 2px solid var(--gray-medium);
  transition: border-color 0.3s ease;
}

.search-input-wrapper:focus-within {
  border-color: var(--primary-color);
}

.search-icon {
  position: absolute;
  left: 20px;
  font-size: 18px;
  color: var(--gray-dark);
  pointer-events: none;
}

.search-input {
  flex: 1;
  padding: 15px 20px 15px 55px;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--text-color);
  background: transparent;
}

.search-input::placeholder {
  color: var(--gray-dark);
}

.search-submit-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 25px;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: none;
  font-size: 14px;
  font-weight: 700;
  text-transform: capitalize;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-submit-btn:hover {
  background-color: #00b300;
}

.search-submit-btn i {
  font-size: 16px;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE
   ============================================ */

/* Tablet and below */
@media (max-width: 992px) {
  header {
    position: static !important;
  }

  .nav-container {
    padding: 12px 20px;
  }

  .logo { /* Hide the main logo in the top bar on mobile */
    display: none;
  }

  /* Show hamburger menu */
  .hamburger {
    display: flex;
  }

  /* Hide desktop navigation */
  .nav-center {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background-color: var(--secondary-color);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 80px 0 20px;
    overflow-y: auto;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    z-index: 1000;
    pointer-events: none; /* don't block clicks when off-screen */
  }

  /* Show mobile menu when checkbox is checked */
  #menuToggle:checked ~ .nav-center {
    right: 0;
    pointer-events: auto;
  }

  /* Hamburger animation */
  #menuToggle:checked ~ .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  #menuToggle:checked ~ .hamburger span:nth-child(2) {
    opacity: 0;
  }

  #menuToggle:checked ~ .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  /* Mobile menu items */
  .nav-center > li {
    width: 100%;
    border-bottom: 1px solid var(--gray-light);
  }

  .nav-center > li > a {
    width: 100%;
    padding: 15px 20px;
    border-radius: 0;
    justify-content: space-between;
  }

  /* Mobile Dropdown - Click to toggle */
  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-top: none;
    border-radius: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background-color: var(--gray-light);
  }

  .nav-dropdown.active .nav-dropdown-menu {
    max-height: 2000px;
  }

  /* Rotate dropdown arrow on mobile when active */
  .nav-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
  }

  .products-mega-menu {
    min-width: 100%;
    max-width: 100%;
  }

  .nav-dropdown-content {
    padding: 10px 0;
  }

  .parent-category-link {
    padding: 12px 20px;
    font-size: 12px;
  }

  /* Mobile: Nested dropdowns appear below instead of to the side */
  .nested-side-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-top: none;
    border-radius: 0;
    margin-left: 20px;
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background-color: rgba(0, 230, 0, 0.03);
  }

  .parent-category-item.has-nested.active .nested-side-dropdown {
    max-height: 800px;
  }

  /* Rotate arrow on mobile when active */
  .parent-category-item.has-nested.active .parent-category-link::after {
    transform: rotate(90deg);
  }

  .nested-dropdown-container {
    padding: 8px 0;
  }

  .subcategory-link {
    padding: 10px 20px;
    font-size: 12px;
  }

  /* Quote button full width on mobile */
  .quote-btn {
    width: calc(100% - 40px);
    margin: 10px 20px;
    text-align: center;
    justify-content: center;
  }

  /* Search button */
  .search-toggle-btn {
    padding: 8px;
    font-size: 16px;
  }

  /* Logo adjustments - Switch to favicon on smaller screens */
  .logo-img {
    height: 40px;
  }

  /* Mobile overlay backdrop */
  #menuToggle:checked ~ .nav-center::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }

  /* Adjust nav-right spacing */
  .nav-right {
    gap: 10px;
  }

  .icon-link {
    padding: 8px;
    font-size: 18px;
  }

  .user-profile-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

/* Mobile phones and small tablets */
@media (max-width: 768px) {
  .nav-container {
    padding: 12px 15px;
  }

  /* Change header background and icon colors on small phones */
  header {
    background-color: var(--primary-color);
  }

  .hamburger span {
    background-color: var(--secondary-color); /* White hamburger lines */
  }

  .nav-right .icon-link {
    color: var(--secondary-color); /* White user/cart icons */
  }

  /* Full width mobile menu */
  .nav-center {
    width: 100%;
    max-width: 100%;
  }

  /* Compact dropdowns */
  .user-profile-dropdown,
  .cart-dropdown {
    min-width: 280px;
    max-width: 90vw;
    right: 0;
  }

  /* Adjust cart dropdown positioning */
  .cart-dropdown {
    right: -10px;
    width: 300px;
  }

  /* Search bar adjustments */
  .search-bar {
    top: 60px;
  }

  .search-bar.active {
    max-height: 120px;
  }

  .search-close-btn-top {
    width: 35px;
    height: 35px;
    font-size: 16px;
    right: 15px;
  }

  .search-bar-container {
    padding: 15px;
  }

  .search-input {
    padding: 12px 15px 12px 50px;
    font-size: 14px;
  }

  .search-submit-btn {
    padding: 12px 20px;
    font-size: 13px;
  }

  .search-submit-btn span {
    display: none;
  }

  .search-icon {
    left: 15px;
    font-size: 16px;
  }

  /* Compact header icons */
  .icon-link {
    padding: 6px;
    font-size: 16px;
  }

  .user-profile-avatar {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .cart-count {
    font-size: 9px;
    padding: 2px 5px;
    min-width: 16px;
  }

  /* Mobile navigation adjustments */
  .nav-center > li > a {
    padding: 14px 20px;
    font-size: 14px;
  }

  .parent-category-link {
    padding: 10px 20px;
    font-size: 11px;
  }

  .subcategory-link {
    padding: 8px 20px;
    font-size: 11px;
  }
}

/* Very small mobile devices */
@media (max-width: 480px) {
  .nav-container {
    padding: 8px 12px;
  }

  /* Full screen mobile menu */
  .nav-center {
    width: 100%;
    max-width: 100%;
    padding: 70px 0 20px;
  }

  /* Full width dropdowns */
  .cart-dropdown,
  .user-profile-dropdown {
    right: 0;
    left: 0;
    width: 100vw;
    max-width: 100vw;
    border-radius: 0;
  }

  .cart-dropdown-items {
    max-height: 220px;
  }

  /* Extra compact icons */
  .icon-link {
    font-size: 15px;
    padding: 5px;
  }

  .user-profile-avatar {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .cart-count {
    font-size: 8px;
    padding: 1px 4px;
    min-width: 14px;
  }

  /* Compact navigation */
  .nav-center > li > a {
    padding: 12px 15px;
    font-size: 13px;
  }

  .parent-category-link {
    padding: 10px 15px;
    font-size: 11px;
  }

  .subcategory-link {
    padding: 8px 15px;
    font-size: 10px;
  }

  .nested-side-dropdown {
    margin-left: 15px;
  }

  /* Quote button */
  .quote-btn {
    width: calc(100% - 30px);
    margin: 8px 15px;
    padding: 10px 20px;
    font-size: 11px;
  }

  /* Search bar */
  .search-bar {
    top: 55px;
  }

  .search-bar.active {
    max-height: 100px;
  }

  .search-bar-container {
    padding: 12px;
  }

  .search-input {
    padding: 10px 12px 10px 45px;
    font-size: 13px;
  }

  .search-submit-btn {
    padding: 10px 15px;
    font-size: 12px;
  }

  .search-icon {
    left: 12px;
    font-size: 14px;
  }

  .search-close-btn-top {
    width: 30px;
    height: 30px;
    font-size: 14px;
    right: 12px;
  }

  /* User profile dropdown */
  .user-profile-header {
    padding: 15px;
  }

  .user-name {
    font-size: 14px;
  }

  .user-email {
    font-size: 12px;
  }

  .user-profile-dropdown a {
    padding: 10px 15px;
    font-size: 13px;
  }

  /* Cart dropdown */
  .cart-dropdown-header {
    padding: 12px 15px;
  }

  .cart-dropdown-header h3 {
    font-size: 14px;
  }

  .cart-item-name {
    font-size: 12px;
  }

  .cart-item-price {
    font-size: 13px;
  }

  .cart-dropdown-view-btn {
    padding: 10px;
    font-size: 12px;
  }
}

/* ============================================
   MOBILE-ONLY HEADER EXTRA (LOGO & SEARCH)
   ============================================ */

.mobile-header-extra {
    display: none; /* Hidden by default on desktop */
    padding: 15px 20px;
    background-color: var(--secondary-color);
    border-bottom: 1px solid var(--gray-light);
}

.mobile-logo-container {
    text-align: center;
    margin-bottom: 15px;
}

.mobile-logo {
    height: 45px;
    width: auto;
    max-width: 200px;
}

.mobile-search-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.mobile-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--gray-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--gray-medium);
    transition: border-color 0.3s ease;
}

.mobile-search-input-wrapper:focus-within {
    border-color: var(--primary-color);
}

.mobile-search-icon {
    position: absolute;
    left: 15px;
    font-size: 14px;
    color: var(--gray-dark);
}

.mobile-search-input {
    flex: 1;
    padding: 12px 15px 12px 45px;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text-color);
    background: transparent;
}

.mobile-search-submit-btn {
    padding: 12px 18px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.mobile-search-submit-btn:hover {
    background-color: #00b300;
}

@media (max-width: 992px) {
    .mobile-header-extra {
        display: block;
    }
}

/* Sticky state for the mobile header extra section */
.mobile-header-extra.sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999; /* Below the main header's mobile menu z-index */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-in-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}


.nav-center::-webkit-scrollbar {
  width: 6px;
}

.nav-center::-webkit-scrollbar-track {
  background: var(--gray-light);
}

.nav-center::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.nav-center::-webkit-scrollbar-thumb:hover {
  background: #00b300;
}

.cart-dropdown-items::-webkit-scrollbar {
  width: 6px;
}

.cart-dropdown-items::-webkit-scrollbar-track {
  background: var(--gray-light);
}

.cart-dropdown-items::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.cart-dropdown-items::-webkit-scrollbar-thumb:hover {
  background: #00b300;
}
