/* Minimal, fast CSS for the grid/list */
.rmsa-arr { margin-top: 24px; }
.rmsa-arr__head { font-weight: 700; font-size: 1.1rem; margin: 0 0 12px; }
.rmsa-arr__grid {
  --cols: 3;
  display: grid;
  grid-gap: 12px;
}
.rmsa-arr__card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .2s ease;
}
.rmsa-arr__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.rmsa-arr__thumb { position: relative; width: 100%; overflow: hidden; }
.rmsa-arr__thumb::before {
  content: ""; display: block; width: 100%;
}
/* Aspect ratios */
.rmsa-arr[data-ratio="16x9"] .rmsa-arr__thumb::before { padding-top: 56.25%; }
.rmsa-arr[data-ratio="1x1"] .rmsa-arr__thumb::before { padding-top: 100%; }
.rmsa-arr[data-ratio="4x3"] .rmsa-arr__thumb::before { padding-top: 75%; }
.rmsa-arr[data-ratio="3x4"] .rmsa-arr__thumb::before { padding-top: 133.33%; }

.rmsa-arr__thumb img {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  image-rendering: auto;
  transition: filter .3s ease, transform .3s ease;
}
.rmsa-enhance .rmsa-arr__thumb img {
  filter: saturate(1.06) contrast(1.04);
}
.rmsa-arr__meta { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.rmsa-arr__title { font-weight: 700; line-height: 1.3; font-size: .98rem; margin:0; }
.rmsa-arr__title a { text-decoration: none; }
.rmsa-arr__title a:hover { text-decoration: underline; }
.rmsa-arr__info { font-size: .8rem; opacity: .75; }

/* Responsive columns via data attributes */
.rmsa-arr__grid { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
@media (max-width: 639px) {
  .rmsa-arr__grid { --cols: var(--cols-m,2); }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .rmsa-arr__grid { --cols: var(--cols-t,3); }
}
@media (min-width: 1024px) {
  .rmsa-arr__grid { --cols: var(--cols-d,4); }
}

/* List layout */
.rmsa-arr__list { display: grid; grid-gap: 12px; }
.rmsa-arr__row {
  display: grid;
  grid-template-columns: 120px 1fr;
  grid-gap: 12px;
  align-items: center;
  background: #fff; border-radius: 12px; overflow: hidden;
  padding: 8px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.rmsa-arr__row .rmsa-arr__thumb::before { padding-top: 66%; }

/* Badges on thumbnail */
.rmsa-arr__thumb { position: relative; }
.rmsa-arr__badges {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.rmsa-badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700; line-height: 1;
  padding: 6px 9px; border-radius: 999px;
  background: rgba(0,0,0,.68); color: #fff; backdrop-filter: blur(2px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.rmsa-badge--hot { background: linear-gradient(90deg, rgba(255,82,82,.95), rgba(255,138,0,.95)); }
.rmsa-badge--fresh { background: rgba(0,0,0,.68); }
.rmsa-badge--trend { background: linear-gradient(90deg, rgba(0,184,212,.95), rgba(0,229,255,.95)); }
.rmsa-badge--popular { background: rgba(0,0,0,.68); }
.rmsa-badge--quick { background: rgba(0,0,0,.68); }
.rmsa-badge--cat { background: rgba(255,255,255,.92); color: #111; border: 1px solid rgba(0,0,0,.1); }
