/* G58 local review candidate: make the products the default desktop focus.
   This layer changes only the closed filter layout and vehicle presentation;
   opening the existing <details> restores its established sidebar/form. */

@media (min-width: 881px) {
  body.miki-pulse .mk-app:not(.is-embedded):not(.is-detail-view)
    .mk-layout:not([hidden]):not(:has(> .mk-filters[open])) {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  body.miki-pulse .mk-app:not(.is-embedded):not(.is-detail-view)
    .mk-layout:not(:has(> .mk-filters[open])) > .mk-pulse-category-facet {
    grid-column: 1;
    grid-row: 1;
  }

  body.miki-pulse .mk-app:not(.is-embedded):not(.is-detail-view)
    .mk-layout:not(:has(> .mk-filters[open])) > .mk-filters {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
  }

  body.miki-pulse .mk-app:not(.is-embedded):not(.is-detail-view)
    .mk-layout:not(:has(> .mk-filters[open])) .mk-filter-head {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    min-height: 44px !important;
  }

  body.miki-pulse .mk-app:not(.is-embedded):not(.is-detail-view)
    .mk-layout:not(:has(> .mk-filters[open])) .mk-filter-toggle-label {
    display: inline-flex !important;
  }

  body.miki-pulse .mk-app:not(.is-embedded):not(.is-detail-view)
    .mk-layout:not(:has(> .mk-filters[open])) > .mk-main-column {
    grid-column: 1;
    grid-row: 3;
  }
}

@media (min-width: 1180px) {
  body.miki-pulse .pulse-screen-majestic .mk-app.is-embedded:not(.is-detail-view)
    .mk-layout:not([hidden]):not(:has(> .mk-filters[open])) {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  body.miki-pulse .pulse-screen-majestic .mk-app.is-embedded:not(.is-detail-view)
    .mk-layout:not(:has(> .mk-filters[open])) > .mk-filters {
    position: static;
    grid-column: 1;
    grid-row: 1;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-height: none;
    overflow: visible;
  }

  body.miki-pulse .pulse-screen-majestic .mk-app.is-embedded:not(.is-detail-view)
    .mk-layout:not(:has(> .mk-filters[open])) > .mk-main-column {
    display: block;
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
  }
}

@media (min-width: 1181px) {
  /* Three breathing cards at 1440px, four at large desktop widths. */
  body.miki-pulse .pulse-screen-majestic .mk-app.is-embedded:not(.is-detail-view)
    .mk-layout:not(:has(> .mk-filters[open])) .mk-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.miki-pulse .mk-app:not(.is-detail-view)
    .mk-card.mk-unified-card[data-market-kind="vehicles"] {
    grid-template-rows: 190px minmax(0, 1fr) auto !important;
  }

  body.miki-pulse .mk-app:not(.is-detail-view)
    .mk-card.mk-unified-card[data-market-kind="vehicles"] .mk-unified-card__media {
    height: 190px !important;
    min-height: 190px !important;
    max-height: 190px !important;
  }

  body.miki-pulse .mk-app:not(.is-detail-view)
    .mk-card.mk-unified-card[data-market-kind="vehicles"] .mk-unified-card__price b {
    font-size: clamp(20px, 1.55vw, 25px) !important;
    line-height: 1.12;
    font-variant-numeric: tabular-nums;
  }
}

@media (min-width: 1720px) {
  body.miki-pulse .pulse-screen-majestic .mk-app.is-embedded:not(.is-detail-view)
    .mk-layout:not(:has(> .mk-filters[open])) .mk-grid,
  body.miki-pulse .mk-app:not(.is-embedded):not(.is-detail-view)
    .mk-layout:not(:has(> .mk-filters[open])) .mk-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 620px) {
  /* Keep the first public vehicle price inside a 390×844 first viewport. */
  body.miki-pulse .mk-app:not(.is-embedded):not(.is-detail-view) .mk-layout {
    margin-top: 4px;
  }
}

/* The current market price is a decision, not a footnote after seven facts.
   It sits directly below the vehicle name in both public projects; the facts
   and existing card actions remain available below it. */
body.miki-pulse .mk-app:not(.is-detail-view)
  .mk-card.mk-unified-card.is-market-vehicle .mk-unified-card__body > .mk-unified-card__price {
  width: 100%;
  margin: 2px 0 1px;
  padding: 5px 0 7px;
  border-bottom: 1px solid rgba(174, 185, 216, .17);
}

body.miki-pulse .mk-app:not(.is-detail-view)
  .mk-card.mk-unified-card.is-market-vehicle .mk-unified-card__body > .mk-unified-card__price b {
  font-size: clamp(19px, 1.6vw, 25px);
  line-height: 1.12;
}

@media (max-width: 640px) {
  /* A slim utility rail keeps the persistent guide/music launchers outside
     public listing cards, including while the page scrolls. */
  body.miki-pulse .mk-app:not(.is-embedded):not(.is-detail-view) .mk-grid {
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr);
    padding-right: 58px;
  }

  body.miki-pulse .mk-app:not(.is-embedded):not(.is-detail-view) .mk-grid:has(> .mk-unified-card) {
    grid-template-columns: minmax(0, 1fr);
  }
}
