/* Store Page (فروشگاه) — Public store at /store. Entry: store.html. Formerly quick-order. */
:root {
  /* Colors - consolidated */
  --quick-bg: rgb(255 255 255 / 1%);
  --quick-border: rgba(139, 92, 246, 0.15);
  --quick-text: var(--ink);
  --quick-text-secondary: var(--ink-2);
  --quick-accent: #5b43ea;
  --quick-success: #26c281;
  --quick-warning: #ffb020;
  --quick-danger: #f59e0b;
  --quick-info: #3b82f6;
  
  /* Do not override --bg here; use header/index so Store matches other public pages */
  
  /* Dashboard variables for service modal compatibility - must match other pages */
  --dashboard-bg: #0a0818;
  --dashboard-panel: rgba(255, 255, 255, 0.02);
  --dashboard-border: var(--dashboard-border, rgba(255, 255, 255, 0.04));
  --dashboard-accent: #5b43ea;
  --dashboard-success: #26c281;
  --dashboard-warning: #ffb020;
  --dashboard-danger: #f59e0b;
  --dashboard-info: #3b82f6;
  
  /* Brand variable for compatibility with filter-system.css */
  --brand: var(--quick-accent);
  
  /* Transition variable for dropdown */
  --transition-normal: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Spacing - simplified scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
  --space-3xl: 32px;
  
  /* Border radius - aligned with header.css for consistency across pages */
  --radius-xs: 10px;
  --radius-sm: 16px;
  --radius: 22px;
  --radius-lg: var(--radius, 22px);
  
  /* Transitions - single option */
  --transition: 0.2s ease;
}

/* Store/Quick-order use same filter bar as category pages (injected by FilterManager) — do not hide */

.header-controls {
  overflow: visible !important;
  position: relative;
  z-index: 1;
  display: grid !important;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: var(--space-lg);
}

.header-controls > .search-wrapper {
  grid-column: 1;
}

.header-controls > .filter-actions {
  grid-column: 2;
  justify-content: flex-start !important;
  margin-left: 0 !important;
}

/* Ensure dashboard-main and store main don't clip dropdowns */
.dashboard-main,
.main-content.store-main {
  overflow: visible;
}

/* Sort Dropdown Menu — theme-aligned (same as filter-system / hero-sort) */
.sort-dropdown-menu {
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid var(--accent, rgba(91, 67, 234, 0.2)) !important;
  border-radius: var(--radius-sm, 16px) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

/* Quick Order Container */
.quick-order-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* ============================================
   Hero / search (legacy; Store uses .hero-section from cat.css)
   ============================================ */

.quick-order-hero {
  padding: var(--space-md) 0 var(--space-sm) 0;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-search-wrapper {
  position: relative;
  margin-bottom: var(--space-sm);
}

.hero-search-container {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Search wrapper — matches site header .search-input-wrapper */
.hero-search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm, 16px);
  transition: all var(--transition-normal, 0.25s ease);
  height: 48px;
  overflow: hidden;
}

.hero-search-input-wrapper:focus-within {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--active-border);
  box-shadow: 0 0 0 2px rgba(91, 67, 234, 0.1);
}

.hero-search-input {
  width: 100%;
  padding: 0 2.75rem 0 2.5rem;
  background: transparent;
  border: none;
  outline: none;
  border-radius: var(--radius-sm, 16px);
  color: var(--quick-text, var(--ink, #fff));
  font-size: 0.9375rem;
  font-weight: 400;
  transition: color 0.2s ease;
  box-sizing: border-box;
  height: 48px;
  min-width: 0;
}

.hero-search-input:focus {
  outline: none;
}

.hero-search-input::placeholder {
  color: var(--quick-text-secondary, rgba(255, 255, 255, 0.5));
  opacity: 0.8;
}

.hero-search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--brand);
  pointer-events: none;
  opacity: 0.75;
  transition: opacity 0.2s ease;
  z-index: 1;
}

.hero-search-input-wrapper:focus-within .hero-search-icon {
  opacity: 1;
}

.hero-search-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--quick-text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transition: color 0.2s ease, background 0.2s ease;
  opacity: 0.8;
  z-index: 1;
}

.hero-search-clear:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--quick-text);
  opacity: 1;
}

.hero-search-clear svg {
  width: 16px;
  height: 16px;
}

/* Hero Filter Button — matches site header .user-btn */
.hero-filter-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm, 16px);
  color: var(--ink-2, rgba(255, 255, 255, 0.8));
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  transition: all var(--transition-normal, 0.25s ease);
  white-space: nowrap;
  height: 48px;
  flex-shrink: 0;
  position: relative;
}

.hero-filter-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--active-border);
  color: var(--quick-text, var(--ink, #fff));
}

.hero-filter-btn:active {
  transform: scale(0.98);
}

.hero-filter-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--brand);
  stroke: var(--brand);
}

.hero-filter-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--brand);
  color: #fff;
  font-size: 0.5625rem;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
  line-height: 1.3;
}

.hero-filter-text {
  display: none;
}

@media (min-width: 640px) {
  .hero-filter-text {
    display: inline;
  }
}

/* Hero Sort Button — matches site header .user-btn */
.hero-sort-dropdown-wrapper {
  position: relative;
  display: inline-block;
  z-index: 1;
  flex-shrink: 0;
}

.hero-sort-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm, 16px);
  color: var(--ink-2, rgba(255, 255, 255, 0.8));
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  transition: all var(--transition-normal, 0.25s ease);
  white-space: nowrap;
  height: 48px;
  flex-shrink: 0;
}

.hero-sort-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--active-border);
  color: var(--quick-text, var(--ink, #fff));
}

.hero-sort-btn:active {
  transform: scale(0.98);
}

.hero-sort-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--brand);
  stroke: var(--brand);
}

.hero-sort-arrow {
  display: none;
}

.hero-sort-text {
  display: none;
}

@media (min-width: 640px) {
  .hero-sort-text {
    display: inline;
  }
}

/* Sort Dropdown Menu — matches theme (same as filter-system.css sort dropdown) */
.hero-sort-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  max-width: 280px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--accent, rgba(91, 67, 234, 0.2));
  border-radius: var(--radius-sm, 16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  z-index: 2;
  padding: 6px;
  overflow: hidden;
}

.hero-sort-dropdown-wrapper.active .hero-sort-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0s;
}

.hero-sort-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm, 16px);
  color: var(--ink-2, rgba(255, 255, 255, 0.75));
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  text-align: left;
}

.hero-sort-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink, #fff);
}

.hero-sort-dropdown-item[aria-checked="true"],
.hero-sort-dropdown-item.active {
  background: var(--active-bg, rgba(91, 67, 234, 0.12));
  color: var(--brand, #5b43ea);
  font-weight: 500;
}

.hero-sort-dropdown-item .sort-option-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0;
  flex-shrink: 0;
  color: var(--brand, #5b43ea);
  opacity: 0.8;
}

.hero-sort-dropdown-item:hover .sort-option-icon {
  opacity: 0.9;
}

.hero-sort-dropdown-item[aria-checked="true"] .sort-option-icon,
.hero-sort-dropdown-item.active .sort-option-icon {
  opacity: 1;
}

.hero-sort-dropdown-item .sort-option-icon svg {
  width: 14px;
  height: 14px;
}

.hero-sort-dropdown-item .sort-option-label {
  flex: 1;
  font-size: 0.875rem;
}

.hero-sort-dropdown-item .sort-check-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0;
  color: var(--brand, #5b43ea);
  transition: opacity 0.2s ease;
}

.hero-sort-dropdown-item[aria-checked="true"] .sort-check-icon,
.hero-sort-dropdown-item.active .sort-check-icon {
  opacity: 1;
}

/* Autocomplete Dropdown */
.hero-search-autocomplete {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(10, 8, 24, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  z-index: 1000;
  overflow: hidden;
  max-height: 400px;
  overflow-y: auto;

  /* Root fix: no display/animation toggling (prevents "flash" when results re-render) */
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.14s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.14s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0.14s;
}

.hero-search-autocomplete.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.14s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.14s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0s;
}

.autocomplete-suggestions {
  padding: var(--space-sm);
}

.autocomplete-suggestion-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
  color: var(--quick-text);
  font-size: 0.875rem;
  font-weight: 400;
  position: relative;
  margin-bottom: 2px;
}

.autocomplete-suggestion-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 0;
  background: var(--quick-accent);
  border-radius: 0 2px 2px 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.autocomplete-suggestion-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--quick-text);
  padding-left: calc(var(--space-lg) + 4px);
}

.autocomplete-suggestion-item:hover::before {
  transform: translateY(-50%) scaleY(1);
  height: 60%;
}

.autocomplete-suggestion-item:hover .suggestion-text {
  color: var(--quick-accent);
  font-weight: 500;
}

.autocomplete-suggestion-item .suggestion-icon {
  width: 18px;
  height: 18px;
  opacity: 0.5;
  flex-shrink: 0;
  transition: all 0.15s ease;
  color: var(--quick-text-secondary);
}

.autocomplete-suggestion-item:hover .suggestion-icon {
  opacity: 0.8;
  color: var(--quick-accent);
}

.autocomplete-suggestion-item .suggestion-image {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--accent);
  transition: all 0.15s ease;
}

.autocomplete-suggestion-item:hover .suggestion-image {
  border-color: var(--active-border);
  transform: scale(1.05);
}

.autocomplete-suggestion-item .suggestion-text {
  flex: 1;
  transition: all 0.15s ease;
  line-height: 1.4;
}

.autocomplete-suggestion-item .suggestion-category {
  font-size: 0.6875rem;
  color: var(--quick-text-secondary);
  opacity: 0.6;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Popular Searches Section - Minimal */
.autocomplete-popular {
  padding: var(--space-md) var(--space-lg);
  padding-top: var(--space-sm);
}

.autocomplete-popular-items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.autocomplete-popular-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease 0.1s;
  font-size: 0.8125rem;
  color: var(--quick-text-secondary);
  font-weight: 400;
  position: relative;
}

.autocomplete-popular-item .popular-trend-icon {
  width: 14px;
  height: 14px;
  opacity: 0.6;
  color: var(--quick-text-secondary);
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.autocomplete-popular-item:hover .popular-trend-icon {
  opacity: 1;
  color: var(--quick-accent);
  transform: scale(1.1);
}

.autocomplete-popular-item:hover {
  color: var(--quick-text);
}

.autocomplete-popular-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--quick-accent);
  transform: translateX(-50%);
  transition: width 0.2s ease;
}

.autocomplete-popular-item:hover::after {
  width: 80%;
}

/* Quick Filter Pills (Dribbble-style) */
.hero-quick-filters {
  display: none;
  /* Original: flex, centered, gap var(--space-md), flex-wrap */
}

.quick-filters-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--accent, rgba(91, 67, 234, 0.2));
  border-radius: var(--radius-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.quick-filters-icon-wrapper::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.quick-filters-icon-wrapper:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--active-border, var(--dashboard-accent));
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(91, 67, 234, 0.12);
}

.quick-filters-icon-wrapper:hover::before {
  opacity: 1;
}

.quick-filters-icon {
  width: 20px;
  height: 20px;
  color: var(--quick-accent);
  filter: drop-shadow(0 0 6px rgba(91, 67, 234, 0.5));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.quick-filters-icon-wrapper:hover .quick-filters-icon {
  color: var(--quick-accent);
  filter: drop-shadow(0 0 8px rgba(91, 67, 234, 0.6));
  transform: scale(1.1);
}

.quick-filters-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--quick-text-secondary);
  white-space: nowrap;
}

.quick-filters-pills {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(91, 67, 234, 0.3) transparent;
}

.quick-filters-pills::-webkit-scrollbar {
  height: 4px;
}

.quick-filters-pills::-webkit-scrollbar-track {
  background: transparent;
}

.quick-filters-pills::-webkit-scrollbar-thumb {
  background: rgba(91, 67, 234, 0.3);
  border-radius: 2px;
}

.quick-filters-pills::-webkit-scrollbar-thumb:hover {
  background: rgba(91, 67, 234, 0.5);
}

.quick-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
}

.quick-filter-pill::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--quick-accent);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.2s ease;
}

.quick-filter-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.03);
}

.quick-filter-pill:hover::after {
  width: 60%;
}

.quick-filter-pill:active {
  transform: scale(0.98);
}

.quick-filter-pill.active {
  color: #ffffff;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--accent, rgba(91, 67, 234, 0.2));
}

.quick-filter-pill.active::after {
  width: 80%;
}


/* Mobile Responsive */
@media (max-width: 768px) {
  .quick-order-hero {
    padding: var(--space-sm) 0 0 0;
    margin-bottom: 0;
  }
  
  /* hero-title is globally hidden */
  
  .hero-search-container {
    flex-direction: row;
    gap: 0.5rem;
  }

  .hero-search-input {
    font-size: 0.875rem;
    padding: 0 2.25rem 0 2.25rem;
    height: 44px;
    flex: 1;
    min-width: 0;
    border-radius: var(--radius-sm);
  }

  .hero-search-icon {
    left: 0.75rem;
    width: 16px;
    height: 16px;
  }

  .hero-search-clear {
    right: 0.375rem;
    width: 26px;
    height: 26px;
  }

  .hero-search-clear svg {
    width: 14px;
    height: 14px;
  }

  /* Icon-only: match header button style, no extra space for label */
  .hero-filter-btn,
  .hero-sort-btn {
    min-width: 44px;
    width: 44px;
    max-width: 44px;
    padding: 0;
    height: 44px;
    border-radius: var(--radius-sm);
    gap: 0;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    box-sizing: border-box;
  }

  .hero-filter-text,
  .hero-sort-text {
    display: none !important;
  }

  .hero-filter-btn svg,
  .hero-sort-btn svg {
    width: 18px;
    height: 18px;
  }

  .hero-sort-arrow {
    display: none;
  }
  
  .hero-sort-dropdown-menu {
    position: fixed;
    top: auto;
    right: var(--space-md);
    left: var(--space-md);
    min-width: auto;
    max-width: none;
    width: calc(100% - (var(--space-md) * 2));
    transform: translateY(-6px);
  }

  .hero-sort-dropdown-wrapper.active .hero-sort-dropdown-menu {
    transform: translateY(0);
  }

  .hero-sort-dropdown-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }

  .hero-sort-dropdown-item .sort-option-icon {
    width: 22px;
    height: 22px;
  }

  .hero-sort-dropdown-item .sort-option-icon svg {
    width: 13px;
    height: 13px;
  }
  
  .hero-search-autocomplete {
    max-height: 300px;
  }
  
  .hero-quick-filters {
    flex-direction: row;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .hero-quick-filters {
    flex-direction: row;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: flex-start;
    position: relative;
  }
  
  .quick-filters-icon-wrapper {
    width: 32px;
    height: 32px;
  }
  
  .quick-filters-icon {
    width: 18px;
    height: 18px;
  }
  
  .quick-filters-pills {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: var(--space-xs);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  
  .quick-filter-pill {
    font-size: 0.8125rem;
    padding: var(--space-xs) var(--space-md);
  }
  
  /* Minimal View Toggle in Mobile */
  .hero-mobile-view-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: transparent;
    border: none;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
  }
  
  .hero-mobile-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.6;
    padding: 0;
  }
  
  .hero-mobile-view-btn:hover {
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.04);
  }
  
  .hero-mobile-view-btn.active {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--accent, rgba(91, 67, 234, 0.2));
    color: #ffffff;
    opacity: 1;
  }
  
  .hero-mobile-view-icon {
    width: 14px;
    height: 14px;
    color: var(--quick-accent);
  }
  
  .hero-mobile-view-btn.active .hero-mobile-view-icon {
    color: var(--quick-accent);
  }
  
  /* unified-page-header is already completely hidden - no need for specific rules */

}

/* Hide old view toggle locations */
.hero-view-toggle,
.hero-mobile-view-toggle {
  display: none !important;
}

/* ============================================
   Single-Row Morphing Category Tab Navigation
   ============================================ */

.qo-category-nav {
  margin-top: var(--space-xs);
  margin-bottom: 0;
  min-height: 44px; /* Reserve vertical space to avoid CLS when tabs initialize */
}

/* Store: tabs live in the main column next to the filter sidebar (desktop) */
.store-main .filter-main-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}

.store-main .filter-main-content > .qo-category-nav {
  margin-top: 0;
  margin-bottom: var(--space-sm, 8px);
  width: 100%;
  flex-shrink: 0;
}

.store-main .filter-main-content > .services-section {
  margin-top: 0;
  padding-top: 0;
}

/* Morph Track: fixed-height row — tabs scroll, view toggle stays pinned right */
.qo-morph-track {
  position: relative;
  display: flex;
  align-items: center;
  height: 44px;
}

/* Morph Slide: the scrollable row of tabs */
.qo-morph-slide {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 0.25rem;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.25rem 0;
  height: 100%;
  scroll-behavior: smooth;
}

.qo-morph-slide::-webkit-scrollbar {
  display: none;
}

/* ---- Slide Animations ---- */
/* Exit: scale down + fade + blur */
@keyframes qo-morph-exit-fwd {
  from { transform: translateX(0) scale(1); opacity: 1; filter: blur(0); }
  to   { transform: translateX(-16%) scale(0.96); opacity: 0; filter: blur(6px); }
}
@keyframes qo-morph-exit-bwd {
  from { transform: translateX(0) scale(1); opacity: 1; filter: blur(0); }
  to   { transform: translateX(16%) scale(0.96); opacity: 0; filter: blur(6px); }
}

/* Enter: staggered per-child via --i custom property */
@keyframes qo-tab-appear {
  from { opacity: 0; transform: translateY(6px) scale(0.92); filter: blur(3px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.qo-morph-slide.qo-anim-exit-left {
  animation: qo-morph-exit-fwd 0.18s cubic-bezier(0.4, 0, 1, 1) forwards;
  pointer-events: none;
}

.qo-morph-slide.qo-anim-exit-right {
  animation: qo-morph-exit-bwd 0.18s cubic-bezier(0.4, 0, 1, 1) forwards;
  pointer-events: none;
}

/* Staggered entrance on children */
.qo-morph-slide.qo-anim-enter > * {
  opacity: 0;
  animation: qo-tab-appear 0.28s cubic-bezier(0, 0, 0.2, 1) forwards;
  animation-delay: calc(var(--i, 0) * 0.04s);
}

/* ---- Tab Button (minimal, like popular-categories filter bar) ---- */
.qo-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm, 16px);
  color: var(--quick-text-secondary);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  min-height: 2.25rem;
  flex-shrink: 0;
  position: relative;
}

.qo-tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.2s ease;
}

.qo-tab-btn:hover {
  color: var(--quick-text);
  background: rgba(255, 255, 255, 0.03);
}

.qo-tab-btn:hover::after {
  width: 60%;
}

.qo-tab-btn:active {
  transform: scale(0.98);
}

.qo-tab-btn.active {
  color: var(--quick-text);
  font-weight: 500;
  background: rgba(91, 67, 234, 0.06);
}

.qo-tab-btn.active::after {
  width: 80%;
}

/* Tab icon — brand color */
.qo-tab-btn i {
  font-size: 1rem;
  color: var(--brand);
  opacity: 0.8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.qo-tab-btn:hover i,
.qo-tab-btn.active i {
  opacity: 1;
}

.qo-tab-btn .has-category-accent.qo-tab-icon-fallback i,
.qo-tab-btn .has-category-accent .category-icon-css-fallback {
  color: var(--category-color, var(--category-accent, var(--brand, var(--quick-accent, #5b43ea))));
  opacity: 0.9;
}

.qo-tab-btn:hover .has-category-accent.qo-tab-icon-fallback i,
.qo-tab-btn.active .has-category-accent.qo-tab-icon-fallback i {
  opacity: 1;
}

/* Tab icon via IconRenderer (category-icon-wrap structure) */
.qo-tab-btn .category-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* Same “accent plate” as admin category list (color from item.color) */
.qo-tab-btn .category-icon-wrap.has-category-accent {
  width: 1.25rem;
  height: 1.25rem;
  padding: 2px;
  box-sizing: border-box;
  border-radius: 6px;
  background: color-mix(
    in srgb,
    var(--category-accent, var(--category-color, #5b43ea)) 22%,
    rgba(0, 0, 0, 0.2)
  );
  box-shadow: inset 0 0 0 1px
    color-mix(
      in srgb,
      var(--category-accent, var(--category-color, #5b43ea)) 45%,
      transparent
    );
}

.qo-tab-btn .category-icon-tinted {
  position: absolute;
  inset: 0;
  background: var(--category-color, var(--brand));
  -webkit-mask-image: var(--icon-url);
  mask-image: var(--icon-url);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.qo-tab-btn:hover .category-icon-tinted,
.qo-tab-btn.active .category-icon-tinted {
  opacity: 1;
}

.qo-tab-btn .category-icon-css-fallback {
  font-size: 0.875rem;
  color: var(--category-color, var(--brand));
  opacity: 0.8;
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qo-tab-btn .category-icon-css-fallback[style*="inline"] {
  display: inline-flex;
}

/* Tab count */
.qo-tab-count {
  font-size: 0.75rem;
  color: var(--quick-text-secondary);
  opacity: 0.8;
  font-weight: 400;
  transition: color 0.2s, opacity 0.2s;
}

.qo-tab-btn.active .qo-tab-count {
  color: var(--brand);
  opacity: 0.9;
}

/* ---- Back Button (minimal, same language as tabs) ---- */
.qo-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.6rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm, 16px);
  color: var(--quick-text-secondary);
  font-size: 0.75rem;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  min-height: 2rem;
  flex-shrink: 0;
  margin-right: 0.25rem;
}

.qo-back-btn:hover {
  color: var(--quick-text);
  background: rgba(255, 255, 255, 0.03);
}

.qo-back-btn:active {
  transform: scale(0.98);
}

.qo-back-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.8;
  color: var(--brand);
  transition: transform 0.2s, opacity 0.2s;
}

.qo-back-btn:hover svg {
  opacity: 1;
  transform: translateX(-2px);
}

.qo-back-label {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- RTL Support ---- */
[dir="rtl"] .qo-back-btn {
  margin-right: 0;
  margin-left: 0.125rem;
}

[dir="rtl"] .qo-back-btn:hover svg {
  transform: translateX(2px);
}

/* Reverse exit directions for RTL */
[dir="rtl"] .qo-morph-slide.qo-anim-exit-left {
  animation-name: qo-morph-exit-bwd;
}
[dir="rtl"] .qo-morph-slide.qo-anim-exit-right {
  animation-name: qo-morph-exit-fwd;
}

/* ---- View Switch (refined, minimal) ---- */
.qo-view-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  margin-left: 0.5rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--quick-text-secondary);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  padding: 0;
  opacity: 0.85;
}

.qo-view-switch:hover {
  color: var(--brand);
  background: rgba(255, 255, 255, 0.04);
  opacity: 1;
}

.qo-view-switch:active {
  transform: scale(0.94);
}

.qo-view-icon {
  width: 14px;
  height: 14px;
  transition: opacity 0.2s ease;
}

/* Stroke icons inherit color from button */
.qo-view-switch .qo-view-icon {
  stroke: currentColor;
}

[dir="rtl"] .qo-view-switch {
  margin-left: 0;
  margin-right: 0.5rem;
}

/* ---- Mobile Responsive ---- */
@media (max-width: 768px) {
  .qo-category-nav {
    margin-top: var(--space-xs, 4px);
  }

  .qo-morph-track {
    height: 44px;
  }

  .qo-morph-slide {
    gap: 0.35rem;
    padding: 0.35rem 0;
  }

  .qo-tab-btn {
    font-size: 0.875rem;
    padding: 0.5rem 0.85rem;
    min-height: 2.25rem;
  }

  .qo-tab-btn .qo-tab-count {
    font-size: 0.8125rem;
  }

  .qo-tab-btn .category-icon-wrap {
    width: 1.125rem;
    height: 1.125rem;
  }

  .qo-back-btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.55rem;
    min-height: 2rem;
  }

  .qo-back-btn svg {
    width: 13px;
    height: 13px;
  }

  .qo-back-label {
    max-width: 80px;
  }

  .qo-view-switch {
    width: 28px;
    height: 28px;
    margin-left: 0.375rem;
  }

  .qo-view-icon {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 480px) {
  .hero-search-container {
    gap: 0.375rem;
  }

  .hero-search-input-wrapper {
    height: 42px;
  }

  .hero-search-input {
    height: 42px;
    font-size: 0.8125rem;
    padding-left: 2rem;
    padding-right: 2rem;
    border-radius: var(--radius-sm);
  }

  .hero-search-icon {
    left: 0.625rem;
    width: 15px;
    height: 15px;
  }

  .hero-filter-btn,
  .hero-sort-btn {
    min-width: 42px;
    width: 42px;
    max-width: 42px;
    height: 42px;
    padding: 0;
    border-radius: var(--radius-sm);
    gap: 0;
    justify-content: center;
    align-items: center;
  }

  .hero-filter-btn svg,
  .hero-sort-btn svg {
    width: 17px;
    height: 17px;
  }

  /* Keep category tabs readable on small phones (do not shrink below ~768px rules) */
  .qo-morph-track {
    height: 44px;
  }

  .qo-tab-btn {
    font-size: 0.875rem;
    padding: 0.45rem 0.8rem;
    min-height: 2.2rem;
    gap: 0.3rem;
  }

  .qo-tab-btn i {
    font-size: 0.9375rem;
  }

  .qo-tab-btn .qo-tab-count {
    font-size: 0.8125rem;
  }

  .qo-back-btn {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
    min-height: 1.9rem;
  }

  .qo-back-btn svg {
    width: 12px;
    height: 12px;
  }

  .qo-back-label {
    max-width: 72px;
  }
}

/* Horizontal filter bar — align store with cat / sub / type */
.store-main .filter-layout-row--horizontal .filter-sidebar {
  display: none !important;
}

.store-main .filter-main-content > .filter-panel--horizontal {
  margin-top: 0;
  margin-bottom: 0.9rem;
  padding-bottom: 0;
}

.store-main .filter-main-content > .qo-category-nav {
  margin-bottom: 0.9rem;
}

.store-main .services-section.has-horizontal-filters {
  padding-top: 0.95rem;
  padding-bottom: 1.05rem;
  margin-top: 0;
}

body.page-horizontal-filters .store-main .hero-section {
  margin-bottom: 0.875rem;
}

@media (max-width: 1023px) {
  .store-main .filter-main-content > .filter-panel--horizontal {
    margin-bottom: 0.8rem;
  }
}

/* Load more — below services grid */
.store-main .load-more-section {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: var(--space-xl, 20px);
  margin-bottom: var(--space-lg, 16px);
  padding: 0 var(--space-lg, 16px);
  box-sizing: border-box;
}

.store-main .load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.625rem 1.35rem;
  border: 1px solid rgba(91, 67, 234, 0.35);
  border-radius: var(--radius-sm, 16px);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.store-main .load-more-btn:hover:not(:disabled) {
  background: rgba(91, 67, 234, 0.1);
  border-color: rgba(91, 67, 234, 0.55);
  color: #fff;
}

.store-main .load-more-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.store-main .load-more-btn:disabled,
.store-main .load-more-btn[aria-busy="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.store-main .load-more-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--brand, #5b43ea);
}

.store-main .load-more-btn:hover:not(:disabled) svg {
  color: rgba(167, 139, 250, 0.95);
}

