@media (max-width: 760px) {
  .market-home-body .marketplace-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
  }

  .market-home-body .marketplace-actions--top {
    position: static;
    transform: none;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-self: end;
    flex: 0 0 auto;
    width: auto;
    margin-left: auto;
    gap: 8px;
    justify-content: flex-end;
  }

  .market-home-body .marketplace-actions--top a,
  .market-home-body .marketplace-actions--top .telegram-login-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    flex: 0 0 42px;
    padding: 0;
    border-radius: 50%;
  }

  .market-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .market-product-card {
    min-width: 0;
    min-height: 0;
    grid-template-rows: auto auto;
  }

  .market-product-visual {
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
    border-radius: 18px 18px 14px 14px;
  }

  .market-product-visual img {
    object-fit: cover;
    object-position: center;
  }

  .market-product-info {
    min-height: 118px;
  }
}

@media (max-width: 620px) {
  .custom-product-detail .product-market-shell,
  .custom-product-detail .product-detail-shell,
  .custom-product-detail .configurator-workspace,
  .custom-product-detail .creation-preview-canvas,
  .custom-product-detail .configurator-panel {
    box-sizing: border-box;
    max-width: 100%;
  }

  .custom-product-detail .product-market-shell {
    width: min(100% - 16px, 560px);
    margin: 8px auto;
    padding: 14px;
    overflow: hidden;
  }

  .custom-product-detail .product-detail-shell,
  .custom-product-detail .configurator-workspace {
    width: 100%;
    overflow: visible;
  }

  .custom-product-detail .creation-preview-canvas {
    width: 100%;
    min-height: min(58vh, 430px);
    overflow: hidden;
  }

  .custom-product-detail #previewCanvas {
    left: 0;
    width: 100%;
    max-width: 100%;
    height: min(58vh, 430px);
    display: block;
  }

  .custom-product-detail .configurator-panel {
    width: 100%;
    margin: -24px 0 0;
  }
}
