/* ============================================================
   ZORPIDO CAFE — menu_redesign.css
   Brand: Red #E8192C · Yellow #FFD600 · White #FFFFFF
   Font: Nunito (Google Fonts)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

/* ─── Design Tokens ───────────────────────────────────────── */
:root {
  --z-red: #E8192C;
  --z-red-dark: #C0111F;
  --z-red-deep: #8B0A14;
  --z-red-light: #FFF0F1;
  --z-red-soft: #FFD6D9;
  --z-yellow: #FFD600;
  --z-yellow-mid: #F5C800;
  --z-yellow-dark: #B89000;
  --z-yellow-pale: #FFFBCC;
  --z-white: #FFFFFF;
  --z-off-white: #FAFAF8;
  --z-gray-50: #F5F4F0;
  --z-gray-100: #EDEBE6;
  --z-gray-200: #D6D3CC;
  --z-gray-400: #9E9B94;
  --z-gray-600: #5C5A55;
  --z-gray-800: #2C2B28;
  --z-shadow-sm: 0 1px 4px rgba(0, 0, 0, .06), 0 2px 8px rgba(0, 0, 0, .04);
  --z-shadow-md: 0 4px 16px rgba(0, 0, 0, .09), 0 2px 6px rgba(0, 0, 0, .05);
  --z-shadow-lg: 0 12px 40px rgba(0, 0, 0, .13), 0 4px 12px rgba(0, 0, 0, .06);
  --z-radius-sm: 8px;
  --z-radius-md: 12px;
  --z-radius-lg: 18px;
  --z-radius-xl: 26px;
  --z-radius-pill: 100px;
  --z-font: 'Nunito', sans-serif;
  --z-transition: .22s cubic-bezier(.4, 0, .2, 1);
}

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

body {
  font-family: var(--z-font);
  background: var(--z-off-white);
  color: var(--z-gray-800);
  -webkit-font-smoothing: antialiased;
}

/* ─── Eyebrow Labels ──────────────────────────────────────── */
.eyebrow {
  font-size: .7rem;
  letter-spacing: .14em;
  font-weight: 800;
  color: var(--z-red) !important;
  display: block;
  margin-bottom: .15rem;
}

/* ─── Hero Slider ─────────────────────────────────────────── */
/*
  FIX: Slider layout glitch (double slider / blank area).
  Root cause: toggling position between absolute/relative on .active
  caused reflow glitches and brief double-render.
  Fix: keep ALL slides position:absolute inside a fixed-height container.
  The container itself carries the height, never the slides.
  Inactive slides: opacity:0 + visibility:hidden + pointer-events:none
  Active slide:    opacity:1 + visibility:visible
  No position toggling at all.
*/
.menu-hero-section {
  padding: 1.25rem 1rem 0;
}

.hero-slider {
  position: relative;
  /* ← establishes stacking context for abs children */
  border-radius: var(--z-radius-xl);
  overflow: hidden;
  height: 380px;
  /* fixed height — not min-height, avoids collapse */
  background: var(--z-gray-800);
  cursor: pointer;
}

@media (min-width: 768px) {
  .hero-slider {
    height: 460px;
  }
}

@media (min-width: 1200px) {
  .hero-slider {
    height: 520px;
  }
}

/* ALL slides are absolute and fill the container */
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* FIX: inactive slides cannot catch clicks */
  transition: opacity .6s ease, visibility .6s;
  display: flex;
  align-items: flex-end;
}

/* Active slide — visible, interactive */
.hero-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  /* FIX: only active slide is clickable */
  z-index: 1;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 6s ease;
}

.hero-slide.active .hero-slide-bg {
  transform: scale(1.04);
}

.hero-slide-fallback {
  background: linear-gradient(135deg, var(--z-red-dark) 0%, var(--z-gray-800) 100%);
}

/* Layered overlay: dark bottom + red tint */
.hero-slide-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(20, 5, 7, .82) 0%, rgba(20, 5, 7, .42) 45%, rgba(20, 5, 7, .12) 100%),
    linear-gradient(135deg, rgba(232, 25, 44, .25) 0%, transparent 60%);
}

.hero-slide-copy {
  position: relative;
  z-index: 2;
  padding: 2.5rem 1.5rem 1.5rem;
  width: 100%;
  text-align: center;
}

@media (min-width: 768px) {
  .hero-slide-copy {
    padding: 3rem 2.5rem 2rem;
  }
}

.hero-eyebrow {
  font-size: .72rem;
  letter-spacing: .18em;
  font-weight: 800;
  background: var(--z-yellow);
  color: var(--z-gray-800) !important;
  padding: .3rem .75rem;
  border-radius: var(--z-radius-pill);
  display: inline-block;
  margin-bottom: .5rem;
}

.hero-title {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.02em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .4);
}

.hero-tagline {
  font-size: clamp(.9rem, 2vw, 1.1rem);
  font-weight: 500;
  opacity: .88;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta-group .btn-light {
  background: var(--z-white);
  color: var(--z-red);
  font-weight: 700;
  border: none;
  border-radius: var(--z-radius-pill);
  padding: .6rem 1.4rem;
  font-size: .92rem;
  transition: var(--z-transition);
  font-family: var(--z-font);
}

.hero-cta-group .btn-light:hover {
  background: var(--z-yellow);
  color: var(--z-gray-800);
  transform: translateY(-1px);
}

.hero-cta-group .btn-secondary {
  background: var(--z-yellow);
  color: var(--z-gray-800);
  font-weight: 700;
  border: none;
  border-radius: var(--z-radius-pill);
  padding: .6rem 1.4rem;
  font-size: .92rem;
  transition: var(--z-transition);
  font-family: var(--z-font);
}

.hero-cta-group .btn-secondary:hover {
  background: var(--z-yellow-mid);
  transform: translateY(-1px);
}

/* Slider Dots — z-index 2 so they sit above active slide (z-index 1) */
.hero-slider-dots {
  position: absolute !important;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  /* FIX: was 10 but must stay above slides (z-index 1) */
  gap: .4rem !important;
  padding-bottom: .75rem;
  display: flex;
}

.hero-slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .4);
  cursor: pointer;
  transition: var(--z-transition);
  padding: 0;
}

.hero-slide-dot.active {
  background: var(--z-yellow);
  width: 24px;
  border-radius: 4px;
}

/* ─── Category Filter Bar ─────────────────────────────────── */
#category-nav {
  background: var(--z-white) !important;
  border-bottom: 1.5px solid var(--z-gray-100) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
  padding: .6rem 0 !important;
  top: 0 !important;
  z-index: 1020 !important;
}

.category-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px !important;
}

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

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .42rem 1rem;
  border-radius: var(--z-radius-pill);
  font-size: .82rem;
  font-weight: 700;
  font-family: var(--z-font);
  white-space: nowrap;
  text-decoration: none;
  color: var(--z-gray-600);
  border: 1.5px solid var(--z-gray-100);
  background: var(--z-white);
  transition: var(--z-transition);
  cursor: pointer;
}

.category-chip:hover {
  border-color: var(--z-red);
  color: var(--z-red);
  background: var(--z-red-light);
}

.category-chip.active-cat {
  background: var(--z-red);
  color: var(--z-white);
  border-color: var(--z-red);
}

.category-chip-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--z-gray-50);
  flex-shrink: 0;
}

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

.category-chip-icon i {
  font-size: 13px;
  color: var(--z-gray-400);
}

/* ─── Section Headings ────────────────────────────────────── */
.section-title-row h2,
.section-header h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 900;
  color: var(--z-gray-800);
  margin-bottom: .1rem;
  letter-spacing: -.01em;
}

.section-title-row p,
.section-header p {
  color: var(--z-gray-400);
  font-size: .88rem;
  font-weight: 500;
}

/* ─── Dish Cards ──────────────────────────────────────────── */
.dish-card {
  background: var(--z-white) !important;
  border-radius: var(--z-radius-lg) !important;
  box-shadow: var(--z-shadow-sm) !important;
  border: 1.5px solid var(--z-gray-100);
  transition: var(--z-transition);
  overflow: hidden;
}

.dish-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--z-shadow-md) !important;
  border-color: var(--z-red-soft);
}

/*
  FIX: Blank content on scroll — card image collapsing.
  Root cause: placeholder gif is 1×1px so img renders at 0 height,
  card collapses, IntersectionObserver never fires because element
  has no visible area.
  Fix: give .menu-card-img an explicit height always, and use
  background-color as the visible placeholder instead of the gif.
*/
.menu-card-img {
  width: 100%;
  height: 180px;
  /* always reserves space — prevents card collapse */
  object-fit: cover;
  display: block;
  background-color: var(--z-gray-50);
  /* visible before real image loads */
}

.dish-name {
  font-weight: 800 !important;
  color: var(--z-gray-800) !important;
  font-size: .95rem !important;
  line-height: 1.3;
}

.dish-description {
  color: var(--z-gray-400) !important;
  font-size: .82rem !important;
  line-height: 1.55;
}

.dish-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--z-red);
}

/* Veg / Spicy badges */
.badge-group .badge {
  font-size: .68rem;
  font-weight: 700;
  font-family: var(--z-font);
  padding: .22em .6em;
  letter-spacing: .02em;
}

/* Card Buttons */
.btn-outline-secondary.btn-sm,
.btn-primary.btn-sm {
  font-family: var(--z-font);
  font-weight: 700;
  font-size: .78rem;
  border-radius: var(--z-radius-pill);
  padding: .35rem .85rem;
  transition: var(--z-transition);
}

.btn-outline-secondary.btn-sm {
  border-color: var(--z-gray-200);
  color: var(--z-gray-600);
}

.btn-outline-secondary.btn-sm:hover {
  border-color: var(--z-red);
  color: var(--z-red);
  background: var(--z-red-light);
}

.btn-primary.btn-sm {
  background: var(--z-red) !important;
  border-color: var(--z-red) !important;
  color: var(--z-white) !important;
}

.btn-primary.btn-sm:hover {
  background: var(--z-red-dark) !important;
  border-color: var(--z-red-dark) !important;
  transform: scale(1.04);
}

.btn-primary.btn-sm:disabled {
  background: var(--z-gray-200) !important;
  border-color: var(--z-gray-200) !important;
  color: var(--z-gray-400) !important;
  transform: none;
}

/* ─── Best Sellers Section ────────────────────────────────── */
.menu-feature-section {
  position: relative;
}

/* Yellow accent stripe on Best Sellers heading */
.menu-feature-section:first-child .section-title-row::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--z-yellow);
  border-radius: 2px;
}

/* ─── Category Section ────────────────────────────────────── */
.category-section {
  border-top: 2px solid var(--z-gray-100);
  padding-top: 2rem !important;
}

.category-section:first-child {
  border-top: none;
}

.section-header .badge {
  background: var(--z-yellow-pale) !important;
  color: var(--z-yellow-dark) !important;
  font-weight: 700;
  font-family: var(--z-font);
}

.section-header .btn-outline-primary {
  border-color: var(--z-red);
  color: var(--z-red);
  font-weight: 700;
  font-family: var(--z-font);
  border-radius: var(--z-radius-pill);
  font-size: .8rem;
  padding: .35rem .9rem;
  transition: var(--z-transition);
}

.section-header .btn-outline-primary:hover {
  background: var(--z-red);
  color: var(--z-white);
}

/* ─── Browse All Categories ───────────────────────────────── */
.category-card {
  background: var(--z-white);
  border-radius: var(--z-radius-lg);
  border: 1.5px solid var(--z-gray-100) !important;
  box-shadow: var(--z-shadow-sm);
  transition: var(--z-transition);
  overflow: hidden;
  text-decoration: none !important;
  display: flex;
  flex-direction: column;
  color: inherit;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--z-shadow-md);
  border-color: var(--z-red-soft) !important;
}

.category-card-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
  border-radius: var(--z-radius-md) var(--z-radius-md) 0 0;
  background: var(--z-gray-50);
  margin-bottom: .75rem !important;
}

.category-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.category-card:hover .category-card-image img {
  transform: scale(1.06);
}

.category-card h3 {
  font-weight: 800;
  color: var(--z-gray-800);
  margin-bottom: .25rem;
}

.category-card p {
  color: var(--z-gray-400);
  font-size: .85rem;
}

.category-card .btn-outline-primary {
  border-color: var(--z-red);
  color: var(--z-red);
  font-weight: 700;
  font-family: var(--z-font);
  border-radius: var(--z-radius-pill);
  font-size: .82rem;
  transition: var(--z-transition);
}

.category-card:hover .btn-outline-primary {
  background: var(--z-red);
  color: var(--z-white);
}

/* ─── Floating Cart Button ────────────────────────────────── */
.floating-cart-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1050;
  background: var(--z-red);
  color: var(--z-white);
  border-radius: var(--z-radius-pill);
  padding: .75rem 1.4rem;
  gap: .55rem;
  font-weight: 800;
  font-family: var(--z-font);
  font-size: .9rem;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(232, 25, 44, .38), 0 2px 8px rgba(0, 0, 0, .14);
  transition: var(--z-transition);
  border: 3px solid rgba(255, 255, 255, .25);
  min-width: 52px;
  min-height: 52px;
}

.floating-cart-btn:hover {
  background: var(--z-red-dark);
  color: var(--z-white);
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 32px rgba(232, 25, 44, .45);
}

.floating-cart-btn i {
  font-size: 1.15rem;
}

/* Cart count badge */
.floating-cart-btn .cart-count {
  position: absolute;
  top: -8px;
  right: -6px;
  background: var(--z-yellow);
  color: var(--z-gray-800);
  font-size: .68rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--z-white);
}

/* ─── Container Tweaks ────────────────────────────────────── */
section.container {
  padding-top: 2.5rem !important;
  padding-bottom: 2rem !important;
}

/* Spacing between main sections */
.menu-feature-section {
  position: relative;
}

.menu-feature-section+.menu-feature-section {
  margin-top: 1rem;
}

/* ─── Utility: View All Button (section header) ───────────── */
.btn-sm.btn-outline-primary {
  border-color: var(--z-red);
  color: var(--z-red);
  font-weight: 700;
  font-family: var(--z-font);
  border-radius: var(--z-radius-pill);
  transition: var(--z-transition);
}

.btn-sm.btn-outline-primary:hover {
  background: var(--z-red);
  color: var(--z-white);
}

/* ─── Alert ───────────────────────────────────────────────── */
.alert-info {
  background: var(--z-red-light);
  border-color: var(--z-red-soft);
  color: var(--z-red-dark);
  border-radius: var(--z-radius-md);
  font-weight: 600;
}

/* ─── Modal Dish ──────────────────────────────────────────── */
.modal-content {
  border-radius: var(--z-radius-lg);
  border: none;
  font-family: var(--z-font);
}

.modal-header {
  border-bottom: 1.5px solid var(--z-gray-100);
}

/* ─── Responsive Tweaks ───────────────────────────────────── */
@media (max-width: 575px) {
  .hero-slider {
    border-radius: var(--z-radius-lg);
    height: 300px;
  }

  .menu-hero-section {
    padding: .75rem .75rem 0;
  }

  .hero-slide-copy {
    padding: 1.5rem 1rem 1rem;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-cta-group .btn-light,
  .hero-cta-group .btn-secondary {
    font-size: .82rem;
    padding: .5rem 1.1rem;
  }

  section.container {
    padding-top: 1.75rem !important;
  }

  .floating-cart-btn {
    bottom: 1rem;
    right: 1rem;
    padding: .7rem 1rem;
  }
}

@media (max-width: 767px) {

  .section-title-row,
  .section-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: .75rem !important;
  }
}

/* ─── Best Sellers – Card Highlight Ring ──────────────────── */
.menu-feature-section:first-of-type .dish-card {
  border-color: var(--z-yellow);
}

.menu-feature-section:first-of-type .dish-card:hover {
  border-color: var(--z-red-soft);
}

/*
  FIX: Remove shimmer animation from img[data-src].
  The animated background-gradient on img[data-src] caused a flash/glitch
  when the real image loaded because the browser briefly showed both.
  Use a plain static background-color instead (set on .menu-card-img above).
  This selector is intentionally left empty / removed.
*/

/* ─── Section Divider Accent ──────────────────────────────── */
.browse-categories-section {
  margin-top: 1rem;
  padding-top: 2.5rem;
  border-top: 2px solid var(--z-gray-100);
}

/* ─── Focus / Accessibility ───────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--z-yellow);
  outline-offset: 2px;
  border-radius: 4px;
}