/* ==============================================
   RESTAWA MENU - Modern App Design
   Glassmorphism + Smooth Animations
   ============================================== */

:root {
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-bg-solid: #ffffff;
  --primary: #16a3a5;
  --secondary: #ffb347;
  --muted: #64748b;
  --dark: #0f172a;
  --accent-soft: rgba(22, 163, 165, 0.1);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.3);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 30px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.18);
  --shadow-xl: 0 25px 60px rgba(15, 23, 42, 0.25);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg, #f8fafc);
  color: var(--text, #1e293b);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ==============================================
   APP LOADING ANIMATION
   ============================================== */

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px 120px;
  width: 100%;
  flex: 1;
  opacity: 0;
  transform: translateY(20px);
  animation: pageReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

@keyframes pageReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger animation for children */
.page > * {
  opacity: 0;
  transform: translateY(15px);
  animation: elementReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.page > .hero { animation-delay: 0.1s; }
.page > .steps { animation-delay: 0.2s; }
.page > .carousel-wrapper { animation-delay: 0.3s; }
.page > .restaurant-description { animation-delay: 0.35s; }
.page > .lists-templates { animation-delay: 0s; opacity: 1; transform: none; }
.page > .footer-info { animation-delay: 0.4s; }

@keyframes elementReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==============================================
   HERO SECTION - Glassmorphism
   ============================================== */

.hero {
  position: relative;
  height: 200px;
  margin: 0 -16px 20px;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -10px;
  background-size: cover;
  background-position: center;
  filter: brightness(0.9) saturate(1.1);
  transform: scale(1.05);
  transition: transform 8s ease-out;
}

.hero:hover .hero-bg {
  transform: scale(1.1);
}

.hero-fallback {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(22, 163, 165, 0.15) 0%,
    rgba(255, 179, 71, 0.1) 50%,
    rgba(248, 250, 252, 1) 100%
  );
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.6) 100%
  );
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.hero-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

.hero-logo-center {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-lg);
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow:
    var(--shadow-xl),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.hero-logo {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  display: block;
}

.hero-initials {
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--dark);
  letter-spacing: -0.02em;
}

.hero-restaurant-name {
  font-weight: 700;
  font-size: clamp(0.85rem, 3vw, 1rem);
  color: var(--dark);
  white-space: nowrap;
  text-align: center;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
  max-width: calc(100vw - 48px);
  letter-spacing: -0.01em;
}

/* ==============================================
   MENU BUTTONS (Steps)
   ============================================== */

.steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.step-btn {
  position: relative;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--dark);
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-base),
    background var(--transition-base);
  overflow: hidden;
}

.step-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(22, 163, 165, 0.08) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity var(--transition-base);
}

.step-btn:hover::before,
.step-btn:focus::before {
  opacity: 1;
}

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

.step-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: var(--shadow-sm);
}

.step-btn .icon {
  display: none;
}

.step-btn span:not(.icon) {
  flex: 1;
  text-align: left;
}

.step-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.step-btn:hover .step-thumb {
  transform: scale(1.05);
}

.step-thumb-placeholder {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #cbd5e1;
}

/* Main button highlight */
.step-btn.main {
  background: linear-gradient(135deg,
    rgba(22, 163, 165, 0.12) 0%,
    rgba(22, 163, 165, 0.05) 100%
  );
  border-color: rgba(22, 163, 165, 0.2);
}

/* ==============================================
   CAROUSEL
   ============================================== */

.carousel-wrapper {
  margin-bottom: 24px;
}

.carousel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 4px;
}

.carousel-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
  letter-spacing: -0.01em;
}

.carousel-dots {
  display: flex;
  gap: 6px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(100, 116, 139, 0.3);
  transition: all var(--transition-base);
}

.carousel-dot.active {
  width: 20px;
  background: var(--primary);
}

.carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 4px 16px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track .dish-card {
  scroll-snap-align: start;
  flex: 0 0 140px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.carousel-track .dish-thumb-top {
  height: 100px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.carousel-track .dish-card-title {
  font-size: 0.8rem;
  line-height: 1.3;
}

.carousel-track .dish-card-sub,
.carousel-track .dish-card-footer {
  display: none;
}

/* ==============================================
   DISH CARDS
   ============================================== */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 380px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

.dish-card {
  background: var(--card-bg-solid);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-base);
}

.dish-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.dish-card:active {
  transform: translateY(-2px) scale(0.98);
}

.dish-thumb-top {
  width: 100%;
  height: 130px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  overflow: hidden;
}

.dish-thumb-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.dish-card:hover .dish-thumb-top img {
  transform: scale(1.08);
}

.dish-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #cbd5e1;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.dish-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dish-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.dish-card-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

.dish-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.dish-tag {
  font-size: 0.65rem;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.dish-tag-spicy {
  background: #fef2f2;
  color: #991b1b;
}

.dish-tag-spicy img {
  vertical-align: middle;
}

.dish-tag-vegetarian {
  background: #dcfce7;
  color: #166534;
}

.dish-tag-vegan {
  background: #d1fae5;
  color: #065f46;
}

.dish-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.dish-card-price {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--dark);
}

.dish-card-meta {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.dish-card-prices {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dish-card-half {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.dish-card-half .half-label {
  color: var(--primary);
  font-weight: 600;
}

/* Modal half portion */
.dish-modal-half-price {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2px;
}

.dish-modal-half-price .half-label {
  color: var(--primary);
  font-weight: 600;
}

/* ==============================================
   RESTAURANT DESCRIPTION
   ============================================== */

.restaurant-description {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.restaurant-description-head {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--dark);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.restaurant-description p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.restaurant-hours {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.restaurant-hours--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.restaurant-hours-icon {
  color: var(--primary);
  opacity: 0.8;
}

.restaurant-hours-head {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--dark);
}

.restaurant-hours-text {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.restaurant-contact {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.restaurant-contact-line {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  line-height: 1.3;
  color: var(--muted);
}

.restaurant-contact-line svg {
  color: var(--primary);
  opacity: 0.75;
  flex-shrink: 0;
}

.restaurant-contact-label {
  font-weight: 700;
  color: var(--dark);
  white-space: nowrap;
}

.restaurant-contact-value a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.restaurant-address-value {
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
  max-width: 100%;
}

.restaurant-divider {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  margin: 16px 0;
}

.restaurant-wifi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.restaurant-wifi-line {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.restaurant-wifi-label {
  font-weight: 700;
  color: var(--dark);
  flex-shrink: 0;
}

.restaurant-wifi-value {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==============================================
   SECTIONS
   ============================================== */

.sections-wrapper {
  margin-top: 8px;
}

.section-block {
  margin-bottom: 24px;
}

.daily-menu-header {
  text-align: center;
  margin-bottom: 20px;
}

.daily-menu-sub {
  font-size: 0.88rem;
  color: var(--muted);
}

.daily-course-header {
  text-align: center;
  margin: 24px 0 16px;
}

.daily-course-title {
  display: inline-block;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg,
    rgba(22, 163, 165, 0.1) 0%,
    rgba(22, 163, 165, 0.05) 100%
  );
  border: 1px solid rgba(22, 163, 165, 0.15);
  color: var(--dark);
}

.section-label-centered {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin: -8px 0 16px;
}

/* ==============================================
   DISH MODAL - Bottom Sheet Style
   ============================================== */

.dish-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.dish-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.dish-modal {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  max-height: 90dvh;
  background: #ffffff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  transform: translateY(100%);
  transition: transform var(--transition-spring);
}

.dish-modal-backdrop.open .dish-modal {
  transform: translateY(0);
}

.dish-modal-img {
  position: relative;
  height: 220px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  overflow: hidden;
  flex-shrink: 0;
}

.dish-modal-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dish-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: none;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast);
}

.dish-modal-close:hover {
  background: rgba(15, 23, 42, 0.85);
}

.dish-modal-close:active {
  transform: scale(0.92);
}

.dish-modal-body {
  padding: 20px 20px 28px;
  overflow-y: auto;
  flex: 1;
}

.dish-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.dish-modal-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.dish-modal-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 16px 0 8px;
}

.dish-modal-text {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.dish-modal-ingredients {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  margin: 0;
}

.dish-modal-desc {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  margin: 0;
}

.dish-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dish-modal-tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: #0f766e;
  font-weight: 500;
}

.dish-modal-meta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--dark);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.dish-modal-meta-icon {
  color: #94a3b8;
  vertical-align: -3px;
  margin-right: 4px;
}

.dish-modal-meta-label {
  font-weight: 600;
}

.dish-modal-add {
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--dark);
  color: #ffffff;
  border: none;
  cursor: pointer;
  margin-top: 20px;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast);
}

.dish-modal-add:hover {
  background: #1e293b;
}

.dish-modal-add:active {
  transform: scale(0.98);
}

/* ==============================================
   LIST MODAL - Full Screen Sheet
   ============================================== */

.list-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.list-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.list-modal {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 95vh;
  max-height: 95dvh;
  max-width: 520px;
  margin: 0 auto;
  background: #f8fafc;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  transform: translateY(100%);
  transition: transform var(--transition-spring);
}

.list-modal-backdrop.open .list-modal {
  transform: translateY(0);
}

.list-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #ffffff;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  flex-shrink: 0;
}

.list-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.01em;
}

.list-modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--dark);
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast);
}

.list-modal-close:active {
  transform: scale(0.92);
}

.list-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #ffffff;
}

/* ==============================================
   ORDER MODAL
   ============================================== */

.order-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 110;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.order-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.order-modal {
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  background: #fffbeb;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition:
    transform var(--transition-spring),
    opacity var(--transition-base);
}

.order-modal-backdrop.open .order-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.order-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(217, 119, 6, 0.15);
}

.order-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
}

.order-modal-close {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--dark);
  color: #ffffff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.order-modal-close:active {
  transform: scale(0.92);
}

.order-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 20px;
}

.order-list {
  list-style: none;
  margin: 0;
  padding: 16px;
  background: #fffef7;
  border-radius: var(--radius-md);
  border: 1px solid rgba(217, 119, 6, 0.12);
}

.order-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(217, 119, 6, 0.15);
}

.order-line:last-child {
  border-bottom: none;
}

.order-line-name {
  flex: 1;
  padding-right: 12px;
}

.order-line-name strong {
  font-weight: 600;
  color: var(--dark);
  font-size: 0.9rem;
}

.order-line-section {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

.order-line-price {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--dark);
}

.order-empty {
  text-align: center;
  padding: 24px 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.order-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.order-clear-btn {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.2);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast);
}

.order-clear-btn:hover {
  background: #fee2e2;
}

.order-clear-btn:active {
  transform: scale(0.96);
}

/* ==============================================
   FLOATING ORDER BUTTON (FAB)
   ============================================== */

.floating-order-btn.order-fab {
  position: fixed;
  right: 16px;
  bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px));
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  animation: fabPulse 2s ease-in-out infinite;
}

@keyframes fabPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.order-fab-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 8px 24px rgba(15, 23, 42, 0.3));
  transition: transform var(--transition-fast);
}

.order-fab-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.floating-order-btn.order-fab:active .order-fab-icon {
  transform: scale(0.92);
}

.floating-order-btn.order-fab .order-count {
  position: absolute;
  top: -4px;
  left: -4px;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 10px;
  background: #ffffff !important;
  color: #dc2626 !important;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  border: 2px solid #ffffff;
  transition: transform var(--transition-spring);
}

.floating-order-btn.order-fab.has-items .order-count {
  animation: countBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes countBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.order-fab-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==============================================
   FOOTER
   ============================================== */

.footer-info {
  padding: 20px 0;
}

.footer-social {
  text-align: center;
  margin-bottom: 20px;
}

.footer-social-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--dark);
  margin-bottom: 14px;
}

.footer-social-icons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.social-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-base);
}

.social-icon:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.social-icon:active {
  transform: translateY(-1px) scale(0.96);
}

.social-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer-copyright {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 10px 0 6px;
}

.footer-sticky-powered {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  padding-bottom: calc(6px + env(safe-area-inset-bottom));
}

.footer-sticky-powered a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-sticky-powered a:hover {
  color: #0d9488;
}

/* ==============================================
   PWA INSTALL
   ============================================== */

.pwa-install-wrap {
  margin: 16px 0 20px;
}

.pwa-install-btn {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg,
    rgba(22, 163, 165, 0.08) 0%,
    rgba(255, 179, 71, 0.06) 100%
  );
  color: var(--dark);
  border: 1px solid rgba(22, 163, 165, 0.15);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-base);
}

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

.pwa-install-btn:active {
  transform: translateY(0) scale(0.98);
}

.pwa-install-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pwa-install-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pwa-install-btn span:last-child {
  flex: 1;
  text-align: left;
}

.pwa-install-note {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
  padding: 0 16px;
}

/* ==============================================
   iOS INSTALL SHEET
   ============================================== */

.ios-install-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  padding-bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px));
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.ios-install-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.ios-install-sheet {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: translateY(100%);
  transition: transform var(--transition-spring);
}

.ios-install-backdrop.open .ios-install-sheet {
  transform: translateY(0);
}

.ios-install-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.ios-install-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
}

.ios-install-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--dark);
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.ios-install-close:active {
  transform: scale(0.92);
}

.ios-install-body {
  padding: 20px;
}

.ios-steps {
  margin: 0;
  padding-left: 20px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #475569;
}

.ios-steps li {
  margin-bottom: 10px;
}

.ios-steps li:last-child {
  margin-bottom: 0;
}

.ios-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(22, 163, 165, 0.1);
  color: var(--primary);
  font-size: 1rem;
  margin: 0 2px;
  vertical-align: middle;
}

.ios-hint {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* ==============================================
   EMPTY STATE
   ============================================== */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ==============================================
   UTILITY / HIDDEN
   ============================================== */

.dish-modal-template,
.list-modal-template,
.lists-templates {
  display: none;
}

/* ==============================================
   RESPONSIVE ADJUSTMENTS
   ============================================== */

@media (min-width: 640px) {
  .page {
    padding: 0 24px 120px;
  }

  .hero {
    height: 240px;
    margin: 0 -24px 24px;
  }

  .hero-logo-center {
    width: 100px;
    height: 100px;
  }

  .cards-grid {
    gap: 16px;
  }

  .dish-thumb-top {
    height: 150px;
  }
}

@media (min-width: 768px) {
  .hero {
    height: 280px;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  }
}

/* ==============================================
   APP LOADING STATE
   ============================================== */

body.app-loading {
  overflow: hidden;
}

body.app-loading .page {
  opacity: 0;
  transform: translateY(30px);
}

/* El botón flotante siempre visible */
.floating-order-btn.order-fab {
  opacity: 1 !important;
  transform: scale(1) !important;
}

body.app-ready .floating-order-btn.order-fab {
  animation: fabEntry 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fabEntry {
  from {
    opacity: 0.8;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==============================================
   TOUCH INTERACTION STATES
   ============================================== */

@media (hover: none) and (pointer: coarse) {
  .step-btn:active,
  .dish-card:active,
  .pwa-install-btn:active {
    transform: scale(0.97);
  }

  .step-btn:hover,
  .dish-card:hover,
  .pwa-install-btn:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }
}

/* ==============================================
   REDUCED MOTION
   ============================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .page,
  .page > * {
    opacity: 1;
    transform: none;
    animation: none;
  }

  body.app-loading .page,
  body.app-loading .floating-order-btn.order-fab,
  body.app-ready .floating-order-btn.order-fab {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ==============================================
   CONFIRM MODAL (Vaciar pedido)
   ============================================== */

.confirm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.confirm-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.confirm-modal {
  width: 100%;
  max-width: 340px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 28px 24px 24px;
  text-align: center;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition:
    transform var(--transition-spring),
    opacity var(--transition-base);
}

.confirm-modal-backdrop.open .confirm-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.confirm-modal-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: var(--radius-full);
  background: #fef2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dc2626;
}

.confirm-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.confirm-modal-text {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

.confirm-modal-actions {
  display: flex;
  gap: 12px;
}

.confirm-modal-btn {
  flex: 1;
  padding: 14px 16px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast);
}

.confirm-modal-btn:active {
  transform: scale(0.96);
}

.confirm-modal-btn--cancel {
  background: #f1f5f9;
  color: var(--dark);
}

.confirm-modal-btn--cancel:hover {
  background: #e2e8f0;
}

.confirm-modal-btn--confirm {
  background: #dc2626;
  color: #ffffff;
}

.confirm-modal-btn--confirm:hover {
  background: #b91c1c;
}

/* Responsive para pantallas pequeñas */
@media (max-width: 380px) {
  .confirm-modal {
    padding: 24px 20px 20px;
  }

  .confirm-modal-icon {
    width: 64px;
    height: 64px;
  }

  .confirm-modal-icon svg {
    width: 40px;
    height: 40px;
  }

  .confirm-modal-title {
    font-size: 1.05rem;
  }

  .confirm-modal-actions {
    flex-direction: column;
    gap: 10px;
  }

  .confirm-modal-btn {
    padding: 12px 16px;
  }
}

/* ==============================================
   ORDER STEP MODAL (WhatsApp pedido por pasos)
   ============================================== */
.order-step-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 18px;
}

.order-step-backdrop.open {
  display: flex;
}

.order-step-panel {
  position: relative;
  width: min(380px, 100%);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(83, 153, 159, 0.15);
  border-radius: 20px;
  padding: 24px 20px 20px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(10px);
  color: #162535;
  animation: raFadeUp 0.2s ease-out;
}

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

.order-step-header {
  margin-bottom: 16px;
}

.order-step-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #162535;
}

.order-step-body {
  text-align: center;
}

.order-step-text {
  margin: 0 0 18px 0;
  font-size: 15px;
  line-height: 1.5;
  color: #475569;
}

.order-step-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-step-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  border: 1px solid rgba(83, 153, 159, 0.25);
  border-radius: 14px;
  background: rgba(83, 153, 159, 0.06);
  color: #162535;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.order-step-btn:active {
  transform: scale(0.98);
}

.order-step-btn--local:hover {
  background: rgba(83, 153, 159, 0.12);
  border-color: rgba(83, 153, 159, 0.4);
}

.order-step-btn--delivery:hover {
  background: rgba(199, 82, 82, 0.08);
  border-color: rgba(199, 82, 82, 0.3);
}

.order-step-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(83, 153, 159, 0.12);
  flex-shrink: 0;
}

.order-step-btn--delivery .order-step-btn-icon {
  background: rgba(199, 82, 82, 0.1);
}

.order-step-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #94a3b8;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.order-step-close:hover {
  color: #162535;
  background: rgba(148, 163, 184, 0.1);
}

.order-step-field {
  margin-bottom: 16px;
  text-align: left;
}

.order-step-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #162535;
}

.order-step-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(83, 153, 159, 0.25);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  color: #162535;
  font-size: 15px;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.order-step-input:focus {
  outline: none;
  border-color: rgba(83, 153, 159, 0.5);
  box-shadow: 0 0 0 3px rgba(83, 153, 159, 0.1);
}

.order-step-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(83, 153, 159, 0.25);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  color: #162535;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.order-step-textarea:focus {
  outline: none;
  border-color: rgba(83, 153, 159, 0.5);
  box-shadow: 0 0 0 3px rgba(83, 153, 159, 0.1);
}

.order-step-btn--send {
  background: #25D366;
  border-color: #25D366;
  color: #fff;
  margin-top: 4px;
}

.order-step-btn--send:hover {
  background: #1ebe57;
  border-color: #1ebe57;
}

.order-step-btn--send .order-step-btn-icon {
  background: rgba(255, 255, 255, 0.2);
}

/* ==============================================
   DISH SHARE BUTTON
   ============================================== */

.dish-modal-sub-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.dish-modal-sub-wrap .dish-modal-sub {
  margin-bottom: 0;
}

.dish-spicy-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.dish-spicy-label {
  font-weight: 600;
  color: var(--dark);
}

.dish-spicy-icons {
  display: flex;
  gap: 2px;
}

.dish-spicy-icons img {
  width: 18px;
  height: 18px;
}

.dish-diet-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.dish-diet-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
}

.dish-diet-vegetarian {
  background: #dcfce7;
  color: #166534;
}

.dish-diet-vegan {
  background: #d1fae5;
  color: #065f46;
}

.dish-share-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: var(--accent-soft);
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.dish-share-btn:hover {
  background: rgba(22, 163, 165, 0.15);
  box-shadow: var(--shadow-sm);
}

.dish-share-btn:active {
  transform: scale(0.92);
}

.dish-share-btn svg {
  display: block;
}
