.dct-menu,
.dct-category-grid {
  box-sizing: border-box;
}

.dct-menu *,
.dct-category-grid * {
  box-sizing: border-box;
}

.dct-menu-page-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 72px;
}

.dct-menu-header {
  text-align: center;
  margin-bottom: 36px;
}

.dct-menu-header h1,
.dct-menu-subcategory-title {
  color: #315f3d;
}

.dct-menu-subcategory {
  margin: 46px 0 0;
}

.dct-menu-subcategory-title {
  text-align: center;
  margin: 0 0 24px;
}

.dct-menu-row {
  display: grid;
  gap: 26px;
  margin: 0 0 28px;
}

.dct-menu-row.dct-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dct-menu-row.dct-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dct-menu-row.dct-cols-1 {
  grid-template-columns: minmax(0, 1fr);
}

.dct-menu-item {
  min-width: 0;
  background: #fff;
  overflow: hidden;
}

.dct-menu-item-image,
.dct-menu-item .dct-image-placeholder {
  display: block;
  width: 100%;
  object-fit: cover;
  border-radius: 6px;
  background: #eef1ec;
}

/* Row-aware normalized image heights. These are user-configurable in Menu Manager. */
.dct-menu-row.dct-cols-1 .dct-menu-item-image,
.dct-menu-row.dct-cols-1 .dct-image-placeholder {
  height: var(--dct-item-image-height-1col, 420px);
  min-height: var(--dct-item-image-height-1col, 420px);
}

.dct-menu-row.dct-cols-2 .dct-menu-item-image,
.dct-menu-row.dct-cols-2 .dct-image-placeholder {
  height: var(--dct-item-image-height-2col, 320px);
  min-height: var(--dct-item-image-height-2col, 320px);
}

.dct-menu-row.dct-cols-3 .dct-menu-item-image,
.dct-menu-row.dct-cols-3 .dct-image-placeholder {
  height: var(--dct-item-image-height-3col, 260px);
  min-height: var(--dct-item-image-height-3col, 260px);
}

.dct-menu-item-body {
  padding: 14px 2px 0;
}

.dct-menu-item-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.dct-menu-item-title {
  margin: var(--dct-label-margin, 0 0 7px 0);
  font-family: var(--dct-label-font-family, inherit);
  font-size: var(--dct-label-font-size, 18px);
  line-height: 1.25;
  color: #315f3d;
}

.dct-menu-item-price {
  white-space: nowrap;
  font-weight: 700;
}

.dct-menu-item-description {
  margin: var(--dct-description-margin, 0);
  font-family: var(--dct-description-font-family, inherit);
  font-size: var(--dct-description-font-size, 16px);
}

.dct-menu-item-description p {
  margin: 0;
  font: inherit;
}

.dct-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 62px;
  align-items: stretch;
}

.dct-category-card {
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  color: inherit;
}

.dct-category-image,
.dct-category-card .dct-image-placeholder {
  display: block;
  width: 100%;
  height: var(--dct-category-image-height, 180px);
  object-fit: cover;
  border-radius: 6px;
  background: #eef1ec;
}

.dct-category-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  background: #315f3d;
  color: #fff;
  font-weight: 700;
  text-align: center;
}

.dct-menu-error,
.dct-menu-empty {
  padding: 16px;
  border: 1px solid #c3c4c7;
  background: #fff;
}

@media (max-width: 980px) {
  .dct-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }

  .dct-menu-row.dct-cols-3,
  .dct-menu-row.dct-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dct-menu-row.dct-cols-3 .dct-menu-item-image,
  .dct-menu-row.dct-cols-3 .dct-image-placeholder,
  .dct-menu-row.dct-cols-2 .dct-menu-item-image,
  .dct-menu-row.dct-cols-2 .dct-image-placeholder {
    height: var(--dct-item-image-height-2col, 320px);
    min-height: var(--dct-item-image-height-2col, 320px);
  }
}

@media (max-width: 620px) {
  .dct-menu-page-inner {
    width: min(100% - 28px, 1180px);
    padding-top: 32px;
  }

  .dct-category-grid,
  .dct-menu-row.dct-cols-3,
  .dct-menu-row.dct-cols-2,
  .dct-menu-row.dct-cols-1 {
    grid-template-columns: minmax(0, 1fr);
  }

  .dct-menu-row {
    gap: 22px;
  }

  .dct-menu-row.dct-cols-3 .dct-menu-item-image,
  .dct-menu-row.dct-cols-3 .dct-image-placeholder,
  .dct-menu-row.dct-cols-2 .dct-menu-item-image,
  .dct-menu-row.dct-cols-2 .dct-image-placeholder,
  .dct-menu-row.dct-cols-1 .dct-menu-item-image,
  .dct-menu-row.dct-cols-1 .dct-image-placeholder {
    height: var(--dct-item-image-height-1col, 420px);
    min-height: var(--dct-item-image-height-1col, 420px);
  }
}
