:root {
  --primary: #d97706;
  --primary-hover: #b45309;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.5;
}

/* Navigation */
.navbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem;
}

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

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.btn-back {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-color);
  border-radius: 6px;
}

/* Layout Container */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.hidden {
  display: none !important;
}

/* Hero Header */
.hero-header {
  text-align: center;
  margin: 1.5rem 0 2rem;
}

.hero-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.hero-header p {
  color: var(--text-muted);
}

/* Filters */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .filter-bar {
    flex-direction: row;
  }
}

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

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input, .city-filter select {
  width: 100%;
  padding: 12px 12px 12px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  background: var(--card-bg);
  font-size: 1rem;
}

.city-filter select {
  padding-left: 12px;
}

/#restaurant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
}
/* Card item consistency across all devices */
.card {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  height: 180px;
  background: #e2e8f0;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: white;
  padding: 4px 8px;
  font-size: 0.75rem;
  border-radius: 4px;
  font-weight: 600;

}

.card-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.rating {
  background: #fef3c7;
  color: #92400e;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.location-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.description {
  font-size: 0.875rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
}

/* SINGLE RESTAURANT PAGE STYLES */
.single-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.single-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  border-radius: var(--radius);
  overflow: hidden;
}

.single-gallery img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.single-header-info {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.meta-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0.75rem 0;
  font-size: 0.9rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .info-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.menu-section, .sidebar-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.menu-list {
  list-style: none;
  margin-top: 1rem;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--border);
}

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

.item-name {
  font-weight: 600;
}

.item-price {
  color: var(--primary);
  font-weight: 700;
}

.action-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--primary);
  color: white;
  padding: 12px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  margin-top: 1rem;
}

.action-btn:hover {
  background: var(--primary-hover);
}


* ==========================================
   Site Header & Navigation Styles
   ========================================== */
.site-header {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e293b;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand i {
  color: #d97706; /* Primary brand color */
}

.nav-menu {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: #475569;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #d97706;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #1e293b;
  cursor: pointer;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    flex-direction: column;
    padding: 1rem 0;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none; /* Hidden by default on mobile */
  }

  .nav-menu.show {
    display: flex;
  }
}

/* ==========================================
   Responsive Restaurant Grid Layout
   ========================================== */

/* Outer Viewport Container */
#listing-view {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  box-sizing: border-box;
}

/* Grid Wrapper - Auto-adjusts columns based on available width */
#restaurant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
  width: 100%;
  box-sizing: border-box;
}

/* Individual Restaurant Card */
.card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Card Image Wrapper */
.card-img-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: #f1f5f9;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-img-wrapper img {
  transform: scale(1.05);
}

/* Card Content Area */
.card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
}

.card-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.card-description {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

/* Footer Link / Action Button inside Card */
.card-action {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}

.btn-details {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 0.6rem 1rem;
  background-color: #d97706;
  color: #ffffff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
  box-sizing: border-box;
}

.btn-details:hover {
  background-color: #b45309;
}

/* Mobile Adjustments */
@media (max-width: 640px) {
  #restaurant-grid {
    grid-template-columns: 1fr; /* Full single column on small phones */
    gap: 1.25rem;
  }
}