/* ══════════════════════════════════════════════════════════════
   Momen Shop — Catering Catalog
   Page: /produkten-menu/
   ══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg-main:   #FAF8F5;
  --bg-card:   #FFFFFF;
  --bg-alt:    #F2EDE4;
  --bg-subtle: #F7F4EF;

  --text-dark:  #1A1A1A;
  --text-main:  #333333;
  --text-muted: #737373;
  --text-light: #A0A0A0;

  --brand-green:       #2B5A36;
  --brand-green-hover: #1E4026;
  --brand-green-light: #EBF2ED;
  --brand-green-mid:   #4A7C5A;

  --accent-warm:       #D97742;
  --accent-warm-light: #FDF3EE;

  --border-light:  #E8E6E1;
  --border-medium: #D4D0C8;

  --shadow-sm:    0 1px 4px rgba(0,0,0,0.05);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.07);
  --shadow-lg:    0 12px 40px rgba(0,0,0,0.10);
  --shadow-hover: 0 16px 48px rgba(43,90,54,0.13);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* Panel legacy vars */
  --ms-primary:      var(--brand-green);
  --ms-primary-dark: var(--brand-green-hover);
  --ms-bg-panel:     #ffffff;
  --ms-green-wash:   var(--brand-green-light);
  --ms-radius-sm:    8px;
  --ms-transition:   0.3s ease;
  --ms-ease:         cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Full-bleed reset ── */
.ms-shop-container {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
  position: relative;
  background: var(--bg-main);
}
.ms-shop-container *, .ms-shop-container *::before, .ms-shop-container *::after {
  box-sizing: border-box;
}

/* Hide WP page title */
.wp-block-post-title, header.entry-header, h1.entry-title, h1.page-title {
  display: none !important;
}

/* ══════════════════════════════════════════════════════════════
   PAGE HERO
   ══════════════════════════════════════════════════════════════ */
.page-hero {
  background: var(--brand-green);
  color: #fff;
  padding: 72px 40px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(255,255,255,0.08);
}
.page-hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 18px;
}
.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 50px;
  font-weight: 400;
  line-height: 1.12;
  margin-bottom: 18px;
  color: #fff;
}
.page-hero h1 em {
  font-style: italic;
  color: #F4CBA0;
}
.page-hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  max-width: 460px;
  margin: 0 auto 28px;
  font-weight: 300;
  line-height: 1.7;
}
.hero-tags {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-tag {
  padding: 6px 14px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}

/* ══════════════════════════════════════════════════════════════
   CATEGORY IMAGE TILES
   ══════════════════════════════════════════════════════════════ */
.cat-tiles-section {
  background: var(--bg-main);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}
.cat-tiles-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.cat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-light);
}
.cat-tile {
  position: relative;
  aspect-ratio: 3/2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  border: none;
  padding: 0;
  background: var(--bg-alt);
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.cat-tile:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-hover);
}
.cat-tile.active {
  box-shadow: 0 0 0 3px var(--brand-green), var(--shadow-md);
  transform: translateY(-2px);
}
.cat-tile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.cat-tile:hover .cat-tile-img {
  transform: scale(1.07);
}
.cat-tile-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20,40,20,0.72) 0%, rgba(20,40,20,0.18) 55%, transparent 100%);
  transition: background 0.28s ease;
}
.cat-tile:hover .cat-tile-scrim {
  background: linear-gradient(to top, rgba(20,40,20,0.58) 0%, rgba(20,40,20,0.10) 55%, transparent 100%);
}
/* No-image tile */
.cat-tile-no-img {
  background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-mid) 100%);
}
.cat-tile-no-img .cat-tile-scrim {
  background: none;
}
.cat-tile-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 10px 12px 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}
.cat-tile-no-img .cat-tile-label {
  text-shadow: none;
}
.cat-tile-count {
  display: block;
  font-size: 10px;
  font-weight: 500;
  opacity: 0.75;
  font-size: 11px;
  font-weight: 400;
  color: rgba(255,255,255,0.8);
  margin-top: 4px;
}

/* ══════════════════════════════════════════════════════════════
   CATALOG BODY
   ══════════════════════════════════════════════════════════════ */
.catalog-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── CATEGORY NAVIGATION ── */
.control-bar {
  background: var(--bg-main);
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 36px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.control-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.cat-title {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 400;
  color: var(--text-dark);
  line-height: 1.15;
  margin: 0;
}
.cat-title em { font-style: italic; color: var(--accent-warm); }
.cat-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin: 6px 0 0;
  max-width: 480px;
  line-height: 1.6;
}
.cat-product-count {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
  flex-shrink: 0;
}

/* ── Sub-category / filter chips ── */
.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
  margin-right: 4px;
}
.filter-chip {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-medium);
  background: var(--bg-card);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.18s;
  white-space: nowrap;
}
.filter-chip:hover {
  border-color: var(--brand-green);
  color: var(--brand-green);
  background: var(--brand-green-light);
}
.filter-chip.active {
  background: var(--brand-green);
  border-color: var(--brand-green);
  color: #fff;
}

/* ══════════════════════════════════════════════════════════════
   PRODUCT GRID
   ══════════════════════════════════════════════════════════════ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 72px;
  animation: ms-fade-in 0.32s ease;
}
@keyframes ms-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Product Card ── */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(43,90,54,0.18);
}

/* Card image */
.card-image {
  aspect-ratio: 4/3;
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}
.card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.42s ease;
}
.product-card:hover .card-image img {
  transform: scale(1.07);
}

/* Badges */
.card-badges {
  position: absolute;
  top: 12px; left: 12px;
  display: flex;
  gap: 6px;
  z-index: 2;
  flex-wrap: wrap;
}
.badge {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.badge-vegan {
  background: rgba(255,255,255,0.93);
  color: var(--brand-green);
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}
.badge-hot {
  background: rgba(255,255,255,0.93);
  color: var(--accent-warm);
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}
.badge-sale {
  background: var(--accent-warm);
  color: #fff;
}

/* Card body */
.card-content {
  padding: 20px 22px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}
.card-meta {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--text-light);
}
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.25;
  margin: 0;
}
.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card footer */
.card-footer {
  padding: 14px 22px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-light);
  gap: 12px;
}
.price-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.price-current {
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-green);
  line-height: 1.2;
}
.price-current del {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-light);
  margin-right: 3px;
}
.price-current ins { text-decoration: none; }
.serves-info {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 500;
}
.card-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--brand-green);
  background: transparent;
  color: var(--brand-green);
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.18s;
  white-space: nowrap;
}
.card-btn:hover {
  background: var(--brand-green);
  color: #fff;
}

/* Empty state */
.ms-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .cat-tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .cat-tiles-section { padding: 28px 20px 0; }
  .catalog-container { padding: 0 20px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
}
@media (max-width: 600px) {
  .page-hero { padding: 48px 20px 36px; }
  .page-hero h1 { font-size: 34px; }
  .page-hero-sub { font-size: 14px; }
  .cat-tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-tile { aspect-ratio: 3/2; border-radius: var(--radius-md); }
  .cat-tiles-section { padding: 22px 16px 0; }
  .catalog-container { padding: 0 16px; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-content { padding: 14px 14px 10px; }
  .card-title { font-size: 15px; }
  .card-footer { padding: 10px 14px 14px; }
  .card-btn { padding: 7px 12px; font-size: 12px; }
  .cat-title { font-size: 24px; }
  .control-bar { padding: 20px 0 14px; }
}

/* ══════════════════════════════════════════════════════════════
   SLIDE-OUT PANEL (unchanged from working version)
   ══════════════════════════════════════════════════════════════ */
.ms-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(18,53,36,0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.ms-panel-overlay.active {
  opacity: 1;
  visibility: visible;
}
.ms-panel {
  position: fixed;
  top: 0; right: 0;
  z-index: 10001;
  width: 480px;
  max-width: 100vw;
  bottom: 0;
  background: var(--ms-bg-panel);
  box-shadow: -10px 0 40px rgba(0,0,0,0.12);
  transform: translateX(105%);
  transition: transform 0.4s var(--ms-ease);
  display: flex;
  flex-direction: column;
}
.ms-panel-overlay.active .ms-panel { transform: translateX(0); }
.ms-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
}
.ms-panel-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--brand-green);
}
.ms-panel-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: none; border-radius: 50%;
  background: var(--brand-green);
  color: #fff;
  font-size: 18px; font-weight: bold;
  cursor: pointer;
  transition: all 0.25s;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.ms-panel-close:hover { background: var(--brand-green-hover); transform: scale(1.1) rotate(90deg); }
.ms-panel-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0; }
.ms-panel-inner { padding: 1.5rem; }
.ms-panel-gallery {
  position: relative;
  margin: -1.5rem -1.5rem 1.5rem;
  aspect-ratio: 1;
  background: var(--bg-alt);
  overflow: hidden;
}
.ms-panel-image {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.ms-panel-image.active { opacity: 1; }
.ms-panel-gallery-nav {
  position: absolute;
  bottom: 0.75rem; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 0.5rem; z-index: 2;
}
.ms-panel-thumb {
  width: 3rem; height: 3rem;
  border: 2px solid transparent; border-radius: var(--radius-sm);
  overflow: hidden; cursor: pointer; padding: 0;
  background: #fff; opacity: 0.7;
  transition: all var(--ms-transition);
}
.ms-panel-thumb.active { border-color: var(--brand-green); opacity: 1; }
.ms-panel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ms-panel-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-dark);
}
.ms-panel-price {
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-green);
}
.ms-panel-price del { font-weight: 400; color: #999; font-size: 0.9rem; margin-right: 0.35rem; }
.ms-panel-price ins { text-decoration: none; }
.ms-panel-description {
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1.25rem;
}
.ms-panel-attribute { margin-bottom: 1rem; }
.ms-panel-attribute label {
  display: block; margin-bottom: 0.5rem;
  font-size: 0.82rem; font-weight: 700;
  color: var(--brand-green);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.ms-attribute-options { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ms-attr-option {
  padding: 0.45rem 1rem;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-main);
  font-size: 0.85rem; font-weight: 500;
  cursor: pointer; transition: all 0.18s;
}
.ms-attr-option:hover { border-color: var(--brand-green); background: var(--brand-green-light); }
.ms-attr-option.selected { background: var(--brand-green); border-color: var(--brand-green); color: #fff; }
.ms-attr-option.unavailable { opacity: 0.35; text-decoration: line-through; cursor: not-allowed; pointer-events: none; }
.ms-panel-form-wrap { margin-top: 1rem; }
.ms-panel-quantity { display: flex; align-items: center; margin-bottom: 1rem; }
.ms-qty-btn {
  width: 2.8rem; height: 2.8rem;
  border: 1.5px solid var(--border-medium);
  background: #fff; color: var(--brand-green);
  font-size: 1.2rem; font-weight: 600;
  cursor: pointer; transition: background 0.18s;
}
.ms-qty-btn:hover { background: var(--brand-green-light); }
.ms-qty-minus { border-radius: var(--radius-sm) 0 0 var(--radius-sm); border-right: none; }
.ms-qty-plus  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-left: none; }
.ms-qty-input {
  width: 4rem; height: 2.8rem;
  border: 1.5px solid var(--border-medium);
  border-left: none; border-right: none;
  text-align: center;
  font-size: 1rem; font-weight: 600;
  -moz-appearance: textfield;
}
.ms-qty-input::-webkit-inner-spin-button,
.ms-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.ms-add-to-cart-btn {
  width: 100%; padding: 14px 20px;
  border: none; border-radius: var(--radius-sm);
  background: var(--brand-green);
  color: #fff; font-size: 1rem; font-weight: 700;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(43,90,54,0.25);
}
.ms-add-to-cart-btn:hover { background: var(--brand-green-hover); transform: translateY(-1px); }
.ms-add-to-cart-btn:disabled,
.ms-add-to-cart-btn.disabled { background: #ccc; cursor: not-allowed; box-shadow: none; transform: none; }
.ms-add-to-cart-btn.added { background: var(--brand-green-hover); }

/* ── Loading & errors ── */
.ms-loading {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 100px 20px; gap: 20px;
}
.ms-loading-spinner { display: inline-flex; gap: 8px; }
.ms-loading-spinner::before,
.ms-loading-spinner span,
.ms-loading-spinner::after {
  content: '';
  width: 10px; height: 10px;
  background: var(--brand-green);
  border-radius: 50%;
  animation: ms-bounce 1.4s infinite ease-in-out both;
}
.ms-loading-spinner::before { animation-delay: -0.32s; }
.ms-loading-spinner span { display: block; animation-delay: -0.16s; }
@keyframes ms-bounce {
  0%, 80%, 100% { transform: scale(0.75); opacity: 0.5; }
  40% { transform: scale(1.15); opacity: 1; }
}
.ms-loading span:not(.ms-loading-spinner span) {
  font-size: 15px; color: var(--text-muted);
}
.ms-error {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 20px; gap: 14px;
  text-align: center;
}
.ms-error-icon { font-size: 28px; color: var(--accent-warm); }
.ms-error span { color: var(--text-muted); font-size: 15px; }
.ms-error-retry {
  padding: 8px 20px;
  border: 1.5px solid var(--brand-green);
  border-radius: var(--radius-pill);
  background: none;
  color: var(--brand-green);
  font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: all 0.18s;
}
.ms-error-retry:hover { background: var(--brand-green); color: #fff; }

/* ── Toast ── */
.ms-toast {
  position: fixed;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(100%);
  z-index: 20000;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  background: var(--brand-green-hover);
  color: #fff;
  font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  opacity: 0;
  transition: transform 0.38s var(--ms-ease), opacity 0.28s ease;
  pointer-events: none;
  white-space: nowrap;
}
.ms-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.ms-toast-icon { font-size: 15px; }

/* Panel loading */
.ms-panel-loading {
  display: flex; align-items: center; justify-content: center;
  height: 200px; gap: 12px;
  color: var(--brand-green); font-weight: 500;
}
.ms-panel-spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--brand-green-light);
  border-top-color: var(--brand-green);
  border-radius: 50%;
  animation: ms-spin 0.7s linear infinite;
}
@keyframes ms-spin { to { transform: rotate(360deg); } }
