/**
 * RISERVATI - Restaurant Pages Styles
 * Used by: /restaurants/index.html
 *
 * Note: This file requires core CSS to be loaded first:
 * - core/variables.css
 * - core/base.css
 * - core/utilities.css
 * - core/animations.css
 */

/* ===== Local Variables (page-specific) ===== */
:root {
  --star-color: #FBBC04;
}

/* ===== Background Effects ===== */
.bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-image: radial-gradient(ellipse at 20% 20%, rgba(245, 166, 35, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

/* ===== Page Header ===== */
.page-header {
  padding: 2rem;
  padding-top: calc(70px + 2rem); /* Account for fixed header */
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  animation: fadeInUp 0.4s ease-out;
}

.page-header-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-normal);
}

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

.page-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: var(--font-size-3xl);
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
}

.page-subtitle {
  color: var(--color-text-secondary);
}

/* ===== Filters ===== */
.filters {
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 2rem;
  animation: fadeInUp 0.4s ease-out 0.1s;
  animation-fill-mode: both;
}

.filters-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: var(--font-weight-semibold);
}

.filter-input {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  min-width: 180px;
  transition: all var(--transition-normal);
}

.filter-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.filter-select {
  appearance: none;
  background: var(--color-bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E") no-repeat right 12px center;
  cursor: pointer;
}

.btn-filter {
  background: var(--color-gradient);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-lg);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  box-shadow: var(--shadow-primary-sm);
  transition: all var(--transition-normal);
}

.btn-filter:hover {
  box-shadow: var(--shadow-primary-md);
  transform: translateY(-2px);
}

.btn-reset {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  padding: 10px 16px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
}

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

/* ===== Results ===== */
.results {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.results-count {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.results-count strong {
  color: var(--color-text-primary);
}

.sort-select {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
}

/* ===== Restaurant Grid ===== */
.restaurant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* ===== Restaurant Card ===== */
.restaurant-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: all var(--transition-slow);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.5s ease-out;
  animation-fill-mode: both;
}

.restaurant-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-primary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Stagger animation delays */
.restaurant-card:nth-child(1) { animation-delay: 0.1s; }
.restaurant-card:nth-child(2) { animation-delay: 0.15s; }
.restaurant-card:nth-child(3) { animation-delay: 0.2s; }
.restaurant-card:nth-child(4) { animation-delay: 0.25s; }
.restaurant-card:nth-child(5) { animation-delay: 0.3s; }
.restaurant-card:nth-child(6) { animation-delay: 0.35s; }

.card-image {
  height: 180px;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.restaurant-card:hover .card-image img {
  transform: scale(1.1);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-gradient);
  color: white;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
}

.card-rating {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(10px);
  color: var(--color-text-primary);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: var(--font-weight-semibold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.card-rating svg {
  width: 12px;
  height: 12px;
  fill: var(--star-color);
}

.card-body {
  padding: 1.25rem;
}

.card-name {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  margin-bottom: 0.25rem;
  color: var(--color-text-primary);
}

.card-cuisine {
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: 0.5rem;
}

.card-location {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 1rem;
}

.card-location svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.card-reviews {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.card-btn {
  background: var(--color-gradient);
  color: white;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  box-shadow: var(--shadow-primary-sm);
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.empty-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
}

.empty-text {
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
}

/* ===== Loading ===== */
.loading {
  display: flex;
  justify-content: center;
  padding: 4rem;
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .filters {
    padding: 1rem;
  }

  .filters-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-input {
    width: 100%;
  }

  .btn-filter {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  .page-header {
    padding: 1.5rem 1rem;
    padding-top: calc(60px + 1.5rem);
  }

  .page-title {
    font-size: var(--font-size-2xl);
  }

  .results {
    padding: 1.5rem 1rem;
  }

  .restaurant-grid {
    grid-template-columns: 1fr;
  }
}
