/* Dolmeh v95.2 — mobile-first repair over the existing v95 visual system.
   Unslop workflow by Damir Sokolovsky (@heydamir), CC BY 4.0.
   Preserve existing brand assets, content and shopping/payment features. */

/* 1. The header is a real row. No oversized absolute mascot crossing the hero. */
html body .v77-header,
html body .v77-header.v77-header-home,
html body .v77-header.v77-header-sub {
  direction: rtl !important;
  display: grid !important;
  grid-template-areas: "menu brand action" !important;
  grid-template-columns: auto minmax(0,1fr) auto !important;
  align-items: center !important;
  min-height: 72px !important;
  height: 72px !important;
  width: calc(100% - 48px) !important;
  margin: 16px auto 20px !important;
  padding: 8px 12px !important;
  overflow: hidden !important;
  isolation: auto !important;
  border-radius: 16px !important;
  box-shadow: 0 2px 12px rgba(39,34,27,.035) !important;
}
html body .v77-header-side-menu { grid-area: menu !important; justify-content: flex-start !important; }
html body .v77-header-side-action { grid-area: action !important; justify-content: flex-end !important; gap: 4px !important; }
html body .v77-brand {
  grid-area: brand !important;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  justify-self: center !important;
  direction: rtl !important;
  position: static !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  gap: 10px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--dolmeh-text) !important;
}
html body .v77-brand-disc {
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  max-width: 50px !important;
  max-height: 50px !important;
  flex: 0 0 50px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  box-shadow: none !important;
  animation: none !important;
  overflow: hidden !important;
}
html body .v77-brand-disc .header-brand-logo-only,
html body .v77-brand-disc .header-brand-video-only,
html body .v77-brand-disc .header-chroma-brand,
html body .v77-brand-disc .header-plain-video-stage {
  width: 50px !important;
  height: 50px !important;
  max-width: 50px !important;
  max-height: 50px !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}
html body .v77-brand-disc :is(.header-badge-frame,.header-logo-static,.header-logo-chroma-canvas,.header-logo-video,.header-logo-chroma-fallback,.header-logo-fallback),
html body .v77-brand-disc .header-brand-video-only :is(.header-logo-chroma-canvas,.header-logo-video,.header-logo-chroma-fallback,.header-logo-fallback) {
  width: 46px !important;
  height: 46px !important;
  max-width: 46px !important;
  max-height: 46px !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  filter: none !important;
  transform: none !important;
}
html body .v96-brand-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; gap: 1px; text-align: right; }
html body .v96-brand-copy strong { font-size: 16px; line-height: 1.4; font-weight: 600; color: var(--dolmeh-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
html body .v96-brand-copy small { font-size: 11px; line-height: 1.4; font-weight: 400; color: var(--dolmeh-secondary); white-space: nowrap; }
html body .v77-header .v77-nav-button,
html body .v77-header .cart-header-btn { width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important; flex: 0 0 44px; border-radius: 10px !important; }

/* 2. The navigation sheet uses its height for navigation, not an empty spacer. */
html body .site-menu-panel {
  width: min(360px, 94vw) !important;
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
  background: var(--dolmeh-paper) !important;
  border-inline-start: 1px solid var(--dolmeh-hairline) !important;
  box-shadow: -8px 0 30px rgba(30,25,20,.12) !important;
  overflow-y: auto !important;
}
html body .site-menu-head { align-items: center !important; padding: 0 0 16px !important; border-color: var(--dolmeh-hairline) !important; }
html body .site-menu-brand { gap: 8px !important; text-decoration: none; }
html body .site-menu-brand img { width: 62px !important; height: 52px !important; object-fit: contain !important; }
html body .site-menu-brand strong { font-size: 15px !important; font-weight: 600 !important; }
html body .site-menu-brand small { font-size: 11px !important; line-height: 1.55 !important; }
html body .site-menu-close { width: 44px !important; height: 44px !important; border-radius: 10px !important; font-weight: 400 !important; }
html body .site-menu-links { display: flex !important; flex-direction: column !important; gap: 4px !important; padding: 16px 0 !important; }
html body .site-menu-links > a,
html body .site-menu-links > button {
  min-height: 48px !important;
  border-radius: 10px !important;
  padding: 8px 10px !important;
  gap: 12px !important;
  animation: none !important;
}
html body .site-menu-links strong { font-size: 14px !important; font-weight: 500 !important; }
html body .site-menu-links .menu-icon { width: 36px !important; height: 36px !important; min-width: 36px !important; border-radius: 10px !important; color: var(--dolmeh-accent) !important; }
html body .site-menu-links svg { width: 18px !important; height: 18px !important; }
html body .site-menu-bottom { margin-top: 16px !important; padding-top: 16px !important; border-color: var(--dolmeh-hairline) !important; gap: 8px !important; }
html body .site-menu-auth { min-height: 44px !important; font-size: 13px !important; font-weight: 500 !important; border-radius: 10px !important; }
html body .site-menu-language { min-height: 44px !important; font-size: 13px !important; font-weight: 500 !important; }
/* Existing app.js adds body.menu-open when the navigation drawer is shown. */
html body.menu-open .cart-float,
html body.menu-open .bottom-dock,
html body.cart-open .cart-float,
html body.cart-open .bottom-dock {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* 3. Compact cards: photo/illustration above, information in a quiet solid row.
   The old .70 aspect-ratio and black bottom gradient were responsible for
   the overly tall, low-contrast category grid on phones. */
html body .home-category-section .category-grid,
html body .home-category-section .category-grid.category-grid { gap: 12px !important; }
html body .home-category-section .category-card {
  aspect-ratio: 1.04 !important;
  min-height: 0 !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  background: var(--dolmeh-paper) !important;
  transform: none !important;
}
html body .home-category-section .category-media {
  position: absolute !important;
  inset: 0 0 54px !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: auto !important;
  background: var(--dolmeh-soft) !important;
}
html body .home-category-section .category-media::after { display: none !important; content: none !important; }
html body .home-category-section .category-media img { width: 100% !important; height: 100% !important; object-fit: cover !important; }
html body .home-category-section .category-fallback {
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  background: var(--dolmeh-soft) !important;
  filter: none !important;
}
html body .home-category-section .category-fallback::before,
html body .home-category-section .category-fallback::after { display: none !important; content: none !important; }
html body .home-category-section .category-fallback svg { width: 38px !important; height: 38px !important; stroke: var(--dolmeh-accent) !important; opacity: .75 !important; filter: none !important; transform: none !important; }
html body .home-category-section .category-card .category-content,
html body.home-page .home-category-section .category-card .v82-category-content {
  position: absolute !important;
  inset: auto 0 0 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  height: 54px !important;
  min-height: 54px !important;
  padding: 8px 12px !important;
  border: 0 !important;
  background: var(--dolmeh-paper) !important;
  background-image: none !important;
  color: var(--dolmeh-text) !important;
  text-align: right !important;
}
html body .home-category-section .v82-category-meta { flex: 1 1 auto !important; min-width: 0 !important; align-self: center !important; }
html body.home-page .home-category-section .category-card .v82-category-meta h3,
html body .home-category-section .v82-category-meta h3 {
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
  color: var(--dolmeh-text) !important;
  text-shadow: none !important;
  text-wrap: wrap !important;
  -webkit-line-clamp: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
html body.home-page .home-category-section .category-card .v82-category-meta > span,
html body .home-category-section .v82-category-meta > span {
  font-size: 11px !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
  color: var(--dolmeh-secondary) !important;
  margin: 2px 0 0 !important;
}
html body.home-page .home-category-section .category-card .v82-category-eye,
html body .home-category-section .v82-category-eye {
  flex: 0 0 30px !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  margin: 0 !important;
  border-radius: 8px !important;
  background: var(--dolmeh-soft) !important;
  color: var(--dolmeh-secondary) !important;
  border: 0 !important;
  box-shadow: none !important;
  animation: none !important;
}
html body .home-category-section .v82-category-eye svg { stroke: currentColor !important; width: 16px !important; height: 16px !important; }

/* 4. A single compact bottom-order strip, aligned with the existing utility dock. */
html body .cart-float { border-radius: 12px !important; box-shadow: 0 3px 14px rgba(40,24,20,.10) !important; }
html body .cart-drawer-close,
html body .cart-line-remove,
html body .qty-stepper button { min-width: 44px !important; min-height: 44px !important; }
html body .qty-stepper .qty-value { min-width: 26px !important; font-variant-numeric: tabular-nums; }
html body .cart-line { gap: 8px !important; padding: 10px !important; }
html body .cart-drawer-panel { border-radius: 0 !important; }

@media (max-width: 760px) {
  html body .site-shell { width: 100% !important; }
  html body .v77-header,
  html body .v77-header.v77-header-home,
  html body .v77-header.v77-header-sub {
    width: calc(100% - 24px) !important;
    height: 60px !important;
    min-height: 60px !important;
    padding: 6px 8px !important;
    margin: 12px auto 12px !important;
    border-radius: 12px !important;
  }
  html body .v77-brand { gap: 6px !important; }
  html body .v77-brand-disc,
  html body .v77-brand-disc .header-brand-logo-only,
  html body .v77-brand-disc .header-brand-video-only,
  html body .v77-brand-disc .header-chroma-brand,
  html body .v77-brand-disc .header-plain-video-stage {
    width: 44px !important; height: 44px !important;
    min-width: 44px !important; max-width: 44px !important; max-height: 44px !important;
    flex-basis: 44px !important;
  }
  html body .v77-brand-disc :is(.header-badge-frame,.header-logo-static,.header-logo-chroma-canvas,.header-logo-video,.header-logo-chroma-fallback,.header-logo-fallback),
  html body .v77-brand-disc .header-brand-video-only :is(.header-logo-chroma-canvas,.header-logo-video,.header-logo-chroma-fallback,.header-logo-fallback) {
    width: 42px !important; height: 42px !important; max-width: 42px !important; max-height: 42px !important;
  }
  html body .v96-brand-copy strong { font-size: 13px !important; }
  html body .v96-brand-copy small { font-size: 10px !important; }
  html body .v77-header .v77-nav-button,
  html body .v77-header .cart-header-btn { width: 42px !important; height: 42px !important; min-width: 42px !important; min-height: 42px !important; flex-basis: 42px !important; }
  html body .v77-header-home .v77-header-action { display: none !important; }
  html body .banner-wrap { padding: 0 12px 8px !important; }
  html body .hero-banner, html body .banner-glass { border-radius: 12px !important; }
  html body .category-section { padding: 28px 12px 36px !important; }
  html body .home-category-section .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  html body .home-category-section .category-card { aspect-ratio: 1.04 !important; }
  html body .cart-float {
    position: fixed !important;
    inset: auto !important;
    left: 50% !important;
    right: auto !important;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    width: min(420px, calc(100% - 24px)) !important;
    max-width: 420px !important;
    min-height: 48px !important;
    padding: 8px 16px !important;
    justify-content: space-between !important;
    border-radius: 12px !important;
    opacity: 0;
    transform: translate(-50%, 12px) !important;
    box-shadow: 0 4px 16px rgba(48,31,26,.12) !important;
  }
  html body .cart-float.is-visible { opacity: 1; transform: translateX(-50%) !important; }
  html body .cart-float .cart-float-copy { align-items: flex-start !important; }
  html body .cart-float .cart-float-copy small { font-size: 11px !important; }
  html body .cart-float .cart-float-copy strong { font-size: 14px !important; font-variant-numeric: tabular-nums; }
  html body .bottom-dock {
    width: min(420px, calc(100% - 24px)) !important;
    height: 60px !important; min-height: 60px !important;
    padding: 4px !important; border-radius: 12px !important;
    column-gap: 4px !important; box-shadow: 0 4px 16px rgba(37,28,20,.08) !important;
  }
  html body .bottom-dock .dock-btn { min-height: 48px !important; height: 48px !important; font-size: 11px !important; font-weight: 500 !important; }
  html body .bottom-dock .location-line { font-size: 10px !important; line-height: 1.4 !important; font-weight: 500 !important; }
  html body .bottom-dock .language-dock > span:last-child,
  html body .bottom-dock .theme-toggle > span { font-size: 10px !important; }
  html body .site-shell.has-bottom-dock { padding-bottom: 158px !important; }
  html body .food-list { gap: 12px !important; }
  html body .food-card { border-radius: 12px !important; }
  html body .food-thumb { border-radius: 10px !important; }
  html body .food-body { min-width: 0 !important; }
  html body .food-title-row h2 { font-size: 16px !important; }
  html body .price-row strong { font-size: 16px !important; }
  html body .co-handoff { margin-top: 12px !important; }
  html body .co-handoff-invoice { margin: 12px 0 16px !important; padding: 12px !important; }
}
@media (max-width: 360px) {
  html body .v96-brand-copy small { display: none !important; }
  html body .v96-brand-copy strong { font-size: 12px !important; }
  html body .v77-brand-disc { width: 40px !important; height: 40px !important; min-width: 40px !important; max-width: 40px !important; flex-basis: 40px !important; }
  html body .v77-header .v77-header-side-action .v77-back-button { display: none !important; }
  html body .home-category-section .category-grid { gap: 8px !important; }
  html body .home-category-section .category-card .v82-category-content { padding: 8px !important; }
  html body.home-page .home-category-section .category-card .v82-category-meta h3 { font-size: 12px !important; }
  html body .home-category-section .v82-category-meta > span { font-size: 10px !important; }
}
@media (min-width: 761px) and (max-width: 1099px) {
  html body .home-category-section .category-grid { grid-template-columns: repeat(4, minmax(0,1fr)) !important; }
  html body .home-category-section .category-card { aspect-ratio: 1.00 !important; }
}
@media (min-width: 1100px) {
  html body .home-category-section .category-grid { grid-template-columns: repeat(6,minmax(0,1fr)) !important; }
  html body .home-category-section .category-card { aspect-ratio: .94 !important; }
}
@media (prefers-reduced-motion: reduce) {
  html body .cart-float,
  html body .site-menu-panel,
  html body .site-menu-links > * { transition: none !important; animation: none !important; }
}

/* Final legibility and density adjustments following the viewport audit. */
html body.home-page .home-category-section .category-card .v82-category-eye svg {
  stroke: var(--dolmeh-secondary) !important;
  fill: none !important;
}
html body .food-placeholder { background: var(--dolmeh-soft) !important; }
html body .food-placeholder svg { filter: none !important; }
@media (max-width: 760px) {
  html body .site-menu-panel {
    top: 8px !important;
    bottom: auto !important;
    height: auto !important;
    max-height: calc(100dvh - 16px) !important;
    border-radius: 14px 0 0 14px !important;
  }
}
/* Keep animated/chroma logo and its static fallback optically centered in the
   newly compact brand slot instead of clipping most of the character below it. */
html body .v77-brand-disc :is(.header-logo-chroma-fallback,.header-logo-fallback,.header-logo-video,.header-logo-chroma-canvas),
html body .v77-brand-disc .header-brand-video-only :is(.header-logo-chroma-fallback,.header-logo-fallback,.header-logo-video,.header-logo-chroma-canvas) {
  position: absolute !important;
  inset: auto !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
  object-fit: contain !important;
}

/* Win the old three-class video-stage selector, which otherwise keeps its
   98px stage in a 44px header and crops the mascot to just its chef hat. */
html body .v77-brand-disc .header-brand-video-only .header-chroma-brand,
html body .v77-brand-disc .header-brand-video-only .header-plain-video-stage {
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  max-width: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
  flex-basis: 50px !important;
  position: relative !important;
}
@media (max-width: 760px) {
  html body .v77-brand-disc .header-brand-video-only .header-chroma-brand,
  html body .v77-brand-disc .header-brand-video-only .header-plain-video-stage {
    width: 44px !important; height: 44px !important;
    min-width: 44px !important; max-width: 44px !important;
    min-height: 44px !important; max-height: 44px !important;
    flex-basis: 44px !important;
  }
}
@media (max-width: 360px) {
  html body .v77-brand-disc .header-brand-video-only .header-chroma-brand,
  html body .v77-brand-disc .header-brand-video-only .header-plain-video-stage,
  html body .v77-brand-disc .header-brand-video-only { width: 40px !important; height: 40px !important; min-width: 40px !important; max-width: 40px !important; min-height: 40px !important; max-height: 40px !important; flex-basis: 40px !important; }
}

/* Small tablets need three moderate cards, not two oversized columns. */
@media (min-width: 600px) and (max-width: 760px) {
  html body .home-category-section .category-grid { grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
}
