[data-mm-recent] {
  --mm-recent-ink: #191b20;
  --mm-recent-gold: #a78953;
  --mm-recent-border: #e3e5e9;
  --mm-recent-gap: clamp(10px, 1.4vw, 18px);
  width: 100%;
  min-width: 0;
  margin: clamp(16px, 3vw, 36px) 0;
  color: var(--mm-recent-ink);
}
[data-mm-recent][hidden], [data-mm-recent] [hidden] { display: none !important; }
[data-mm-recent] .mm-recent-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
[data-mm-recent] .mm-recent-tab {
  margin: 0;
  padding: 11px clamp(16px, 2.5vw, 28px);
  border: 1px solid #363941;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(125deg, #2d3037, #15171c);
  color: #ffffff;
  font-size: clamp(15px, 1.6vw, 20px);
  font-weight: 750;
  line-height: 1.35;
}
[data-mm-recent] .mm-recent-body {
  padding: clamp(10px, 1.6vw, 20px);
  border: 1px solid var(--mm-recent-border);
  border-top: 2px solid var(--mm-recent-gold);
  border-radius: 0 12px 12px;
  background: #f5f6f8;
}
[data-mm-recent-cards] { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--mm-recent-gap); }
[data-mm-recent] .mm-recent-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--mm-recent-border);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 2px 6px #151b2510;
  transition: border-color .2s, box-shadow .2s;
}
[data-mm-recent] .mm-recent-card:hover { border-color: var(--mm-recent-gold); box-shadow: 0 3px 12px #141a2520; }
[data-mm-recent] .mm-recent-card:focus-visible, .mm-recent-controls button:focus-visible { outline: 2px solid #825817; outline-offset: -2px; }
[data-mm-recent] .mm-recent-card img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; padding: 8px; background: #fff; }
[data-mm-recent] .mm-recent-details { display: flex; flex: 1; flex-direction: column; justify-content: flex-start; gap: 6px; padding: clamp(8px, .75vw, 14px); border-top: 1px solid #f0f1f3; }
[data-mm-recent] .mm-recent-name { display: -webkit-box; line-height: 1.4; font-weight: 650; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
[data-mm-recent] .mm-recent-category, [data-mm-recent] .mm-recent-model { color: #565c68; font-size: .82em; line-height: 1.3; }
[data-mm-recent] .mm-recent-category { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-mm-recent] .mm-recent-model { overflow-wrap: anywhere; }
[data-mm-recent] .mm-recent-price { margin-top: auto; padding-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; color: #811b23; font-size: clamp(14px, 1.45vw, 18px); }
[data-mm-recent] .mm-recent-price del { color: #5f636c; font-size: .75em; font-weight: 500; }
[data-mm-recent] .mm-recent-controls { display: none; }
@media (max-width: 767px) {
  [data-mm-recent-cards] {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - var(--mm-recent-gap)) / 2);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    padding-bottom: 5px;
  }
  [data-mm-recent-cards] > :nth-child(odd) { scroll-snap-align: start; scroll-snap-stop: always; }
  [data-mm-recent-cards].mm-recent-odd::after { content: ''; pointer-events: none; }
  [data-mm-recent] .mm-recent-controls { display: flex; gap: 6px; padding-bottom: 4px; }
  [data-mm-recent] .mm-recent-controls button {
    display: grid; place-items: center; min-width: 36px; min-height: 36px; padding: 0;
    border: 1px solid var(--mm-recent-border); border-radius: 9px;
    background: #fff; color: var(--mm-recent-ink); font-size: 24px; line-height: 1;
  }
  [data-mm-recent] .mm-recent-controls button:disabled { opacity: .42; }
}
@media (prefers-reduced-motion: reduce) { [data-mm-recent] .mm-recent-card { transition: none; } }

/* Lightning uses an ID selector and !important to hide placeholder text.
   This module supplies its own text after the cards request completes. */
:is(#liaj1, [id^="liaj"]) [data-mm-recent] .mm-recent-tab {
  color: #fff !important;
}
:is(#liaj1, [id^="liaj"]) [data-mm-recent] .mm-recent-name {
  color: var(--mm-recent-ink) !important;
}
:is(#liaj1, [id^="liaj"]) [data-mm-recent] :is(.mm-recent-category, .mm-recent-model) {
  color: #565c68 !important;
}
:is(#liaj1, [id^="liaj"]) [data-mm-recent] .mm-recent-price {
  color: #811b23 !important;
}
:is(#liaj1, [id^="liaj"]) [data-mm-recent] .mm-recent-price del {
  color: #5f636c !important;
}
:is(#liaj1, [id^="liaj"]) [data-mm-recent] .mm-recent-controls button {
  color: var(--mm-recent-ink) !important;
}
