body.smart-cart-panel-scroll-lock {
  overflow: hidden;
}

.smart-cart-panel {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}

.smart-cart-panel.is-open {
  opacity: 1;
  pointer-events: auto;
}

.smart-cart-panel__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}

.smart-cart-panel__sheet {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 24px));
  max-height: min(88vh, 760px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.28);
  border: 1px solid #e5e7eb;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.smart-cart-panel__header,
.smart-cart-panel__footer {
  padding: 16px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.smart-cart-panel__header h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.smart-cart-panel__footer {
  border-bottom: 0;
  border-top: 1px solid #eee;
  justify-content: flex-end;
}

.smart-cart-panel__body {
  overflow: auto;
  padding: 12px;
}

.smart-cart-panel__item {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #ececec;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #f7f5f2;
}

.smart-cart-panel__item-main {
  min-width: 0;
}

.smart-cart-panel__item-size {
  font-size: 12px;
  color: #4b5563;
}

.smart-cart-panel__item-thumb {
  width: 76px;
  position: relative;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.smart-cart-panel__item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.smart-cart-panel__item-thumb-placeholder {
  font-size: 22px;
  line-height: 1;
}

.smart-cart-panel__item-thumb-spinner {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  width: 30px;
  height: 30px;
  border: 4px solid #53514f;
  border-top-color: #ffffff;
  border-radius: 999px;
  background: rgba(0, 0, 0, .35);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .2);
  animation: smart-cart-spin .8s linear infinite;
}

@keyframes smart-cart-spin {
  to { transform: rotate(360deg); }
}


.smart-cart-panel__item-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: flex-end;
}

.smart-cart-panel__dislike-modal[hidden] {
  display: none;
}

.smart-cart-panel__dislike-modal {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.smart-cart-panel__dislike-sheet {
  width: min(640px, calc(100% - 24px));
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.smart-cart-panel__dislike-sheet h4 {
  margin: 0 0 4px;
}

.smart-cart-panel__feedback-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.smart-cart-panel__feedback-column {
  display: grid;
  gap: 8px;
  align-content: start;
}

.smart-cart-panel__dislike-sheet label {
  font-size: 14px;
  color: #111827;
  display: flex;
  gap: 8px;
  align-items: center;
}

.smart-cart-panel__dislike-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 640px) {
  .smart-cart-panel__feedback-columns {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.smart-cart-panel__status {
  min-height: 42px;
  margin-bottom: 8px;
  color: #2f6d2f;
  line-height: 1.35;
}

.smart-cart-panel__status.is-error {
  color: #a33535;
}

.smart-cart-panel__persons p {
  margin: 0 0 8px;
  font-size: 13px;
  color: #4b5563;
}

.smart-cart-panel__persons-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.smart-cart-panel__persons-buttons button {
  border: 0;
  background: transparent;
  color: #111827;
  border-radius: 999px;
  min-width: 54px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  cursor: pointer;
}

.smart-cart-panel__person-svg {
  width: 38px;
  height: 26px;
  display: block;
}

.smart-cart-panel__person-svg--active {
  display: none;
}

.smart-cart-panel__persons-buttons button.is-active {
  border: 0;
  background: transparent;
}

.smart-cart-panel__persons-buttons button.is-active .smart-cart-panel__person-svg--default {
  display: none;
}

.smart-cart-panel__persons-buttons button.is-active .smart-cart-panel__person-svg--active {
  display: block;
}

.smart-cart-panel__satiety {
  margin-bottom: 12px;
}

.smart-cart-panel__satiety p {
  margin: 0 0 8px;
  font-size: 13px;
  color: #4b5563;
}

.smart-cart-panel__satiety-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.smart-cart-panel__satiety-buttons button {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.smart-cart-panel__satiety-buttons button.is-active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

@media (max-width: 768px) {
  .smart-cart-panel__sheet {
    width: min(100%, calc(100% - 12px));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: min(82vh, 620px);
    border-radius: 14px;
  }
  .smart-cart-panel__item {
    grid-template-columns: 62px 1fr auto;
  }

  .smart-cart-panel__item-thumb {
    width: 62px;
    height: 48px;
  }
}
