:root {
  --primary-color: #3b82f6;
  --primary-dark: #1e40af;
  --secondary-color: #93c5fd;
  --accent-color: #dbeafe;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-light: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-accent: #eff6ff;
  --border-color: #e5e7eb;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --dark-bg: #1e40af;
}

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

/* Optimized performance styles */
html {
  scroll-behavior: smooth;
}

/* Critical rendering optimizations */
@font-display: swap;

/* Optimized GPU acceleration */
.card:hover,
.directory-card:hover,
.filter-btn:hover,
.search-btn:hover,
.cta-button:hover {
  will-change: transform;
  transform: translateZ(0);
}

/* Optimized animations */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container optimization */
.city-categories,
.directory,
#directory {
  contain: layout style paint;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #F9FAFB;
  color: var(--text-primary);
  line-height: 1.6;
  font-display: swap;
}

/* Font loading optimization */
@font-face {
  font-family: 'Inter-fallback';
  src: local('Arial'), local('Helvetica'), local(sans-serif);
  font-display: swap;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}

/* Header Styles */
header {
  background: #ffffff;
  padding: 3rem 1rem;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.logo {
  height: 290px;
  width: auto;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  max-width: 100%;
}

.logo-large {
  height: 390px;
  width: auto;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  max-width: 100%;
}

.logo-container a {
  display: inline-block;
  line-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  font-size: 0;
  vertical-align: top;
  width: fit-content;
  height: fit-content;
  text-decoration: none;
  outline: none;
  box-sizing: border-box;
}

.logo,
.logo-large {
  display: block;
  border: 0;
  outline: none;
  margin: 0;
  padding: 0;
  width: auto;
  height: auto;
  line-height: 0;
  font-size: 0;
  vertical-align: top;
  object-fit: contain;
  box-sizing: border-box;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.logo:hover,
.logo-large:hover {
  transform: scale(1.08);
}

.brand-text {
  max-width: 800px;
}

.brand-text h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-text p {
  font-size: 1.375rem;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.5;
  margin: 0;
}

/* For directory pages */
header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Navigation */
nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1.25rem 1rem;
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.breadcrumb {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.cta-button {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, #1e3a8a, var(--primary-dark));
}

/* Main Content */
.content {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 4rem;
}

.hero-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.hero-section p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 2rem;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
  text-align: center;
}

.stat-card {
  background: white;
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Categories Section */
.categories-section {
  margin: 4rem 0;
}

/* Browse Sections */
.browse-section {
  margin: 3rem 0;
}

.browse-section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.browse-section-header h3 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.browse-section-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Browse by Category Section */
.browse-by-category-section {
  margin: 4rem 0;
}

.browse-by-category-section .category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.browse-by-category-section .category-card {
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  min-height: 160px;
  height: auto;
}

.browse-by-category-section .category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.browse-by-category-section .category-card.expanded {
  border-color: var(--primary-color);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

.browse-by-category-section .category-card.coming-soon-category {
  opacity: 0.8;
  border: 2px dashed #e5e7eb;
}

.browse-by-category-section .category-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  padding: 1.5rem;
  color: white;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.browse-by-category-section .category-card.coming-soon-category .category-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.browse-by-category-section .category-header:hover {
  background: linear-gradient(135deg, #1e3a8a 0%, var(--primary-dark) 100%);
}

.browse-by-category-section .category-card.coming-soon-category .category-header:hover {
  background: linear-gradient(135deg, #1e3a8a 0%, var(--primary-dark) 100%);
}

.browse-by-category-section .category-main-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.browse-by-category-section .category-icon {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.browse-by-category-section .category-icon svg {
  width: 28px;
  height: 28px;
  fill: white;
}

.browse-by-category-section .category-content h3 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: white;
}

.browse-by-category-section .category-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.browse-by-category-section .category-stats span {
  font-size: 0.875rem;
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
}

.browse-by-category-section .category-card.expanded .chevron {
  transform: rotate(180deg);
}

.browse-by-category-section .category-cities {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  background: #fafafa;
  opacity: 0;
  padding: 0 1.5rem;
}

.browse-by-category-section .category-card.expanded .category-cities {
  max-height: 800px;
  padding: 1.5rem;
  opacity: 1;
}

/* Shared styling for ALL category cards in browse sections */
.browse-by-category-section .category-cities .category-card,
.city-categories .category-card {
  background: white;
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  border: none;
  min-height: auto;
}

.browse-by-category-section .category-cities .category-card:last-child,
.city-categories .category-card:last-child {
  margin-bottom: 0;
}

.browse-by-category-section .category-cities .category-card:hover,
.city-categories .category-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.browse-by-category-section .category-cities .category-icon,
.city-categories .category-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.browse-by-category-section .category-cities .category-icon svg,
.city-categories .category-icon svg {
  width: 24px;
  height: 24px;
  fill: white;
}

.browse-by-category-section .category-cities .category-content,
.city-categories .category-content {
  flex: 1;
  min-width: 0;
}

.browse-by-category-section .category-cities .category-content h4,
.city-categories .category-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.browse-by-category-section .category-cities .category-content p,
.city-categories .category-content p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.browse-by-category-section .category-cities .category-stats,
.city-categories .category-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.browse-by-category-section .category-cities .category-stats span,
.city-categories .category-stats span {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-weight: 500;
  background: var(--bg-accent);
  color: var(--primary-color);
  opacity: 1;
}

.browse-by-category-section .category-cities .category-link,
.city-categories .category-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  margin-left: auto;
  flex-shrink: 0;
}

.browse-by-category-section .category-cities .category-link:hover,
.city-categories .category-link:hover {
  background: var(--secondary-color);
  color: var(--primary-dark);
  transform: translateY(-1px);
}

/* Styles consolidated above in mini city cards section */

/* Category Main Cards */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.category-main-card {
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  min-height: 160px;
  height: auto;
}

.category-main-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.category-main-card.expanded {
  border-color: var(--primary-color);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

.category-main-card.coming-soon-main {
  opacity: 0.8;
  border: 2px dashed #e5e7eb;
}

.category-main-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  padding: 1.5rem;
  color: white;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  position: relative;
}

.category-main-card.coming-soon-main .category-main-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.category-main-header:hover {
  background: linear-gradient(135deg, #1e3a8a 0%, var(--primary-dark) 100%);
}

.category-main-card.coming-soon-main .category-main-header:hover {
  background: linear-gradient(135deg, #1e3a8a 0%, var(--primary-dark) 100%);
}

.category-main-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.category-main-icon {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.category-main-icon svg {
  width: 28px;
  height: 28px;
  fill: white;
}

.category-main-content h4 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: white;
}

.category-main-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.category-main-stats span {
  font-size: 0.875rem;
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
}

.category-main-card.expanded .chevron {
  transform: rotate(180deg);
}

.category-cities {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  background: #fafafa;
  opacity: 0;
  padding: 0 1.5rem;
}

.category-main-card.expanded .category-cities {
  max-height: 800px;
  padding: 1.5rem;
  opacity: 1;
}

/* Consolidated mini city cards (shared with city-card-mini) */
.mini-city-card,
.city-card-mini {
  background: white;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.mini-city-card:last-child,
.city-card-mini:last-child {
  margin-bottom: 0;
}

.mini-city-card:hover,
.city-card-mini:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.mini-city-card.coming-soon-mini,
.city-card-mini.coming-soon-mini {
  opacity: 0.7;
  border: 2px dashed #e5e7eb;
  background: #f9fafb;
}

.mini-city-info h5,
.city-info h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.mini-city-stats,
.city-mini-stats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.mini-city-stats span,
.city-mini-stats span {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-weight: 500;
}

.mini-shop-count,
.city-mini-stats .shop-count {
  background: #e0f2fe;
  color: #0369a1;
}

.mini-availability,
.city-mini-stats .availability {
  background: var(--bg-accent);
  color: var(--primary-color);
}

.mini-city-link,
.city-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.mini-city-link:hover,
.city-link:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.city-link.disabled {
  background: #6b7280;
  cursor: not-allowed;
  opacity: 0.7;
}

.city-link.disabled:hover {
  transform: none;
  background: #6b7280;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

/* City Grid - Home Page */
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.city-card {
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.city-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.city-card.expanded {
  border-color: var(--primary-color);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

.city-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  padding: 1.5rem;
  color: white;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.city-header:hover {
  background: linear-gradient(135deg, #1e3a8a 0%, var(--primary-dark) 100%);
}

.city-main-info h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: white;
}

.city-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.city-stats span {
  font-size: 0.875rem;
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
}

.expand-icon {
  display: flex;
  align-items: center;
}

.chevron {
  width: 24px;
  height: 24px;
  fill: white;
  transition: transform 0.3s ease;
}

.city-card.expanded .chevron {
  transform: rotate(180deg);
}

.city-categories {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  background: #fafafa;
  opacity: 0;
  padding: 0 1.5rem;
}

.city-card.expanded .city-categories {
  max-height: 1200px;
  padding: 1.5rem;
  opacity: 1;
}

/* Coming soon styling for category cards */
.category-card.coming-soon-category {
  opacity: 0.7;
  border: 2px dashed #e5e7eb;
  background: #f9fafb;
}

.coming-soon-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: #f59e0b;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Specific badge colors for category stats */
.shop-count {
  background: var(--bg-accent);
  color: var(--primary-color);
}

.availability {
  background: #e0f2fe;
  color: #0369a1;
}

/* Directory Grid - Legacy support for other pages */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.directory-card {
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  position: relative;
}

.directory-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  padding: 1.5rem;
  color: white;
}

.card-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-header .location {
  font-size: 0.875rem;
  opacity: 0.9;
}

.card-body {
  padding: 1.5rem;
}

.card-body p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.card-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.card-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-color);
  color: var(--primary-dark);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}

.card-link:hover {
  background: var(--secondary-color);
}

/* Coming Soon Badge */
.coming-soon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--warning-orange);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600,
  text-transform: uppercase;
}

/* Directory Page Specific Styles */
.controls {
  background: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.search-box {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.search-wrapper {
  position: relative;
  flex: 1;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  padding-right: 40px;
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.clear-search {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 5px 10px;
}

.clear-search:hover {
  color: #333;
}

.search-btn, .filter-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.search-btn:hover, .filter-btn:hover {
  background: var(--secondary-color);
  color: var(--primary-dark);
}

.filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 2px solid var(--border-color);
  background: white;
  color: var(--text-primary);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.filter-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Pagination Controls */
.pagination-controls {
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.pagination-controls label {
  font-weight: 600;
  color: var(--text-primary);
}

.pagination-controls select {
  padding: 0.5rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  background: white;
  cursor: pointer;
}

.pagination-controls select:focus {
  outline: none;
  border-color: var(--primary-color);
}

#paginationInfo {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-left: auto;
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
}

.pagination-nav button {
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--border-color);
  background: white;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  min-width: 40px;
}

.pagination-nav button:hover:not(:disabled) {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.pagination-nav button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Info Bar */
.info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.result-count {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.last-updated {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Directory Listings - FIXED GRID LAYOUT */
.directory, #directory {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}

/* Card Styles */
.card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.card-detail {
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.address-span {
  line-height: 1.4;
  display: block;
  flex: 1;
}

.card-detail strong {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 80px;
}

.card-detail span {
  color: var(--text-secondary);
}

/* Badges */
.badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-24h {
  background: var(--bg-accent);
  color: var(--primary-color);
}

.badge-delivery {
  background: #F0FDF4;
  color: var(--success-green);
}

.badge-women {
  background: #FEF3C7;
  color: #92400E;
}

.badge-lgbtq {
  background: #EDE9FE;
  color: #6B21A8;
}

/* Summary text styling */
.summary-text {
  line-height: 1.4;
  color: #555;
  font-size: 14px;
}

/* Contact links */
.contact-links {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.website-link {
  background: var(--primary-color);
  color: white;
}

.website-link:hover {
  background: var(--primary-dark);
}

.phone-link {
  background: transparent;
  color: var(--primary-color);
  border: none;
  text-decoration: underline;
  padding: 0;
}

.phone-link:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

/* Features Section */
.features-section {
  margin: 6rem 0;
  background: white;
  padding: 4rem 2rem;
  border-radius: 1rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
  }
}

.feature {
  text-align: center;
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.feature-icon svg {
  width: 30px;
  height: 30px;
  fill: white;
}

.feature h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.feature p {
  color: var(--text-secondary);
}

/* Icons */
.icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Footer */
footer {
  background: var(--primary-dark);
  color: white;
  padding: 4rem 1rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-section a {
  display: block;
  color: #E9F4F6;
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #E9F4F6;
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #E9F4F6;
  text-decoration: none;
  font-weight: 500;
}

.footer-links a:hover {
  color: white;
  text-decoration: underline;
}

/* Loading Spinner */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Utility Classes */
.hidden {
  display: none;
}

/* Optimize grid container for better performance */
.directory, #directory {
  contain: layout style paint;
}

.error-message {
  background: #FEE2E2;
  color: #B91C1C;
  padding: 1rem;
  border-radius: 0.5rem;
  text-align: center;
  margin: 2rem 0;
  border: 1px solid #FECACA;
}

/* Blog Styles */
.blog-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.blog-posts {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blog-post {
  background: white;
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

.blog-post h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.post-date {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.blog-post p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.blog-post p:last-child {
  margin-bottom: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Desktop and large screens - keep logos reasonable */
@media (min-width: 1024px) {
  .logo {
    height: 350px;
  }

  .logo-large {
    height: 470px;
  }
}

@media (min-width: 1440px) {
  .logo {
    height: 390px;
  }

  .logo-large {
    height: 540px;
  }
}

/* Mobile Responsive - Enhanced for better UX */
@media (max-width: 768px) {
  /* Improved header spacing */
  header {
    padding: 1.5rem 1rem;
  }

  .header-content {
    width: 100%;
    max-width: 100%;
  }

  .logo-container {
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    align-items: center;
    justify-content: center;
  }

  .logo {
    height: 220px;
    max-width: 85%;
  }

  .logo-large {
    height: 280px;
    max-width: 85%;
  }

  .brand-text {
    width: 100%;
    max-width: 100%;
    text-align: center;
  }

  .brand-text h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  .brand-text p {
    font-size: 1rem;
    padding: 0 1rem;
    margin: 0 auto;
    line-height: 1.4;
  }

  header h1 {
    font-size: 1.875rem;
    line-height: 1.2;
  }

  header p {
    font-size: 0.95rem;
    padding: 0 1rem;
    line-height: 1.4;
  }

  .hero-section h2 {
    font-size: 1.875rem;
    line-height: 1.2;
  }

  /* Enhanced grid layouts for mobile */
  .directory-grid, .directory, #directory {
    grid-template-columns: 1fr;
    padding: 0 10px;
    gap: 1.25rem;
  }

  .city-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 0 10px;
  }

  /* Better touch targets and spacing */
  .city-header {
    padding: 1.5rem;
    min-height: 60px;
    cursor: pointer;
    touch-action: manipulation;
  }

  .city-header:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }

  .city-main-info h3 {
    font-size: 1.25rem;
    line-height: 1.3;
  }

  .city-stats {
    flex-direction: column;
    gap: 0.75rem;
  }

  .city-stats span {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  /* Enhanced category cards for mobile */
  .category-card {
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 0.75rem;
  }

  .category-icon {
    width: 48px;
    height: 48px;
    align-self: flex-start;
  }

  .category-icon svg {
    width: 24px;
    height: 24px;
  }

  .category-link {
    align-self: stretch;
    justify-content: center;
    margin-left: 0;
    padding: 1rem;
    font-size: 1rem;
    min-height: 48px;
    touch-action: manipulation;
  }

  .category-link:active {
    transform: scale(0.98);
  }

  /* Category grid mobile styles */
  .category-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 0 10px;
  }

  /* Browse by Category Section mobile styles */
  .browse-by-category-section .category-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .browse-by-category-section .category-header {
    padding: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    touch-action: manipulation;
  }

  .browse-by-category-section .category-header:active {
    transform: scale(0.99);
  }

  .browse-by-category-section .category-main-info {
    width: 100%;
  }

  .browse-by-category-section .category-content h3 {
    font-size: 1.25rem;
    line-height: 1.3;
  }

  .browse-by-category-section .category-stats {
    flex-direction: column;
    gap: 0.75rem;
  }

  .browse-by-category-section .expand-icon {
    align-self: flex-end;
    padding: 0.5rem;
  }

  /* Enhanced mini cards */
  .city-card-mini {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
  }

  .city-link {
    align-self: stretch;
    justify-content: center;
    min-height: 48px;
    padding: 1rem;
    font-size: 1rem;
    touch-action: manipulation;
  }

  .city-link:active {
    transform: scale(0.98);
  }

  .category-main-header {
    padding: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .category-main-info {
    width: 100%;
  }

  .category-main-content h4 {
    font-size: 1.25rem;
    line-height: 1.3;
  }

  .category-main-stats {
    flex-direction: column;
    gap: 0.75rem;
  }

  .expand-icon {
    align-self: flex-end;
    padding: 0.5rem;
  }

  .mini-city-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
  }

  .mini-city-link {
    align-self: stretch;
    justify-content: center;
    min-height: 48px;
    padding: 1rem;
    touch-action: manipulation;
  }

  .mini-city-link:active {
    transform: scale(0.98);
  }

  .browse-section-header h3 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  /* Enhanced navigation for mobile */
  .nav-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
  }

  .nav-links {
    display: flex;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }

  .nav-links a {
    padding: 0.75rem 1rem;
    touch-action: manipulation;
  }

  .cta-button {
    margin-top: 0.75rem;
    padding: 1rem 1.5rem;
    min-height: 48px;
    touch-action: manipulation;
  }

  .cta-button:active {
    transform: scale(0.98);
  }

  /* Enhanced search and controls */
  .search-box {
    flex-direction: column;
    gap: 1rem;
  }

  .search-input {
    padding: 1rem;
    font-size: 1rem;
    min-height: 48px;
  }

  .search-btn, .filter-btn {
    padding: 1rem 1.5rem;
    min-height: 48px;
    font-size: 1rem;
    touch-action: manipulation;
  }

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

  .filters {
    gap: 0.75rem;
    justify-content: center;
  }

  /* Enhanced contact links */
  .contact-links {
    flex-direction: column;
    gap: 0.75rem;
  }

  .contact-links a {
    justify-content: center;
    padding: 1rem;
    min-height: 48px;
    font-size: 1rem;
    touch-action: manipulation;
  }

  .contact-links a:active {
    transform: scale(0.98);
  }

  /* Enhanced pagination for mobile */
  .pagination-nav button {
    min-height: 48px;
    min-width: 48px;
    padding: 0.75rem;
    font-size: 1rem;
    touch-action: manipulation;
  }

  .pagination-nav button:active:not(:disabled) {
    transform: scale(0.95);
  }

  .pagination-controls {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .pagination-controls select {
    padding: 1rem;
    font-size: 1rem;
    min-height: 48px;
  }

  /* Enhanced stats grid */
  .stats {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 10px;
  }

  .stat-card {
    padding: 1.5rem;
  }

  /* Enhanced card layout */
  .card {
    padding: 1.25rem;
    margin-bottom: 1rem;
  }

  .card h3 {
    font-size: 1.25rem;
    line-height: 1.3;
  }

  /* Enhanced content spacing */
  .content {
    padding: 1.5rem 1rem;
  }

  /* Better footer for mobile */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }

  /* Enhanced features grid */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
  }
}

/* Additional mobile enhancements for very small screens */
@media (max-width: 480px) {
  .brand-text h1 {
    font-size: 1.75rem;
  }

  .brand-text p {
    font-size: 0.95rem;
  }

  .logo {
    height: 200px;
  }

  .logo-large {
    height: 260px;
  }

  .city-header {
    padding: 1.25rem;
  }

  .category-card, .city-card-mini, .mini-city-card {
    padding: 1rem;
  }

  .search-input, .search-btn, .filter-btn, .category-link, .city-link, .mini-city-link {
    font-size: 0.95rem;
  }

  .pagination-nav button {
    min-width: 44px;
    min-height: 44px;
  }
}

.contact-links a:hover {
  background: #2563eb;
  color: white;
}

.rating {
  margin: 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stars {
  color: #fbbf24;
  font-size: 16px;
  line-height: 1;
}

.rating-text {
  color: #6b7280;
  font-size: 14px;
}

.footer-bottom p {
  color: #888;
  font-size: 0.9rem;
}

.footer-bottom .attribution {
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* ============================================================================
   CARD COMPONENTS
   ============================================================================ */

.business-thumbnail {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 12px;
  object-fit: cover;
}