/* ==========================================================================
   EL BAJÓN - Modern Design System & Styles (Vanilla CSS)
   ========================================================================== */

/* 1. CSS Custom Properties / Design Tokens */
:root {
  /* Fonts */
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Color Palette (Warm Food-Centric Theme) */
  --primary: hsl(24, 95%, 50%);         /* Vibrant Orange/Amber */
  --primary-hover: hsl(24, 95%, 43%);
  --primary-light: hsl(24, 95%, 95%);
  --secondary: hsl(39, 98%, 50%);       /* Golden Yellow */
  --bg-light: hsl(30, 20%, 98%);        /* Soft Cream Background */
  --bg-white: #ffffff;
  --text-dark: hsl(24, 15%, 12%);       /* Near Black */
  --text-muted: hsl(24, 5%, 45%);       /* Slate Gray */
  --border-color: hsl(24, 10%, 90%);
  --whatsapp-color: #25d366;
  --whatsapp-hover: #20ba5a;
  
  /* Status Badges */
  --badge-open: hsl(142, 70%, 45%);
  --badge-closed: hsl(0, 80%, 60%);
  
  /* Spacers & Sizing */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-full: 9999px;
  
  --container-max: 1200px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 32px rgba(245, 124, 0, 0.08);
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. Reset and Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

button, input, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  outline: none;
}

ul {
  list-style: none;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* 3. Header & Navigation */
.header-shell {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  height: 70px;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 20px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  color: var(--primary);
}

.logo-icon {
  font-size: 1.6rem;
}

/* Header Search bar (Only shown on non-home pages/large devices) */
.header-search-bar {
  position: relative;
  width: 100%;
  max-width: 360px;
  flex: 1;
  margin: 0 20px;
  display: none; /* Hidden on mobile */
}

.header-search-bar input {
  width: 100%;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  padding: 8px 16px 8px 36px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.header-search-bar input:focus {
  border-color: var(--primary);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.15);
}

.header-search-bar .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  pointer-events: none;
}

/* Header Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover {
  color: var(--primary);
  background-color: var(--primary-light);
}

.nav-link.active {
  color: var(--primary);
  background-color: var(--primary-light);
}

/* Mobile Hamburger Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  width: 24px;
  height: 24px;
  justify-content: center;
  z-index: 1010;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2.5px;
  background-color: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* Mobile responsive navigation styles are at the bottom under Media Queries */

/* 4. Hero Section */
.hero-section {
  background: linear-gradient(135deg, hsl(24, 95%, 98%) 0%, hsl(39, 90%, 96%) 100%);
  padding: 60px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

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

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-dark);
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.hero-search-wrapper {
  position: relative;
  margin-bottom: 20px;
  z-index: 20;
}

.search-input-container {
  display: flex;
  background-color: var(--bg-white);
  border-radius: var(--radius-full);
  padding: 6px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: var(--transition-normal);
  align-items: center;
}

.search-input-container:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg), 0 0 0 4px rgba(245, 124, 0, 0.15);
}

.search-input-container .search-icon {
  margin-left: 16px;
  font-size: 1.2rem;
}

.search-input-container input {
  flex: 1;
  padding: 12px;
  font-size: 1.05rem;
  color: var(--text-dark);
}

.btn-search-trigger {
  background-color: var(--primary);
  color: var(--bg-white);
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-search-trigger:hover {
  background-color: var(--primary-hover);
}

/* Autocomplete Panel Dropdown */
.autocomplete-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border-color);
  overflow: hidden;
  max-height: 400px;
  overflow-y: auto;
  text-align: left;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.autocomplete-suggestions.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.autocomplete-section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 12px 16px 4px 16px;
  background-color: var(--bg-light);
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition-fast);
  border-bottom: 1px solid var(--border-color);
}

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

.autocomplete-item:hover {
  background-color: var(--primary-light);
}

.autocomplete-item .name {
  font-weight: 600;
  flex: 1;
  color: var(--text-dark);
}

.autocomplete-item .category {
  font-size: 0.75rem;
  color: var(--text-muted);
  background-color: var(--bg-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.autocomplete-no-results {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Suggested searches */
.suggested-searches {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.suggested-searches span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.tags-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.suggest-btn, .suggested-search-tag {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 4px;
}

.suggest-btn:hover, .suggested-search-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
  transform: translateY(-1px);
}

/* 5. Categories Section */
.categories-section {
  padding: 40px 20px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.category-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.category-emoji {
  font-size: 2.2rem;
}

.category-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dark);
}

/* 6. Directory / Home Restaurants Section */
.featured-section {
  padding: 20px 20px 60px 20px;
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-link-more {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
}

.section-link-more:hover {
  text-decoration: underline;
}

.restaurants-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.restaurant-home-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
}

.restaurant-home-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.rest-home-cover {
  height: 120px;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.rest-home-logo {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 3px solid var(--bg-white);
  box-shadow: var(--shadow-sm);
  background-color: var(--bg-white);
  transform: translateY(20px);
}

.card-status-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.card-status-badge.open {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.card-status-badge.closed {
  background-color: #ffebee;
  color: #c62828;
}

.rest-home-info {
  padding: 32px 20px 20px 20px;
  flex: 1;
}

.rest-home-name {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.rest-home-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rest-home-address {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.rest-home-actions {
  padding: 0 20px 20px 20px;
}

.btn-primary-outline {
  display: inline-block;
  text-align: center;
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-primary-outline:hover {
  background-color: var(--primary);
  color: var(--bg-white);
}

.full-width {
  width: 100%;
}

.btn-primary {
  display: inline-block;
  text-align: center;
  background-color: var(--primary);
  color: var(--bg-white);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

/* 7. Search Results Page Layout */
.search-page-container {
  padding: 30px 20px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.search-header-section {
  margin-bottom: 24px;
}

.search-title {
  font-size: 1.8rem;
  font-weight: 800;
}

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

.search-count {
  font-size: 1rem;
  color: var(--text-muted);
}

.search-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
}

/* Filters Sidebar */
.search-filters-sidebar {
  width: 100%;
}

.filter-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}

.filter-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.filter-card-header h3 {
  font-weight: 800;
  font-size: 1.15rem;
}

.clear-filters-btn {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
}

.clear-filters-btn:hover {
  text-decoration: underline;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-group label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.filter-group select {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-light);
}

/* Radio Group */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-label, .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500 !important;
  font-size: 0.9rem !important;
  cursor: pointer;
}

.radio-label input, .checkbox-label input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* Range input pricing */
.filter-group input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.price-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Results Main List */
.search-results-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sort-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-size: 0.9rem;
}

.sort-bar select {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-white);
  font-weight: 600;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Result Card */
.product-result-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
}

.product-result-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.product-result-card.closed-card {
  opacity: 0.85;
}

.card-image-section {
  height: 100px;
  background: linear-gradient(135deg, var(--bg-light) 0%, hsl(24, 40%, 88%) 100%);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 12px 16px;
}

.restaurant-logo-badge {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  border: 3px solid var(--bg-white);
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.restaurant-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.restaurant-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.restaurant-name-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
}

.restaurant-name-link:hover {
  text-decoration: underline;
}

.product-category-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  background-color: var(--bg-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.product-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 4px;
}

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

.price-delivery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-top: 1px dashed var(--border-color);
  padding-top: 12px;
}

.product-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark);
}

.delivery-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dark);
  background-color: var(--primary-light);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.card-address {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-light);
}

.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: var(--whatsapp-color);
  color: var(--bg-white);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px;
}

.btn-whatsapp:hover {
  background-color: var(--whatsapp-hover);
}

.btn-detail {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition-fast);
}

.btn-detail:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
}

/* 8. Empty & Error States */
.empty-state-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 50px 30px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.empty-emoji {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.empty-state-card h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.empty-state-card p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.empty-actions {
  max-width: 480px;
  margin: 0 auto;
}

.empty-actions p {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.empty-actions .tags-container {
  justify-content: center;
}

.error-page-container {
  text-align: center;
  padding: 80px 20px;
  max-width: 400px;
  margin: 0 auto;
}

.error-page-container h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.error-page-container p {
  color: var(--text-muted);
  margin-bottom: 30px;
}

/* Spinner/Loading */
.spinner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 50px 0;
  width: 100%;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* 9. Restaurant Detail Page */
.restaurant-page-container {
  padding: 20px;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.restaurant-nav-back {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.95rem;
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-full);
}

.btn-back:hover {
  background-color: var(--bg-light);
}

.btn-favorite {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.btn-favorite:hover {
  color: var(--primary);
  border-color: var(--primary-light);
  background-color: var(--primary-light);
}

.btn-favorite.is-fav {
  background-color: hsl(0, 100%, 97%);
  border-color: hsl(0, 100%, 88%);
  color: hsl(0, 85%, 55%);
}

.heart-icon {
  fill: transparent;
  stroke: currentColor;
  stroke-width: 2.5px;
}

.btn-favorite.is-fav .heart-icon {
  fill: currentColor;
}

/* Restaurant Header Info Card */
.restaurant-header-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.restaurant-header-hero {
  height: 160px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  position: relative;
}

.restaurant-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.15);
}

.restaurant-avatar {
  position: absolute;
  bottom: -40px;
  left: 24px;
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  border: 4px solid var(--bg-white);
  background-color: var(--bg-white);
  box-shadow: var(--shadow-md);
  object-fit: cover;
}

.restaurant-header-info {
  padding: 56px 24px 24px 24px;
}

.restaurant-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.restaurant-main-name {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.restaurant-status-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

.restaurant-status-badge.open {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.restaurant-status-badge.closed {
  background-color: #ffebee;
  color: #c62828;
}

.restaurant-main-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  max-width: 720px;
}

.restaurant-meta-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.restaurant-action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-whatsapp-large {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--whatsapp-color);
  color: var(--bg-white);
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
}

.btn-whatsapp-large:hover {
  background-color: var(--whatsapp-hover);
  transform: translateY(-1px);
}

.btn-call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
}

.btn-call:hover {
  background-color: var(--bg-light);
}

/* Details Layout Columns */
.restaurant-details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
}

/* Category Tab Quicklinks */
.category-tabs-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.category-tabs-bar::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Safari/Chrome */
}

.category-tab-btn {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition-fast);
}

.category-tab-btn:hover, .category-tab-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
}

.menu-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.menu-category-block {
  scroll-margin-top: 90px;
}

.menu-category-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
}

.menu-items-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.menu-product-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal), border var(--transition-normal);
}

.menu-product-card:hover {
  box-shadow: var(--shadow-md);
}

.menu-product-content {
  flex: 1;
}

.menu-product-name {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.menu-product-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.menu-product-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
}

.menu-product-actions {
  flex-shrink: 0;
}

.btn-order-wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--whatsapp-color);
  color: var(--bg-white);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
}

.btn-order-wa:hover {
  background-color: var(--whatsapp-hover);
}

/* Pulse highlight class for navigated search items */
@keyframes highlight-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 124, 0, 0.4);
    background-color: var(--primary-light);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(245, 124, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 124, 0, 0);
  }
}

.menu-product-card.highlight-pulse {
  animation: highlight-pulse 2s 3;
  border: 2px solid var(--primary) !important;
}

/* Sidebar Info Cards */
.restaurant-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-widget {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.hours-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hours-day-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.hours-day-row.current-day {
  font-weight: 700;
  color: var(--primary);
}

.day-time.closed-time {
  color: var(--badge-closed);
  font-weight: 700;
}

.widget-address {
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.details-leaflet-map {
  height: 200px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
  z-index: 10;
}

.btn-directions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px;
  text-align: center;
  transition: var(--transition-fast);
}

.btn-directions:hover {
  background-color: var(--border-color);
  color: var(--text-dark);
}

/* Custom leaflet pin marker style */
.custom-map-marker {
  position: relative;
}

.custom-map-marker .marker-pin {
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 0;
  background: var(--primary);
  position: absolute;
  transform: rotate(-45deg);
  left: 50%;
  top: 50%;
  margin-y: -18px;
  margin-x: -18px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 0.6s ease-out;
}

.custom-map-marker .marker-emoji {
  transform: rotate(45deg);
  font-size: 1.25rem;
}

@keyframes bounce {
  0% { transform: translateY(-50px) rotate(-45deg); opacity: 0; }
  50% { transform: translateY(0) rotate(-45deg); }
  75% { transform: translateY(-10px) rotate(-45deg); }
  100% { transform: translateY(0) rotate(-45deg); opacity: 1; }
}

/* 10. Large Directory Layouts */
.directory-page-container {
  padding: 30px 20px;
}

.directory-header {
  margin-bottom: 30px;
}

.directory-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.directory-header p {
  color: var(--text-muted);
  max-width: 600px;
}

.restaurants-large-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.directory-restaurant-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 20px;
  transition: var(--transition-normal);
}

.directory-restaurant-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.directory-restaurant-card.closed-card {
  opacity: 0.9;
}

.directory-rest-logo {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-md);
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.directory-rest-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.directory-rest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.directory-rest-header h2 {
  font-size: 1.3rem;
  font-weight: 800;
}

.directory-rest-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.directory-rest-categories {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.category-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dark);
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.directory-rest-footer {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
  flex-wrap: wrap;
}

.directory-meta-item {
  display: inline-flex;
  align-items: center;
}

.directory-rest-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
}

/* 11. Footer navigation */
.footer-shell {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-white);
  padding: 24px 20px;
  text-align: center;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  font-weight: 800;
  color: var(--primary);
  font-size: 1.1rem;
}

.footer-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Bottom mobile navigation bar (Similar to native apps) */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  display: none; /* Only visible on mobile */
  justify-content: space-around;
  align-items: center;
  z-index: 999;
}

.mobile-bottom-nav .nav-link {
  flex-direction: column;
  gap: 2px;
  font-size: 0.7rem;
  padding: 4px 8px;
  background-color: transparent !important;
  color: var(--text-muted);
}

.mobile-bottom-nav .nav-link.active {
  color: var(--primary);
}

.mobile-bottom-nav .nav-icon {
  font-size: 1.25rem;
}


/* Search page input layout */
.search-page-input-wrapper {
  margin-bottom: 24px;
  position: relative;
  z-index: 20;
}

/* Mobile filter toggle button - Hidden on desktop */
.mobile-filter-toggle-btn {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 20px;
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dark);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  transition: var(--transition-fast);
}

.mobile-filter-toggle-btn:hover, .mobile-filter-toggle-btn.expanded {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
}

/* ==========================================================================
   MEDIA QUERIES (Mobile-First Architecture)
   ========================================================================== */

/* Tablet view (min-width: 600px) */
@media (min-width: 600px) {
  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .restaurants-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .directory-restaurant-card {
    flex-direction: row;
  }

  .directory-rest-actions {
    min-width: 180px;
  }
}

/* Desktop view (min-width: 900px) */
@media (min-width: 900px) {
  /* Header adjustments */
  .header-search-bar {
    display: block; /* Show search in header */
  }

  .restaurants-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .results-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Search Page double column */
  .search-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  /* Restaurant Page side-by-side columns */
  .restaurant-details-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .menu-items-grid {
    grid-template-columns: 1fr; /* keep list style for products, clean */
  }

  .restaurant-header-hero {
    height: 220px;
  }
  
  .restaurant-avatar {
    width: 120px;
    height: 120px;
    bottom: -50px;
  }

  .restaurant-header-info {
    padding: 64px 32px 32px 32px;
  }

  .restaurant-main-name {
    font-size: 2.2rem;
  }
}

/* Large Desktop view (min-width: 1200px) */
@media (min-width: 1200px) {
  .results-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Mobile specific styling overrides (max-width: 899px) */
@media (max-width: 899px) {
  .container {
    padding: 0 12px;
  }

  .restaurant-page-container {
    padding: 12px;
  }
  /* Hide standard header menu since we use bottom nav */
  .nav-menu {
    display: none !important;
  }

  /* Hide redundant hamburger menu to clean mobile header layout */
  .menu-toggle {
    display: none !important;
  }

  /* Center header logo for a native app feel */
  .header-container {
    justify-content: center;
  }

  .logo-section {
    font-size: 1.5rem;
  }

  /* Show mobile filter toggle button */
  .mobile-filter-toggle-btn {
    display: flex;
  }

  /* Make filters sidebar collapsible on mobile */
  .search-filters-sidebar {
    display: none;
    width: 100%;
    margin-bottom: 10px;
  }

  .search-filters-sidebar.active {
    display: block;
    animation: slideDown 0.25s ease-out;
  }

  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Show native-app style bottom navigation bar */
  .mobile-bottom-nav {
    display: flex;
  }

  /* Add margin bottom to body so content isn't covered by bottom nav bar */
  body {
    padding-bottom: 60px;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  /* Search input container mobile overrides to fit smaller viewports */
  .search-input-container {
    padding: 4px;
  }

  .search-input-container .search-icon {
    margin-left: 10px;
    font-size: 1rem;
  }

  .search-input-container input {
    padding: 8px;
    font-size: 0.95rem;
  }

  .btn-search-trigger {
    padding: 10px 18px;
    font-size: 0.95rem;
  }

  /* Adjust detail page action buttons */
  .restaurant-action-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn-whatsapp-large, .btn-call {
    width: 100%;
    justify-content: center;
  }

  /* Mobile margin corrections */
  .category-tabs-bar {
    position: sticky;
    top: 70px;
    background-color: var(--bg-light);
    z-index: 50;
    padding: 8px 0;
    margin-bottom: 12px;
  }

  .filter-card {
    position: static; /* don't stick on mobile */
  }
}

/* ==========================================================================
   INTERACTIVE CART & ORDERING SYSTEM
   ========================================================================== */

/* Product Card Quantity Selector */
.qty-selector {
  display: flex;
  align-items: center;
  background-color: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: var(--radius-full);
  overflow: hidden;
  height: 38px;
}

.btn-qty-minus, .btn-qty-plus {
  background: none;
  border: none;
  width: 32px;
  height: 100%;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-qty-minus:hover, .btn-qty-plus:hover {
  background-color: rgba(245, 124, 0, 0.1);
}

.qty-display {
  font-weight: 800;
  color: var(--primary);
  min-width: 24px;
  text-align: center;
  font-size: 0.95rem;
}

.btn-add-to-cart {
  background-color: var(--primary);
  color: var(--bg-white);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid var(--primary);
}

.btn-add-to-cart:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(245, 124, 0, 0.2);
}

/* Floating Cart Drawer Bar */
.cart-floating-drawer {
  position: fixed;
  bottom: 75px; /* Sits cleanly above the mobile nav tab bar */
  left: 50%;
  transform: translate(-50%, 50px);
  width: calc(100% - 24px);
  max-width: 500px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--primary);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(245, 124, 0, 0.15);
  z-index: 999;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.cart-floating-drawer.visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.cart-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
}

.cart-bar-left, .cart-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-bar-icon {
  font-size: 1.2rem;
}

.cart-bar-qty {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.cart-bar-total {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
}

.cart-bar-text {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* Cart Modal Overlay */
.cart-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-modal-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: 500px;
  background-color: var(--bg-white);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.15);
  z-index: 2001;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.cart-modal-sheet.active {
  transform: translate(-50%, 0);
}

.cart-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.cart-modal-header h3 {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-dark);
}

.btn-close-cart {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border-color);
}

.cart-item-info {
  flex: 1;
  padding-right: 12px;
}

.cart-item-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.cart-item-price-unit {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cart-item-subtotal {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-left: 12px;
  min-width: 70px;
  text-align: right;
}

.cart-notes-wrapper {
  margin-bottom: 20px;
}

.cart-notes-label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.cart-notes-textarea {
  width: 100%;
  height: 70px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  font-size: 0.85rem;
  resize: none;
  background-color: var(--bg-light);
  transition: var(--transition-fast);
}

.cart-notes-textarea:focus {
  border-color: var(--primary);
  background-color: var(--bg-white);
  outline: none;
}

.cart-modal-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-light);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cart-total-label {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dark);
}

.cart-total-val {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--primary);
}

.btn-send-order {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background-color: var(--whatsapp-color);
  color: var(--bg-white);
  padding: 14px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
}

.btn-send-order:hover {
  background-color: var(--whatsapp-hover);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.25);
}

/* ==========================================================================
   ADMINISTRATION MODULE (Dashboard & Login)
   ========================================================================== */

/* Login View Styling */
.admin-login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  padding: 40px 20px;
}

.admin-login-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 420px;
  padding: 32px;
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo-emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
}

.login-header h2 {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.login-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Forms General Styling */
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group-row {
  display: flex;
  gap: 16px;
}

.form-group.flex-1 { flex: 1; }
.form-group.flex-2 { flex: 2; }

.form-group label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-dark);
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  background-color: var(--bg-white);
  transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.1);
}

.form-group.check-group {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-top: 4px;
}

.form-group.check-group input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.form-group.check-group label {
  cursor: pointer;
  font-weight: 600;
}

/* Error banner style */
.error-alert {
  background-color: #fee2e2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.hidden {
  display: none !important;
}

/* Dashboard View Styling */
.admin-dashboard-container {
  padding-top: 30px;
  padding-bottom: 60px;
}

.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 30px;
  gap: 16px;
}

.admin-header-title h1 {
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--text-dark);
}

.admin-header-title p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

.admin-header-actions {
  display: flex;
  gap: 12px;
}

/* Summary Card */
.admin-summary-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.summary-info span {
  font-size: 1rem;
  color: var(--text-dark);
  font-weight: 600;
}

.summary-info strong {
  font-size: 1.2rem;
  color: var(--primary);
  margin-left: 6px;
}

/* Products Table List Rows */
.admin-products-table-wrapper {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.admin-product-row {
  display: grid;
  grid-template-columns: 1fr 100px 100px 200px;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  gap: 16px;
  transition: background-color var(--transition-fast);
}

.admin-product-row:last-child {
  border-bottom: none;
}

.admin-product-row:hover {
  background-color: var(--bg-light);
}

.prod-row-category {
  display: inline-block;
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.prod-row-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.prod-row-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.prod-row-price {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.prod-row-status {
  text-align: center;
}

.prod-row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Toggle Switch Widget */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .slider {
  background-color: var(--primary);
}

.toggle-switch input:checked + .slider:before {
  transform: translateX(22px);
}

/* Modals General Styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.admin-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%) scale(0.95);
  width: 90%;
  max-width: 500px;
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  z-index: 3001;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.25s ease;
  display: flex;
  flex-direction: column;
}

.admin-modal.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-dark);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-modal .admin-form {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

/* Responsive Adjustments for Admin panel */
@media (max-width: 768px) {
  .admin-header-row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .admin-header-actions {
    width: 100%;
  }
  
  .admin-header-actions a,
  .admin-header-actions button {
    flex: 1;
    text-align: center;
    justify-content: center;
  }

  .admin-summary-card {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .btn-add-product-action {
    width: 100%;
    text-align: center;
  }

  .admin-product-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .prod-row-price {
    font-size: 1rem;
  }

  .prod-row-status {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
  }

  .prod-row-status .status-label {
    margin-top: 0 !important;
  }

  .prod-row-actions {
    justify-content: flex-start;
    border-top: 1px dashed var(--border-color);
    padding-top: 12px;
    width: 100%;
  }

  .prod-row-actions button {
    flex: 1;
  }
}
