/* ==========================================================================
   LOS CHANCHOS Y EL BORREGO — MENU CATALOGUE STYLES (menu.css)
   Gallery-style. No ordering UI. Premium rustic aesthetic.
   ========================================================================== */

/* ---------- Page Structure ---------- */
body.menu-page {
  background: var(--color-bg);
  padding-top: 60px;
  position: relative;
}

/* Subtle repeating pig pattern over the whole page background */
body.menu-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('images/Chancho1.svg?v=1.2');
  background-size: 120px;
  background-repeat: repeat;
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Page Container ---------- */
.menu-page-container {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ---------- Branch Header ---------- */
.menu-page-header {
  text-align: center;
  padding: var(--space-xl) 0 var(--space-lg);
}

.menu-page-header .branch-logo {
  width: 88px;
  height: 88px;
  margin: 0 auto var(--space-sm);
  animation: float 4s ease-in-out infinite;

  background-color: var(--color-bg-soft); 

  border-radius: 50%; 

  /* Space between pig and circle edge */
  padding: 12px;

  border: 3px solid var(--color-text);
  box-shadow: var(--shadow-md); 
}


.menu-page-header h1 {
  font-family: var(--font-display);
  color: var(--color-text);
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 0.3rem;
}

.menu-page-subtitle {
  font-family: var(--font-display-2);
  font-size: clamp(0.85rem, 2vw, 1rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

/* ---------- Search & Category Filters ---------- */
.menu-filters-wrapper {
  max-width: 750px;
  margin: 0 auto var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.search-container {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  pointer-events: none;
  opacity: 0.5;
}

#search-bar {
  width: 100%;
  padding: 0.9rem 3rem 0.9rem 3rem;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-text);
  background: var(--color-white);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

#search-bar:focus {
  outline: none;
  border-color: var(--color-accent-2);
  box-shadow: var(--shadow-glow);
}

.search-clear {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--color-text);
  opacity: 0.5;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.search-clear:hover {
  opacity: 1;
}

/* Category Pills — Horizontal scroll bar */
.category-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
  flex-wrap: wrap;
  justify-content: center;
}

.category-list::-webkit-scrollbar {
  display: none;
}

.category-pill {
  white-space: nowrap;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  background: var(--color-white);
  border: 2px solid var(--color-text);
  font-family: var(--font-display-2);
  font-size: 0.82rem;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.category-pill:hover {
  transform: translateY(-2px);
  background: var(--color-bg-warm);
}

.category-pill.active {
  background: var(--color-text);
  color: var(--color-yellow);
  box-shadow: var(--shadow-md);
}

/* ---------- Category Section Headers ---------- */
.category-section-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) 0 var(--space-xs);
}

.category-section-header h2 {
  font-family: var(--font-display-2);
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  color: var(--color-text);
  white-space: nowrap;
}

.category-section-header .cat-emoji {
  font-size: 1.5rem;
}

.category-section-header::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--color-text), transparent);
  opacity: 0.15;
  border-radius: 2px;
}

/* ---------- Dish Grid ---------- */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-bottom: var(--space-2xl);
}

@media (min-width: 580px) {
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .menu-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Dish Card ---------- */
.dish-card {
  background: var(--color-bg-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(70, 37, 12, 0.06);
  transition: transform 0.35s var(--ease-smooth), box-shadow 0.35s var(--ease-smooth);
  display: flex;
  flex-direction: column;
}

.dish-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* Image Area */
.dish-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.dish-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-smooth);
}

.dish-card:hover .dish-image {
  transform: scale(1.06);
}

/* Placeholder (when no photo yet) */
.dish-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(145deg, var(--color-bg), var(--color-bg-warm), var(--color-pink));
  background-size: 200% 200%;
  animation: placeholderShift 8s ease-in-out infinite;
  overflow: hidden;
}

@keyframes placeholderShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.placeholder-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: radial-gradient(var(--color-text) 1px, transparent 1px);
  background-size: 14px 14px;
}

.placeholder-emoji {
  font-size: 3.2rem;
  z-index: 1;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.12));
  transition: transform 0.4s var(--ease-smooth);
}

.dish-card:hover .placeholder-emoji {
  transform: scale(1.2) rotate(6deg);
}

.placeholder-brand {
  font-family: var(--font-display-2);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text);
  margin-top: 6px;
  opacity: 0.4;
  z-index: 1;
}

/* Category Badge on image */
.dish-category-label {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-text);
  color: var(--color-yellow);
  font-family: var(--font-display-2);
  font-size: 0.62rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  z-index: 2;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-sm);
}

/* ---------- Card Info Section ---------- */
.dish-info {
  padding: 16px 18px 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.dish-name {
  font-family: var(--font-display-2);
  font-size: 1.05rem;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: 6px;
}

.dish-description {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.55;
  flex-grow: 1;
  margin-bottom: 12px;
}

/* ---------- Price Display ---------- */

/* Simple single price */
.dish-price-single {
  display: inline-block;
  font-family: var(--font-display-2);
  font-size: 1.2rem;
  color: var(--color-accent-2);
  background: var(--color-cream);
  padding: 0.25rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(70, 37, 12, 0.08);
  align-self: flex-start;
}

/* Variant price table (consomé, kilo, agua fresca, etc.) */
.dish-price-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: auto;
}

.dish-price-table tr {
  border-bottom: 1px solid rgba(70, 37, 12, 0.06);
}

.dish-price-table tr:last-child {
  border-bottom: none;
}

.dish-price-table td {
  padding: 5px 0;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.dish-price-table td:first-child {
  font-weight: 600;
  color: var(--color-text);
}

.dish-price-table td:last-child {
  text-align: right;
  font-family: var(--font-display-2);
  font-size: 0.92rem;
  color: var(--color-accent-2);
  font-weight: 700;
}

/* ---------- Empty State ---------- */
.menu-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-text-light);
}

.empty-emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.menu-empty-state h3 {
  font-family: var(--font-display-2);
  margin-bottom: 0.5rem;
}

/* ---------- Back-to-Home Link ---------- */
.menu-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display-2);
  font-size: 0.85rem;
  color: var(--color-text);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  background: rgba(70, 37, 12, 0.06);
  transition: all var(--transition-fast);
}

.menu-back-link:hover {
  background: var(--color-text);
  color: var(--color-yellow);
  transform: translateX(-3px);
}

/* ---------- Footer Separator ---------- */
.menu-footer {
  text-align: center;
  padding: var(--space-lg) 0 var(--space-xl);
  position: relative;
  z-index: 1;
}

.menu-footer p {
  font-family: var(--font-display-2);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  opacity: 0.5;
}

/* ---------- Responsive Fine-tuning ---------- */
@media (max-width: 767px) {
  body.menu-page {
    padding-top: 52px;
  }

  .menu-page-header {
    padding: var(--space-lg) 0 var(--space-md);
  }

  .top-bar__links {
    display: none;
  }
}

/* ---------- Branch Switcher ---------- */
.branch-switcher {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.branch-switcher a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-text);
  font-family: var(--font-display-2);
  font-size: 0.85rem;
  color: var(--color-text);
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.branch-switcher a img {
  width: 22px;
  height: 22px;
}

.branch-switcher a:hover {
  transform: translateY(-2px);
  background: var(--color-bg-warm);
}

.branch-switcher a.active {
  background: var(--color-text);
  color: var(--color-yellow);
  pointer-events: none;
  box-shadow: var(--shadow-md);
}