/**
 * Foody — stranica restorana (Wolt-inspirirano)
 * Boje ovise o temi: tamna = crna školjka, svijetla = ista logika kao ostatak aplikacije.
 */

body[data-page="restaurant"] {
  --wolt-blue: #009de0;
  --wolt-blue-hover: #00b4f5;
  font-family: "Inter", var(--font, system-ui), sans-serif;
  /* Zadano = tamna (kao globalni default) dok nema data-theme="light" */
  background: #000000;
  --rest-bg: #000000;
  --rest-elevated: #141414;
  --rest-card: #161616;
  --rest-card-hover: #1c1c1c;
  --rest-border: rgba(255, 255, 255, 0.08);
  --rest-border-strong: rgba(255, 255, 255, 0.14);
  --rest-text: #ffffff;
  --rest-muted: #a3a3a3;
  --rest-toolbar-bg: rgba(0, 0, 0, 0.82);
  --rest-card-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --rest-card-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.45);
  --rest-placeholder: rgba(163, 163, 163, 0.85);
  --rest-hero-pop-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  --rest-dialog-shadow: 0 -12px 60px rgba(0, 0, 0, 0.55);
  --rest-focus-ring: rgba(0, 157, 224, 0.22);
  --rest-bullet-muted: rgba(255, 255, 255, 0.25);
  --rest-logo-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

[data-theme="light"] body[data-page="restaurant"] {
  background: #f1f5f9;
  --rest-bg: #f1f5f9;
  --rest-elevated: #ffffff;
  --rest-card: #ffffff;
  --rest-card-hover: #f8fafc;
  --rest-border: #e2e8f0;
  --rest-border-strong: #cbd5e1;
  --rest-text: #0f172a;
  --rest-muted: #64748b;
  --rest-toolbar-bg: rgba(255, 255, 255, 0.94);
  --rest-card-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  --rest-card-shadow-hover: 0 10px 28px rgba(15, 23, 42, 0.1);
  --rest-placeholder: rgba(100, 116, 139, 0.85);
  --rest-hero-pop-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
  --rest-dialog-shadow: 0 -8px 40px rgba(15, 23, 42, 0.12);
  --rest-focus-ring: rgba(2, 132, 199, 0.25);
  --rest-bullet-muted: rgba(15, 23, 42, 0.22);
  --rest-logo-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
}

body[data-page="restaurant"] main {
  padding: 0;
  max-width: none;
}

/* Mobilno: prostor za fiksnu donju navigaciju (kao na ostalim stranicama) */
@media (max-width: 767px) {
  body[data-page="restaurant"] main {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  }

  body[data-page="restaurant"] .site-footer {
    padding-bottom: calc(24px + 58px + env(safe-area-inset-bottom, 0px));
  }
}

/* Jelovnik koristi --rest-* tokene (tamno / svijetlo) */
body[data-page="restaurant"] .rest-page {
  --text: var(--rest-text);
  --text-muted: var(--rest-muted);
  --border: var(--rest-border);
  --surface: var(--rest-card);
  --surface-2: var(--rest-elevated);
  --primary: var(--wolt-blue);
  --primary-hover: var(--wolt-blue-hover);
  background: var(--rest-bg);
  color: var(--rest-text);
}

body[data-page="restaurant"] .site-footer {
  background: var(--rest-bg);
  border-top: 1px solid var(--rest-border);
  color: var(--rest-muted);
}

body[data-page="restaurant"] .site-footer .muted {
  color: var(--rest-muted);
}

body[data-page="restaurant"] .rest-toolbar {
  top: var(--header-h);
}

.rest-page {
  min-height: 100vh;
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0));
}

@media (min-width: 900px) {
  .rest-page {
    padding-bottom: 2rem;
  }
}

/* —— Hero blok + identitet (logo preklapa hero) —— */
.rest-hero-block {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
}

.rest-hero {
  position: relative;
  width: 100%;
  height: min(48vh, 360px);
  min-height: 220px;
  background: var(--rest-elevated);
  overflow: hidden;
}

@media (min-width: 900px) {
  .rest-hero {
    height: min(52vh, 520px);
    min-height: 320px;
    border-radius: 0 0 24px 24px;
    box-shadow: var(--rest-hero-pop-shadow);
  }
}

.rest-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rest-hero__actions {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: calc(10px + env(safe-area-inset-top, 0)) 14px 12px;
  pointer-events: none;
  z-index: 3;
}

.rest-hero__actions > * {
  pointer-events: auto;
}

/* Zadano: tamna fotografija → svijetli gumbi (postavlja i JS preko data-hero-tone) */
.rest-hero__btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.15s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.rest-hero__btn:hover {
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.65);
  transform: scale(1.05);
}

.rest-hero__btn.is-favorite {
  background: rgba(56, 189, 248, 0.95);
  border-color: rgba(14, 165, 233, 0.85);
  color: #0f172a;
}

.rest-hero__btn.is-favorite:hover {
  background: rgba(125, 211, 252, 1);
}

/* Svijetla naslovna slika → tamni gumbi, svijetle ikone */
.rest-hero[data-hero-tone="light"] .rest-hero__btn {
  background: rgba(15, 23, 42, 0.78);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.rest-hero[data-hero-tone="light"] .rest-hero__btn:hover {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(255, 255, 255, 0.35);
}

.rest-hero[data-hero-tone="light"] .rest-hero__btn.is-favorite {
  background: rgba(0, 157, 224, 0.92);
  color: #ffffff;
  border-color: rgba(125, 211, 252, 0.65);
}

.rest-hero[data-hero-tone="light"] .rest-hero__btn.is-favorite:hover {
  background: rgba(14, 165, 233, 1);
}

.rest-hero__btn-icon,
.rest-hero__heart-svg {
  display: flex;
  align-items: center;
  justify-content: center;
}

.rest-hero__btn-group {
  display: flex;
  gap: 10px;
}

.rest-identity {
  position: relative;
  z-index: 4;
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  margin-top: -40px;
  padding: 0 1.15rem 0.5rem;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

/* Preklapanje s herom: u svijetlom načinu tamni gradijent ispod = nečitljivo ime / meta bez čvrste svijetle podloge */
[data-theme="light"] body[data-page="restaurant"] .rest-identity {
  background: var(--rest-bg);
  padding-top: 10px;
  margin-top: -32px;
  border-radius: 0 0 20px 20px;
}

@media (min-width: 900px) {
  .rest-identity {
    margin-top: -48px;
    padding: 0 1.75rem 0.65rem;
    gap: 1.25rem;
  }
}

.rest-identity__logo {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--rest-bg);
  box-shadow: var(--rest-logo-shadow);
  background: var(--rest-elevated);
}

.rest-identity__logo--hidden {
  display: none;
}

@media (min-width: 900px) {
  .rest-identity__logo {
    width: 96px;
    height: 96px;
    border-radius: 22px;
  }
}

.rest-identity .rest-info {
  flex: 1;
  min-width: 0;
  padding: 0;
  margin: 0;
  max-width: none;
}

.rest-info__title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.5rem, 4.5vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--rest-text);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] body[data-page="restaurant"] .rest-info__title {
  text-shadow: none;
  color: #0f172a;
}

[data-theme="light"] body[data-page="restaurant"] .rest-info__meta,
[data-theme="light"] body[data-page="restaurant"] .rest-info__meta-line.restaurant-meta {
  color: #475569;
}

@media (min-width: 900px) {
  .rest-info__title {
    font-size: clamp(1.85rem, 2.4vw, 2.5rem);
    text-shadow: none;
  }
}

.rest-info__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--rest-muted);
  margin: 0;
}

/* Isti red kao kartica na početnoj: grad · ocjena · vrijeme */
.rest-info__meta-line.restaurant-meta {
  margin: 0;
  width: 100%;
  color: var(--rest-muted);
}

.rest-info__meta-line .rating {
  color: #fbbf24;
}

.rest-info__meta-line .delivery-time::before {
  color: var(--rest-bullet-muted);
}

.rest-info__fee {
  margin: 0;
  font-size: 0.8125rem;
}

/* Bedževi identični početnoj, prilagođeni tamnoj stranici restorana */
.rest-info__meta .badges {
  margin-top: 0.15rem;
}

body[data-page="restaurant"] .rest-info__meta .badge {
  background: rgba(0, 157, 224, 0.22);
  color: var(--wolt-blue);
}

[data-theme="light"] body[data-page="restaurant"] .rest-info__meta .badge {
  background: rgba(56, 189, 248, 0.14);
  color: #0284c7;
}

.rest-info__meta-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.rest-info__rating strong {
  color: var(--rest-text);
  font-weight: 700;
}

.rest-page .restaurant-status-banner {
  max-width: 1080px;
  margin: 0.5rem auto 0;
  padding: 0 1.15rem;
  border-radius: 12px;
}

@media (min-width: 900px) {
  .rest-page .restaurant-status-banner {
    padding: 0 1.75rem;
  }
}

.rest-page .restaurant-status-banner:not(.hidden) {
  display: block;
}

body[data-page="restaurant"] .rest-page .alert-warn {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #fde68a;
}

[data-theme="light"] body[data-page="restaurant"] .rest-page .alert-warn {
  background: rgba(250, 204, 21, 0.15);
  border-color: rgba(202, 138, 4, 0.45);
  color: #854d0e;
}

/* Toolbar */
.rest-toolbar {
  position: sticky;
  z-index: 30;
  background: var(--rest-toolbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--rest-border);
  padding: 0.75rem 0 0.65rem;
}

.rest-toolbar__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 900px) {
  .rest-toolbar__inner {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 1rem 1.25rem;
    padding: 0 1.75rem;
  }

  .rest-menu-search-wrap {
    flex: 0 0 min(320px, 34vw);
    margin-bottom: 0 !important;
  }

  .rest-cat-nav {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
  }
}

.rest-menu-search-wrap {
  position: relative;
  margin-bottom: 0.75rem;
}

.rest-menu-search-wrap .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.45;
  pointer-events: none;
  font-size: 0.95rem;
}

.rest-menu-search {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  font: inherit;
  font-size: 0.9375rem;
  border-radius: 999px;
  border: 1px solid var(--rest-border-strong);
  background: var(--rest-elevated);
  color: var(--rest-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.rest-menu-search::placeholder {
  color: var(--rest-placeholder);
}

.rest-menu-search:focus {
  outline: none;
  border-color: var(--wolt-blue);
  box-shadow: 0 0 0 3px var(--rest-focus-ring);
}

.rest-cat-nav {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 6px;
  margin: 0 -0.25rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  mask-image: linear-gradient(90deg, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent 100%);
}

.rest-cat-nav::-webkit-scrollbar {
  display: none;
}

.rest-cat-nav__chip {
  flex-shrink: 0;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--rest-border);
  background: var(--rest-elevated);
  color: var(--rest-text);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, transform 0.12s, color 0.2s;
}

.rest-cat-nav__chip:hover {
  border-color: rgba(0, 157, 224, 0.45);
  background: var(--rest-card-hover);
}

.rest-cat-nav__chip.is-active {
  background: var(--wolt-blue);
  border-color: var(--wolt-blue);
  color: #ffffff;
}

/* Sekcije jelovnika */
.rest-menu-body {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

@media (min-width: 900px) {
  .rest-menu-body {
    padding: 1.5rem 1.75rem 3rem;
  }
}

.rest-menu-section {
  margin-bottom: 2rem;
  scroll-margin-top: calc(var(--header-h) + 120px);
}

.rest-menu-section__title {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--rest-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.rest-menu-section__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--rest-border-strong), transparent);
  max-width: 120px;
  opacity: 0.9;
}

.rest-menu-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 1100px) {
  .rest-menu-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
  }
}

/* Kartice jela */
.rest-dish-card-wrap {
  display: flex;
  align-items: stretch;
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--rest-border);
  background: var(--rest-card);
  box-shadow: var(--rest-card-shadow);
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.25s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.rest-dish-card-wrap:hover {
  transform: translateY(-3px);
  box-shadow: var(--rest-card-shadow-hover);
  border-color: rgba(0, 157, 224, 0.35);
  background: var(--rest-card-hover);
}

.rest-dish-card-wrap:active {
  transform: translateY(-1px);
}

.rest-dish-card-wrap .rest-dish-card {
  flex: 1;
  min-width: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
}

.rest-dish-card__remove {
  flex: 0 0 48px;
  min-width: 48px;
  align-self: stretch;
  border: none;
  margin: 0;
  padding: 0;
  border-right: 1px solid var(--rest-border);
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  font-size: 1.85rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

[data-theme="light"] .rest-dish-card__remove {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.1);
}

.rest-dish-card__remove:hover {
  background: rgba(239, 68, 68, 0.24);
}

.rest-dish-card__remove:active {
  background: rgba(239, 68, 68, 0.32);
}

.rest-dish-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr minmax(108px, 38%);
  gap: 1rem 1rem;
  align-items: stretch;
  padding: 1rem 1rem 1rem 1.15rem;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.rest-dish-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.15rem 0;
}

.rest-dish-card__name {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--rest-text);
  line-height: 1.25;
}

.rest-dish-card__desc {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  color: var(--rest-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rest-dish-card__price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--wolt-blue);
  letter-spacing: -0.02em;
}

.rest-dish-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-height: 130px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--rest-elevated);
  align-self: center;
}

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

.rest-dish-card__add {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--wolt-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.rest-dish-card:hover .rest-dish-card__add {
  background: var(--wolt-blue-hover);
  transform: scale(1.06);
}

.rest-dish-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--wolt-blue);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* Modal jela — zatvoren <dialog> mora ostati display:none (globalni flex bi ga inače prikazao kao „kocku”) */
.menu-item-dialog--wolt {
  padding: 0;
  max-width: 100%;
  width: min(440px, 100%);
  max-height: min(92vh, 900px);
  margin: auto;
  border: 1px solid var(--rest-border);
  border-radius: 22px 22px 0 0;
  background: var(--rest-card);
  color: var(--rest-text);
  box-shadow: var(--rest-dialog-shadow);
  position: relative;
}

.menu-item-dialog--wolt:not([open]) {
  display: none;
}

.menu-item-dialog--wolt[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Mobitel: pun zaslon umjesto centriranog prozora (izbjegava odsjecanje X/slike/gumba) */
@media (max-width: 639px) {
  .menu-item-dialog--wolt[open] {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    height: 100vh;
    max-height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
  }

  .menu-item-dialog__scroll {
    padding-top: env(safe-area-inset-top, 0px);
  }
}

@media (min-width: 480px) {
  .menu-item-dialog--wolt {
    border-radius: 22px;
  }
}

@media (max-width: 639px) {
  .menu-item-dialog--wolt {
    border-radius: 0;
  }
}

.menu-item-dialog--wolt::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.menu-item-dialog__scroll {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.menu-item-dialog__hero-img {
  width: 100%;
  aspect-ratio: 1;
  max-height: 320px;
  object-fit: cover;
  display: block;
  background: var(--rest-elevated);
}

@media (max-width: 639px) {
  .menu-item-dialog__hero-img {
    aspect-ratio: 16 / 9;
    max-height: min(240px, 42vh);
  }
}

.menu-item-dialog__body {
  padding: 1.15rem 1.2rem 1.25rem;
}

.menu-item-dialog__footer {
  flex-shrink: 0;
  padding: 0.75rem 1.2rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--rest-border);
  background: var(--rest-card);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.28);
}

[data-theme="light"] .menu-item-dialog__footer {
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.06);
}

.menu-item-dialog__title--lg {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.menu-item-dialog__price-stack {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--rest-muted);
}

.menu-item-dialog__price-stack strong {
  color: var(--rest-text);
  font-size: 1.1rem;
}

.menu-item-dialog__opts-block {
  margin-bottom: 1rem;
}

.menu-item-dialog__opts-heading {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rest-muted);
}

.menu-addon-list--wolt {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-item-dialog--wolt .menu-addon-row.menu-addon-row--wolt {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--rest-border);
  background: var(--rest-elevated);
  box-sizing: border-box;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.menu-item-dialog--wolt .menu-addon-row--wolt:has(.mi-opt-cb:checked) {
  border-color: var(--wolt-blue);
  background: rgba(0, 157, 224, 0.14);
  box-shadow: 0 0 0 1px rgba(0, 157, 224, 0.35);
}

.menu-item-dialog--wolt .menu-addon-row--wolt .mi-opt-cb {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--wolt-blue);
  cursor: pointer;
}

.menu-item-dialog--wolt .menu-addon-row__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.menu-item-dialog--wolt .menu-addon-row__name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--rest-text);
}

.menu-item-dialog--wolt .menu-addon-row--wolt .menu-addon-price {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--rest-muted);
}

.menu-item-dialog__qty-root {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 1.1rem;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--rest-border);
  background: var(--rest-elevated);
}

.menu-item-dialog__qty-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rest-muted);
}

.menu-item-dialog__qty-controls {
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: 999px;
  border: 1px solid var(--rest-border);
  background: var(--rest-card);
  overflow: hidden;
}

.menu-item-dialog__qty-btn {
  min-width: 48px;
  min-height: 48px;
  padding: 0 14px;
  border: none;
  background: transparent;
  color: var(--rest-text);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.menu-item-dialog__qty-btn:hover:not(:disabled) {
  background: rgba(0, 157, 224, 0.12);
}

.menu-item-dialog__qty-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.menu-item-dialog__qty-value {
  min-width: 2rem;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--rest-text);
}

body[data-page="restaurant"] .menu-item-dialog__add-cart--full {
  width: 100%;
  justify-content: center;
  min-height: 52px;
  border-radius: 999px;
  font-weight: 700;
  margin: 0;
  background: var(--wolt-blue);
  border: none;
  color: #fff;
}

body[data-page="restaurant"] .menu-item-dialog__add-cart--full:hover {
  background: var(--wolt-blue-hover);
}

.menu-item-dialog__close--float {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: calc(12px + env(safe-area-inset-right, 0px));
  z-index: 20;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.rest-info-dialog {
  max-width: 400px;
  width: calc(100% - 2rem);
  padding: 1.35rem;
  border: 1px solid var(--rest-border);
  border-radius: 20px;
  background: var(--rest-card);
  color: var(--rest-text);
}

.rest-info-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

@media (min-width: 900px) {
  #rest-hero-back {
    display: none;
  }

  .rest-hero__actions {
    justify-content: flex-end;
  }
}

/* Header: isti grid kao početna (header-inner--index); uvijek iznad heroa */
body[data-page="restaurant"] .site-header.site-header--restaurant {
  position: sticky;
  top: 0;
  z-index: 200;
}

body[data-page="restaurant"] #rest-header-global-search {
  cursor: pointer;
}

/* Mobilno: ukloni globalnu pretragu („Pretraži restorane…”) — na stranici restorana ostaje samo pretraga jelovnika ispod heroa */
@media (max-width: 767px) {
  body[data-page="restaurant"] .site-header--restaurant .header-inner--index {
    grid-template-areas: "logo actions";
    grid-template-columns: 1fr auto;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  body[data-page="restaurant"] .site-header--restaurant .header-search-mid {
    display: none !important;
  }
}

/* Tamna tema: header u istom tonu kao jelovnik */
[data-theme="dark"] body[data-page="restaurant"] .site-header.site-header--restaurant {
  background: rgba(0, 0, 0, 0.92);
  border-bottom-color: var(--rest-border);
}

[data-theme="dark"] body[data-page="restaurant"] .logo-text {
  color: #fff;
}

[data-theme="dark"] body[data-page="restaurant"] .cart-btn,
[data-theme="dark"] body[data-page="restaurant"] .btn-ghost {
  color: rgba(255, 255, 255, 0.9);
  border-color: var(--rest-border-strong);
}

[data-theme="dark"] body[data-page="restaurant"] .cart-btn:hover,
[data-theme="dark"] body[data-page="restaurant"] .btn-ghost:hover {
  background: var(--rest-elevated);
  color: #fff;
}

body[data-page="restaurant"] .theme-toggle {
  opacity: 0.9;
}

body[data-page="restaurant"] .cart-fab {
  background: linear-gradient(135deg, var(--wolt-blue) 0%, #0088c7 100%);
  color: #fff;
  border: none;
  box-shadow: 0 10px 36px rgba(0, 157, 224, 0.45);
}

body[data-page="restaurant"] .empty-state {
  color: var(--rest-muted);
}

body[data-page="restaurant"] .menu-item--skeleton {
  background: var(--rest-card);
  border: 1px solid var(--rest-border);
  border-radius: 18px;
}

body[data-page="restaurant"] .menu-item--skeleton .skeleton,
body[data-page="restaurant"] .menu-item--skeleton .skeleton--thumb,
body[data-page="restaurant"] .menu-item--skeleton .skeleton--line {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.06) 100%
  );
  background-size: 200% 100%;
}

[data-theme="light"] body[data-page="restaurant"] .menu-item--skeleton .skeleton,
[data-theme="light"] body[data-page="restaurant"] .menu-item--skeleton .skeleton--thumb,
[data-theme="light"] body[data-page="restaurant"] .menu-item--skeleton .skeleton--line {
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.04) 0%,
    rgba(15, 23, 42, 0.1) 50%,
    rgba(15, 23, 42, 0.04) 100%
  );
  background-size: 200% 100%;
}
