/* =====================================================
   Mifta's V2 — Child Theme Design System
   Source: Figma "MIFTA'S Dine" node 99:41
   ===================================================== */

/* ---- Tokens ---- */
:root {
  --mf-bg:        #120E0D;
  --mf-surface:   #1C1614;
  --mf-surface2:  #261E1B;
  --mf-line:      #3A2F2B;
  --mf-cream:     #F5EFE6;
  --mf-muted:     #B9ADA2;
  --mf-red:       #C4252F;
  --mf-red-hover: #A61B26;
  --mf-red-text:  #F0525C;
  --mf-gold:      #F9C65B;
  --mf-white:     #FFFFFF;
  --mf-header-h:  96px;
}

/* ---- Reset ---- */
html { scroll-behavior: smooth; scroll-padding-top: var(--mf-header-h); }

body.mf-page {
  background: var(--mf-bg) !important;
  color: var(--mf-cream);
  font-family: 'Open Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  margin: 0 !important;
  overflow-x: hidden;
}
body.mf-page a { text-decoration: none; }

/* The parent theme sets body text to 22px / 1.4. Inline span headings and inline
   images sit on that line box, which adds ~10px of phantom height per widget.
   Make span titles block-level and give image widgets a zero line box. */
body.mf-page { font-size: 16px; line-height: 1.5; }
body.mf-page .elementor-widget-heading .elementor-heading-title { display: block; }
body.mf-page .elementor-widget-image { line-height: 0; font-size: 0; }
/* Icons keep their Figma size next to growing text blocks. */
body.mf-page .mf-icon { flex-shrink: 0; }
body.mf-page :focus-visible { outline: 2px solid var(--mf-gold); outline-offset: 3px; }
body.mf-page .e-con { box-sizing: border-box; }

/* =====================================================
   HEADER
   Figma: 1440×96px, padding 100px H, flex-row space-between
   ===================================================== */
.mf-header {
  position: sticky !important;
  top: 0;
  z-index: 100;
  width: 100% !important;
}
.mf-header.elementor-sticky--effects {
  box-shadow: 0 1px 0 var(--mf-line);
}

/* Force the header's inner flex to actually apply space-between.
   Elementor's .e-flex base rule resets align/justify to 'normal';
   we need to re-apply the CSS-var values on the inner div. */
.mf-header > .e-con-inner {
  display:         flex !important;
  flex-direction:  row  !important;
  align-items:     center          !important;
  justify-content: space-between   !important;
  width:           100%            !important;
  height:          100%            !important;
  gap:             24px            !important;
}

/* Logo: exact Figma size, no stretching */
.mf-header > .e-con-inner > .elementor-widget-image {
  flex:       0 0 auto !important;
  width:      71.333px !important;
  max-width:  71.333px !important;
}
.mf-header > .e-con-inner > .elementor-widget-image img {
  width:      71.333px !important;
  height:     72px     !important;
  object-fit: contain  !important;
  display:    block;
}

/* Nav block: takes up natural space, sits in the middle */
.mf-header > .e-con-inner > .elementor-element.mf-desk-nav {
  flex: 0 0 auto !important;
}

/* Actions block */
.mf-header > .e-con-inner > .elementor-element:last-child {
  flex: 0 0 auto !important;
}

/* Desktop nav centred on the page (same axis as the hero title).
   It can't sit closer than 24px to the actions: its centre is capped at
   100% - padding(100) - actions(438: phone number, divider, 2 buttons) - 24
   - half nav width(250) = 100% - 812px. Exactly centred from ~1624px wide;
   at 1440 it sits as close to centre as the phone number allows.
   Narrower desktops use 40px header padding (1025-1340) and hide the
   phone number + tighten the nav (1025-1240), so the cap changes per range. */
@media (min-width: 1025px) {
  .mf-header .mf-desk-nav {
    position:  absolute !important;
    top:       50%;
    left:      min(50%, calc(100% - var(--mf-nav-cap, 812px)));
    transform: translate(-50%, -50%);
    width:     max-content !important;
    flex:      none !important;
  }
}
@media (min-width: 1241px) and (max-width: 1340px) { .mf-header { --mf-nav-cap: 752px; } } /* 40 + 438 + 24 + 250 */
@media (min-width: 1025px) and (max-width: 1240px) { .mf-header { --mf-nav-cap: 600px; } } /* 40 + 291 + 24 + 245 */

/* Mobile logo size */
@media (max-width: 1024px) {
  .mf-header > .e-con-inner > .elementor-widget-image,
  .mf-header > .e-con-inner > .elementor-widget-image img {
    width:  51.5px !important;
    height: 52px   !important;
  }
}


/* Logo widget wrapper: constrain to exact Figma size */
.elementor-element-b74d0fb img {
  width:      71.333px !important;
  height:     72px     !important;
  object-fit: contain  !important;
  display:    block;
}
@media (max-width:1024px) {
  .elementor-element-b74d0fb img { width:51.5px !important; height:52px !important; }
}
/* =====================================================
   NAV LINKS
   ===================================================== */
.mf-nav .elementor-heading-title { transition: color .2s ease; }
.mf-nav .elementor-heading-title a { color: inherit; text-decoration: none; }
.mf-nav:hover .elementor-heading-title { color: var(--mf-cream) !important; }
.mf-nav.is-active .elementor-heading-title { color: var(--mf-cream) !important; }

/* =====================================================
   LINK HELPERS
   ===================================================== */
.mf-link { cursor: pointer; transition: opacity .2s ease; }
.mf-link:hover { opacity: .75; }
.mf-footer-links .elementor-heading-title { transition: color .2s ease; }
.mf-footer-links:hover .elementor-heading-title { color: var(--mf-cream) !important; }
body.mf-page .elementor-button { transition: background-color .2s ease, border-color .2s ease, color .2s ease; }

/* Heading links */
body.mf-page .elementor-heading-title a       { color: inherit; text-decoration: none; }
body.mf-page .elementor-heading-title a:hover { color: var(--mf-cream); }
.mf-booking .elementor-heading-title a:hover  { color: var(--mf-white); text-decoration: underline; }

/* =====================================================
   HERO SECTION
   Desktop: column, center/center, 1440×760px
   Tablet:  column, flex-start/flex-end (bottom-left)
   Mobile:  same as tablet
   ===================================================== */
.elementor-element-a65ed38 > .e-con-inner {
  display:         flex    !important;
  flex-direction:  column  !important;
  align-items:     center  !important;   /* desktop: centered */
  justify-content: center  !important;
  width:           100%    !important;
  height:          100%    !important;
  gap:             28px    !important;
  padding:         0 100px !important;   /* Figma: match section px 100 */
  box-sizing:      border-box;
}
@media (max-width: 1024px) {
  .elementor-element-a65ed38 > .e-con-inner {
    align-items:     flex-start !important;
    justify-content: flex-end   !important;
    padding:         0 32px 40px !important;
  }
}
@media (max-width: 767px) {
  .elementor-element-a65ed38 > .e-con-inner {
    padding: 0 20px 40px !important;
    gap:     20px !important;
  }
}

/* =====================================================
   MENU CARDS
   Desktop: 4-col flex-row, gap 24px
   Tablet:  2-col wrap
   Mobile:  horizontal scroll-snap
   ===================================================== */

/* Desktop cards: prevent overflow clipping */
.mf-cards {
  overflow: visible !important;  /* ← was hidden in some rule; cards must NOT clip */
}

/* Tablet: 2-col wrap */
@media (max-width: 1024px) and (min-width: 768px) {
  .mf-cards {
    flex-wrap: wrap    !important;
    overflow:  visible !important;
  }
  .mf-cards > .e-con {
    width:     calc(50% - 12px) !important;
    max-width: calc(50% - 12px) !important;
    min-width: 0 !important;
    flex:      0 0 calc(50% - 12px) !important;
  }
}

/* Mobile: horizontal scroll-snap strip */
@media (max-width: 767px) {
  /* The mf-cards container becomes a horizontal scroller */
  .mf-cards {
    overflow-x:            auto      !important;
    overflow-y:            visible   !important;
    scroll-snap-type:      x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width:       none;
    flex-wrap:             nowrap    !important;
    --flex-wrap:           nowrap    !important;
    padding-right:         20px      !important; /* peek gap */
    max-width:             calc(100vw - 20px);
  }
  .mf-cards::-webkit-scrollbar { display: none; }
  .mf-cards > .e-con {
    scroll-snap-align: start;
    min-width:  264px !important;
    max-width:  264px !important;
    flex:       0 0 264px !important;
    --width:    264px !important;
  }
}

/* =====================================================
   IMAGE FILL HELPER
   ===================================================== */
/* Width fills the card; height comes from the widget's Elementor height setting (340 / 360 / 300). */
.mf-fill img { width:100% !important; object-fit:cover !important; display:block; }

/* =====================================================
   MAP LINK
   ===================================================== */
.mf-map { display: flex !important; }

/* =====================================================
   BOOKING BAND — responsive
   ===================================================== */
@media (max-width: 1024px) {
  /* Inner row (copy + button) stacks on tablet */
  .mf-booking > .e-con-inner > .e-con {
    flex-direction: column !important;
    align-items:    flex-start !important;
  }
  .mf-booking .elementor-widget-button,
  .mf-booking .elementor-button-wrapper,
  .mf-booking .elementor-button {
    width:        100% !important;
    display:      block !important;
    text-align:   center !important;
  }
}

/* =====================================================
   FOOTER COLUMNS — responsive
   ===================================================== */
@media (max-width: 1024px) and (min-width: 768px) {
  /* Columns wrap on tablet */
  .elementor-element-c2b6d2c {
    flex-wrap:  wrap !important;
    gap:        40px 40px !important;
  }
  .elementor-element-eb2263d { width: 100% !important; }     /* Brand: full row */
  .elementor-element-7d15438,
  .elementor-element-e0f3eab  { width: calc(50% - 20px) !important; flex: 0 0 calc(50% - 20px) !important; }
  .elementor-element-fa5d310  { width: 100% !important; }
}

/* =====================================================
   MOBILE NAV OVERLAY
   ===================================================== */
.mf-mobile-nav {
  position:   fixed   !important;
  inset:      0;
  /* !important: on non-Elementor pages (order flow) Elementor's frontend.css loads
     after this file and its .e-con { z-index: var(--z-index) } resets this to auto,
     letting page content paint over the open menu. Must also clear RestroPress's
     floating Menu button (10010) and mobile cart (10020). */
  z-index:    100000  !important;
  overflow-y: auto;
  transform:  translateX(100%);
  visibility: hidden;
  transition: transform .3s ease, visibility .3s;
  display:    flex    !important;
  flex-direction: column !important;
}
.mf-mobile-nav.is-open { transform: translateX(0); visibility: visible; }
body.mf-nav-open { overflow: hidden; }
.mf-menu-toggle, .mf-nav-close { cursor: pointer; }

/* =====================================================
   STICKY ACTION BAR
   ===================================================== */
.mf-sticky-bar {
  position: fixed  !important;
  left:     0      !important;
  right:    0      !important;
  bottom:   0      !important;
  z-index:  60;
  width:    100%   !important;
}

/* =====================================================
   RESPONSIVE VISIBILITY
   ===================================================== */
@media (min-width: 1025px) {
  .mf-sticky-bar  { display: none !important; }
  .mf-mobile-nav  { display: none !important; visibility: hidden !important; }
}
@media (max-width: 1024px) {
  :root { --mf-header-h: 72px; }
  body.mf-page { padding-bottom: 76px; }
}

/* =====================================================
   ELEMENTOR EDITOR OVERRIDES
   ===================================================== */
.elementor-editor-active .mf-mobile-nav {
  position:   relative !important;
  transform:  none     !important;
  visibility: visible  !important;
  display:    flex     !important;
}
.elementor-editor-active .mf-sticky-bar  { position: relative !important; }
.elementor-editor-active body.mf-page     { padding-bottom: 0; }

/* =====================================================
   ACCESSIBILITY
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
  html           { scroll-behavior: auto; }
  .mf-mobile-nav { transition: none; }
  .elementor-button { transition: none; }
}

/* =====================================================
   OFFER BAR TICKER
   miftas.js moves the bar's items into a track and clones them so the
   strip loops seamlessly. Pauses on hover/focus; swipeable with reduced motion.
   ===================================================== */
.mf-offer-bar.mf-marquee {
  overflow:        hidden     !important;
  flex-direction:  row        !important;
  flex-wrap:       nowrap     !important;
  justify-content: flex-start !important;
  padding-left:    0          !important;
  padding-right:   0          !important;
}
.mf-marquee__track {
  display:     flex;
  flex-wrap:   nowrap;
  width:       max-content;
  animation:   mf-marquee var(--mf-mq-dur, 30s) linear infinite;
  will-change: transform;
}
.mf-marquee__group {
  --mf-mq-gap:   28px;
  display:       flex;
  flex-wrap:     nowrap;
  align-items:   center;
  flex-shrink:   0;
  gap:           var(--mf-mq-gap);
  padding-right: var(--mf-mq-gap);
}
.mf-marquee__group > .elementor-element {
  flex:      0 0 auto !important;
  width:     auto     !important;
  max-width: none     !important;
}
.mf-marquee .elementor-heading-title { white-space: nowrap; }
.mf-marquee:hover .mf-marquee__track,
.mf-marquee:focus-within .mf-marquee__track { animation-play-state: paused; }
@media (max-width: 767px) {
  .mf-marquee__group { --mf-mq-gap: 20px; }
}
@keyframes mf-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-1 * var(--mf-mq-shift, 50%))); }
}
@media (prefers-reduced-motion: reduce) {
  .mf-offer-bar.mf-marquee { overflow-x: auto !important; scrollbar-width: none; }
  .mf-marquee__track { animation: none; }
}

/* =====================================================
   ORDERING PAGES (RestroPress) — no site menus or footer links
   Navigation blocks are removed server-side; this drops the credit row.
   ===================================================== */
body.mf-order-flow footer.wp-block-template-part .wp-block-spacer,
body.mf-order-flow footer.wp-block-template-part .wp-block-group:has(> p.has-small-font-size) {
  display: none !important;
}
/* =====================================================
   ORDER ONLINE — cart pinned top-right on desktop
   RestroPress's sticky-sidebar script sets inline position/transform on
   .rpressStickySidebar; those are overridden so native sticky does the work.
   Below 1025px RestroPress's own bottom cart bar + sheet takes over.
   ===================================================== */
body.page-id-59 main .wp-block-post-title,
body.page-id-59 .wp-block-post-content > .restropress {
  max-width: min(1320px, 100%) !important;
}
@media (min-width: 1025px) {
  .rpress-menu-v2 {
    --mf-cart-w:           340px;
    display:               grid !important;
    grid-template-columns: minmax(0, 1fr) var(--mf-cart-w);
    column-gap:            32px;
    align-items:           start;
  }
  .rpress-menu-v2 > *,
  .rpress-menu-v2 > .desktop-scroll-menu > .make-me-sticky {
    grid-column:  1;
    width:        auto !important;
    max-width:    none !important;
    float:        none !important;
    margin-left:  0    !important;
    margin-right: 0    !important;
  }
  .rpress-menu-v2 > .rpress-sidebar-cart {
    grid-column: 2;
    grid-row:    1 / span 3;
    align-self:  stretch;
    padding:     0 !important;
    min-height:  0 !important;
  }
  .rpress-menu-v2 > .rpress-sidebar-cart > .rpressStickySidebar {
    position:   sticky !important;
    top:        calc(var(--wp-admin--admin-bar--height, 0px) + 24px) !important;
    transform:  none   !important;
    width:      auto   !important;
    max-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px) - 48px);
    overflow-y: auto;
  }
}
@media (min-width: 1025px) and (max-width: 1240px) {
  .rpress-menu-v2 { --mf-cart-w: 290px; column-gap: 24px; }
}


/* =====================================================
   OFFER BAR — each offer once (replaces the cloned ticker)
   Static centred row where it fits; miftas.js adds .mf-offer-rotate when the
   row overflows and shows one offer at a time.
   ===================================================== */
.mf-offer-bar { overflow: hidden !important; }
.mf-offer-bar > .e-con-inner,
.mf-offer-bar:not(:has(> .e-con-inner)) {
  flex-wrap: nowrap !important;
  justify-content: center !important;
}
.mf-offer-bar .elementor-widget-heading .elementor-heading-title { white-space: nowrap; }

.mf-offer-bar.mf-offer-rotate .mf-icon,
.mf-offer-bar.mf-offer-rotate .elementor-widget-heading:not(.is-active) { display: none !important; }
.mf-offer-bar.mf-offer-rotate .elementor-widget-heading.is-active {
  animation: mf-offer-in .45s ease both;
  max-width: 100%;
}
.mf-offer-bar.mf-offer-rotate .elementor-widget-heading.is-active .elementor-heading-title {
  white-space: normal;
  text-align: center;
}
@keyframes mf-offer-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mf-offer-bar.mf-offer-rotate .elementor-widget-heading.is-active { animation: none; }
}

/* =====================================================
   BACK-TO-TOP BUTTON (all pages; JS adds it after scrolling)
   ===================================================== */
.mf-to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 59;
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  background: #C4252F; color: #fff; border: 0; border-radius: 2px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, background-color .2s ease, bottom .2s ease;
}
.mf-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.mf-to-top:hover { background: #A61B26; }
.mf-to-top:focus-visible { outline: 2px solid #F9C65B; outline-offset: 2px; }
.mf-to-top svg { display: block; }
html.mf-viewer-open .mf-to-top { display: none; }
@media (prefers-reduced-motion: reduce) { .mf-to-top { transition: none; } }