.cmg-menu {
  --cmg-primary: #ff8500;
  --cmg-secondary: #6b2e00;
  --cmg-primary-rgb: 255, 133, 0;
  --cmg-primary-dark: #ea580c;
  --cmg-primary-hover: #e67400;
  --cmg-text: #1f2937;
  --cmg-muted: #6b7280;
  --cmg-bg: #ffffff;
  --cmg-surface: #ffffff;
  --cmg-page-bg: #ffffff;
  --cmg-soft: #fff9f3;
  width: 100%;
  max-width: 720px;
  margin: 1.5rem auto;
  padding: 0 max(1rem, env(safe-area-inset-right)) 0 max(1rem, env(safe-area-inset-left));
  box-sizing: border-box;
  color: var(--cmg-text);
  background: var(--cmg-page-bg);
  overflow-x: hidden;
}

.cmg-menu-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto 1.1rem;
  padding: 0.35rem 0;
}

.cmg-menu-logo {
  display: block;
  margin: 0 auto;
  max-width: min(260px, 88%);
  max-height: 88px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.cmg-menu-header {
  margin-bottom: 1.5rem;
}

.cmg-table-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: rgba(var(--cmg-primary-rgb), 0.12);
  color: var(--cmg-primary-dark, var(--cmg-primary));
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 1px solid rgba(var(--cmg-primary-rgb), 0.25);
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}

.cmg-menu > .cmg-table-badge {
  display: flex;
  margin-left: auto;
  margin-right: auto;
}

.cmg-menu-header--has-logo {
  text-align: center;
}

.cmg-menu-header--has-logo h2 {
  margin-top: 0.15rem;
}

.cmg-menu-header--has-logo .cmg-menu-intro {
  margin-left: auto;
  margin-right: auto;
  max-width: 42rem;
}

.cmg-menu-header h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.cmg-menu-intro {
  color: var(--cmg-muted);
}

.cmg-category-block {
  margin-bottom: 1.5rem;
}

.cmg-category-title {
  margin: 0;
  color: var(--cmg-primary);
}

.cmg-category-description {
  color: var(--cmg-muted);
  margin: 0.35rem 0 0.9rem;
}

.cmg-category-image-wrap {
  margin-bottom: 1rem;
}

.cmg-category-image {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}

.cmg-items-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cmg-menu-item {
  border: 1px solid rgba(31, 41, 55, 0.1);
  border-radius: 16px;
  background: var(--cmg-bg);
  padding: 1rem 1.1rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.cmg-menu-item-image-wrap {
  margin: -1rem -1.1rem 0.9rem;
  position: relative;
}

.cmg-media-flip {
  perspective: 1200px;
  margin: -1rem -1.1rem 0.9rem;
}

.cmg-media-flip-inner {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
  aspect-ratio: 1 / 1;
  width: 100%;
}

.cmg-media-flip.is-flipped .cmg-media-flip-inner {
  transform: rotateY(180deg);
}

.cmg-media-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.cmg-media-front {
  position: relative;
  height: 100%;
}

.cmg-media-front .cmg-menu-item-image-wrap {
  margin: 0;
  height: 100%;
}

.cmg-media-front .cmg-menu-item-image {
  height: 100%;
  aspect-ratio: auto;
}

.cmg-media-flip.is-flipped .cmg-flip-hint {
  visibility: hidden;
}

.cmg-media-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  background: var(--cmg-soft);
  color: var(--cmg-text);
  overflow: hidden;
}

.cmg-media-back-content {
  height: 100%;
  padding: 0.4rem;
  overflow: hidden;
  box-sizing: border-box;
}

.cmg-flip-back-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(var(--cmg-primary-rgb), 0.12);
  color: var(--cmg-primary);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.18s ease, transform 0.15s ease;
}

.cmg-flip-back-arrow:hover {
  background: rgba(var(--cmg-primary-rgb), 0.2);
  transform: translateX(-1px);
}

.cmg-flip-back-arrow-icon {
  display: block;
  width: 7px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 2px;
}

.cmg-flip-ingredients {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: var(--cmg-surface);
  border: 1px solid rgba(var(--cmg-primary-rgb), 0.16);
}

.cmg-flip-ingredients-head {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.35rem 0.45rem;
  border-bottom: 1px solid rgba(var(--cmg-primary-rgb), 0.12);
}

.cmg-flip-ingredients-head .cmg-ingredients-unit-tabs {
  flex: 1 1 100%;
  margin-top: 0.08rem;
}

.cmg-flip-ingredients-title {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cmg-primary);
  line-height: 1.15;
}

.cmg-flip-ingredients-scroll {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.cmg-flip-ingredients.is-scrollable .cmg-flip-ingredients-scroll::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1rem;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--cmg-surface) 85%);
  pointer-events: none;
  z-index: 1;
}

.cmg-flip-ingredients-list {
  list-style: none;
  margin: 0;
  padding: 0.18rem 0.28rem 0.24rem;
  overflow-y: auto;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--cmg-primary-rgb), 0.4) transparent;
  box-sizing: border-box;
  --cmg-ing-row-h: 1.26rem;
}

.cmg-flip-ingredients.is-scrollable .cmg-flip-ingredients-list {
  height: 100%;
  max-height: 100%;
}

.cmg-flip-ingredients-list::-webkit-scrollbar {
  width: 4px;
}

.cmg-flip-ingredients-list::-webkit-scrollbar-thumb {
  background: rgba(var(--cmg-primary-rgb), 0.4);
  border-radius: 999px;
}

.cmg-flip-ingredients .cmg-ingredient-item {
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr);
  align-items: center;
  gap: 0.28rem;
  width: 100%;
  min-height: var(--cmg-ing-row-h, 1.26rem);
  padding: 0.12rem 0.28rem;
  border-radius: 6px;
  border: 1px solid rgba(var(--cmg-primary-rgb), 0.14);
  background: color-mix(in srgb, var(--cmg-soft) 75%, var(--cmg-surface));
  box-shadow: none;
  box-sizing: border-box;
}

.cmg-flip-hint {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  z-index: 2;
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  background: linear-gradient(135deg, var(--cmg-primary), var(--cmg-primary-dark));
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 14px rgba(234, 88, 12, 0.35);
  pointer-events: none;
}

.cmg-menu-item-image-wrap[data-cmg-flip-trigger] {
  cursor: pointer;
}

.cmg-menu-item-image-wrap[data-cmg-flip-trigger]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(17, 24, 39, 0.25) 100%);
  pointer-events: none;
}

.cmg-flip-ingredients .cmg-ingredient-item:hover {
  transform: none;
  border-color: rgba(var(--cmg-primary-rgb), 0.35);
}

.cmg-flip-ingredients .cmg-ingredient-name {
  font-size: 0.6rem;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmg-flip-ingredients .cmg-ingredient-toggle {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 3px;
}

.cmg-flip-ingredients .cmg-ingredient-toggle::after {
  left: 2.5px;
  top: 0.5px;
  width: 3px;
  height: 5px;
  border-right-width: 1.5px;
  border-bottom-width: 1.5px;
}

.cmg-ingredients-picker {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--cmg-soft) 0%, var(--cmg-surface) 100%);
  border: 1px solid rgba(var(--cmg-primary-rgb), 0.14);
}

.cmg-ingredients-picker--flip-back {
  display: none;
}

.cmg-ingredients-picker-head {
  margin-bottom: 0.4rem;
  padding-bottom: 0.32rem;
  border-bottom: 1px solid rgba(var(--cmg-primary-rgb), 0.12);
}

.cmg-ingredients-picker-title {
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cmg-primary);
}

.cmg-ingredients-picker-hint {
  margin: 0.25rem 0 0;
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--cmg-muted);
}

.cmg-ingredients-picker-head {
  flex-wrap: wrap;
}

.cmg-ingredients-picker-head .cmg-ingredients-unit-tabs {
  flex: 1 1 100%;
  margin-top: 0.2rem;
}

.cmg-ingredients-unit-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.22rem;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 0;
  box-sizing: border-box;
}

.cmg-ingredients-unit-tabs::-webkit-scrollbar {
  height: 0;
  background: transparent;
}

.cmg-ingredients-unit-tabs.is-scrolling {
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--cmg-primary-rgb), 0.45) transparent;
  padding-bottom: 0.08rem;
}

.cmg-ingredients-unit-tabs.is-scrolling::-webkit-scrollbar {
  height: 3px;
}

.cmg-ingredients-unit-tabs.is-scrolling::-webkit-scrollbar-thumb {
  background: rgba(var(--cmg-primary-rgb), 0.45);
  border-radius: 999px;
}

.cmg-ingredients-unit-tab {
  flex: 0 0 auto;
  min-width: 1.75rem;
  padding: 0.18rem 0.38rem;
  border: 1px solid rgba(var(--cmg-primary-rgb), 0.28);
  border-radius: 999px;
  background: var(--cmg-surface);
  color: var(--cmg-primary);
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cmg-ingredients-unit-tab:hover {
  border-color: var(--cmg-primary);
  background: var(--cmg-soft);
}

.cmg-ingredients-unit-tab.is-active {
  background: linear-gradient(135deg, var(--cmg-primary), var(--cmg-primary-dark));
  border-color: var(--cmg-primary-dark);
  color: #fff;
  box-shadow: 0 1px 5px rgba(234, 88, 12, 0.22);
}

.cmg-ingredients-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cmg-ingredients-list-item {
  min-width: 0;
}

.cmg-ingredient-item {
  position: relative;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.28rem 0.42rem;
  border-radius: 8px;
  border: 1px solid rgba(var(--cmg-primary-rgb), 0.18);
  background: var(--cmg-surface);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.cmg-ingredient-check {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.cmg-ingredient-toggle {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  flex: 0 0 16px;
  border: 1.5px solid rgba(var(--cmg-primary-rgb), 0.4);
  background: var(--cmg-surface);
  position: relative;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.cmg-ingredient-toggle::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
}

.cmg-ingredient-name {
  min-width: 0;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--cmg-text);
  word-break: break-word;
}

.cmg-ingredient-item.is-included .cmg-ingredient-toggle {
  background: var(--cmg-primary);
  border-color: var(--cmg-primary);
}

.cmg-ingredient-item.is-included .cmg-ingredient-toggle::after {
  transform: rotate(45deg) scale(1);
}

.cmg-ingredient-item.is-excluded {
  border-color: rgba(107, 114, 128, 0.2);
  background: #f9fafb;
}

.cmg-ingredient-item.is-excluded .cmg-ingredient-toggle {
  background: #e5e7eb;
  border-color: #d1d5db;
}

.cmg-ingredient-item.is-excluded .cmg-ingredient-toggle::after {
  transform: rotate(45deg) scale(0);
}

.cmg-ingredient-item.is-excluded .cmg-ingredient-name {
  color: var(--cmg-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(107, 114, 128, 0.4);
}

.cmg-ingredients-back {
  margin: 0;
  line-height: 1.35;
}

.cmg-menu-item-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  display: block;
}

.cmg-menu-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.45rem;
}

.cmg-menu-item-top h4 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: clamp(0.78rem, 2.6vw, 1.08rem);
  line-height: 1.25;
  overflow-wrap: break-word;
  word-break: break-word;
}

.cmg-price {
  flex: 0 0 auto;
  color: var(--cmg-primary);
  font-weight: 700;
  line-height: 1.25;
  font-size: clamp(0.78rem, 2.4vw, 0.95rem);
  text-align: right;
  white-space: nowrap;
}

.cmg-menu .cmg-menu-item p.cmg-description {
  margin-top: 0.5rem !important;
  margin-bottom: 0 !important;
}

.cmg-menu .cmg-menu-item .cmg-description + .cmg-ingredients-picker {
  margin-top: 0.55rem;
}

.cmg-item-actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
}

.cmg-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.cmg-qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: auto;
  min-width: 1.1rem;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cmg-primary);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: color 0.15s ease, transform 0.15s ease;
}

.cmg-qty-btn:hover {
  color: var(--cmg-primary-hover);
  background: transparent;
  box-shadow: none;
}

.cmg-qty-btn:active {
  transform: scale(0.94);
}

.cmg-qty-btn:focus-visible {
  outline: 2px solid var(--cmg-primary);
  outline-offset: 2px;
}

.cmg-qty-input {
  width: 1.65rem;
  height: 1.5rem;
  border: 0;
  background: transparent;
  text-align: center;
  color: var(--cmg-text);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0;
  -moz-appearance: textfield;
}

.cmg-qty-input::-webkit-outer-spin-button,
.cmg-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cmg-qty-input:focus {
  outline: none;
}

.cmg-add-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  background: var(--cmg-primary);
  color: var(--cmg-btn-text, #fff);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, filter 0.2s ease;
}

.cmg-add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(var(--cmg-primary-rgb), 0.25);
  background: var(--cmg-primary-hover, var(--cmg-primary));
}

.cmg-add-btn.is-added {
  background: var(--cmg-primary-dark, var(--cmg-primary));
  color: var(--cmg-btn-text, #fff);
  filter: brightness(0.95);
}

/* ---- Popup suppléments ---- */
.cmg-supp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,.45);
  z-index: 10500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}

@media (min-width: 480px) {
  .cmg-supp-overlay {
    align-items: center;
  }
}

.cmg-supp-popup {
  width: min(94vw, 420px);
  background: var(--cmg-surface);
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(17,24,39,.3);
  overflow: hidden;
}

.cmg-supp-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  border-bottom: 1px solid rgba(17,24,39,.08);
}

.cmg-supp-popup-head strong {
  font-size: 1rem;
}

.cmg-supp-popup-close {
  border: 0;
  background: transparent;
  font-size: 1.3rem;
  cursor: pointer;
  color: #6b7280;
}

.cmg-supp-popup-list {
  list-style: none;
  margin: 0;
  padding: .5rem .75rem .75rem;
  max-height: 55vh;
  overflow: auto;
}

.cmg-supp-popup-list li {
  border: 1px solid rgba(17,24,39,.09);
  border-radius: 10px;
  margin-top: .45rem;
}

.cmg-supp-popup-list label {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .75rem;
  cursor: pointer;
}

.cmg-supp-popup-list input[type="checkbox"] {
  accent-color: var(--cmg-primary);
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.cmg-supp-popup-list small {
  margin-left: auto;
  color: #6b7280;
}

.cmg-supp-popup-foot {
  padding: .75rem 1rem;
  border-top: 1px solid rgba(17,24,39,.08);
}

.cmg-supp-popup-confirm {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: .75rem 1rem;
  background: var(--cmg-primary);
  color: var(--cmg-btn-text, #fff);
  font-weight: 700;
  cursor: pointer;
}

body.cmg-supp-open { overflow: hidden; }

.cmg-menu-item.is-highlighted {
  border-color: rgba(var(--cmg-primary-rgb), 0.35);
  background: linear-gradient(180deg, var(--cmg-bg) 0%, var(--cmg-soft) 100%);
}

.cmg-model-classic .cmg-category-block {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(31, 41, 55, 0.08);
}

.cmg-model-classic .cmg-classic-categories {
  width: min(640px, 100%);
  margin-inline: auto;
}

.cmg-classic-categories {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.cmg-classic-category-entry {
  display: block;
}

.cmg-classic-category-entry .cmg-category-card {
  display: block;
  width: 100%;
}

.cmg-category-card {
  display: grid;
  gap: 0.6rem;
  text-align: left;
  border: 1px solid rgba(31, 41, 55, 0.12);
  border-radius: 16px;
  background: var(--cmg-surface);
  padding: 0.9rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  color: inherit;
  font: inherit;
  transition: border-color 0.2s ease;
}

.cmg-category-card:hover,
.cmg-category-card.is-active,
.cmg-category-card:focus,
.cmg-category-card:focus-visible,
.cmg-category-card:active {
  background: var(--cmg-surface);
  border-color: rgba(var(--cmg-primary-rgb), 0.65);
  box-shadow: none;
  transform: none;
  outline: none;
}

.cmg-category-card.is-active {
  border-width: 2px;
  padding: calc(0.9rem - 1px);
}

.cmg-category-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 12px;
}

.cmg-category-card strong {
  color: var(--cmg-text);
  font-size: 1rem;
}

.cmg-category-card span {
  color: var(--cmg-muted);
  font-size: 0.92rem;
}

.cmg-classic-empty {
  border: 1px dashed rgba(31, 41, 55, 0.2);
  border-radius: 14px;
  padding: 0.9rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.cmg-category-products[hidden] {
  display: none !important;
}

.cmg-category-products {
  border: 1px solid rgba(31, 41, 55, 0.1);
  border-radius: 16px;
  padding: 1rem;
  background: var(--cmg-surface);
  margin-top: 0.7rem;
}

.cmg-model-classic .cmg-category-products .cmg-items-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 560px) {
  .cmg-model-classic .cmg-category-products .cmg-items-list,
  .cmg-model-cards .cmg-items-list,
  .cmg-model-spotlight .cmg-items-list,
  .cmg-items-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .cmg-model-classic .cmg-category-products .cmg-menu-item {
    padding: 0.75rem 0.6rem;
  }

  .cmg-menu-item-top h4 {
    font-size: 0.92rem;
  }

  .cmg-price {
    font-size: 0.88rem;
  }

  .cmg-menu-item-top {
    flex-wrap: wrap;
  }

  .cmg-price {
    white-space: normal;
  }

  .cmg-item-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .cmg-qty {
    width: 100%;
    justify-content: center;
  }

  .cmg-add-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .cmg-menu-header h2 {
    font-size: clamp(1.45rem, 7vw, 1.9rem);
  }

  .cmg-category-card img {
    height: 110px;
  }

  .cmg-menu-item {
    padding: 0.7rem 0.55rem;
  }

  .cmg-menu-item-top h4 {
    font-size: 0.85rem;
    line-height: 1.25;
  }
}

.cmg-model-cards .cmg-items-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cmg-model-classic .cmg-category-products .cmg-item-actions {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  align-items: stretch;
}

.cmg-model-classic .cmg-category-products .cmg-qty {
  width: 100%;
  justify-content: center;
}

.cmg-model-classic .cmg-category-products .cmg-add-btn {
  width: 100%;
  text-align: center;
}

.cmg-model-cards .cmg-menu-item-image {
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
}

.cmg-model-spotlight .cmg-category-block {
  background: var(--cmg-soft);
  border-radius: 20px;
  padding: 1.2rem;
}

.cmg-model-spotlight .cmg-category-title-wrap {
  margin-bottom: 1rem;
}

.cmg-model-spotlight .cmg-items-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cmg-model-spotlight .cmg-menu-item {
  border-color: rgba(var(--cmg-primary-rgb), 0.18);
}

/* ---- Mode sombre ---- */
body.cmg-page-dark {
  background: #0f172a !important;
  color: #f3f4f6;
}

body.cmg-page-dark #page,
body.cmg-page-dark .site,
body.cmg-page-dark main,
body.cmg-page-dark .site-content,
body.cmg-page-dark #content,
body.cmg-page-dark .entry-content,
body.cmg-page-dark article,
body.cmg-page-dark .content-area {
  background-color: transparent !important;
}

.cmg-menu.cmg-theme-dark {
  --cmg-text: #f3f4f6;
  --cmg-muted: #9ca3af;
  --cmg-bg: #1f2937;
  --cmg-surface: #1f2937;
  --cmg-page-bg: #0f172a;
  background: var(--cmg-page-bg);
}

.cmg-menu.cmg-theme-dark .cmg-menu-item {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.cmg-menu.cmg-theme-dark .cmg-category-title,
.cmg-menu.cmg-theme-dark .cmg-category-card strong {
  color: #ffffff;
}

.cmg-menu.cmg-theme-dark .cmg-category-description,
.cmg-menu.cmg-theme-dark .cmg-category-card span {
  color: var(--cmg-muted);
}

.cmg-menu.cmg-theme-dark .cmg-flip-ingredients,
.cmg-menu.cmg-theme-dark .cmg-ingredients-picker {
  background: var(--cmg-bg);
  border-color: rgba(var(--cmg-primary-rgb), 0.24);
}

.cmg-menu.cmg-theme-dark .cmg-flip-ingredients-scroll::after {
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0), var(--cmg-surface) 85%);
}

.cmg-menu.cmg-theme-dark .cmg-ingredient-item,
.cmg-menu.cmg-theme-dark .cmg-flip-ingredients .cmg-ingredient-item {
  background: color-mix(in srgb, var(--cmg-bg) 86%, var(--cmg-primary) 14%);
  border-color: rgba(var(--cmg-primary-rgb), 0.22);
}

.cmg-menu.cmg-theme-dark .cmg-ingredient-item.is-excluded {
  background: #374151;
  border-color: rgba(255, 255, 255, 0.08);
}

.cmg-menu.cmg-theme-dark .cmg-ingredient-item.is-excluded .cmg-ingredient-name {
  color: #9ca3af;
}

.cmg-menu.cmg-theme-dark .cmg-ingredients-unit-tab {
  background: #374151;
  color: #f9fafb;
  border-color: rgba(var(--cmg-primary-rgb), 0.35);
}

.cmg-menu.cmg-theme-dark .cmg-ingredients-unit-tab.is-active {
  color: #fff;
}

.cmg-menu.cmg-theme-dark .cmg-ingredients-unit-tab:hover {
  background: color-mix(in srgb, var(--cmg-primary) 22%, #374151);
}

.cmg-menu.cmg-theme-dark .cmg-category-card,
.cmg-menu.cmg-theme-dark .cmg-category-products,
.cmg-menu.cmg-theme-dark .cmg-menu-item,
.cmg-menu.cmg-theme-dark .cmg-flip-ingredients,
.cmg-menu.cmg-theme-dark .cmg-ingredients-picker {
  background: var(--cmg-surface);
}

.cmg-menu.cmg-theme-dark .cmg-classic-empty {
  color: var(--cmg-muted);
  border-color: rgba(255, 255, 255, 0.12);
}

.cmg-menu.cmg-theme-dark .cmg-menu-item.is-highlighted {
  background: linear-gradient(180deg, var(--cmg-bg) 0%, color-mix(in srgb, var(--cmg-soft) 70%, var(--cmg-bg)) 100%);
}

.cmg-menu.cmg-theme-dark .cmg-supp-popup {
  background: #111827;
  color: #f3f4f6;
}

.cmg-menu.cmg-theme-dark .cmg-supp-popup-head,
.cmg-menu.cmg-theme-dark .cmg-supp-popup-foot {
  border-color: rgba(255, 255, 255, 0.08);
}

.cmg-menu.cmg-theme-dark .cmg-supp-popup-list li {
  border-color: rgba(255, 255, 255, 0.08);
}

.cmg-menu.cmg-theme-dark .cmg-supp-popup-list small,
.cmg-menu.cmg-theme-dark .cmg-supp-popup-close {
  color: #9ca3af;
}
