.category-row {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
justify-content: center;
margin-bottom: 0.5rem;
}
.category-row > p {
display: none;
}
.category-row > .category-row {
border-radius: var(--border-radius--medium);
justify-content: space-between;
align-content: stretch;
margin-bottom: 0;
}
.category-container {
display: flex;
flex-grow: 1;
flex-direction: column-reverse;
background: var(--color-surface-2);
border-radius: var(--border-radius--medium);
padding: 0.5rem 0.5rem 0;
overflow: hidden;
}
.category-container--size-12 {
flex-basis: calc( 100% - 0.5rem );
}
.category-container--size-11 {
flex-basis: calc( 91.6666% - 0.5rem );
}
.category-container--size-10 {
flex-basis: calc( 83.3333% - 0.5rem );
}
.category-container--size-9 {
flex-basis: calc( 75% - 0.5rem );
}
.category-container--size-8 {
flex-basis: calc( 66.6666% - 0.5rem );
}
.category-container--size-7 {
flex-basis: calc( 58.3333% - 0.5rem );
}
.category-container--size-6 {
flex-basis: calc( 50% - 0.5rem );
}
.category-container--size-5 {
flex-basis: calc( 41.6666% - 0.5rem );
}
.category-container--size-4 {
flex-basis: calc( 33.3333% - 0.5rem );
}
.category-container--size-3 {
flex-basis: calc( 25% - 0.5rem );
}
.category-container--size-20 {
flex-basis: calc( 20% - 0.5rem );
}
.category-container--size-2 {
flex-basis: calc( 16.6666% - 0.5rem );
}
.category-container--size-1 {
flex-basis: calc( 8.3333% - 0.5rem );
}
.category-container.category-container--title-top {
flex-direction: column;
padding-top: 0;
padding-bottom: 0.5rem;
}
.category-container.category-container--title-prominent {
padding: 0;
position: relative;
/* TODO */
max-height: 8rem;
min-height: 8rem;
}
.category-container__title {
text-align: center;
font-size: 1rem;
line-height: var(--line-height-sm);
font-weight: bold;
margin: 0;
overflow: hidden;
}
.category-container__title a {
color: var(--color-base);
}
.category-container__title span,
.category-container__title span a {
display: block;
}
.category-container__title span a {
padding: 0.5rem;
}
.category-container__image {
border-radius: var(--border-radius--medium);
overflow: hidden;
height: 100%;
max-height: 12rem;
}
.category-container__image a,
.category-container__image a img {
display: block;
height: 100%;
}
.category-container__image a img {
width: 100%;
object-fit: cover;
object-position: center;
transform-origin: center;
transition: transform 0.25s;
min-height: 100%;
}
.category-container:hover img {
transform: scale(1.05);
}
/* Title centered in the image */
.category-container.category-container--title-prominent .category-container__title {
position: absolute;
height: 100%;
display: flex;
width: 100%;
z-index: 2;
text-align: left;
padding: 0.5rem;
pointer-events: none;
font-size: 1.1rem;
background: rgba(0,0,0,0)linear-gradient(to bottom,rgba(0,0,0,0.2)0px,rgba(0,0,0,0.5)50%,rgba(0,0,0,0.2)100%)repeat 0 0;
}
.category-container.category-container--title-prominent .category-container__title span {
display: flex;
flex-grow: 1;
pointer-events: none;
}
.category-container.category-container--title-prominent .category-container__title span a {
align-self: center;
display: block;
width: 100%;
pointer-events: none;
color: #fff;
}
.category-row-container,
.category-stack {
display: flex;
gap: 0.5rem;
}
.category-row-container > p,
.category-stack > p {
display: none;
}
.category-stack {
flex-direction: column;
}
.category-stack .category-container {
flex-grow: 1;
}
.category-row-container {
flex-wrap: wrap;
}
.category-row-container > .category-container {
flex-grow: 1;
}
@media (max-width: 575.98px) {
.category-container--size-1,
.category-container--size-2,
.category-container--size-20,
.category-container--size-3,
.category-container--size-4,
.category-container--size-5 {
flex-basis: calc( 50% - 0.5rem );
}
.category-container--size-7,
.category-container--size-8,
.category-container--size-9,
.category-container--size-10,
.category-container--size-11 {
flex-basis: calc( 100% - 0.5rem );
}
.category-row.category-container--size-6,
.category-row.category-container--size-8 {
flex-basis: calc( 100% - 0.5rem );
}
}