.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background-color: var(--surface);
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 64px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0; /* Important for text truncation */
}

.back-button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg);
  border-radius: 50%;
  color: var(--text-dark);
  flex-shrink: 0;
}

.header-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  cursor: pointer;
  transition: opacity 0.2s;
}

.header-logo:hover {
  opacity: 0.8;
}

.header-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-picker {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.location-main {
  display: flex;
  align-items: center;
  gap: 4px;
}

.location-label {
  font-weight: 700;
  font-size: 0.95rem;
}

.location-sub {
  font-size: 0.75rem;
  color: var(--text-mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.user-profile-section {
  display: flex;
  align-items: center;
  gap: 4px;
}

.user-name-header {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 4px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg);
  border-radius: 50%;
  color: var(--text-mid);
  flex-shrink: 0;
}

.icon-button.profile {
  background-color: var(--primary);
  color: white;
}


.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: rgba(35, 22, 81, 0.05); /* Light Purple Wash */
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.cart-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background-color: var(--primary);
  border-radius: 8px;
  color: white;
  font-weight: 600;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.cart-count {
  background-color: white;
  color: #000000; /* Black text as requested earlier */
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
}

.cart-price {
  white-space: nowrap;
}

.primary-color {
  color: var(--primary);
}

@media (max-width: 360px) {
  .location-sub, .cart-text {
    display: none;
  }
  .user-name-header {
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
