/* ================================================================
   BIJOU – OddMenu Mobile Layout (V2 Alternative Design)
   Inspired by modern card-based digital dining menus
   ================================================================ */

:root {
  --bg-page: #f2eee8;
  --bg-card: #ffffff;
  --text-main: #191a1f;
  --text-muted: #6f717b;
  --gold: #b38e2d;
  --gold-dark: #91711f;
  --gold-bg: rgba(179, 142, 45, 0.1);
  --border-light: rgba(0, 0, 0, 0.07);
  --radius-card: 28px;
  --radius-banner: 18px;
  --font-heading: 'Cinzel', serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --shadow-card: 0 -8px 30px rgba(0, 0, 0, 0.15);
  --shadow-banner: 0 6px 18px rgba(0, 0, 0, 0.12);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.v2-body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
}

/* App viewport wrapper (matches mobile frame on desktop, full-width on mobile) */
.v2-app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: var(--bg-card);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.12);
  overflow-x: hidden;
}

/* ── Top Hero Banner ────────────────────────────────────────────── */
.v2-hero {
  position: relative;
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

body[data-section="restaurant"] .v2-hero {
  background-image: url('https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?w=1200&auto=format&fit=crop&q=80');
}

body[data-section="lounge"] .v2-hero {
  background-image: url('https://images.unsplash.com/photo-1572116469696-31de0f17cc34?w=1200&auto=format&fit=crop&q=80');
}

.v2-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 13, 16, 0.4) 0%, rgba(12, 13, 16, 0.75) 100%);
}

.v2-top-bar {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.1rem;
}

.v2-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(12, 13, 16, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 99px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  transition: all 0.2s ease;
}

.v2-nav-btn:active {
  transform: scale(0.96);
  background: rgba(12, 13, 16, 0.85);
}

.v2-switch-btn {
  background: rgba(212, 175, 55, 0.25);
  border-color: rgba(212, 175, 55, 0.6);
  color: #f7d57f;
}

/* Floating Circular Logo Badge */
.v2-logo-badge {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  width: 66px;
  height: 66px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  border: 2.5px solid #d4af37;
  z-index: 10;
  padding: 8px;
}

.v2-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ── Main Rounded Card Sheet ────────────────────────────────────── */
.v2-main-card {
  position: relative;
  flex: 1;
  background: var(--bg-card);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  margin-top: -24px;
  z-index: 6;
  padding: 3.4rem 1.15rem 3rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

/* Header inside card */
.v2-card-header {
  text-align: center;
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
}

.v2-card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.v2-card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ── Search Bar ─────────────────────────────────────────────────── */
.v2-search-wrap {
  position: relative;
  margin-bottom: 1.4rem;
}

.v2-search-input {
  width: 100%;
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 99px;
  padding: 0.78rem 2.75rem 0.78rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.v2-search-input:focus {
  background: #ffffff;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(179, 142, 45, 0.15);
}

.v2-search-icon {
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9c9ea8;
  pointer-events: none;
}

/* ── Category Banner Cards List ─────────────────────────────────── */
.v2-category-list {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.v2-category-card {
  position: relative;
  width: 100%;
  height: 110px;
  border-radius: var(--radius-banner);
  overflow: hidden;
  box-shadow: var(--shadow-banner);
  cursor: pointer;
  border: none;
  background: #111;
  text-align: left;
  user-select: none;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.18s ease;
}

.v2-category-card:active {
  transform: scale(0.975);
}

.v2-category-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.v2-category-card:hover .v2-category-bg {
  transform: scale(1.04);
}

.v2-category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 1rem;
  text-align: center;
}

.v2-category-name {
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.v2-category-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: #e5cf96;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.15rem 0.6rem;
  border-radius: 99px;
  border: 1px solid rgba(229, 207, 150, 0.25);
  letter-spacing: 0.04em;
}

/* ── Category Detail / Items View ──────────────────────────────── */
.v2-detail-view {
  display: none;
  flex-direction: column;
}

.v2-detail-view.active {
  display: flex;
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.v2-detail-header {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.v2-back-btn-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.v2-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f4f4f7;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 99px;
  padding: 0.5rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.v2-back-btn:active {
  transform: scale(0.95);
  background: #e5e5eb;
}

/* Category Mini Banner in Detail View */
.v2-detail-cat-banner {
  position: relative;
  width: 100%;
  height: 90px;
  border-radius: var(--radius-banner);
  overflow: hidden;
  box-shadow: var(--shadow-banner);
}

.v2-detail-cat-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v2-detail-cat-banner .v2-category-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.75) 100%);
  padding: 0.8rem 1rem;
}

.v2-detail-cat-banner .v2-category-name {
  font-size: 1.15rem;
}

/* Item Rows */
.v2-item-card {
  padding: 0.95rem 0.2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

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

.v2-item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.v2-item-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.v2-item-dots {
  flex: 1;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.18);
  margin-bottom: 4px;
  min-width: 10px;
}

.v2-item-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gold-dark);
  white-space: nowrap;
  flex-shrink: 0;
}

.v2-item-price-ask {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-bg);
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  border: 1px solid rgba(179, 142, 45, 0.2);
  white-space: nowrap;
  flex-shrink: 0;
}

.v2-item-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 85%;
}

/* ── Search Results View ────────────────────────────────────────── */
.v2-search-results {
  display: none;
  flex-direction: column;
}

.v2-search-results.active {
  display: flex;
}

.v2-search-meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

/* Loading & Empty states */
.v2-state-box {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.v2-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(179, 142, 45, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: v2spin 0.8s linear infinite;
  margin: 0 auto 0.75rem;
}

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