/* Responsive Navbar CSS */
:root {
  --primary-color: #c26f33; /* بني محروق */
  --accent-color: #D4AF37;  /* ذهبي */
  --backColor: #fff;        /* لون الخلفية */
  --FontColor: #000;        /* لون الخط الفرعي */
  --darkback-color: #3f3c3c; /* لون الخلفية */
  --darkFontColor: #fff;    /* لون الخط الفرعي */
  --darkback-color: #3f3c3c; /* لون الخلفية */
  --darkFontColor: #fff;    /* لون الخط الفرعي */
}

/* Basic reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  color: #000;
  margin: 0;
  font-family: 'Nunito', sans-serif;
  background-color: #fdfdfd;
}

/* Dark Mode Styles */
body.dark {
  background-color: var(--darkback-color);
  color: var(--darkFontColor);
}

body.dark .navbar {
  background-color: #222;
  box-shadow: none;
}

body.dark .nav-links a, 
body.dark .user-sign-in a {
  background-color: #333;
  color: #fff;
}

body.dark .nav-links a:hover, 
body.dark .user-sign-in a:hover {
  background-color: #ff9500;
  color: white;
  border-color: #ff9500;
}

body.dark .dropdown-menu,
body.dark .user-menu,
body.dark .mobile-menu {
  background-color: #333;
}

body.dark .dropdown-menu a,
body.dark .user-menu a,
body.dark .mobile-menu a {
  color: white;
}

body.dark .user-menu a:hover {
  color: #ff9500;
}

body.dark .icons i,
body.dark .search-icon,
body.dark .user-icon,
body.dark .menu-toggle {
  color: white !important;
}


label i  {
  color: #fff !important;
}

body.dark label i {
  color: #000 !important;
}

/* Navbar Styles */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 20px;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  flex-wrap: wrap;
}

#CalledNav {
  width: 100%;
  padding: 0;
  margin: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  
  display: flex;
}

.logo img {
  /* height: 70px; */
  height: 80px;
}

.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav-links a, .user-sign-in a {
  text-decoration: none;
  color: black;
  font-weight: 600;
  font-size: 15px;
  padding: 8px 15px;
  border-radius: 30px;
  background-color: #f1f1f1;
  transition: all 0.3s ease;
  font-style: oblique;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid transparent;
}

.nav-links a:hover {
  background-color: rgba(255, 149, 0, 0.1);
  color: #5A3A22;
  border: 2px solid #ff9500;
}

.nav-links a.active {
  background-color: #ffffff;
  color: black;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Dropdown Menus */
.dropdown {
  position: relative;
}

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

.dropdown-menu li {
  list-style: none;
}

.dropdown-menu a:hover {
  background-color: #ff9500;
  color: white;
  border: none;
  border-radius: 30px;
}

.dropdown-menu a:hover i {
  color: white !important; 
}


.dropdown-menu a {
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  text-decoration: none;
  color: black;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 30px;
  background-color: transparent;
}

.dropdown-menu {
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  position: absolute;
  top: 100%;
  left: -35%;
  background-color: white;
  width: 180px;
  border-radius: 15px;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);
  padding: 8px;
  z-index: 1000;
  transition: all 0.3s ease;
}


.dropdown-menu li {
  list-style: none;
  margin: 4px 0;
}

body.dark .dropdown-menu a {
  border-radius: 30px;
}

body.dark .dropdown-menu a:hover {
  background-color: #ff9500;
  color: white;
  border-radius: 30px;
}

.dropdown-menu a i {
  font-size: 16px;
  color: #ff9500;
}

/* Icons */
.icons {
  display: flex;
  align-items: center;
  gap: 20px;
}

.icons i {
  font-size: 20px;
  color: black;
  cursor: pointer;
  transition: color 0.3s;
}

.icons i:hover {
  color: #ff9500;
}

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: 5px;
}

.search-section-header {
    padding: 8px 15px;
    background-color: #f8f9fa;
    color: #333;
    font-weight: bold;
    font-size: 14px;
    border-bottom: 1px solid #ddd;
}

.search-result-item {
    padding: 8px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f5f5f5;
}

.result-item-content {
    display: flex;
    align-items: center;
}

.result-item-content img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 10px;
}

.result-details {
    flex: 1;
}

.result-title {
    font-weight: 600;
    margin-bottom: 3px;
}

.result-price {
    font-size: 12px;
    color: #ff9500;
}

.no-results {
    padding: 15px;
    text-align: center;
    color: #888;
}

/* Dark mode styles for search dropdown */
body.dark .search-results-dropdown {
    background-color: #333;
    border-color: #444;
}

body.dark .search-section-header {
    background-color: #444;
    color: #fff;
    border-color: #555;
}

body.dark .search-result-item {
    border-color: #444;
}

body.dark .search-result-item:hover {
    background-color: #444;
}

body.dark .result-title {
    color: #fff;
}

body.dark .no-results {
    color: #ccc;
}

.search-container {
  position: absolute;
  top: 50%;
  right: 40%;
  transform: translateY(-50%);
  background: #f1f1f1;
  padding: 6px 15px;
  border-radius: 30px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  /* min-width: 240px; */
  width: 25%;
  display: none;
  flex-direction: row;
  align-items: center;
  z-index: 1;
}

.search-container input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  width: 180px;
  margin: 0 8px;
}

.search-container i {
  color: #333;
}

.close-search {
  font-size: 18px;
  cursor: pointer;
}

body.dark .search-container {
  background-color: #333;
}

body.dark .search-container input,
body.dark .search-container i {
  color: white;
}

/* Cart Icon */
.cart-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: #ff9500;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
}

/* User Dropdown */
.user-dropdown {
  position: relative;
}

.user-icon {
  font-size: 20px;
  color: black;
  cursor: pointer;
}

.user-menu {
  position: absolute;
  top: 35px;
  right: 0;
  width: 220px;
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  padding: 15px;
  display: none;
  z-index: 1001;
}

.user-menu.show {
  display: block;
}

.user-menu .profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 10px;
}

.user-menu .profile img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.user-menu .profile .info {
  display: flex;
  flex-direction: column;
}

.user-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  text-decoration: none;
  color: black;
  font-size: 14px;
  transition: 0.3s;
  border-radius: 30px;
}

.user-menu a:hover {
  color: #ff9500;
  background-color: #f1f1f1;
}

.user-menu a:hover i {
  color: #ff9500;
}

.user-menu a:nth-of-type(3) {
  border-bottom: 1px solid #ccc;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

/* Cart Dropdown */
.cart-dropdown {
  position: absolute;
  top: 60px;
  right: 10px;
  width: 350px;
  max-width: 95vw;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 20px;
  z-index: 1000;
  display: none;
  font-family: 'Arial', sans-serif;
  max-height: 80vh;
  overflow-y: auto;
}

.cart-items h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #333;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.cart-items .cart-items-list {
  padding: 0 8px;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 15px;
}

.cart-items .cart-item-dropdown {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.cart-items .Drop-item-info {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  flex-grow: 1;
  padding: 0;
  flex-direction: row;
}

.cart-items .Drop-item-info img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.cart-items .item-name {
  font-weight: 600;
  margin-bottom: 4px;
  color: #333;
}

.cart-items .item-price {
  text-align: right;
  min-width: 80px;
  font-weight: bold;
  color: #333;
}

.cart-items .item-price button {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px 0;
  display: block;
  width: 100%;
}

.cart-items .item-price button:hover {
  text-decoration: underline;
}

.cart-items .cart-summary {
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.cart-items .subtotal1 {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-weight: 600;
}

.cart-items .cart-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.cart-items .view-cart,
.cart-items .checkout-btn {
  display: block;
  text-align: center;
  padding: 12px;
  border: 1px solid #eee;
  width: 100%;
  border-radius: 30px;
  color: #fff;
  text-decoration: none;
  transition: all 0.2s ease;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.view-cart {
  background-color: #fff !important;
  color: #000 !important;
}

.view-cart:hover {
  background-color: #f4f4f4 !important;
}

body.dark .view-cart {
  background-color: var(--darkback-color) !important;
  color: var(--darkFontColor) !important;
}

.view-cart:hover {
  background-color: #b0b0b0;
}

.cart-items .checkout-btn:hover {
  opacity: 0.7;
}

.cart-items .empty-cart {
  text-align: center;
  padding: 20px 0;
  color: #666;
}

/* Dark mode cart dropdown */
body.dark .cart-dropdown {
  background-color: var(--darkback-color);
  color: var(--darkFontColor);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body.dark .cart-items h3 {
  color: var(--darkFontColor);
  border-bottom: 1px solid #555;
}

body.dark .cart-item-dropdown {
  border-bottom: 1px solid #555;
}

body.dark .item-name {
  color: var(--darkFontColor);
}

body.dark .item-price {
  color: var(--darkFontColor);
}

body.dark .item-price button {
  color: #ef4444;
}

body.dark .cart-summary {
  border-top: 1px solid #555;
}
/* 
body.dark .cart-actions .view-cart,
body.dark .cart-actions .checkout-btn {
  border-color: #555;
  color: var(--darkFontColor);
} */

body.dark .empty-cart {
  color: #aaa;
}

/* Empty Cart Styling */
.empty-cart-container {
  text-align: center;
  color: #666;
}

.empty-cart-icon {
  margin-bottom: 15px;
}

.empty-cart-message {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

body.dark .empty-cart-message {
  color: #fff;
}

.empty-cart-subtitle {
  font-size: 14px;
  color: #888;
  margin-bottom: 25px;
}

body.dark .empty-cart-subtitle {
  color: #b8b8b8;
}

.shop-now-btn {
  display: inline-block;
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  color: white;
  padding: 12px 25px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.shop-now-btn:hover {
  background: linear-gradient(135deg, #ff5252, #ff7979);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
  color: white;
  text-decoration: none;
}

.shop-now-btn i {
  margin-right: 8px;
}

/* Alternative styling if you prefer a different color scheme */
.shop-now-btn.alternative {
  background: linear-gradient(135deg, #4CAF50, #66BB6A);
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.shop-now-btn.alternative:hover {
  background: linear-gradient(135deg, #43A047, #5CB85C);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Error message styling */
/* .error-message {
  text-align: center;
  padding: 20px;
  color: #dc3545;
  font-weight: 500;
} */

/* Custom Scrollbar */
.cart-dropdown::-webkit-scrollbar,
.cart-items .cart-items-list::-webkit-scrollbar {
  width: 6px;
  border-radius: 3px;
}

.cart-dropdown::-webkit-scrollbar-track,
.cart-items .cart-items-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.cart-dropdown::-webkit-scrollbar-thumb,
.cart-items .cart-items-list::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.cart-dropdown::-webkit-scrollbar-thumb:hover,
.cart-items .cart-items-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.hamburger {
  padding: 10px;
  margin: 12px auto;
}

/* Media Queries */
@media (max-width: 1024px) {
  .navbar {
    padding: 3px 15px;
  }
  
  .logo img {
    height: 60px;
  }
  
  .nav-links a, .user-sign-in {
    padding: 6px 12px;
    font-size: 14px;
  }
}

@media (max-width: 900px) {
  .nav-links {
    gap: 5px;
  }
  
  .icons {
    gap: 15px;
  }
  
  .search-container {
    min-width: 200px;
    right: 28%;
  }
  
  .search-container input {
    width: 140px;
  }
}
/* Enhanced Responsive Nav-links Fix */

/* Improve the transition between desktop and mobile views */
@media (max-width: 768px) {
  /* Hide desktop nav-links properly with a transition */
  .nav-links {
    display: none;
  }
  
}

/* Medium screen improvements - don't hide nav-links too early */
@media (min-width: 769px) and (max-width: 1024px) {
  .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .nav-links a, .user-sign-in {
    padding: 6px 10px;
    font-size: 13px;
    margin: 3px;
  }
}

/* Small tablet responsive improvements */
@media (min-width: 576px) and (max-width: 768px) {
  .navbar {
    padding-bottom: 10px;
  }
  
  .logo img {
    height: 45px;
  }
}

/* Extra small devices */
@media (max-width: 375px) {
  .navbar {
    padding: 5px;
  }
  
  .logo img {
    height: 35px;
  }
  
  .icons {
    gap: 8px;
  }
  
  .icons i {
    font-size: 16px;
  }
}

/* Fix for JavaScript responsive handling */
.nav-links.mobile-visible {
  display: flex;
  flex-direction: column;
  width: 100%;
  position: absolute;
  top: 60px;
  left: 0;
  background: rgba(0, 0, 0, 0.9);
  padding: 20px 0;
  z-index: 999;
}

.nav-links.mobile-visible a {
  color: white;
  width: 90%;
  margin: 5px auto;
  text-align: center;
}



/* Hamburger Icon and X Animation */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  width: 30px;
  height: 25px;
  transition: all 0.3s ease;
  padding: 0;
  margin-right: 15px;
}

.hamburger i {
  font-size: 24px;
  transition: all 0.3s ease;
  color: var(--primary-color);
}

/* X animation for hamburger */
.hamburger.active i::before {
  content: "\f00d"; /* Font Awesome X icon */
}

/* Sidebar Navigation Styles */
body.sidebar-open {
  overflow: hidden; /* Prevent scrolling when sidebar is open */
}

.nav-links {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Sidebar Active State */
.nav-links.sidebar-active {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background-color: #fff;
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
  padding: 80px 20px 30px;
  z-index: 998;
  transform: translateX(0);
  overflow-y: auto;
}

/* Dark mode sidebar */
body.dark .nav-links.sidebar-active {
  background-color: #222;
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.4);
}

/* Sidebar Links */
.nav-links.sidebar-active a {
  width: 100%;
  padding: 15px;
  margin: 5px 0;
  font-size: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* Sidebar Dropdown */
.nav-links.sidebar-active .dropdown {
  width: 100%;
}

.nav-links.sidebar-active .dropdown-menu {
  position: static;
  opacity: 1;
  visibility: hidden;
  transform: none;
  width: 100%;
  box-shadow: none;
  padding: 0;
  margin: 0 0 10px 20px;
  display: none;
  transition: none;
}

.nav-links.sidebar-active .dropdown-open .dropdown-menu {
  visibility: visible;
  display: block;
}

.nav-links.sidebar-active .dropdown-menu li {
  margin: 5px 0;
}

.nav-links.sidebar-active .dropdown-menu a {
  padding: 10px 15px;
  font-size: 14px;
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .navbar {
    justify-content: space-between;
  }
  
  .logo {
    display: flex;
    align-items: center;
  }
  
  .hamburger {
    display: block;
    order: -1;
  }
  
  /* Fix for navigation when it's not in sidebar mode */
  .nav-links:not(.sidebar-active) {
    display: none;
  }
  
  /* Initial state - off screen */
  .nav-links {
    transform: translateX(100%);
    opacity: 0;
  }
  
  /* Active state - visible */
  .nav-links.sidebar-active {
    transform: translateX(0);
    opacity: 1;
  }
}




/* Search Container - Fixed and Responsive */
.search-container {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #f1f1f1;
  padding: 6px 15px;
  border-radius: 30px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  width: clamp(200px, 25vw, 400px); /* Responsive width */
  max-width: calc(100vw - 200px); /* Prevent overflow */
  display: none;
  align-items: center;
  z-index: 1001;
  gap: 8px;
}

.search-container input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  flex: 1; /* Take remaining space */
  min-width: 0; /* Allow shrinking */
  margin: 0;
}

.search-container .search-icon {
  color: #333;
  font-size: 16px;
  flex-shrink: 0; /* Don't shrink */
}

.search-container .close-search {
  font-size: 18px;
  cursor: pointer;
  color: #333;
  flex-shrink: 0; /* Don't shrink */
  padding: 2px;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.search-container .close-search:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

/* Dark mode search container */
body.dark .search-container {
  background-color: #333;
}

body.dark .search-container input,
body.dark .search-container .search-icon,
body.dark .search-container .close-search {
  color: white;
}

body.dark .search-container .close-search:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Search Results Dropdown - Made Responsive */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  max-height: min(300px, 50vh); /* Responsive height */
  overflow-y: auto;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1002;
  transform-origin: top;
  animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: scaleY(0.95);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

.search-section-header {
  padding: 8px 15px;
  background-color: #f8f9fa;
  color: #333;
  font-weight: bold;
  font-size: 14px;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 1;
}

.search-result-item {
  padding: 8px 15px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s;
}

.search-result-item:hover {
  background-color: #f5f5f5;
}

.search-result-item:last-child {
  border-bottom: none;
}

.result-item-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-item-content img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
}

.result-details {
  flex: 1;
  min-width: 0; /* Allow text to wrap/truncate */
}

.result-title {
  font-weight: 600;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-price {
  font-size: 12px;
  color: #ff9500;
  font-weight: 500;
}

.no-results {
  padding: 20px 15px;
  text-align: center;
  color: #888;
  font-style: italic;
}

/* Dark mode styles for search dropdown */
body.dark .search-results-dropdown {
  background-color: #333;
  border-color: #444;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark .search-section-header {
  background-color: #444;
  color: #fff;
  border-color: #555;
}

body.dark .search-result-item {
  border-color: #444;
}

body.dark .search-result-item:hover {
  background-color: #444;
}

body.dark .result-title {
  color: #fff;
}

body.dark .no-results {
  color: #ccc;
}

/* Custom Scrollbar for Search Dropdown */
.search-results-dropdown::-webkit-scrollbar {
  width: 6px;
}

.search-results-dropdown::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.search-results-dropdown::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.search-results-dropdown::-webkit-scrollbar-thumb:hover {
  background: #555;
}

body.dark .search-results-dropdown::-webkit-scrollbar-track {
  background: #444;
}

body.dark .search-results-dropdown::-webkit-scrollbar-thumb {
  background: #666;
}

/* Voice Search Icon */
.voice-search-icon {
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 15px;
    background-color: #000;
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.voice-search-icon:hover {
    transform: scale(1.1);
    background-color: #333;
}

/* Voice Search Icon inside search container */
.search-container .voice-search-icon {
  cursor: pointer;
  font-size: 1.2rem;
  margin: 0 8px;
  color: #a8a4a4;
  transition: all 0.3s ease;
}

.search-container .voice-search-icon:hover {
  transform: scale(1.1);
  color: #ff9500;
}

body.dark .search-container .voice-search-icon {
  color: white;
}

body.dark .search-container .voice-search-icon:hover {
  color: #ff9500;
}

/* Voice Search Container */
.voice-search-container {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: none;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
}

.voice-search-animation {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.voice-wave {
    width: 50px;
    height: 50px;
    background-color: #000;
    border-radius: 50%;
    position: relative;
    transition: transform 0.1s ease-out, background-color 0.2s ease;
}

.listening .voice-wave::before,
.listening .voice-wave::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.listening .voice-wave::after {
    animation-delay: 0.5s;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.voice-search-text {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.voice-search-result {
    font-size: 18px;
    font-weight: bold;
    color: #000;
    margin-bottom: 15px;
    text-align: center;
    min-height: 24px;
}

.close-voice-search {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 18px;
    color: #666;
}

.close-voice-search:hover {
    color: #000;
}

/* Mobile and Small Screen Adjustments */
.search-container {
  /* Use container queries for better responsiveness */
  container-type: inline-size;
}

/* When search container is narrow */
@container (max-width: 250px) {
  .search-container input {
    font-size: 14px;
  }
  
  .search-container .search-icon,
  .search-container .close-search {
    font-size: 14px;
  }
}

/* Fallback for browsers without container query support */
@media (max-width: 480px) {
  .search-container {
    right: 2%;
    width: clamp(180px, 40vw, 300px);
    padding: 6px 12px;
  }
  
  .search-container input {
    font-size: 14px;
  }
  
  .search-results-dropdown {
    max-height: 40vh;
  }
  
  .result-item-content img {
    width: 35px;
    height: 35px;
  }
  
  .search-section-header {
    font-size: 13px;
    padding: 6px 12px;
  }
  
  .search-result-item {
    padding: 6px 12px;
  }
}



.Dropquantity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}

.Dropquantity-input {
  width: 50px;
  text-align: center;
  padding: 2px 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.Dropquantity-btn {
  background: #f0f0f0;
  border: none;
  padding: 3px 8px;
  cursor: pointer;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.2s;
}

.Dropquantity-btn:hover {
  background: #ddd;
}