.market-product-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 6px 0 12px;
}
.market-products-page [hidden] { display: none !important; }
.market-products-page > .sector-price-navigation,
.market-products-page .commodity-control,
.market-products-page .commodity-sector-heading,
.market-products-page .commodity-status,
.market-products-page #metals-sector,
.market-products-page label:has(>#metals-sector),
.market-products-page .metals-control-group:has(#metals-mode),
.market-products-page #md-nonferrous-panel > h2,
.market-products-page #md-gold-panel > h2,
.market-products-page #steel-market-section > .steel-market-heading > h2,
.market-products-page > #steel-market-section,
.market-products-page > #steel-market-error {
  display: none !important;
}
.market-product-availability {
  color: #a1b3bf;
  font: 11px/1.45 Arial, sans-serif;
  margin: 5px 0 8px;
}
.market-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.market-product-grid > :is([data-commodity-workspace], #metals-existing-prices, #md-nonferrous-panel, #md-gold-panel, #steel-market-section):not([hidden]),
.market-product-grid :is([data-commodity-charts], .commodity-pair, .commodity-paired-grid, .commodity-paired-grid > div, .metals-grid, .md-grid, .steel-market-grid) {
  display: contents !important;
}
.market-product-grid [hidden] { display: none !important; }
.market-product-grid :is(.metals-controls, .metals-range-controls, .commodity-controls, .md-controls, .md-status, .md-note, .metals-note, .metals-empty, .notice, .metals-detail, .steel-market-heading, .steel-market-note, .processing-widget, details:not(.terminal-menu)) {
  grid-column: 1 / -1;
}
.market-product-grid :is(.metals-controls, .metals-range-controls, .commodity-controls, .md-controls, .steel-market-heading) {
  order: -1;
}
.market-product-grid :is(.md-status, .md-note, .steel-market-note, .processing-widget, .metals-detail, #steel-market-section > details) {
  order: 1;
}
.market-product-grid .chart-card { min-width: 0; margin: 0 !important; }
#metals-page .market-product-grid :is(.metals-controls, .metals-range-controls, .commodity-controls, .md-controls, .steel-market-heading) {
  order: -1;
}
.market-product-grid :is(.md-status, .md-note, .steel-market-note, .processing-widget, .metals-detail, #steel-market-section > details) {
  order: 1;
}
.market-product-grid .chart-card { padding: 9px 10px !important; }
.market-product-grid .commodity-controls { margin: 0; }
.market-product-grid [data-commodity-empty] { grid-column: 1 / -1; }
.market-product-grid [data-product-market] .chart-card::before,
.market-product-grid #metals-existing-prices .chart-card::before,
.market-product-grid :is(#md-gold-panel, #md-nonferrous-panel) .md-card::before {
  display: block;
  margin-bottom: 5px;
  color: #a5b9cc;
  font: 10px/1.2 Arial, sans-serif;
  content: 'Международная цена';
}
.market-product-grid [data-product-market="domestic"] .chart-card::before,
.market-product-grid #metals-existing-prices .chart-card::before {
  content: 'Внутренняя цена';
}
@media (max-width: 850px) {
  .market-product-grid { grid-template-columns: minmax(0, 1fr); }
}
