/* ==========================================================
   QR-MENU — PREMIUM UPGRADE (guest experience)
   Loaded after pages.css. Re-styles existing components and
   adds: sticky-categories with blur, hero, tags, skeleton,
   calories/time badges, smooth scroll-snap.
   ========================================================== */

/* === STICKY CATEGORIES with backdrop-blur (fix overflow) === */
#header { z-index: 90; }
.category-cards {
  /* Inherit base layout from pages.css: display:flex, gap, overflow-x:auto */
  position: sticky;
  top: var(--header-h, 56px);
  z-index: 88;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: rgba(var(--color-bg-rgb, 255,255,255), 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  scroll-snap-type: x mandatory;
  scroll-padding: var(--page-px, 16px);
  -webkit-overflow-scrolling: touch;
  /* Subtle separator on scroll */
  transition: box-shadow 0.3s ease;
}
.category-cards--compact {
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 6px 14px -10px rgba(0,0,0,0.08);
}
/* Hide horizontal scroll bar but keep scrollable */
.category-cards::-webkit-scrollbar { display: none; }
.category-cards { scrollbar-width: none; }
.category-card {
  scroll-snap-align: start;
  position: relative;
  transition: transform 0.2s ease;
}
.category-card:active { transform: scale(0.96); }
.category-card--active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
  animation: catUnderline 0.3s ease both;
}
@keyframes catUnderline {
  from { width: 0; opacity: 0; }
  to   { width: 32px; opacity: 1; }
}

/* === HERO BLOCK (top dish) === */
.menu-hero {
  position: relative;
  margin: 4px 0 22px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent, var(--color-primary)) 100%);
  box-shadow: 0 18px 40px -16px rgba(var(--color-primary-rgb), 0.4);
  cursor: pointer;
  aspect-ratio: 16/9;
  display: block;
  text-decoration: none;
  color: #fff;
}
.menu-hero__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.78) saturate(1.05);
  transition: transform 0.6s ease;
}
.menu-hero:hover .menu-hero__img { transform: scale(1.04); }
.menu-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.65) 100%);
}
.menu-hero__body {
  position: absolute;
  bottom: 18px;
  left: 18px;
  right: 18px;
  z-index: 2;
}
.menu-hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.menu-hero__name {
  font-size: clamp(20px, 5vw, 26px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 6px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.menu-hero__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.95;
}
.menu-hero__price {
  background: rgba(255,255,255,0.22);
  padding: 3px 10px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* === MICRO-TAGS on product cards === */
.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.product-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  border-radius: 999px;
  white-space: nowrap;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.product-tag--hot     { background: rgba(255,107,53,0.10);  color: #FF6B35; border-color: rgba(255,107,53,0.25); }
.product-tag--new     { background: rgba(16,185,129,0.10);  color: #059669; border-color: rgba(16,185,129,0.22); }
.product-tag--spicy   { background: rgba(220,38,38,0.10);   color: #DC2626; border-color: rgba(220,38,38,0.22); }
.product-tag--vegan   { background: rgba(34,197,94,0.10);   color: #16A34A; border-color: rgba(34,197,94,0.22); }

/* Position tags as floating badges over image */
.product-card { position: relative; }
.product-card .product-card__badges {
  position: absolute;
  top: 8px; left: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  z-index: 2;
  pointer-events: none;
  max-width: calc(100% - 60px);
}
.product-card .product-card__badges .product-tag {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.product-card .product-card__badges .product-tag--hot   { color: #FF6B35; }
.product-card .product-card__badges .product-tag--new   { color: #059669; }
.product-card .product-card__badges .product-tag--spicy { color: #DC2626; }
.product-card .product-card__badges .product-tag--vegan { color: #16A34A; }

/* For list items — inline tags below name */
.product-list-item .product-tags {
  margin-top: 5px;
}

/* === CALORIES & TIME meta === */
.product-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--color-text-muted, #6E7484);
  margin-top: 4px;
  font-weight: 500;
}
.product-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.product-meta__item svg { width: 11px; height: 11px; opacity: 0.85; }
.product-meta__sep { color: var(--color-text-muted, #C8CCD7); opacity: 0.5; }

/* === SKELETON LOADERS === */
.skeleton-wrap {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.skeleton {
  background: linear-gradient(90deg,
    rgba(0,0,0,0.04) 0%,
    rgba(0,0,0,0.08) 50%,
    rgba(0,0,0,0.04) 100%);
  background-size: 200% 100%;
  border-radius: 8px;
  animation: skeletonShine 1.4s ease-in-out infinite;
}
@media (prefers-color-scheme: dark) {
  .skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0.06) 100%);
    background-size: 200% 100%;
  }
}
@keyframes skeletonShine {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 14px;
}
@media (prefers-color-scheme: dark) {
  .skeleton-card { background: rgba(20,22,28,0.5); border-color: rgba(255,255,255,0.04); }
}
.skeleton-card__img { width: 88px; height: 88px; border-radius: 10px; }
.skeleton-card__body { display: flex; flex-direction: column; gap: 6px; }
.skeleton-card__line { height: 12px; }
.skeleton-card__line--w70 { width: 70%; }
.skeleton-card__line--w40 { width: 40%; }
.skeleton-card__line--w50 { width: 50%; }

.skeleton-cat {
  display: flex;
  gap: 8px;
  overflow: hidden;
  padding: 10px 0;
}
.skeleton-cat__item {
  flex: 0 0 88px;
  height: 96px;
  border-radius: 14px;
}

/* === STAGGER + APPEAR === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.fade-in-up { animation: fadeUp 0.4s ease both; }
.stagger-1  { animation-delay: 30ms; }
.stagger-2  { animation-delay: 60ms; }
.stagger-3  { animation-delay: 90ms; }
.stagger-4  { animation-delay: 120ms; }
.stagger-5  { animation-delay: 150ms; }
.stagger-6  { animation-delay: 180ms; }
.stagger-7  { animation-delay: 210ms; }
.stagger-8  { animation-delay: 240ms; }
.stagger-9  { animation-delay: 270ms; }
.stagger-10 { animation-delay: 300ms; }
@media (prefers-reduced-motion: reduce) {
  .fade-in-up, .menu-hero__img, .category-card, .skeleton { animation: none !important; transition: none !important; }
}
