/* De Roma NO/EN Flag Switcher – Desktop & Mobile (incl. iPhone 390px / 375px / 360px) */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(244, 236, 221, 0.06);
  border: 1px solid var(--line, rgba(244, 236, 221, 0.16));
  flex-shrink: 0;
  margin-right: 2px;
}

.lang-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  width: 32px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.58;
  transition: opacity 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.lang-btn:hover {
  opacity: 0.92;
  background: rgba(244, 236, 221, 0.08);
}

.lang-btn.is-active {
  opacity: 1;
  background: rgba(242, 201, 76, 0.18);
  box-shadow: 0 0 0 1.5px var(--gold, #F2C94C);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--gold, #F2C94C);
  outline-offset: 2px;
}

.flag-svg {
  width: 21px;
  height: 15px;
  border-radius: 2.5px;
  overflow: hidden;
  display: block;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

/* Mobile header refinement: keep Brand + NO/EN flags + Book a table on one crisp top row */
@media (max-width: 767px) {
  .header-in {
    gap: 8px;
  }
  .brand {
    gap: 9px;
    min-width: 0;
  }
  .hcta {
    gap: 7px;
    flex-shrink: 0;
  }
  .hcta .btn {
    min-height: 38px;
    padding: 0 13px;
    font-size: 13.5px;
    white-space: nowrap;
  }
  .lang-switch {
    padding: 2.5px;
    gap: 2px;
    margin-right: 0;
  }
  .lang-btn {
    width: 30px;
    height: 27px;
  }
  .flag-svg {
    width: 20px;
    height: 14.5px;
  }
}

@media (max-width: 389px) {
  .brand {
    gap: 7px;
  }
  .brand img {
    width: 35px;
    height: 35px;
  }
  .brand span {
    font-size: 17.5px;
    letter-spacing: 1.4px;
  }
  .hcta {
    gap: 5px;
  }
  .hcta .btn {
    min-height: 36px;
    padding: 0 10px;
    font-size: 12.8px;
  }
  .lang-btn {
    width: 28px;
    height: 25px;
  }
  .flag-svg {
    width: 18.5px;
    height: 13.5px;
  }
}


/* De Roma Vintermeny 2026 – Sticky Category Bar, Scrollspy & Quick Search */
.menu-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
}

.menu-search {
  position: relative;
  flex: 1 1 300px;
  max-width: 480px;
}

.menu-search-input {
  width: 100%;
  min-height: 46px;
  padding: 0 42px 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line, rgba(242, 201, 76, 0.28));
  background: var(--ink2, #1a1613);
  color: var(--cream, #f4ecdd);
  font: 500 15px/1.2 var(--sans);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.menu-search-input::placeholder {
  color: var(--muted2, #a79c8b);
}

.menu-search-input:focus {
  outline: none;
  border-color: var(--gold, #f2c94c);
  box-shadow: 0 0 0 2px rgba(242, 201, 76, 0.2);
}

.menu-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 0;
  background: rgba(244, 236, 221, 0.1);
  color: var(--cream, #f4ecdd);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.menu-search-clear[hidden],
.menu-search-empty[hidden],
.mi[hidden],
.cat[hidden],
.dr-subcat[hidden] {
  display: none !important;
}

.menu-search-empty {
  margin-top: 22px;
  padding: 18px 22px;
  border-radius: 14px;
  background: var(--ink2, #1a1613);
  border: 1px solid var(--line, rgba(242, 201, 76, 0.22));
  color: var(--gold, #f2c94c);
  font-weight: 500;
}

.catnav-sticky {
  position: sticky;
  top: calc(var(--header-h, 76px) + var(--preview-bar-h, 0px));
  z-index: 950;
  margin: 18px calc(-1 * var(--gutter, 40px)) 0;
  padding: 10px var(--gutter, 40px);
  background: rgba(17, 15, 13, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-block: 1px solid var(--line, rgba(242, 201, 76, 0.22));
}

.catnav-sticky .catnav {
  margin-top: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(242, 201, 76, 0.35) transparent;
  gap: 8px;
  padding-bottom: 2px;
  scroll-target-group: auto;
}

.catnav-sticky .catnav::-webkit-scrollbar {
  height: 4px;
}

.catnav-sticky .catnav::-webkit-scrollbar-thumb {
  background: rgba(242, 201, 76, 0.32);
  border-radius: 99px;
}

.catnav-sticky .catnav a {
  flex: none;
  min-height: 38px;
  padding: 0 15px;
  font-size: 14px;
  white-space: nowrap;
  background: rgba(26, 22, 19, 0.85);
}

/* Combine native :target-current with fallback .target-current inside :is() per modern-web-guidance */
.catnav a:is(:target-current, .target-current) {
  background: var(--gold, #f2c94c);
  border-color: var(--gold, #f2c94c);
  color: var(--ink, #110f0d);
  font-weight: 700;
  box-shadow: 0 6px 20px -6px rgba(242, 201, 76, 0.55);
}

.cat,
.dr-subcat {
  scroll-margin-top: calc(var(--header-h, 76px) + var(--preview-bar-h, 0px) + 74px);
}

.cat:focus,
.dr-subcat:focus,
#drikke:focus {
  outline: none;
}

/* Defer off-screen rendering for below-the-fold menu categories without layout shifts */
.cat-deferred {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 520px;
}

@media (max-width: 767px) {
  .menu-toolbar {
    gap: 10px;
  }
  .menu-search {
    max-width: none;
    flex-basis: 100%;
  }
  .catnav-sticky {
    padding: 8px var(--gutter, 20px);
  }
  .catnav-sticky .catnav a {
    min-height: 36px;
    padding: 0 13px;
    font-size: 13.5px;
  }
}


/* De Roma rettbilder – klikk for større bilde (v6). Kortmålene (104/84 px) kommer fra pizza-bilder-v1.css */
/* Ekstra høyde fra bildet havner i siste rad, så tittel/beskrivelse står tett som på kort uten bilde */
.mi-med-foto {
  grid-template-rows: auto auto 1fr;
}

.mi-med-foto > .mi-foto {
  cursor: zoom-in;
  box-shadow: 0 0 0 1px rgba(242, 201, 76, 0.16), 0 6px 18px -10px rgba(0, 0, 0, 0.7);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .mi-med-foto > .mi-foto:hover {
    box-shadow: 0 0 0 1px rgba(242, 201, 76, 0.55), 0 10px 24px -10px rgba(0, 0, 0, 0.8);
    filter: brightness(1.04);
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .mi-med-foto > .mi-foto:hover {
    transform: scale(1.03);
  }
}

.mi-med-foto > .mi-foto:focus-visible {
  outline: 2px solid var(--gold, #f2c94c);
  outline-offset: 3px;
}

/* Lightbox */
.dr-dish-lightbox {
  box-sizing: border-box;
  width: min(760px, 94vw);
  max-width: min(760px, 94vw);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(242, 201, 76, 0.32);
  border-radius: 18px;
  background: #161310;
  color: var(--cream, #f4ecdd);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.4);
  overflow: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.28s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

@media (prefers-reduced-motion: no-preference) {
  .dr-dish-lightbox {
    transform: translateY(10px) scale(0.97);
  }
}

.dr-dish-lightbox[open]:where(:not([data-closing])) {
  opacity: 1;
}

@starting-style {
  .dr-dish-lightbox[open]:where(:not([data-closing])) {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .dr-dish-lightbox[open]:where(:not([data-closing])) {
    transform: none;
  }
  @starting-style {
    .dr-dish-lightbox[open]:where(:not([data-closing])) {
      transform: translateY(10px) scale(0.97);
    }
  }
}

.dr-dish-lightbox::backdrop {
  background-color: rgba(8, 6, 5, 0);
  overflow: hidden;
  overscroll-behavior: contain;
  transition-property: background-color, backdrop-filter, display, overlay;
  transition-duration: 0.28s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

.dr-dish-lightbox[open]:where(:not([data-closing]))::backdrop {
  background-color: rgba(8, 6, 5, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

@starting-style {
  .dr-dish-lightbox[open]:where(:not([data-closing]))::backdrop {
    background-color: rgba(8, 6, 5, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dr-dish-lightbox,
  .dr-dish-lightbox::backdrop {
    transition-duration: 0.1s;
  }
}

.dr-lb-frame {
  position: relative;
  display: flex;
  flex-direction: column;
}

.dr-lb-fig {
  margin: 0;
  background: #0d0b09;
  border-bottom: 1px solid rgba(242, 201, 76, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dr-lb-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(64dvh, 560px);
  object-fit: contain;
}

.dr-lb-body {
  padding: 20px 24px 24px;
}

.dr-lb-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.dr-lb-title {
  margin: 0;
  font-family: var(--serif, Georgia, serif);
  font-size: clamp(21px, 2.6vw, 27px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--cream, #f4ecdd);
  min-width: 0;
  overflow-wrap: anywhere;
}

.dr-lb-price {
  flex: none;
  font-family: var(--sans, system-ui, sans-serif);
  font-weight: 600;
  font-size: 17px;
  color: var(--gold, #f2c94c);
  white-space: nowrap;
}

.dr-lb-desc {
  margin: 10px 0 0;
  font-family: var(--sans, system-ui, sans-serif);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--body, #ddd2c0);
}

.dr-lb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(242, 201, 76, 0.4);
  background: rgba(17, 15, 13, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--cream, #f4ecdd);
  font: 300 34px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.dr-lb-close:hover {
  background: rgba(242, 201, 76, 0.18);
  border-color: var(--gold, #f2c94c);
  color: var(--gold, #f2c94c);
}

.dr-lb-close:focus-visible {
  outline: 2px solid var(--gold, #f2c94c);
  outline-offset: 2px;
}

.dr-lb-close span {
  display: block;
  transform: translateY(-2px);
}

@media (max-width: 767px) {
  .dr-dish-lightbox {
    border-radius: 16px;
  }
  .dr-lb-img {
    max-height: 56dvh;
  }
  .dr-lb-body {
    padding: 16px 18px 20px;
  }
  .dr-lb-close {
    top: 10px;
    right: 10px;
  }
}

/* /pasta/ hero: behold kokkens ansikt i utsnittet på brede skjermer */
.hero-bg img[src*="shawan-flambe"] {
  object-position: 50% 22%;
}

/* ===== 2026-11-19: Mobil-scrollfiks forsiden («Ord fra bordene») ===== */
/* Hover-løft kun på ekte pekerenheter – aldri under tommelen på touch */
@media (hover: none) {
  .rv:hover,
  .dish:hover,
  .ex:hover,
  .reel > *:hover,
  .btn-gold:hover,
  .btn-dark:hover {
    transform: none !important;
  }
}

/* Horisontale karuseller (retter, galleri, meny): lås vertikal akse så tommelen alltid scroller siden */
.sig-row,
.reel {
  overflow-y: hidden;
}

.rv-more-wrap {
  display: none;
}

@media (max-width: 767px) {
  /* Ingen indre scrollboks: anmeldelsene ligger i vanlig dokumentflyt */
  .rv-grid {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start;
    overflow: visible !important;
    scroll-snap-type: none !important;
    margin-inline: 0 !important;
    padding: 0 !important;
    gap: 16px;
    margin-top: 36px;
  }

  .rv {
    width: 100% !important;
    flex: auto !important;
    scroll-snap-align: none !important;
    border-radius: 24px;
    padding: 26px 24px;
  }

  .rv-stars {
    padding-top: 0;
  }

  .rv:hover {
    transform: none;
  }

  /* Vis 3 først – resten foldes ut med knappen (kun når JS er aktiv) */
  .rv-grid.rv-js:not(.rv-open) > .rv:nth-child(n + 4) {
    display: none;
  }

  .rv-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 24px;
  }

  .rv-more {
    min-height: 48px;
    cursor: pointer;
  }

  .rv-more .rv-less-label,
  .rv-more[aria-expanded="true"] .rv-more-label {
    display: none;
  }

  .rv-more[aria-expanded="true"] .rv-less-label {
    display: inline;
  }
}
