/* HERZWERK Speisekarte — clean premium digital menu */
:root {
  --hw-dark: #0E2118;
  --hw-dark-soft: #1a3328;
  --hw-gold: #BA9A6F;
  --hw-gold-soft: #c9ae84;
  --hw-cream: #D1CCC1;
  --hw-light: #F3EFE6;
  --hw-surface: #FFFCF7;
  --hw-muted: #6a716c;
  --hw-line: rgba(14, 33, 24, 0.08);
  --hw-max: 680px;
  --hw-max-wide: 1120px;
  --hw-nav-h: 90px;
  --hw-cat-h: 64px;
  --hw-sticky-offset: 154px;
  --hw-radius: 18px;
  --hw-thumb: 76px;
}

html {
  scroll-behavior: auto;
}

body.hw-menu-page {
  background: var(--hw-light);
  color: var(--hw-dark);
  /* clip keeps sticky category nav working (hidden breaks it) */
  overflow-x: clip;
  padding-top: 0;
  padding-bottom: 0;
}

/* Footer sits flush — no cream gap under dark green */
body.hw-menu-page .rt-footer {
  margin-bottom: 0;
  padding-bottom: 48px;
}

/* Navbar — match reservation/contact dimensions; only keep dark green + readable colors */
body.hw-menu-page .rt-navbar {
  background: var(--hw-dark) !important;
  border-bottom: 1px solid rgba(209, 204, 193, 0.14);
}

body.hw-menu-page .rt-nav-shadow {
  display: none !important;
}

body.hw-menu-page .rt-navbar.w-nav {
  z-index: 100;
}

/* Same logo box as brand.css / other pages — do not shrink */
body.hw-menu-page .rt-brand,
body.hw-menu-page .w-nav-brand {
  width: auto !important;
  max-width: none !important;
}

body.hw-menu-page .rt-brand .herzwerk-logo,
body.hw-menu-page .w-nav-brand .herzwerk-logo,
body.hw-menu-page .herzwerk-logo {
  height: 70px !important;
  max-width: 360px !important;
  width: auto !important;
}

body.hw-menu-page .rt-menu-text.w-nav-link {
  color: rgba(245, 241, 232, 0.88) !important;
}

body.hw-menu-page .rt-menu-text.w-nav-link.w--current,
body.hw-menu-page .rt-menu-text.w-nav-link:hover {
  color: var(--hw-gold-soft) !important;
}

body.hw-menu-page .w-nav-button,
body.hw-menu-page .w-icon-nav-menu {
  color: #f5f1e8 !important;
}

body.hw-menu-page .mobile-list-line-one,
body.hw-menu-page .mobile-list-line-two,
body.hw-menu-page .mobile-list-line-three {
  background-color: #fff !important;
}

/* Mobile: home-sized logo, compact fixed nav, sticky categories */
@media screen and (max-width: 991px) {
  :root {
    --hw-nav-h: 78px;
    --hw-cat-h: 52px;
    --hw-sticky-offset: 142px;
  }

  body.hw-menu-page {
    scroll-padding-top: var(--hw-sticky-offset);
  }

  /* Do NOT set display:flex on .w-nav — it expands the mobile menu into the bar */
  body.hw-menu-page .rt-navbar.w-nav {
    height: var(--hw-nav-h) !important;
    min-height: var(--hw-nav-h) !important;
    max-height: var(--hw-nav-h) !important;
    overflow: visible;
    border-bottom: 0;
    box-sizing: border-box;
  }

  body.hw-menu-page .rt-navbar .rt-container {
    height: var(--hw-nav-h);
  }

  body.hw-menu-page .rt-navbar .rt-nav-wrapper {
    height: var(--hw-nav-h);
    align-items: center;
  }

  /* Exact same logo size as homepage */
  body.hw-menu-page .rt-brand .herzwerk-logo,
  body.hw-menu-page .w-nav-brand .herzwerk-logo,
  body.hw-menu-page .herzwerk-logo {
    height: 70px !important;
    max-width: 360px !important;
    width: auto !important;
  }

  body.hw-menu-page .rt-nav-menu,
  body.hw-menu-page .w-nav-menu {
    background: #fffdf8 !important;
  }

  body.hw-menu-page .rt-nav-menu .rt-menu-text.w-nav-link,
  body.hw-menu-page .w-nav-menu .rt-menu-text.w-nav-link {
    color: #0e2118 !important;
  }

  body.hw-menu-page .rt-nav-menu .rt-menu-text.w-nav-link.w--current,
  body.hw-menu-page .w-nav-menu .rt-menu-text.w-nav-link.w--current,
  body.hw-menu-page .rt-nav-menu .rt-menu-text.w-nav-link:hover,
  body.hw-menu-page .w-nav-menu .rt-menu-text.w-nav-link:hover {
    color: #ba9a6f !important;
  }

  /* Enough top space so "SPEISE- &" is never under the fixed nav */
  .hw-menu-header {
    padding-top: calc(var(--hw-nav-h) + 32px) !important;
    padding-left: 18px;
    padding-right: 16px;
    padding-bottom: 22px;
    margin-top: 0;
    overflow: visible;
  }

  .hw-menu-kicker {
    margin-bottom: 6px;
  }

  .hw-menu-title {
    overflow: visible;
    line-height: 1.15;
    font-size: clamp(24px, 7.2vw, 32px);
  }

  .hw-menu-header-inner {
    max-width: min(18rem, 58vw);
  }

  /* Sticky categories flush under navbar */
  .hw-cat-nav {
    position: sticky !important;
    top: var(--hw-nav-h) !important;
    z-index: 90;
    background: #f3efe6 !important;
    box-shadow: none !important;
    border-top: 0;
    border-bottom: 1px solid rgba(14, 33, 24, 0.08);
  }

  .hw-cat-nav-track {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .hw-chip {
    flex: 0 0 auto !important;
    width: auto !important;
  }

  .hw-cat-nav.is-fixed {
    position: sticky !important;
    top: var(--hw-nav-h) !important;
    box-shadow: none !important;
  }

  .hw-cat-nav-spacer,
  .hw-cat-nav-spacer.is-active {
    display: none !important;
    height: 0 !important;
  }
}

@media screen and (min-width: 992px) {
  :root {
    --hw-nav-h: 90px;
    --hw-sticky-offset: 154px;
  }

  .hw-menu-header {
    padding-top: calc(var(--hw-nav-h) + 28px);
  }
}

.hw-menu {
  width: 100%;
  padding: 0;
  overflow: visible;
}

/* ── Minimal hero: one drink, calm composition ── */
.hw-menu-header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 0;
  padding: 28px 20px 24px;
  background:
    radial-gradient(ellipse 80% 120% at 100% 0%, rgba(186, 154, 111, 0.16), transparent 55%),
    linear-gradient(165deg, #12261c 0%, var(--hw-dark) 55%, #0a1812 100%);
  color: var(--hw-light);
  overflow: visible;
}

.hw-menu-hero-media {
  position: relative;
  z-index: 1;
  width: clamp(112px, 30vw, 148px);
  height: clamp(112px, 30vw, 148px);
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    0 0 0 3px rgba(186, 154, 111, 0.35),
    0 18px 40px rgba(0, 0, 0, 0.35);
  order: 2;
  flex-shrink: 0;
}

.hw-menu-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hw-menu-hero-shade {
  display: none;
}

.hw-menu-header-inner {
  position: relative;
  z-index: 1;
  order: 1;
  text-align: left;
  max-width: 18rem;
}

.hw-menu-kicker {
  margin: 0 0 8px;
  font-family: Oswald, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hw-gold-soft);
}

.hw-menu-title {
  margin: 0;
  font-family: Oswald, sans-serif;
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.12;
  text-transform: uppercase;
  color: #f7f3ea;
}

.hw-menu-tagline {
  margin: 10px 0 0;
  font-family: Lato, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(245, 241, 232, 0.72);
  letter-spacing: 0.01em;
}

/* ── Pill category tabs ── */
.hw-cat-nav {
  position: sticky;
  top: var(--hw-nav-h);
  z-index: 50;
  background: #f3efe6;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid var(--hw-line);
  border-top: 0;
  min-height: var(--hw-cat-h);
  box-shadow: none;
}

.hw-cat-nav-track {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--hw-cat-h);
  max-width: var(--hw-max);
  margin: 0 auto;
  padding: 10px 14px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.hw-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(14, 33, 24, 0.1);
  border-radius: 999px;
  background: var(--hw-surface);
  font-family: Oswald, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(14, 33, 24, 0.62);
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(14, 33, 24, 0.03);
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.hw-chip-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}

.hw-chip.is-active,
.hw-chip:focus-visible {
  background: var(--hw-dark);
  border-color: var(--hw-dark);
  color: #f5f1e8;
  box-shadow: 0 8px 20px rgba(14, 33, 24, 0.18);
  outline: none;
}

.hw-chip:hover:not(.is-active) {
  color: var(--hw-dark);
  border-color: rgba(186, 154, 111, 0.55);
  background: #fff;
}

.hw-section.is-filtered-out {
  display: none !important;
}

/* ── Body ── */
.hw-menu-body {
  max-width: var(--hw-max);
  margin: 0 auto;
  padding: 8px 14px 40px;
  position: relative;
}

.hw-section {
  position: relative;
  padding: 26px 0 6px;
  scroll-margin-top: var(--hw-sticky-offset);
}

.hw-section-title {
  margin: 0 0 16px;
  padding: 0 2px;
  border: 0;
  font-family: Oswald, sans-serif;
  font-size: clamp(20px, 5vw, 24px);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--hw-dark);
  scroll-margin-top: var(--hw-sticky-offset);
}

.hw-section-title::after {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  margin-top: 10px;
  border-radius: 2px;
  background: var(--hw-gold);
}

.hw-sub {
  margin: 0 0 6px;
}

.hw-subhead {
  margin: 18px 0 10px;
  padding-left: 2px;
  font-family: Oswald, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hw-gold);
}

/* ── Product cards ── */
.hw-item {
  display: grid;
  grid-template-columns: var(--hw-thumb) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--hw-line);
  border-radius: var(--hw-radius);
  background: var(--hw-surface);
  box-shadow: 0 10px 28px rgba(14, 33, 24, 0.045);
  transition:
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease;
}

.hw-item:hover {
  border-color: rgba(186, 154, 111, 0.35);
  box-shadow: 0 14px 34px rgba(14, 33, 24, 0.08);
}

.hw-item-media {
  margin: 0;
  width: var(--hw-thumb);
  height: var(--hw-thumb);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(145deg, #ebe4d7, #d9d2c4);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(14, 33, 24, 0.04);
}

.hw-item-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hw-item-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 2px;
}

.hw-item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hw-item-name {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-family: Oswald, sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: var(--hw-dark);
}

.hw-item-price {
  margin: 0;
  flex: 0 0 auto;
  max-width: 42%;
  font-family: Lato, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
  color: var(--hw-dark);
}

.hw-price-line {
  display: block;
  white-space: nowrap;
}

.hw-item-desc {
  margin: 0;
  padding: 0;
  max-width: none;
  font-family: Lato, sans-serif;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--hw-muted);
}

.hw-section-title,
.hw-sub,
.hw-item,
.hw-subhead,
.hw-item-name,
.hw-item-price,
.hw-item-desc {
  position: relative;
  z-index: 2;
}

/* ── Allergens ── */
.hw-allergens {
  margin-top: 28px;
  border: 1px solid var(--hw-line);
  border-radius: var(--hw-radius);
  overflow: hidden;
  background: var(--hw-surface);
  box-shadow: 0 8px 22px rgba(14, 33, 24, 0.04);
}

.hw-allergens-toggle {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  font-family: Oswald, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hw-dark);
  cursor: pointer;
  text-align: left;
}

.hw-allergens-icon {
  font-size: 22px;
  line-height: 1;
  color: var(--hw-gold);
}

.hw-allergens-panel {
  padding: 0 16px 16px;
  border-top: 1px solid var(--hw-line);
}

.hw-allergens-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  font-family: Lato, sans-serif;
  font-size: 13px;
  color: var(--hw-muted);
}

@media (min-width: 560px) {
  .hw-allergens-list {
    grid-template-columns: 1fr 1fr;
  }
}

.hw-allergens-note {
  margin: 12px 0 0;
  font-family: Lato, sans-serif;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--hw-muted);
}

/* Hide floating dock — cleaner mobile chrome */
.hw-menu-dock {
  display: none !important;
}

/* Hide decorative floats — reduce clutter */
.hw-float {
  display: none !important;
}

.hw-section--float-right,
.hw-section--float-left {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

@media (min-width: 768px) {
  :root {
    --hw-max: 1120px;
  }

  .hw-menu-header {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: calc(var(--hw-nav-h) + 28px) 36px 32px;
    border-radius: 0;
    gap: 28px;
  }

  .hw-menu-hero-media {
    width: 168px;
    height: 168px;
  }

  .hw-menu-header-inner {
    max-width: 26rem;
  }

  .hw-menu-title {
    font-size: 40px;
  }

  .hw-cat-nav-track {
    max-width: var(--hw-max);
    padding: 12px 20px;
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
    row-gap: 10px;
  }

  .hw-menu-body {
    max-width: var(--hw-max);
    padding: 12px 24px 56px;
  }

  /* Tablet: 2-column product grid — continuous flow, no empty cells */
  .hw-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 16px;
    align-items: stretch;
  }

  .hw-section > .hw-float,
  .hw-section > .hw-section-title {
    grid-column: 1 / -1;
  }

  /* Flatten subgroups so all cards pack into one grid */
  .hw-sub {
    display: contents;
  }

  /* Subheads create orphan rows with 1 card — hide on multi-column layouts */
  .hw-subhead {
    display: none;
  }

  .hw-item {
    --hw-thumb: 72px;
    width: 100%;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 14px;
    gap: 14px;
    align-content: center;
    box-sizing: border-box;
  }

  .hw-item-name {
    font-size: 15px;
  }

  .hw-item-price {
    font-size: 13.5px;
    max-width: 48%;
  }

  .hw-item-desc {
    font-size: 12.5px;
  }

  .hw-chip {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 14px;
  }
}

@media (min-width: 992px) {
  body.hw-menu-page {
    background:
      radial-gradient(ellipse 50% 40% at 50% 0%, rgba(186, 154, 111, 0.08), transparent 60%),
      var(--hw-light);
  }

  /* Desktop categories: wrap as equal pills — never stretch a lone last chip */
  .hw-cat-nav-track {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    overflow: visible;
    padding: 14px 24px;
    max-width: var(--hw-max);
  }

  .hw-chip {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none;
    justify-content: center;
    padding: 0 14px;
    font-size: 11.5px;
    letter-spacing: 0.05em;
  }

  .hw-chip-icon {
    display: none;
  }

  /* Desktop: 3-column product grid */
  .hw-section {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 18px;
    row-gap: 18px;
  }

  .hw-item {
    --hw-thumb: 76px;
    padding: 14px;
  }

  .hw-item-name {
    font-size: 15px;
  }

  .hw-item-price {
    font-size: 13.5px;
  }

  .hw-item-desc {
    font-size: 12.5px;
  }

  .hw-menu-body {
    padding: 16px 28px 72px;
  }
}

@media (min-width: 1200px) {
  .hw-cat-nav-track {
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
  }

  .hw-chip {
    flex: 0 0 auto !important;
    padding: 0 16px;
    font-size: 12px;
  }

  .hw-chip-icon {
    display: inline-block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hw-item,
  .hw-chip {
    transition: none;
  }
}
