.themes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}

    /* In the grid context the theme card needs to stretch to the
       column instead of the fixed 160px width used in the home
       carousel. */
    .themes-grid .theme-card {
        width: 100%;
        aspect-ratio: 1 / 1;
        height: auto;
    }

@media (min-width: 640px) {
    .themes-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .themes-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .themes-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .themes-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}
