/**
 * MigMarket — специфика раздела (карточки, сетки, маркет-UI).
 * Подключать после: variables.css, base.css, platform_page.css
 */

/* =============================================================================
   Главная /market (market-home-page) — только специфика секций
   ============================================================================= */

body.market-page.market-home-page .market-sections {
  padding-bottom: 4px;
}

body.market-page.market-home-page .market-sections--wide {
  display: block;
}

body.market-page.market-home-page .mig-market-page {
  gap: 16px;
}

body.market-page.market-home-page .mig-market-page .services-page__hero,
body.market-page.market-favorites-page .mig-market-page .services-page__hero,
body.market-page.market-orders-page .mig-market-page .services-page__hero {
  margin: 0;
  padding: 22px 20px;
  border-radius: var(--mp-radius-lg, 18px);
  border: 1px solid var(--mp-border-soft);
  background: linear-gradient(135deg, var(--mp-surface) 0%, var(--mp-surface-muted) 100%);
  box-shadow: var(--mp-shell-shadow);
}

body.market-page.market-home-page .mig-market-page .services-page__title,
body.market-page.market-favorites-page .mig-market-page .services-page__title,
body.market-page.market-orders-page .mig-market-page .services-page__title {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--mp-text);
}

body.market-page.market-home-page .mig-market-page .services-page__lead,
body.market-page.market-favorites-page .mig-market-page .services-page__lead,
body.market-page.market-orders-page .mig-market-page .services-page__lead {
  max-width: 62ch;
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--mp-text-secondary);
}

body.market-page.market-home-page .mig-market-page .services-page__hero,
body.market-page.market-home-page .mig-market-page .services-page__title,
body.market-page.market-home-page .mig-market-page .services-page__lead,
body.market-page.market-home-page .mig-market-page .site-page__cta {
  opacity: 1;
  visibility: visible;
  transform: none;
  animation: none;
  transition: none;
}

body.market-page.market-home-page .mig-market-page .services-page__lead {
  max-width: 720px;
  font-size: clamp(15px, 2.4vw, 18px);
  contain: none;
}

body.market-page .site-page__section-title {
  margin: 0 0 12px;
  color: var(--mp-text);
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

body.market-page .site-page__section-title--body,
body.market-page .site-page__section-title--catalog,
body.market-page .site-page__section-title--faq {
  margin-top: 0;
}

body.market-page .site-page__steps {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--mp-text-secondary);
  font-size: 15px;
  line-height: 1.55;
}

body.market-page .site-page__steps li + li {
  margin-top: 6px;
}

body.market-page .site-page__faq {
  display: grid;
  gap: 12px;
}

body.market-page .site-page__faq-item {
  padding: 15px 16px 16px;
  border-radius: 16px;
  border: 1px solid var(--mp-border-soft);
  background: var(--mp-surface-muted);
}

body.market-page .site-page__faq-question {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--mp-text);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

body.market-page .site-page__faq-question::-webkit-details-marker {
  display: none;
}

body.market-page .site-page__faq-question::after {
  content: '+';
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--mp-accent);
  font-weight: 800;
}

body.market-page .site-page__faq-item[open] .site-page__faq-question::after {
  content: '−';
}

body.market-page .site-page__faq-answer {
  margin: 8px 0 0;
  color: var(--mp-text-secondary);
  font-size: 15px;
  line-height: 1.55;
}

body.market-page .site-page__faq-question:focus-visible,
body.market-page .market-action-card.card--action:focus-visible,
body.market-page .market-product__btn:focus-visible,
body.market-page .site-page__cta:focus-visible {
  outline: 2px solid var(--mp-accent);
  outline-offset: 3px;
}

body.market-page.market-home-page .mig-market-page .mig-landing__cta,
body.market-page.market-favorites-page .mig-market-page .mig-landing__cta,
body.market-page.market-orders-page .mig-market-page .mig-landing__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  width: 175px;
  padding: 0 18px;
  margin-top: 20px;
  border-radius: 12px;
  border: 1px solid var(--mp-accent-border);
  background: var(--mp-accent);
  color: var(--mp-accent-contrast);
  font-size: 13px;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

body.market-page.market-home-page .mig-market-page .mig-landing__cta:hover,
body.market-page.market-favorites-page .mig-market-page .mig-landing__cta:hover,
body.market-page.market-orders-page .mig-market-page .mig-landing__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

body.market-page.market-home-page .mig-market-page__products,
body.market-page.market-favorites-page .mig-market-page__products {
  padding-bottom: 4px;
}

body.market-page.market-home-page .market-product-filter-toolbar {
  width: 100%;
  min-width: 0;
  margin: 12px 0 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

body.market-page.market-home-page .market-product-filter-toolbar__label {
  display: block;
  margin: 0 0 8px;
  color: var(--mp-muted, #667085);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
}

body.market-page.market-home-page .market-product-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  min-width: 0;
  overflow: visible;
  padding: 0;
}

body.market-page.market-home-page .market-product-filter__chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  max-width: 100%;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(47, 60, 150, 0.18);
  background: #fff;
  color: var(--mp-text, #273052);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 1px rgba(39, 48, 82, 0.04);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

body.market-page.market-home-page .market-product-filter__chip:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--mp-accent) 34%, rgba(255, 255, 255, 0.22));
  color: var(--mp-text, #273052);
  background: #f8faff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

body.market-page.market-home-page .market-product-filter__chip.is-active {
  border-color: var(--mp-accent-border);
  background: color-mix(in srgb, var(--mp-accent) 16%, var(--mp-surface) 84%);
  color: var(--mp-text);
  box-shadow: 0 7px 18px rgba(61, 74, 158, 0.12);
}

@media (max-width: 600px) {
  body.market-page.market-home-page .market-product-filter-toolbar {
    margin-top: 10px;
    margin-bottom: 16px;
  }

  body.market-page.market-home-page .market-product-filter-toolbar__label {
    margin-bottom: 7px;
  }

  body.market-page.market-home-page .market-product-filter {
    gap: 6px;
  }

  body.market-page.market-home-page .market-product-filter__chip {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
  }
}

body.market-page .market-page__notes {
  margin-top: 2px;
  padding: 0 2px;
}

body.market-page .market-page__notes p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--mp-text-secondary);
}

body.market-page .market-page__notes p + p {
  margin-top: 4px;
}

body.market-page.market-home-page .cards-grid--products--wide,
body.market-page.market-favorites-page .cards-grid--products--wide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

@media (max-width: 900px) {
  body.market-page.market-home-page .cards-grid--products--wide,
  body.market-page.market-favorites-page .cards-grid--products--wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  body.market-page.market-home-page .cards-grid--products--wide,
  body.market-page.market-favorites-page .cards-grid--products--wide {
    grid-template-columns: 1fr;
  }
}

body.market-page.market-home-page .cards-grid--products--wide .product-card.mtl-product-card,
body.market-page .market-recent .product-card.mtl-product-card,
body.market-page .market-catalog .product-card.mtl-product-card,
body.market-page .market-favorites .product-card.mtl-product-card {
  min-height: 260px;
  padding: 20px 20px 16px;
  border-radius: var(--mp-radius-md);
  border: 1px solid var(--mp-border);
  background: var(--mp-surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: none;
}

body.market-page.market-home-page .cards-grid--products--wide .product-card .mtl-product-top,
body.market-page .market-recent .product-card .mtl-product-top,
body.market-page .market-catalog .product-card .mtl-product-top,
body.market-page .market-favorites .product-card .mtl-product-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 0 !important;
  margin-bottom: 0 !important;
}

body.market-page.market-home-page .cards-grid--products--wide .mtl-product-author,
body.market-page .market-recent .mtl-product-author,
body.market-page .market-catalog .mtl-product-author,
body.market-page .market-favorites .mtl-product-author {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body.market-page.market-home-page .cards-grid--products--wide .mtl-product-seller,
body.market-page .market-recent .mtl-product-seller,
body.market-page .market-catalog .mtl-product-seller,
body.market-page .market-favorites .mtl-product-seller {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  color: var(--mp-seller-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 12rem;
}

body.market-page.market-home-page .cards-grid--products--wide .mtl-product-author-icon,
body.market-page .market-recent .mtl-product-author-icon,
body.market-page .market-catalog .mtl-product-author-icon,
body.market-page .market-favorites .mtl-product-author-icon {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  border: none !important;
  outline: none;
  box-shadow: none;
  object-fit: cover;
}

body.market-page.market-home-page .cards-grid--products--wide .product-card a.title,
body.market-page.market-home-page .cards-grid--products--wide .product-card .title.mtl-product-title,
body.market-page .market-recent .product-card a.title,
body.market-page .market-recent .product-card .title.mtl-product-title,
body.market-page .market-catalog .product-card a.title,
body.market-page .market-catalog .product-card .title.mtl-product-title,
body.market-page .market-favorites .product-card a.title,
body.market-page .market-favorites .product-card .title.mtl-product-title {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--mp-text);
  text-decoration: none;
  min-height: 0;
  margin-bottom: 0;
  word-break: break-word;
}

body.market-page.market-home-page .cards-grid--products--wide .product-card .desc,
body.market-page.market-home-page .cards-grid--products--wide .product-card .mtl-product-desc,
body.market-page .market-recent .product-card .desc,
body.market-page .market-recent .product-card .mtl-product-desc,
body.market-page .market-catalog .product-card .desc,
body.market-page .market-catalog .product-card .mtl-product-desc,
body.market-page .market-favorites .product-card .desc,
body.market-page .market-favorites .product-card .mtl-product-desc {
  font-size: 15px;
  line-height: 1.38;
  color: var(--mp-text-secondary);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  min-height: 0 !important;
  margin: 0 !important;
}

body.market-page.market-home-page .cards-grid--products--wide .product-card .footer,
body.market-page.market-home-page .cards-grid--products--wide .product-card .mtl-product-bottom,
body.market-page .market-recent .product-card .footer,
body.market-page .market-recent .product-card .mtl-product-bottom,
body.market-page .market-catalog .product-card .footer,
body.market-page .market-catalog .product-card .mtl-product-bottom,
body.market-page .market-favorites .product-card .footer,
body.market-page .market-favorites .product-card .mtl-product-bottom {
  margin-top: auto !important;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 0;
}

body.market-page.market-home-page .cards-grid--products--wide .mtl-product-price,
body.market-page .market-recent .mtl-product-price,
body.market-page .market-catalog .mtl-product-price,
body.market-page .market-favorites .mtl-product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

body.market-page.market-home-page .cards-grid--products--wide .mtl-product-price-value,
body.market-page .market-recent .mtl-product-price-value,
body.market-page .market-catalog .mtl-product-price-value,
body.market-page .market-favorites .mtl-product-price-value {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--mp-warning-fg) !important;
}

body.market-page.market-home-page .cards-grid--products--wide .mtl-product-price-unit,
body.market-page .market-recent .mtl-product-price-unit,
body.market-page .market-catalog .mtl-product-price-unit,
body.market-page .market-favorites .mtl-product-price-unit {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--mp-warning-fg) !important;
}

body.market-page.market-home-page .cards-grid--products--wide .mtl-product-favorite-btn,
body.market-page .market-recent .mtl-product-favorite-btn,
body.market-page .market-catalog .mtl-product-favorite-btn,
body.market-page .market-favorites .mtl-product-favorite-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--mp-icon);
  height: var(--mp-icon);
  min-width: var(--mp-icon);
  min-height: var(--mp-icon);
  padding: 0;
  margin: 0;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  color: var(--mp-link-blue);
  transition: color 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

body.market-page.market-home-page .cards-grid--products--wide .mtl-product-favorite-btn:hover,
body.market-page .market-recent .mtl-product-favorite-btn:hover,
body.market-page .market-catalog .mtl-product-favorite-btn:hover,
body.market-page .market-favorites .mtl-product-favorite-btn:hover {
  background: var(--mp-favorite-hover-bg);
}

body.market-page.market-home-page .cards-grid--products--wide .mtl-product-favorite-btn.is-favorite,
body.market-page .market-recent .mtl-product-favorite-btn.is-favorite,
body.market-page .market-catalog .mtl-product-favorite-btn.is-favorite,
body.market-page .market-favorites .mtl-product-favorite-btn.is-favorite {
  color: var(--mp-link-blue-strong);
}

body.market-page.market-home-page .cards-grid--products--wide .mtl-product-favorite-btn .mtl-product-favorite-btn__icon,
body.market-page .market-recent .mtl-product-favorite-btn .mtl-product-favorite-btn__icon,
body.market-page .market-catalog .mtl-product-favorite-btn .mtl-product-favorite-btn__icon,
body.market-page .market-favorites .mtl-product-favorite-btn .mtl-product-favorite-btn__icon {
  display: block;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

/* =============================================================================
   Сервисы
   ============================================================================= */

body.market-page .market-service-item,
body.market-page .market-action-card.card--action,
body.market-page .product-card.mtl-product-card {
  border-radius: var(--mp-radius-md);
  border: 1px solid var(--mp-border);
  background: var(--mp-surface);
  box-shadow: none;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

body.market-page .market-service-item:hover,
body.market-page .market-action-card.card--action:hover,
body.market-page .product-card.mtl-product-card:hover {
  transform: translateY(-2px);
  border-color: var(--mp-accent-border);
  background: var(--mp-surface-muted);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

body.market-page .market-service-item {
  min-height: 118px;
  max-width: 31%;
  padding: 16px 14px 14px;
  background: var(--mp-surface-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  color: var(--mp-service-icon-text);
}

body.market-page .mtl-service__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none !important;
  outline: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
  line-height: 0;
}

body.market-page .mtl-service__icon img,
body.market-page .mtl-service__icon svg {
  width: var(--mp-icon);
  height: var(--mp-icon);
  min-width: var(--mp-icon);
  min-height: var(--mp-icon);
  max-width: var(--mp-icon);
  max-height: var(--mp-icon);
  object-fit: contain;
  opacity: 0.96;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  display: block;
}

body.market-page .mtl-service__label {
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  line-height: 1.15;
  color: var(--mp-title-muted);
}

body.market-page .market-service-item:hover {
  background: var(--mp-surface-muted);
}

/* =============================================================================
   Секции (две колонки → одна)
   ============================================================================= */

body.market-page .market-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

body.market-page .section-title {
  font-size: 17px;
  line-height: 1.3;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--mp-text-secondary);
  letter-spacing: 0.015em;
}

body.market-page .mtl-empty {
  color: var(--mp-text-secondary);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 0 12px;
  margin: 0;
}

/* =============================================================================
   Карточки товаров
   ============================================================================= */

body.market-page .cards-grid--products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

/* Карточки товара: главная / каталог / избранное */
body.market-page .market-recent .product-card.mtl-product-card,
body.market-page .market-catalog .product-card.mtl-product-card,
body.market-page .market-favorites .product-card.mtl-product-card {
  min-height: 260px;
  padding: 20px 20px 16px;
  border-radius: var(--mp-radius-md);
  border: 1px solid var(--mp-border);
  background: var(--mp-surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: none;
}

body.market-page .market-recent .product-card .mtl-product-top,
body.market-page .market-catalog .product-card .mtl-product-top,
body.market-page .market-favorites .product-card .mtl-product-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 0 !important;
  margin-bottom: 0 !important;
}

body.market-page .market-recent .mtl-product-author,
body.market-page .market-catalog .mtl-product-author,
body.market-page .market-favorites .mtl-product-author {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body.market-page .market-recent .mtl-product-seller,
body.market-page .market-catalog .mtl-product-seller,
body.market-page .market-favorites .mtl-product-seller {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  color: var(--mp-seller-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 12rem;
}

body.market-page .market-recent .mtl-product-author-icon,
body.market-page .market-catalog .mtl-product-author-icon,
body.market-page .market-favorites .mtl-product-author-icon {
  width: 28px !important;
  height: 28px !important;
  border: none !important;
  outline: none;
  box-shadow: none;
}

body.market-page .market-recent .product-card a.title,
body.market-page .market-recent .product-card .title.mtl-product-title,
body.market-page .market-catalog .product-card a.title,
body.market-page .market-catalog .product-card .title.mtl-product-title,
body.market-page .market-favorites .product-card a.title,
body.market-page .market-favorites .product-card .title.mtl-product-title {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--mp-text);
  text-decoration: none;
  min-height: 0;
  margin-bottom: 0;
}

body.market-page .market-recent .product-card .desc,
body.market-page .market-recent .product-card .mtl-product-desc,
body.market-page .market-catalog .product-card .desc,
body.market-page .market-catalog .product-card .mtl-product-desc,
body.market-page .market-favorites .product-card .desc,
body.market-page .market-favorites .product-card .mtl-product-desc {
  font-size: 15px;
  line-height: 1.38;
  color: var(--mp-text-secondary);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  min-height: 0 !important;
  margin: 0 !important;
}

body.market-page .market-recent .product-card .footer,
body.market-page .market-recent .product-card .mtl-product-bottom,
body.market-page .market-catalog .product-card .footer,
body.market-page .market-catalog .product-card .mtl-product-bottom,
body.market-page .market-favorites .product-card .footer,
body.market-page .market-favorites .product-card .mtl-product-bottom {
  margin-top: auto !important;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 0;
}

body.market-page .market-recent .mtl-product-price,
body.market-page .market-catalog .mtl-product-price,
body.market-page .market-favorites .mtl-product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

body.market-page .market-recent .mtl-product-price-value,
body.market-page .market-catalog .mtl-product-price-value,
body.market-page .market-favorites .mtl-product-price-value {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--mp-warning-fg) !important;
}

body.market-page .market-recent .mtl-product-price-unit,
body.market-page .market-catalog .mtl-product-price-unit,
body.market-page .market-favorites .mtl-product-price-unit {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--mp-warning-fg) !important;
}

body.market-page .market-recent .mtl-product-favorite-btn,
body.market-page .market-catalog .mtl-product-favorite-btn,
body.market-page .market-favorites .mtl-product-favorite-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--mp-icon);
  height: var(--mp-icon);
  min-width: var(--mp-icon);
  min-height: var(--mp-icon);
  padding: 0;
  margin: 0;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  color: var(--mp-link-blue);
  transition: color 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

body.market-page .market-recent .mtl-product-favorite-btn:hover,
body.market-page .market-catalog .mtl-product-favorite-btn:hover,
body.market-page .market-favorites .mtl-product-favorite-btn:hover {
  background: var(--mp-favorite-hover-bg);
}

body.market-page .market-recent .mtl-product-favorite-btn.is-favorite,
body.market-page .market-catalog .mtl-product-favorite-btn.is-favorite,
body.market-page .market-favorites .mtl-product-favorite-btn.is-favorite {
  color: var(--mp-link-blue-strong);
}

body.market-page .market-recent .mtl-product-favorite-btn .mtl-product-favorite-btn__icon,
body.market-page .market-catalog .mtl-product-favorite-btn .mtl-product-favorite-btn__icon,
body.market-page .market-favorites .mtl-product-favorite-btn .mtl-product-favorite-btn__icon {
  display: block;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

body.market-page .market-recent .mtl-product-favorite-btn .mtl-product-favorite-btn__heart,
body.market-page .market-catalog .mtl-product-favorite-btn .mtl-product-favorite-btn__heart,
body.market-page .market-favorites .mtl-product-favorite-btn .mtl-product-favorite-btn__heart {
  fill: none;
  stroke: currentColor;
}

body.market-page .market-recent .mtl-product-favorite-btn.is-favorite .mtl-product-favorite-btn__heart,
body.market-page .market-catalog .mtl-product-favorite-btn.is-favorite .mtl-product-favorite-btn__heart,
body.market-page .market-favorites .mtl-product-favorite-btn.is-favorite .mtl-product-favorite-btn__heart {
  fill: currentColor;
  stroke: none;
}

body.market-page .mtl-product-favorite-btn.is-favorite {
  color: var(--mp-accent);
  background: var(--mp-link-hover-bg);
  box-shadow:
    inset 0 0 0 1px var(--mp-accent-border),
    0 6px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px) scale(1.06);
}

body.market-page .mtl-product-favorite-btn.is-favorite:hover {
  background: var(--mp-link-hover-bg);
}

body.market-page .mtl-product-favorite-btn.is-favorite .mtl-product-favorite-btn__heart {
  fill: currentColor;
  stroke: none;
}

/* =============================================================================
   Страница каталога /market/catalog (только сетка; карточки — см. выше)
   ============================================================================= */

body.market-page.market-catalog-page .market-catalog {
  margin: 0;
}

body.market-page.market-catalog-page .market-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  padding-bottom: 4px;
}

@media (max-width: 900px) {
  body.market-page.market-catalog-page .market-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  body.market-page.market-catalog-page .market-catalog-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================================================
   Страница товара /product (контент внутри общего shell)
   ============================================================================= */

body.market-page.market-product-page .market-banners {
  margin-bottom: 10px;
}

body.market-page.market-product-page .market-product {
  margin: 0;
  padding: 0 0 8px;
  min-width: 0;
}

body.market-page.market-product-page .market-product-detail {
  margin: 0;
  min-width: 0;
  padding: 22px 20px;
  border-radius: var(--mp-radius-lg, 16px);
  border: 1px solid var(--mp-border-soft);
  background: linear-gradient(135deg, var(--mp-surface) 0%, var(--mp-surface-muted) 100%);
  box-shadow: var(--mp-shell-shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body.market-page.market-product-page .market-product__back {
  margin: 0;
  font-size: 15px;
}

body.market-page.market-product-page .market-product__back a {
  color: var(--mp-accent);
  font-weight: 500;
}

body.market-page.market-product-page .market-product__heading {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  color: var(--mp-text-secondary);
}

body.market-page.market-product-page .market-product__title {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 600;
  margin: 0;
  color: var(--mp-text);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

body.market-page.market-product-page .market-product__meta {
  margin: 0;
  font-size: 15px;
  color: var(--mp-text-secondary);
  line-height: 1.55;
}

body.market-page.market-product-page .market-product__seller {
  margin: 0;
  font-size: 15px;
  color: var(--mp-title-muted);
}

body.market-page.market-product-page .market-product__description {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--mp-body-text-soft);
}

body.market-page.market-product-page .market-product__price {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--mp-text);
}

body.market-page.market-product-page .market-product__banner {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--mp-radius-md, 14px);
  font-size: 14px;
  line-height: 1.4;
}

body.market-page.market-product-page .market-product__banner--error {
  color: var(--mp-error-fg);
  background: var(--mp-error-bg);
  border: 1px solid var(--mp-error-border);
}

body.market-page.market-product-page .market-product__banner--success {
  color: var(--mp-success-fg);
  background: var(--mp-success-bg);
  border: 1px solid var(--mp-success-border);
}

body.market-page.market-product-page .market-product__banner--muted {
  color: var(--mp-text-secondary);
  background: var(--mp-muted-panel-bg);
  border: 1px solid var(--mp-border-soft);
}

body.market-page.market-product-page .market-product__owned {
  margin-top: 4px;
}

body.market-page.market-product-page .market-product__after-success a,
body.market-page.market-product-page .market-product__actions a {
  color: var(--mp-accent);
  font-weight: 500;
}

body.market-page.market-product-page .market-product__form {
  margin-top: 0;
}

body.market-page .market-product__btn,
body.site-page .market-product__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: var(--mp-radius-md, 14px);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

body.market-page .market-product__btn:hover,
body.site-page .market-product__btn:hover {
  transform: translateY(-1px);
}

body.market-page .market-product__btn--primary,
body.site-page .market-product__btn--primary {
  background: var(--mp-accent);
  color: var(--mp-accent-contrast) !important;
  border-color: var(--mp-accent-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

body.market-page .market-product__btn--primary:hover,
body.site-page .market-product__btn--primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 8px 20px rgba(61, 74, 158, 0.16);
}

body.market-page .market-product__btn--secondary,
body.site-page .market-product__btn--secondary {
  background: var(--mp-surface);
  color: var(--mp-text) !important;
  border-color: var(--mp-border-soft);
}

body.market-page .market-product__btn--ghost,
body.site-page .market-product__btn--ghost {
  min-height: 30px;
  padding: 0 2px;
  border-color: transparent;
  background: transparent;
  color: var(--mp-text-secondary) !important;
}

body.market-page.market-orders-page .market-order-card {
  min-height: 0;
  padding: 18px 18px 16px;
  gap: 12px;
  border-radius: var(--mp-radius-lg, 18px);
  border: 1px solid var(--mp-border-soft);
  background: linear-gradient(180deg, var(--mp-surface) 0%, var(--mp-surface-muted) 100%);
  box-shadow: var(--mp-shell-shadow);
}

body.market-page.market-orders-page .market-order-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 2px;
}

body.market-page.market-orders-page .market-order-card__title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

body.market-page.market-orders-page .market-order-card__meta {
  font-size: 14px;
  line-height: 1.5;
  color: var(--mp-text-secondary);
}

body.market-page.market-orders-page .market-order-card__footer {
  justify-content: flex-end;
  padding-top: 0;
  margin-top: auto;
}

body.market-page.market-orders-page .market-order-card__materials {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--mp-border-soft);
}

body.market-page.market-orders-page .market-order-card__materials-collapse {
  display: block;
  margin: 0;
}

body.market-page.market-orders-page .market-order-card__materials-collapse > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(58, 72, 146, 0.08);
  color: var(--mp-link-blue-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background-color 160ms ease, transform 160ms ease;
}

body.market-page.market-orders-page .market-order-card__materials-collapse > summary:hover {
  transform: translateY(-1px);
  background: rgba(58, 72, 146, 0.12);
}

body.market-page.market-orders-page .market-order-card__materials-collapse[open] > summary {
  margin-bottom: 10px;
}

body.market-page.market-orders-page .market-order-card__materials-collapse > summary::marker {
  content: '';
}

body.market-page.market-orders-page .market-order-card__materials-collapse > summary::-webkit-details-marker {
  display: none;
}

body.market-page.market-orders-page .market-order-card__materials-collapse > summary::after {
  content: '▾';
  font-size: 11px;
  line-height: 1;
  opacity: 0.75;
}

body.market-page.market-orders-page .market-order-card__materials-collapse[open] > summary::after {
  content: '▴';
}

body.market-page.market-orders-page .market-order-card__materials-collapse > summary {
  margin: 0;
}

body.market-page.market-orders-page .market-order-card__materials-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 0;
}

body.market-page.market-orders-page .market-order-card__material-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

body.market-page.market-orders-page .market-order-card__material-row + .market-order-card__material-row {
  border-top: 1px solid var(--mp-border-soft);
}

body.market-page.market-orders-page .market-order-card__material-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.market-page.market-orders-page .market-order-card__material-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--mp-text);
  line-height: 1.3;
}

body.market-page.market-orders-page .market-order-card__material-state {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--mp-text-secondary);
}

body.market-page.market-orders-page .market-order-card__material-row .market-product__btn {
  flex: 0 0 auto;
  min-width: 156px;
}

body.market-page.market-orders-page .market-order-card__material-row .market-product__btn--primary {
  min-width: 120px;
}

body.market-page.market-favorites-page .market-favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0 0 4px;
}

@media (max-width: 900px) {
  body.market-page.market-favorites-page .market-favorites-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  body.market-page.market-favorites-page .market-favorites-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================================================
   Карточки действий (высота/отступы как у product-card)
   ============================================================================= */

body.services-page .site-page-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body.services-page .site-page-content .site-page__hero,
body.services-page .site-page-content .site-page__block--body,
body.services-page .site-page-content .site-page__block--text,
body.services-page .site-page-content .site-page__block--html,
body.services-page .site-page-content .site-page__block--products {
  margin: 0;
  padding: 18px 20px;
  border-radius: var(--mp-radius-lg, 18px);
  border: 1px solid var(--mp-border-soft);
  background: var(--mp-surface);
  box-shadow: var(--mp-shell-shadow);
}

body.services-page .site-page-content .site-page__hero {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

body.services-page .site-page-content .site-page__block--products {
  display: grid;
  gap: 14px;
}

body.services-page .site-page-content .cards-grid--actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  width: 100%;
}

body.services-page .site-page-content .site-page__block--body .platform-detail-body-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--mp-text-secondary);
}

body.services-page .site-page-content .contact-direct-card {
  display: grid;
  gap: 18px;
}

body.services-page .site-page-content .contact-direct-card__header {
  display: grid;
  gap: 8px;
  max-width: 680px;
}

body.services-page .site-page-content .contact-direct-card__eyebrow {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--mp-border-soft);
  background: var(--mp-surface-muted);
  color: var(--mp-text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

body.services-page .site-page-content .contact-direct-card h2 {
  margin: 0;
  color: var(--mp-text);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

body.services-page .site-page-content .contact-direct-card p {
  margin: 0;
  color: var(--mp-text-secondary);
  font-size: 15px;
  line-height: 1.55;
}

body.services-page .site-page-content .contact-direct-card a {
  color: var(--mp-accent);
  font-weight: 700;
  text-decoration: none;
}

body.services-page .site-page-content .contact-direct-card a:hover {
  text-decoration: underline;
}

body.services-page .site-page-content .contact-direct-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 760px;
}

body.services-page .site-page-content .contact-direct-form__field {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--mp-text);
  font-size: 14px;
  font-weight: 700;
}

body.services-page .site-page-content .contact-direct-form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

body.services-page .site-page-content .contact-direct-form__field--wide,
body.services-page .site-page-content .contact-direct-form__actions,
body.services-page .site-page-content .contact-direct-form__status {
  grid-column: 1 / -1;
}

body.services-page .site-page-content .contact-direct-form input,
body.services-page .site-page-content .contact-direct-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--mp-border);
  border-radius: 16px;
  background: var(--mp-surface-muted);
  color: var(--mp-text);
  font: inherit;
  font-weight: 500;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

body.services-page .site-page-content .contact-direct-form input {
  min-height: 48px;
  padding: 0 14px;
}

body.services-page .site-page-content .contact-direct-form textarea {
  min-height: 150px;
  padding: 14px;
  resize: vertical;
}

body.services-page .site-page-content .contact-direct-form input::placeholder,
body.services-page .site-page-content .contact-direct-form textarea::placeholder {
  color: color-mix(in srgb, var(--mp-text-secondary) 78%, transparent);
}

body.services-page .site-page-content .contact-direct-form input:focus,
body.services-page .site-page-content .contact-direct-form textarea:focus {
  border-color: var(--mp-accent-border);
  background: var(--mp-surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--mp-accent) 14%, transparent);
}

body.services-page .site-page-content .contact-direct-form__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

body.services-page .site-page-content .contact-direct-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--mp-accent-border);
  border-radius: 16px;
  background: var(--mp-accent);
  color: var(--mp-accent-contrast);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

body.services-page .site-page-content .contact-direct-form__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

body.services-page .site-page-content .contact-direct-form__submit:disabled {
  cursor: progress;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

body.services-page .site-page-content .contact-direct-form__actions p {
  max-width: 420px;
  font-size: 13px;
}

body.services-page .site-page-content .contact-direct-form__status {
  display: none;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--mp-border-soft);
  background: var(--mp-surface-muted);
  color: var(--mp-text-secondary);
  font-size: 14px;
  line-height: 1.45;
}

body.services-page .site-page-content .contact-direct-form__status.is-visible {
  display: block;
}

body.services-page .site-page-content .contact-direct-form__status.is-success {
  border-color: color-mix(in srgb, #0f8a5f 34%, var(--mp-border-soft));
  background: color-mix(in srgb, #0f8a5f 10%, var(--mp-surface));
  color: #0b5f43;
}

body.services-page .site-page-content .contact-direct-form__status.is-error {
  border-color: color-mix(in srgb, #b42318 34%, var(--mp-border-soft));
  background: color-mix(in srgb, #b42318 10%, var(--mp-surface));
  color: #8a1f16;
}

@media (max-width: 640px) {
  body.services-page .site-page-content .contact-direct-form {
    grid-template-columns: 1fr;
  }

  body.services-page .site-page-content .contact-direct-form__actions {
    align-items: stretch;
  }

  body.services-page .site-page-content .contact-direct-form__submit {
    width: 100%;
  }
}

body.services-page .site-page-content .market-action-card.card--action {
  min-height: 220px;
  padding: 20px calc(56px + 22px) 16px 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  border-radius: var(--mp-radius-md);
  border: 1px solid var(--mp-border);
  background: var(--mp-surface);
  box-shadow: none;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  width: 100%;
  min-width: 0;
}

body.services-page .site-page-content .market-action-card__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--mp-text);
}

body.services-page .site-page-content .market-action-card__desc {
  margin: 0;
  max-width: 52ch;
  font-size: 15px;
  line-height: 1.45;
  color: var(--mp-text-secondary);
}

body.services-page .site-page-content .market-action-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
  margin-top: auto;
}

body.services-page .site-page-content .market-action-card__price {
  font-size: 14px;
  font-weight: 700;
  color: var(--mp-warning-fg);
}

body.services-page .site-page-content .market-action-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 120px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--mp-accent);
  color: var(--mp-accent-contrast);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--mp-accent-border);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

body.services-page .site-page-content .market-action-card__cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 8px 20px rgba(61, 74, 158, 0.16);
}

body.services-page .site-page-content .market-action-card__icon {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.services-page .site-page-content .market-action-card__icon img,
body.services-page .site-page-content .market-action-card__icon svg {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.services-page .site-page-content .services-page__title {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--mp-text);
}

body.services-page .site-page-content .services-page__lead {
  margin: 0;
  max-width: 74ch;
  font-size: 15px;
  line-height: 1.65;
  color: var(--mp-text-secondary);
}

body.services-page .site-page-content .site-page__section-title {
  margin: 0 0 12px;
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--mp-text);
}

body.services-page .site-page-content .site-page__block--body .site-page__section-title {
  margin-bottom: 10px;
}

body.services-page .site-page-content .site-page__hero .mig-landing__cta {
  margin-top: 2px;
}

body.services-page .promo-page__body,
body.services-page .market-product-page__body,
body.services-page .market-order-detail-page__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.services-page .market-order-detail-page__hero {
  margin: 0;
}

body.services-page .market-order-detail-page__section,
body.services-page .market-order-detail-page__actions,
body.services-page .market-order-detail-page__rows,
body.services-page .market-order-detail-page__grid {
  margin-top: 0;
}

body.services-page .market-order-detail-page__table {
  width: 100%;
  border-collapse: collapse;
  border-color: var(--mp-border, #e6ebf2);
}

body.market-page .cards-grid--actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

body.market-page .market-action-card.card--action {
  min-height: 260px;
  padding: 20px calc(var(--mp-icon) + 28px) 16px 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  gap: 10px;
}

@media (max-width: 640px) {
  body.services-page .site-page-content .site-page__block--body,
  body.services-page .site-page-content .site-page__block--text,
  body.services-page .site-page-content .site-page__block--html,
  body.services-page .site-page-content .site-page__block--products {
    padding: 16px 14px;
  }

  body.services-page .site-page-content .cards-grid--actions {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  body.services-page .site-page-content .market-action-card.card--action {
    min-height: 240px;
    padding: 16px calc(48px + 16px) 14px 16px;
    gap: 8px;
  }

  body.services-page .site-page-content .market-action-card__icon {
    width: 24px;
    height: 24px;
    right: 12px;
    bottom: 12px;
  }

  body.services-page .site-page-content .market-action-card__title {
    font-size: 17px;
  }

  body.services-page .site-page-content .market-action-card__desc {
    font-size: 14px;
  }

  body.services-page .site-page-content .market-action-card__footer {
    flex-direction: column;
    align-items: flex-start;
  }

  body.services-page .site-page-content .market-action-card__cta {
    width: 100%;
  }
}

body.market-page .market-action-card__title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 0;
  color: var(--mp-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.2;
}

body.market-page .market-action-card__desc {
  font-size: 15px;
  line-height: 1.38;
  max-width: 100%;
  color: var(--mp-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

body.market-page .market-action-card__icon {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: var(--mp-icon);
  height: var(--mp-icon);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0;
  line-height: 0;
}

body.market-page .market-action-card__icon img,
body.market-page .market-action-card__icon svg {
  width: var(--mp-icon);
  height: var(--mp-icon);
  min-width: var(--mp-icon);
  min-height: var(--mp-icon);
  object-fit: contain;
  opacity: 0.94;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  display: block;
}

/* Нижняя навигация — см. platform_page.css */

/* =============================================================================
   Responsive: ≤980px
   ============================================================================= */

@media (max-width: 980px) {
  body.market-page .market-services {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* =============================================================================
   Responsive: ≤900px
   ============================================================================= */

@media (max-width: 900px) {
  body.market-page .market-sections {
    grid-template-columns: 1fr;
  }
}

/* =============================================================================
   Responsive: ≤600px
   ============================================================================= */

@media (max-width: 600px) {
  body.market-page .cards-grid--products {
    grid-template-columns: 1fr;
  }

  body.market-page .cards-grid--actions {
    grid-template-columns: 1fr;
  }

  body.market-page .market-services {
    gap: 10px;
  }

  body.market-page .market-service-item {
    max-width: 100%;
    width: 100%;
  }
}

/* =============================================================================
   Responsive: ≤480px
   ============================================================================= */

@media (max-width: 480px) {
  body.market-page .market-services {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Баннеры ≤420px — см. platform_page.css */

/* =============================================================================
   Responsive: ≤320px (маркет: горизонтальная лента сервисов)
   ============================================================================= */

@media (max-width: 320px) {
  body.market-page .market-services {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    margin: 0 0 16px;
    grid-template-columns: none;
  }

  body.market-page .market-service-item {
    flex: 0 0 auto;
    width: 92px;
    min-width: 92px;
    max-width: 92px;
    font-size: 10px;
  }

  body.market-page .mtl-service__label {
    font-size: 10px;
  }
}

/* =============================================================================
   Cart / checkout
   ============================================================================= */

body.market-page .mtl-product-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.market-page .mtl-product-cart-form {
  margin: 0;
}

body.market-page .market-product__action-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
}

body.market-page .market-product__action-stack .market-product__form {
  margin: 0;
}

body.market-page .market-cart-layout,
body.market-page .market-checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 18px;
  align-items: start;
}

body.market-page .market-cart-panel {
  border: 1px solid var(--mp-border);
  background: var(--mp-surface);
  border-radius: var(--mp-radius-lg, 18px);
  padding: 18px;
  box-shadow: var(--mp-shell-shadow);
}

body.market-page .market-cart-panel__title {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--mp-text);
}

body.market-page .market-cart-panel__rows {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

body.market-page .market-cart-panel__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--mp-text-secondary);
  font-size: 14px;
}

body.market-page .market-cart-panel__note,
body.market-page .market-cart__empty-copy {
  margin: 12px 0 0;
  color: var(--mp-text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

body.market-page .market-cart-panel__cta {
  display: inline-flex;
  margin-top: 16px;
}

body.market-page .market-cart-panel__clear {
  margin-top: 10px;
}

body.market-page .market-cart-panel__cta--disabled {
  color: var(--mp-text-secondary);
  font-size: 14px;
  font-weight: 600;
}

body.market-page .market-cart-banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--mp-radius-md, 14px);
  font-size: 14px;
  line-height: 1.5;
}

body.market-page .market-cart-banner--success {
  background: var(--mp-success-bg);
  color: var(--mp-success-fg);
  border: 1px solid var(--mp-success-border);
}

body.market-page .market-cart-banner--error {
  background: var(--mp-error-bg);
  color: var(--mp-error-fg);
  border: 1px solid var(--mp-error-border);
}

body.market-page .market-cart-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

body.market-page .market-cart-summary__stat {
  padding: 14px;
  border-radius: var(--mp-radius-md, 14px);
  background: var(--mp-surface-muted);
  border: 1px solid var(--mp-border-soft);
}

body.market-page .market-cart-summary__stat span {
  display: block;
  color: var(--mp-text-secondary);
  font-size: 13px;
  margin-bottom: 6px;
}

body.market-page .market-cart-summary__stat strong {
  display: block;
  color: var(--mp-text);
  font-size: 16px;
}

body.market-page .market-cart-items {
  display: grid;
  gap: 12px;
}

body.market-page .market-cart-item,
body.market-page .market-checkout-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--mp-radius-md, 14px);
  background: var(--mp-surface-muted);
  border: 1px solid var(--mp-border-soft);
}

body.market-page .market-cart-item__title,
body.market-page .market-checkout-item__title {
  color: var(--mp-text);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}

body.market-page .market-cart-item__meta,
body.market-page .market-checkout-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--mp-text-secondary);
  font-size: 13px;
}

body.market-page .market-cart-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

body.market-page .market-cart-item__form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

body.market-page .market-cart-item__form--remove {
  margin-left: auto;
}

body.market-page .market-cart-item__quantity {
  display: grid;
  gap: 6px;
  min-width: 110px;
}

body.market-page .market-cart-item__quantity span {
  font-size: 12px;
  font-weight: 600;
  color: var(--mp-text-secondary);
}

body.market-page .market-cart-item__quantity input,
body.market-page .market-checkout-form__field input {
  min-height: 40px;
  border-radius: var(--mp-radius-sm, 10px);
  border: 1px solid var(--mp-border-soft);
  background: var(--mp-surface);
  color: var(--mp-text);
  padding: 0 12px;
  font: inherit;
}

body.market-page .market-checkout-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
}

body.market-page .market-checkout-form {
  display: grid;
  gap: 14px;
}

body.market-page .market-checkout-form__group {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border-radius: var(--mp-radius-md, 14px);
  border: 1px solid var(--mp-border-soft);
  background: var(--mp-surface-muted);
}

body.market-page .market-checkout-form__group legend {
  padding: 0 4px;
  color: var(--mp-text);
  font-size: 14px;
  font-weight: 700;
}

body.market-page .market-checkout-form__option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--mp-radius-sm, 10px);
  background: var(--mp-surface);
  border: 1px solid var(--mp-border-soft);
  cursor: pointer;
}

body.market-page .market-checkout-form__option input {
  margin-top: 3px;
}

body.market-page .market-checkout-form__option span {
  display: grid;
  gap: 4px;
}

body.market-page .market-checkout-form__option strong {
  color: var(--mp-text);
  font-size: 14px;
}

body.market-page .market-checkout-form__option small {
  color: var(--mp-text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

body.market-page .market-checkout-form__field {
  display: grid;
  gap: 6px;
}

body.market-page .market-checkout-form__field span,
body.market-page .market-checkout-form__hint {
  color: var(--mp-text-secondary);
  font-size: 12px;
}

body.market-page .market-checkout-form__submit {
  justify-content: center;
  width: 100%;
}

@media (max-width: 900px) {
  body.market-page .market-cart-layout,
  body.market-page .market-checkout-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  body.market-page .market-cart-summary {
    grid-template-columns: 1fr;
  }

  body.market-page .market-cart-item__actions {
    flex-direction: column;
  }

  body.market-page .market-cart-item__form--remove {
    margin-left: 0;
  }
}
