/* Search Section Styles - Simplified (Categories Removed) */
.search-categories-section {
  background: transparent;
  /* Removed pink gradient */
  padding: 15px 0;
  position: relative;
  z-index: 1000;
  max-width: 1140px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: visible;
}

/* Container for search section */
.search-categories-section .container {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1001;
  overflow: visible;
}

/* Flex container for search (Centered) */
.search-categories-container-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Center the search bar */
  order: 1;
  position: relative;
  overflow: visible;
  gap: 15px;
  /* Added gap for support icon */
}

.store-brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #ffffff;
  border: 1px solid #d4af37;
  border-radius: 50%;
  /* Perfectly circular */
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.1);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.store-brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-brand-icon:hover {
  border-color: #ffd700;
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(212, 175, 55, 0.2);
}

.support-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #ffffff;
  border: 1px solid #d4af37;
  border-radius: 12px;
  color: #d4af37;
  font-size: 1.3rem;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.1);
  transition: all 0.3s ease;
  text-decoration: none;
  flex-shrink: 0;
}

.support-btn:hover {
  background: #fffdf7;
  border-color: #ffd700;
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(212, 175, 55, 0.2);
  color: #d4af37;
}

.search-form {
  flex: 1;
  /* Take remaining space */
  max-width: 600px;
  /* Slightly wider since it's alone */
  margin: 0;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #d4af37;
  /* Golden Border */
  border-radius: 12px;
  /* Smooth corners */
  padding: 0 15px;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.05);
  width: 100%;
  height: 44px;
  /* Fixed height for symmetry */
  z-index: 999;
  transition: all 0.3s ease;
}

.search-input-group:focus-within {
  border-color: #ffd700;
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
}

.search-icon {
  color: #d4af37;
  /* Golden Icon */
  font-size: 1.1rem;
  margin-left: 10px;
}

.search-input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  font-size: 1rem;
  color: #2c3e50;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Tajawal', sans-serif;
}

.search-input::placeholder {
  color: #a0aec0;
  font-size: 0.95rem;
}

/* Hide mobile close button on desktop, show categories button and mobile close button only on mobile */


/* Hide 'تسوق حسب' text in dropdown menu on desktop */


/* Mobile Responsive */
/* Mobile Styles are now default */
.search-categories-section {
  padding: 12px 15px;
  max-width: none;
  border-radius: 0;
  margin: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #e5dac9;
  /* Match body background */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  width: 100%;
  overflow: visible;
}

.search-categories-container-flex {
  flex-direction: row;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.search-form {
  flex: 1;
  max-width: 100%;
}

.search-input-group {
  height: 42px;
  border-radius: 12px;
}

.support-btn {
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
}

.store-brand-icon {
  width: 42px;
  height: 42px;
}

/* Live Search Results */
.live-search-results {
  display: none;
  position: relative;
  width: 100%;
  background: white;
  border-radius: 15px 15px 0 0;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1001;
  margin-bottom: 10px;
  order: -1;
  /* Place above the search bar */
}

.live-search-results.show {
  display: block;
}

.live-search-header {
  padding: 10px 15px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  font-weight: 600;
  color: #495057;
  font-size: 0.9rem;
}

.live-search-items {
  max-height: 320px;
  overflow-y: auto;
}

.live-search-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s;
}

.live-search-item:hover {
  background-color: #f8f9fa;
  text-decoration: none;
  color: inherit;
}

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

.live-search-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  margin-left: 12px;
  flex-shrink: 0;
}

.live-search-info {
  flex: 1;
  min-width: 0;
}

.live-search-title {
  font-weight: 600;
  color: #212529;
  font-size: 0.9rem;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-search-branch {
  font-size: 0.75rem;
  color: #d4af37;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.live-search-branch i {
  font-size: 0.8rem;
}

.live-search-price {
  color: #28a745;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.live-search-price .price-old {
  color: #6c757d;
  text-decoration: line-through;
  margin-left: 8px;
  font-size: 0.8rem;
}

.live-search-price .price-new {
  color: #28a745;
}

.live-search-code {
  color: #6c757d;
  font-size: 0.75rem;
}

.live-search-empty {
  padding: 30px 15px;
  text-align: center;
  color: #6c757d;
}

.live-search-empty i {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #adb5bd;
}

.live-search-empty p {
  margin: 0;
  font-size: 0.9rem;
}

.live-search-footer {
  padding: 10px 15px;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
  text-align: center;
}

.live-search-footer a {
  color: #d4af37;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
}

.live-search-footer a:hover {
  text-decoration: underline;
}

/* Mobile Responsive for Live Search */
@media (max-width: 768px) {
  .live-search-results {
    max-height: 300px;
    border-radius: 12px 12px 0 0;
    margin-bottom: 8px;
  }

  .live-search-items {
    max-height: 220px;
  }

  .live-search-image {
    width: 50px;
    height: 50px;
  }

  .live-search-title {
    font-size: 0.85rem;
  }

  .live-search-price {
    font-size: 0.8rem;
  }
}