/* media (max-width: 520px) — sub-tier of theme-carousel--mobile.css's 767px range; only the cards grid
   switches to single column here, other properties still hold their 767px values. */

.theme-carousel__cards {
  grid-template-columns: 1fr;
  grid-auto-rows: 300px;
}

/* height must match this breakpoint's grid-auto-rows (300px) above — the flex path doesn't fall back to it. */
.theme-carousel__cards:has(> .theme-carousel__card:nth-child(1):nth-last-child(-n+2)) > .theme-carousel__card {
  flex-basis: 100%;
  height: 300px;
}

/* Same specificity as tablet-1200's nth-child(4n+x) rules (still in scope here) — wins on source order
   alone, so this file must stay loaded after theme-carousel--tablet-1200.css. */
.theme-carousel__card:nth-child(odd) .theme-carousel__card-link {
  border-radius: 0 var(--radius-50) 0 var(--radius-50);
}

.theme-carousel__card:nth-child(even) .theme-carousel__card-link {
  border-radius: var(--radius-50) 0 var(--radius-50) 0;
}