.menu-calculator-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e7e7e7;
}

.menu-calculator-controls__count {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-calculator-controls__label {
  font-size: 14px;
  line-height: 1;
  color: #818181;
  white-space: nowrap;
}

.menu-calculator-controls__count input {
  width: 64px;
  height: 38px;
  padding: 8px 10px;
  font-size: 15px;
  line-height: 1;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.menu-calculator-controls__add {
  flex-shrink: 0;
  height: 38px;
  padding: 0 18px;
  font-size: 15px;
  line-height: 38px;
  color: #c29d63;
  background: #fff;
  border: 1px solid #c29d63;
  border-radius: 4px;
  cursor: pointer;
}

.menu-calculator-controls__add:hover,
.menu-calculator-controls__add:focus {
  color: #fff;
  background: #c29d63;
}

.menu-estimate-basket {
  position: fixed;
  top: 50%;
  right: 15px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  color: #c29d63;
  background-color: #fff;
  border: 1px solid #c39d6380;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  text-decoration: none;
  transform: translateY(-50%);
  z-index: 20;
}

.menu-estimate-basket img {
  width: 24px;
  height: 24px;
}

.menu-estimate-basket__text {
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
}

.menu-estimate-basket .count {
  position: absolute;
  top: -8px;
  right: -4px;
  display: none;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background-color: #c29d63;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(194, 157, 99, 0.35);
}

.menu-estimate-basket .count.is-visible {
  display: flex;
  justify-content: center;
  align-items: center;
}

.menu-estimate-form {
  margin-top: 24px;
}

.menu-estimate-info {
  gap: 20px;
  margin-bottom: 20px;
}

.menu-estimate-info-item {
  flex: 1 1 calc(50% - 10px);
  max-width: calc(50% - 10px);
}

.event-header-brand {
  gap: 16px;
  align-items: center;
}

.event-logo {
  max-width: 140px;
  height: auto;
}

.event-header-qr {
  gap: 10px;
}

.event-qr {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e7e7e7;
  border-radius: 6px;
}

.event-qr--placeholder {
  background:
    linear-gradient(45deg, #f3f3f3 25%, transparent 25%, transparent 75%, #f3f3f3 75%, #f3f3f3),
    linear-gradient(45deg, #f3f3f3 25%, transparent 25%, transparent 75%, #f3f3f3 75%, #f3f3f3);
  background-position: 0 0, 8px 8px;
  background-size: 16px 16px;
}

.menu-estimate-info-item--full {
  margin-bottom: 24px;
}

.menu-estimate-info-item label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  color: #818181;
}

.menu-estimate-info-item input,
.menu-estimate-info-item textarea {
  width: 100%;
  padding: 15px 14px;
  font-size: 15px;
  line-height: 18px;
  color: #000;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.menu-estimate-btn {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 30px;
}

.menu-estimate-btn .download,
.menu-estimate-btn button {
  padding: 10px 20px;
  font-size: 16px;
  line-height: 1.2;
  color: #fff;
  background-color: #c29d63;
  border: 1px solid #c29d63;
  cursor: pointer;
}

.menu-estimate-btn .download--secondary {
  color: #c29d63;
  background-color: #fff;
}

.menu-estimate-empty {
  padding: 40px 20px;
  font-size: 18px;
  line-height: 1.5;
  text-align: center;
  color: #818181;
}

.menu-estimate > .container {
  width: 100% !important;
  max-width: 1560px;
}

.menu-estimate .event {
  max-width: 1560px;
  width: 100%;
  margin-top: 40px;
  margin-inline: auto;
  padding: 32px 40px;
}

.menu-estimate-pdf-info {
  margin-block: 40px 24px;
}

.menu-estimate-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.menu-estimate-table .event-menu-item.flex {
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
}

.menu-estimate-table .event-menu-item {
  display: flex;
  align-items: stretch;
}

.menu-estimate-table .event-menu-item > div:not(.remove) {
  flex-shrink: 0;
  border-top: none;
  border-bottom: 1px solid #c39d633d;
  border-left: none;
  border-right: 1px solid #c39d633d;
}

.menu-estimate-table .event-menu-item > .num {
  border-left: 1px solid #c39d633d;
}

.menu-estimate-table .event-menu-item:first-child > .num {
  border-left: 1px solid #fff;
}

.menu-estimate-table .event-menu-item .num {
  flex: 0 0 48px;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
}

.menu-estimate-table .event-menu-item .photo {
  flex: 0 0 116px;
  width: 116px;
  min-width: 116px;
  max-width: 116px;
  overflow: hidden;
  padding: 8px;
  border-left: none;
}

.menu-estimate-table .event-menu-item:first-child > .photo {
  border-left: none;
}

.menu-estimate-table .event-menu-item .name {
  flex: 1 1 160px;
  width: auto;
  min-width: 140px;
  max-width: none;
  justify-content: flex-start;
  text-align: left;
}

.menu-estimate-table .event-menu-item .composition {
  flex: 1 1 180px;
  width: auto;
  min-width: 140px;
  max-width: none;
  justify-content: flex-start;
  text-align: left;
  font-size: 14px;
  line-height: 1.35;
}

.menu-estimate-table .event-menu-item .unit {
  flex: 0 0 70px;
  width: 70px;
  max-width: 70px;
}

.menu-estimate-table .event-menu-item .count {
  flex: 0 0 110px;
  width: 110px;
  max-width: 110px;
}

.menu-estimate-table .event-menu-item .weight,
.menu-estimate-table .event-menu-item .weight-total {
  flex: 0 0 90px;
  width: 90px;
  max-width: 90px;
}

.menu-estimate-table .event-menu-item .price {
  flex: 0 0 100px;
  width: 100px;
  max-width: 100px;
}

.menu-estimate-table .event-menu-item .sum {
  flex: 0 0 110px;
  width: 110px;
  max-width: 110px;
}

.menu-estimate-table .event-menu-item[data-id] {
  position: relative;
}

.menu-estimate-table .event-menu-item[data-id] > .sum {
  border-right: 1px solid #c39d633d;
}

.menu-estimate-table .event-menu-item .photo img,
.menu-estimate-photo {
  display: block;
  width: 100px;
  height: 100px;
  max-width: 100px;
  max-height: 100px;
  object-fit: cover;
  border-radius: 4px;
}

.menu-estimate-table .event-menu-item .remove {
  position: absolute;
  top: 0;
  right: 0;
  transform: translateY(0);
}

.menu-estimate-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 991px) {
  .menu-estimate > .container {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
  }

  .menu-estimate .event {
    padding: 24px 20px;
  }

  .menu-estimate-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .menu-estimate-table .event-menu-item.flex {
    min-width: 1100px;
  }

  .menu-estimate-pdf-info.event-info {
    flex-wrap: wrap;
    margin-block: 24px 16px;
  }

  .menu-estimate-pdf-info .event-info-item {
    flex: 1 1 50%;
    border-right: 1px solid #c39d638f;
    border-bottom: 1px solid #c39d638f;
  }

  .menu-estimate-pdf-info .event-info-item:nth-child(2n) {
    border-right: none;
  }

  .menu-estimate-pdf-info .event-info-item:nth-last-child(-n + 2) {
    border-bottom: none;
  }

  .event-header-brand {
    width: 100%;
  }

  .menu-estimate .event-header {
    flex-wrap: wrap;
    gap: 16px;
  }

  .menu-estimate .event-header h2 {
    width: 100%;
    font-size: 28px !important;
    line-height: 32px !important;
  }

  .menu-estimate-table .event-menu-item:first-child div {
    font-size: 13px;
    padding: 10px 8px;
  }

  .menu-estimate-table .event-menu-item-footer {
    flex-wrap: wrap;
    gap: 12px;
    font-size: 16px;
  }
}

@media (max-width: 767px) {
  .menu-estimate-basket__text {
    display: none;
  }

  .menu-calculator-controls {
    flex-wrap: wrap;
  }

  .menu-estimate-btn {
    flex-direction: column;
  }

  .menu-estimate-info {
    flex-direction: column;
  }

  .menu-estimate-info-item {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .event-qr {
    width: 56px;
    height: 56px;
  }

  .menu-estimate-pdf-info .event-info-item {
    flex: 1 1 100%;
    border-right: none;
  }

  .menu-estimate-table .event-menu-item[data-id] .num {
    display: none;
  }

  .menu-estimate-table .event-menu-item[data-id] .composition,
  .menu-estimate-table .event-menu-item[data-id] .unit,
  .menu-estimate-table .event-menu-item[data-id] .count,
  .menu-estimate-table .event-menu-item[data-id] .weight,
  .menu-estimate-table .event-menu-item[data-id] .weight-total,
  .menu-estimate-table .event-menu-item[data-id] .price,
  .menu-estimate-table .event-menu-item[data-id] .sum {
    flex: 1 1 50%;
    width: 50%;
    max-width: 50%;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eee;
    font-size: 15px;
    line-height: 1.3;
  }

  .menu-estimate-table .event-menu-item[data-id] .composition::before,
  .menu-estimate-table .event-menu-item[data-id] .unit::before,
  .menu-estimate-table .event-menu-item[data-id] .count::before,
  .menu-estimate-table .event-menu-item[data-id] .weight::before,
  .menu-estimate-table .event-menu-item[data-id] .weight-total::before,
  .menu-estimate-table .event-menu-item[data-id] .price::before,
  .menu-estimate-table .event-menu-item[data-id] .sum::before {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    line-height: 1.2;
    color: #818181;
  }

  .menu-estimate-table .event-menu-item[data-id] .composition::before {
    content: "Состав";
  }

  .menu-estimate-table .event-menu-item[data-id] .unit::before {
    content: "Ед. изм.";
  }

  .menu-estimate-table .event-menu-item[data-id] .count::before {
    content: "Количество";
  }

  .menu-estimate-table .event-menu-item[data-id] .weight::before {
    content: "Грамм";
  }

  .menu-estimate-table .event-menu-item[data-id] .weight-total::before {
    content: "Итого грамм";
  }

  .menu-estimate-table .event-menu-item[data-id] .price::before {
    content: "Цена";
  }

  .menu-estimate-table .event-menu-item[data-id] .sum::before {
    content: "Сумма";
  }

  .menu-estimate .event {
    padding: 20px 12px;
    margin-top: 24px;
  }

  .menu-estimate .event-header h2 {
    font-size: 24px !important;
    line-height: 28px !important;
  }

  .menu-estimate .event-info-desc {
    padding-bottom: 24px;
  }

  .menu-estimate-table {
    overflow-x: visible;
  }

  .menu-estimate-table .event-menu-item.flex {
    min-width: 0;
  }

  .menu-estimate-table > .event-menu-item:first-child {
    display: none;
  }

  .menu-estimate-table .event-menu-item-header {
    padding: 10px 14px;
    font-size: 18px;
    border-radius: 8px 8px 0 0;
  }

  .menu-estimate-table .event-menu-item[data-id] {
    flex-wrap: wrap;
    position: relative;
    gap: 0;
    margin-bottom: 12px;
    padding: 14px 44px 14px 14px;
    background: #fff;
    border: 1px solid #c39d633d;
    border-radius: 8px;
  }

  .menu-estimate-table .event-menu-item[data-id] > div {
    border: none;
    padding: 0;
    text-align: left;
  }

  .menu-estimate-table .event-menu-item[data-id] .photo {
    flex: 0 0 116px;
    width: 116px;
    min-width: 116px;
    max-width: 116px;
    padding: 8px;
    margin-right: 12px;
  }

  .menu-estimate-table .event-menu-item[data-id] .photo img,
  .menu-estimate-table .event-menu-item[data-id] .menu-estimate-photo {
    width: 100px;
    height: 100px;
    max-width: 100px;
    max-height: 100px;
  }

  .menu-estimate-table .event-menu-item[data-id] .name {
    flex: 1 1 calc(100% - 128px);
    width: auto;
    max-width: none;
    align-items: flex-start;
    justify-content: center;
    min-height: 100px;
    padding-right: 8px;
    font-size: 18px;
    line-height: 1.3;
  }

  .menu-estimate-table .event-menu-item[data-id] .remove {
    top: 14px;
    right: 10px;
    transform: none;
  }

  .menu-estimate-table .event-menu-item[data-id] .count {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .menu-estimate-table .event-menu-item[data-id] .count::before {
    flex: 1 1 100%;
  }

  .menu-estimate-table .event-menu-item[data-id] .count .count-btn,
  .menu-estimate-table .event-menu-item[data-id] .count .count-value {
    margin-top: 0;
  }

  .menu-estimate-table .event-menu-item[data-id] .sum {
    font-weight: 600;
    color: #c29d63;
  }

  .menu-estimate-table .event-menu-item-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px 16px;
    font-size: 16px;
    text-align: center;
  }

  .menu-estimate-table .event-menu-item-footer .total {
    font-size: 18px;
  }
}

@media (max-width: 479px) {
  .menu-estimate-table .event-menu-item[data-id] .composition,
  .menu-estimate-table .event-menu-item[data-id] .unit,
  .menu-estimate-table .event-menu-item[data-id] .count,
  .menu-estimate-table .event-menu-item[data-id] .weight,
  .menu-estimate-table .event-menu-item[data-id] .weight-total,
  .menu-estimate-table .event-menu-item[data-id] .price,
  .menu-estimate-table .event-menu-item[data-id] .sum {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }

  .menu-estimate-basket {
    top: auto;
    bottom: 20px;
    right: 12px;
    transform: none;
    padding: 10px 14px;
  }
}
