:root {
  --primary: #C45C26;
  --bg: #FAF7F2;
  --soft: #F3EBE4;
  --card: #FFFFFF;
  --text: #1A1A1A;
  --muted: #666;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: #1d1d1f;
}

body {
  font-family: var(--font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--primary) 22%, #1d1d1f) 0%, #1d1d1f 55%, #151517 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
  padding: max(10px, env(safe-area-inset-top))
           max(10px, env(safe-area-inset-right))
           max(10px, env(safe-area-inset-bottom))
           max(10px, env(safe-area-inset-left));
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  background: var(--soft);
  background: color-mix(in srgb, var(--primary) 14%, white);
  border-radius: 24px;
  overflow: hidden;
  max-width: 480px;
  margin: 0 auto;
  min-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.18),
    0 12px 32px rgba(0, 0, 0, 0.30),
    0 32px 80px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
}

/* ── Ulazne animacije ─────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .section-card,
  .menu-card,
  .guestbook {
    animation: mk-rise 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
    animation-delay: calc(var(--i, 0) * 60ms);
  }
}

@keyframes mk-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes mk-spin {
  to { transform: rotate(360deg); }
}

body.preview-page {
  padding-top: max(8px, env(safe-area-inset-top));
}

body.preview-page .app-shell {
  min-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}

.hidden { display: none !important; }

.offline-banner {
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
  color: #fff;
  background: #B00020;
}

.lang-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: linear-gradient(160deg, #2A2A2A 0%, #1a1a1a 100%);
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding:
    max(12px, env(safe-area-inset-top, 0px))
    max(16px, env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  overflow: hidden;
}

.lang-gate.hidden { display: none !important; }

.lang-gate-inner {
  width: 100%;
  max-width: 480px;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  padding: 8px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  overflow: hidden;
}

.lang-gate-icon {
  font-size: 32px;
  text-align: center;
  margin: 0 0 4px;
  flex-shrink: 0;
}

.lang-gate-title {
  text-align: center;
  font-size: 20px;
  color: #FAF7F2;
  margin: 0 0 12px;
  padding: 0 20px;
  flex-shrink: 0;
}

.lang-gate-list {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  touch-action: pan-y;
  padding: 0 16px;
  overflow: hidden;
  box-sizing: border-box;
}

.lang-search-wrap {
  width: 100%;
  max-width: 360px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.lang-search-input {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: inherit;
  font-size: 15px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}

.lang-search-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.lang-search-input:focus {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 2px rgba(196, 92, 38, 0.55);
}

.lang-carousel-panel {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.lang-search-results {
  width: 100%;
  max-width: 360px;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 4px 0 12px;
  -webkit-overflow-scrolling: touch;
}

.lang-search-results.hidden {
  display: none !important;
}

.lang-search-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.lang-search-item:active {
  background: rgba(255, 255, 255, 0.1);
}

.lang-search-flag {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.lang-search-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-search-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  padding: 24px 12px;
}

.lang-carousel-scene {
  width: 100%;
  height: min(220px, 34dvh);
  flex: 1 1 auto;
  max-height: 240px;
  min-height: 140px;
  position: relative;
  perspective: 900px;
  perspective-origin: 50% 42%;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.lang-carousel-scene.is-dragging {
  cursor: grabbing;
}

.lang-carousel-track {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.lang-carousel-item {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  will-change: transform, opacity;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.lang-carousel-flag {
  width: 72px;
  height: 72px;
  display: block;
  pointer-events: none;
  border: none;
  background: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.lang-carousel-item.is-center .lang-carousel-flag {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.38);
}

.lang-carousel-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  max-width: 100px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  transition: color 0.2s ease, font-size 0.2s ease;
}

.lang-carousel-item.is-center .lang-carousel-label {
  color: #fff;
  font-size: 13px;
}

.lang-carousel-focus-name {
  margin-top: 4px;
  min-height: 2.2em;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  padding: 0 24px;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.lang-carousel-select {
  margin-top: 10px;
  margin-bottom: 4px;
  padding: 14px 36px;
  width: min(100%, 280px);
  border: none;
  border-radius: 999px;
  background: var(--primary, #C45C26);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(196, 92, 38, 0.4);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, opacity 0.15s ease;
  flex-shrink: 0;
}

.lang-carousel-select:active {
  transform: scale(0.97);
}

.lang-carousel-select:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.app-root.hidden { display: none !important; }

.header {
  background: linear-gradient(155deg,
    color-mix(in srgb, var(--primary) 88%, #fff) 0%,
    var(--primary) 42%,
    color-mix(in srgb, var(--primary) 78%, #000) 100%);
  color: #fff;
  padding: 14px 12px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: 60px;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.12);
}

.header-left {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 40px;
}

.header-center {
  grid-column: 2;
  text-align: center;
  min-width: 0;
  max-width: 100%;
}

.change-lang-btn {
  grid-column: 3;
  justify-self: end;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.change-lang-btn:active {
  background: rgba(255,255,255,0.32);
}

.lang-flag {
  font-size: 22px;
  line-height: 1;
  display: block;
}

.services-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.1s ease;
}

.services-btn:active {
  background: rgba(255, 255, 255, 0.32);
  transform: scale(0.97);
}

.services-btn.hidden {
  display: none !important;
}

.services-btn-icon {
  width: 20px;
  height: 20px;
}

.header-options {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.header-options.hidden {
  display: none !important;
}

.options-btn {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.1s ease;
}

.options-btn:active {
  background: rgba(255, 255, 255, 0.32);
  transform: scale(0.97);
}

.options-btn-icon {
  width: 20px;
  height: 20px;
}

.options-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #fff;
  color: var(--primary, #C45C26);
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.options-badge.hidden,
.options-menu.hidden,
.options-menu-item.hidden {
  display: none !important;
}

.options-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  min-width: 210px;
  padding: 6px;
  border-radius: 14px;
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
}

.options-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 12px 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.options-menu-item:active {
  background: #f3f3f3;
}

.options-menu-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--primary, #C45C26);
}

.options-item-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--primary, #C45C26);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}

.options-item-badge.hidden {
  display: none !important;
}

.cart-btn {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.1s ease;
}

.cart-btn:active {
  background: rgba(255, 255, 255, 0.32);
  transform: scale(0.97);
}

.cart-btn.hidden {
  display: none !important;
}

.cart-btn-icon {
  width: 20px;
  height: 20px;
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #fff;
  color: var(--primary, #C45C26);
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.cart-badge.hidden {
  display: none !important;
}

.add-cart-btn {
  margin-top: 8px;
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--primary, #C45C26);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.add-cart-btn:active {
  transform: scale(0.97);
}

.subitem-row .add-cart-btn {
  margin-top: 6px;
  align-self: flex-start;
}

.cart-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f7f4f0;
  border-radius: 12px;
  padding: 10px 12px;
}

.cart-line-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
}

.cart-line-price {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cart-qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #1a1a1a;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.cart-qty-count {
  min-width: 18px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}

.cart-total {
  margin: 4px 0 8px;
  font-size: 16px;
  font-weight: 800;
  color: #1a1a1a;
  text-align: right;
}

.cart-total.hidden,
.cart-empty.hidden,
#cart-form.hidden,
#cart-pay-hint.hidden {
  display: none !important;
}

.cart-empty {
  margin: 8px 0 12px;
  color: #777;
  font-size: 14px;
}

.cart-pay-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: #6f675f;
  line-height: 1.4;
}

.cart-mode-switch {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #ddd;
}
.cart-mode-btn {
  flex: 1;
  padding: 10px 8px;
  border: none;
  background: #f5f5f5;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #555;
  transition: background 0.2s, color 0.2s;
}
.cart-mode-btn.active {
  background: var(--primary, #C45C26);
  color: #fff;
}

.back-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.1s ease;
}

  .back-btn:active {
    background: rgba(255, 255, 255, 0.32);
    transform: scale(0.97);
  }

  .back-btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  .back-btn-label {
    display: none;
  }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(20, 16, 12, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-sheet {
  width: min(440px, 100%);
  max-height: min(88vh, 720px);
  overflow: auto;
  background: #fff;
  color: #212121;
  border-radius: 18px 18px 14px 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.28);
  padding: 16px 16px 18px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a1a;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f0f0f0;
  color: #444;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.reservation-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  margin-top: 6px;
}

.reservation-form input,
.reservation-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  font-size: 15px;
  background: #fafafa;
  color: #212121;
}

.reservation-form input:focus,
.reservation-form textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--primary) 55%, #fff);
  border-color: var(--primary);
  background: #fff;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.modal-submit {
  margin-top: 10px;
  border: none;
  border-radius: 12px;
  padding: 13px 16px;
  background: var(--primary, #C45C26);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.modal-submit:disabled {
  opacity: 0.55;
  cursor: default;
}

.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.section-card {
  position: relative;
  border: none;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.08),
    0 8px 22px rgba(0, 0, 0, 0.10);
  cursor: pointer;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}

.section-card:active {
  transform: scale(0.97);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
}

.section-card-cover {
  aspect-ratio: 1;
  background: #1c1c1e;
  overflow: hidden;
  display: block;
  flex-shrink: 0;
  position: relative;
}

.section-card-cover.block-media-slideshow {
  position: relative;
}

.section-card-cover .block-media-image,
.section-card-cover .block-media-video,
.section-card-cover > img,
.section-card-cover > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.section-card-cover .block-media-image,
.section-card-cover .block-media-video {
  position: absolute;
  inset: 0;
}

.section-card-cover img,
.section-card-cover video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.section-card-cover.block-media-video-only > .video-still,
.section-card-cover.block-media-video-only > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.section-card-cover.block-media-video-only > .video-still {
  z-index: 2;
  background: var(--soft, #f0f0f0);
  transition: opacity 0.28s ease;
}

.section-card-cover.block-media-video-only.is-playing > .video-still {
  opacity: 0;
  pointer-events: none;
}

.section-card-cover.block-media-video-only > video {
  z-index: 1;
  background: transparent;
}

.section-card-cover.has-still {
  background: var(--soft, #f0f0f0);
}

.section-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 700;
  font-family: var(--font-heading, inherit);
  color: var(--primary);
  background:
    radial-gradient(90% 90% at 50% 10%, color-mix(in srgb, var(--primary) 10%, #fff) 0%, var(--soft) 100%);
}

.section-card-name {
  position: static;
  display: block;
  padding: 12px 10px 14px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--primary);
  background: #fff;
  text-shadow: none;
  pointer-events: none;
  line-height: 1.25;
}

.section-card-wide {
  grid-column: span 2;
}

.section-card-wide .section-card-cover {
  aspect-ratio: 2.4 / 1;
}

.logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  margin-bottom: 8px;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.55),
    0 4px 14px rgba(0, 0, 0, 0.25);
}

.header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-heading, inherit);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-content {
  padding: 16px 16px 24px;
  background: var(--soft);
  background: color-mix(in srgb, var(--primary) 18%, white);
  flex: 1;
}

.block-group {
  margin-bottom: 20px;
}

.block-group-title {
  margin: 4px 4px 12px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.block-group-items .menu-card {
  margin-bottom: 12px;
}

.menu-card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 6px 18px rgba(0, 0, 0, 0.07);
  overflow: hidden;
}

.menu-card-expandable {
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.menu-card-openable {
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.menu-card-openable:active {
  transform: scale(0.99);
}

.block-open-icon {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--primary);
  line-height: 1;
}

.menu-card-expandable:active {
  transform: scale(0.99);
}

.menu-card-expandable.is-expanded {
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.08),
    0 12px 30px rgba(0, 0, 0, 0.12);
}

.block-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 12px;
}

.block-expand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
  font-size: 10px;
  line-height: 1;
  transition: transform 0.25s ease, background 0.2s ease;
  flex-shrink: 0;
}

.menu-card-expandable.is-expanded .block-expand-icon {
  transform: rotate(180deg);
}

.block-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.25s ease;
  padding-top: 0;
}

.menu-card-expandable.is-expanded .block-details {
  max-height: 520px;
  opacity: 1;
  padding-top: 8px;
}

.subitem-row {
  background: color-mix(in srgb, var(--primary) 6%, white);
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 0;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, transparent);
}

.subitem-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.menu-card-with-subitems.is-expanded .block-details {
  max-height: none;
  opacity: 1;
  padding-top: 10px;
}

.menu-card-with-subitems .block-desc {
  text-align: center;
  margin-top: 6px;
}

.subitem-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.subitem-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--primary) 12%, white);
  padding: 0;
  border: none;
  display: block;
}

button.subitem-thumb-zoom {
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

button.subitem-thumb-zoom:active {
  transform: scale(0.97);
}

.subitem-thumb img,
.subitem-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

body.lightbox-open {
  overflow: hidden;
}

.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.media-lightbox.hidden {
  display: none;
}

.media-lightbox-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.media-lightbox-stage {
  max-width: min(960px, 100%);
  max-height: min(90vh, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-lightbox-img,
.media-lightbox-video {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 12px;
  object-fit: contain;
  background: #111;
}

.media-lightbox-img.hidden,
.media-lightbox-video.hidden {
  display: none;
}

.subitem-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.subitem-thumb-empty span {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.55;
}

.subitem-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.subitem-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  text-align: left;
  line-height: 1.25;
}

.subitem-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text, #222);
  text-align: left;
}

.subitem-desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  text-align: left;
  line-height: 1.35;
  white-space: pre-wrap;
}

.block-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  text-align: center;
}

.block-desc {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
  margin-bottom: 8px;
  text-align: center;
  line-height: 1.5;
  white-space: pre-wrap;
}

.allergen-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 2px 0 10px;
}

.subitem-body .allergen-row {
  justify-content: flex-start;
  margin: 4px 0 6px;
}

.allergen-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 12%, white);
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.2;
}

.allergen-emoji {
  font-size: 14px;
  line-height: 1;
}

.allergen-label {
  white-space: nowrap;
}

.block-price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-top: 6px;
}

.block-price::before,
.block-price::after {
  content: "";
  height: 1px;
  width: 26px;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--primary) 40%, transparent);
}

.block-media {
  border-radius: 12px;
  overflow: hidden;
  background: #1c1c1e;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.block-media img,
.block-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.block-media-slideshow {
  position: relative;
}

.block-media-slideshow .block-media-image,
.block-media-slideshow .block-media-video {
  position: absolute;
  inset: 0;
}

.block-media-video-only > .video-still,
.block-media-video-only > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.block-media-video-only > .video-still {
  z-index: 2;
  background: var(--soft, #f0f0f0);
  transition: opacity 0.28s ease;
}

.block-media-video-only.is-playing > .video-still {
  opacity: 0;
  pointer-events: none;
}

.block-media-video-only > video {
  z-index: 1;
  background: transparent;
}

.block-media-video-only.has-still {
  background: var(--soft, #f0f0f0);
}

.block-media-empty {
  background: var(--soft);
  color: #999;
  font-size: 13px;
  aspect-ratio: 4 / 3;
}

.loading, .error-msg {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
}

.loading::before {
  content: "";
  display: block;
  width: 30px;
  height: 30px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--primary) 18%, transparent);
  border-top-color: var(--primary);
  animation: mk-spin 0.8s linear infinite;
}

.app-footer {
  margin-top: auto;
  padding: 14px 16px 18px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: color-mix(in srgb, var(--primary) 8%, white);
  border-top: 1px solid color-mix(in srgb, var(--primary) 12%, transparent);
}

.app-footer strong {
  color: var(--primary);
  font-weight: 700;
}

.rate-us {
  margin: 0 0 12px;
}

.rate-us-label {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

.rate-us-stars {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.rate-star {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 4px;
  font-size: 28px;
  line-height: 1;
  color: color-mix(in srgb, var(--primary) 28%, #cfc8c0);
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}

.rate-star.is-hover,
.rate-star:hover {
  color: var(--primary);
  transform: scale(1.08);
}

.guestbook-rating-display {
  margin: 0 0 12px;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--primary);
  font-weight: 700;
  text-align: center;
}

.guestbook {
  margin-top: 24px;
  background: var(--card);
  border-radius: 16px;
  padding: 18px 16px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 6px 18px rgba(0, 0, 0, 0.07);
}

.guestbook-title {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-heading, inherit);
  margin-bottom: 4px;
  color: var(--text);
}

.guestbook-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}

.guestbook-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.guestbook-form input,
.guestbook-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, #ddd);
  border-radius: 12px;
  font: inherit;
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.guestbook-form input:focus,
.guestbook-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent);
}

.guestbook-form textarea {
  min-height: 72px;
  resize: vertical;
}

.guestbook-form button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 46px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: linear-gradient(155deg,
    color-mix(in srgb, var(--primary) 88%, #fff) 0%,
    var(--primary) 55%,
    color-mix(in srgb, var(--primary) 82%, #000) 100%);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 35%, transparent);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.guestbook-form button:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 30%, transparent);
}

.guestbook-form button svg {
  width: 24px;
  height: 24px;
}

.guestbook-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.guestbook-msg {
  font-size: 13px;
  margin-bottom: 10px;
  min-height: 1.2em;
}

.guestbook-msg.ok { color: #2E7D32; }
.guestbook-msg.err { color: #B00020; }

.guestbook-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guestbook-entry {
  background: var(--soft);
  border-radius: 8px;
  padding: 12px;
}

.guestbook-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.guestbook-entry-name {
  font-weight: 600;
  font-size: 14px;
}

.guestbook-entry-date {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.guestbook-entry-text {
  font-size: 14px;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.guestbook-empty {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 8px 0;
}

/* ── Layout templates ─────────────────────────────────────── */

.app-shell,
.menu-content,
[data-template="classic"] .app-shell,
[data-template="classic"] .menu-content,
body:not([data-template]) .app-shell,
body:not([data-template]) .menu-content {
  background: color-mix(in srgb, var(--primary) 18%, white);
}

[data-template="elegant"] .app-shell {
  border-radius: 32px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.10),
    0 24px 56px rgba(0, 0, 0, 0.18);
}

[data-template="elegant"] .header {
  padding: 18px 16px;
  min-height: 72px;
}

[data-template="elegant"] .header h1 {
  font-weight: 500;
  letter-spacing: 0.04em;
}

[data-template="elegant"] .section-card,
[data-template="elegant"] .menu-card {
  border-radius: 22px;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.05),
    0 14px 36px rgba(0, 0, 0, 0.08);
}

/* ── Font styles ──────────────────────────────────────────── */

[data-font="playfair"] .header h1,
[data-font="playfair"] .section-card-name,
[data-font="playfair"] .block-title {
  font-weight: 600;
}

[data-font="cormorant"] .header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

[data-font="oswald"] .header h1,
[data-font="oswald"] .section-card-name,
[data-font="oswald"] .block-title {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

[data-font="lora"] .block-desc {
  font-style: italic;
}
