/* ============================================================
   style.css — Customer Menu Styles
   Premium warm light theme with gold accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

/* ── CSS Variables ─────────────────────────────────────── */
:root {
  --bg-primary: #faf8f5;
  --bg-secondary: #f0ece6;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.7);

  --accent: #b8885a;
  --accent-light: #d4a574;
  --accent-dark: #9a7048;
  --accent-glow: rgba(184, 136, 90, 0.12);

  --text-primary: #1a1714;
  --text-secondary: #6b635a;
  --text-muted: #9e958b;

  --border: rgba(0, 0, 0, 0.07);
  --border-accent: rgba(184, 136, 90, 0.3);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 4px 20px rgba(184, 136, 90, 0.1);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  --header-height: 180px;
  --tab-height: 56px;
}

/* ── Reset & Base ──────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle warm gradient overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(184, 136, 90, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(184, 136, 90, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(184, 136, 90, 0.3);
  border-radius: 4px;
}

/* ── Header ────────────────────────────────────────────── */
.menu-header {
  position: relative;
  text-align: center;
  padding: 48px 24px 32px;
  background: linear-gradient(180deg, rgba(184, 136, 90, 0.08) 0%, transparent 100%);
}

.menu-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.restaurant-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-accent);
  margin-bottom: 16px;
  box-shadow: var(--shadow-glow);
}

.restaurant-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.restaurant-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Category Tabs ─────────────────────────────────────── */
.category-tabs-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.category-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  flex-shrink: 0;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-glass);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
}

.category-tab:hover {
  background: rgba(184, 136, 90, 0.08);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.category-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #ffffff;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(184, 136, 90, 0.25);
}

.category-tab .tab-icon {
  font-size: 1.1rem;
}

/* ── Products Container ────────────────────────────────── */
.products-container {
  position: relative;
  z-index: 1;
  padding: 24px 16px 100px;
  max-width: 680px;
  margin: 0 auto;
}

.category-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-left: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-title .cat-icon {
  font-size: 1.3rem;
}

.category-title .cat-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-accent), transparent);
}

/* ── Product Card ──────────────────────────────────────── */
.product-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  animation: cardFadeIn 0.5s ease backwards;
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.product-image-wrapper {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.product-image-placeholder {
  font-size: 2.5rem;
  opacity: 0.25;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.product-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}

.product-description {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.01em;
}

.product-price .currency {
  font-size: 0.85rem;
  font-weight: 500;
}

/* ── Empty State ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 0.95rem;
}

/* ── Footer ────────────────────────────────────────────── */
.menu-footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-top: 1px solid var(--border);
}

/* ── Animations ────────────────────────────────────────── */
@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* stagger children */
.product-card:nth-child(1)  { animation-delay: 0.05s; }
.product-card:nth-child(2)  { animation-delay: 0.10s; }
.product-card:nth-child(3)  { animation-delay: 0.15s; }
.product-card:nth-child(4)  { animation-delay: 0.20s; }
.product-card:nth-child(5)  { animation-delay: 0.25s; }
.product-card:nth-child(6)  { animation-delay: 0.30s; }
.product-card:nth-child(7)  { animation-delay: 0.35s; }
.product-card:nth-child(8)  { animation-delay: 0.40s; }
.product-card:nth-child(9)  { animation-delay: 0.45s; }
.product-card:nth-child(10) { animation-delay: 0.50s; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 480px) {
  .restaurant-name {
    font-size: 1.6rem;
  }

  .product-image-wrapper {
    width: 80px;
    height: 80px;
  }

  .products-container {
    padding: 20px 12px 80px;
  }

  .product-card {
    padding: 12px;
    gap: 12px;
  }
}

@media (min-width: 768px) {
  .products-container {
    padding: 32px 24px 100px;
  }

  .menu-header {
    padding: 64px 24px 40px;
  }

  .restaurant-name {
    font-size: 2.4rem;
  }
}

/* ── Loading Skeleton ──────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-card) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── "All" tab special styling ─────────────────────────── */
.category-tab[data-id="all"] .tab-icon {
  font-size: 1rem;
}
