.cards ul {
    display: flex;
    gap: 2em;
    flex-flow: row wrap;
    padding: 0;
    justify-content: center;
    margin: 0;
}

.cards ul:empty::before {
    content: "Nenhum item selecionado";
    text-align: center;
    width: 100%;
    background-color: var(--bg-color-over);
    font-style: italic;
    color: var(--color-base-text-weak);
    padding: 1em;
    font-size: 0.9em;
    border-radius: 0.5em;
}

.cards ul li {
    position: relative;
    flex: 0 0 calc(33% - 1.25em);
    display: flex;
    flex-flow: column wrap;
    align-items: flex-start;
    border-radius: 0.5em;
    margin: 0;
    background-color: #fff;
    box-shadow: 0 0.5em 1em -0.5em;
}

@media (max-width: 768px) {
    .cards ul li {
        flex: 1 0 calc(50% - 1.25em);
    }
}
@media (max-width: 480px) {
    .cards ul li {
        flex: 1 0 100%;
    }
}
.cards li a {
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.cards figure {
    width: 100%;
    aspect-ratio: 3 / 2;
    margin: 0;
    position: relative;
}

.cards figure img {
    width: 100%;
    height: 100%;
    border-radius: 0.25em 0.25em 0 0;
    object-fit: contain;
    background-color: white;
    display: block;
    aspect-ratio: inherit;
    padding: 2rem;
}

.cards .content {
    padding: 1em;
    display: flex;
    flex-flow: column nowrap;
    gap: 0.25em;
}

.cards .content p {
    margin: 0;
    font-size: 0.95em;
    color: var(--text-color-weak);
    line-height: 1.4em;
}

.cards h4 {
    margin: 0;
    font-size: clamp(1.05rem, 3vw, 1.5rem);
    font-weight: 800;
    font-family: var(--font-title);
}

.cards li>button.remove {
    position: absolute;
    top: -0.5em;
    right: -0.5em;
    border: none;
    z-index: 2;
    padding: 0;
    width: 1.5em;
    height: 1.5em;
    background-color: var(--color-error);
    border-radius: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cards li>button.remove::before {
    content: "×";
    color: var(--color-error-inverse);
    font-size: 1.5em;
    line-height: 1.5em;
    text-align: center;
}

.cards .tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background-color: var(--surface-color);
    padding: 1rem;
    border-radius: 0.5rem;
}