/* ============================================================
   WC Matching page — pill filter bar + griglia variabile.
   ============================================================ */

.wc-matching-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
}

.wc-matching-filters__pill {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e6e8ec;
    color: var(--wc-ink, #0f1d36);
    font: 600 14px/1 var(--wc-font, inherit);
    text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease;
}

.wc-matching-filters__pill:hover {
    border-color: var(--wc-brand, #FB2C57);
    color: var(--wc-brand, #FB2C57);
}

.wc-matching-filters__pill.is-active {
    background: var(--wc-brand-soft, #ffe1e9);
    border-color: var(--wc-brand-soft, #ffe1e9);
    color: var(--wc-brand, #FB2C57);
}

.wc-matching-grid {
    list-style: none;
    margin: 0 0 40px;
    padding: 0;
    display: grid;
    gap: 28px 16px;
    justify-content: space-between;
}
.wc-matching-grid:last-child { margin-bottom: 0; }

.wc-matching-grid--2col { grid-template-columns: repeat(2, minmax(0, 380px)); }
.wc-matching-grid--3col { grid-template-columns: repeat(3, minmax(0, 280px)); }
.wc-matching-grid--4col { grid-template-columns: repeat(4, minmax(0, 230px)); }

@media (max-width: 960px) {
    .wc-matching-grid--3col,
    .wc-matching-grid--4col { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
}

@media (max-width: 520px) {
    .wc-matching-grid--2col,
    .wc-matching-grid--3col,
    .wc-matching-grid--4col { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
}

.wc-matching-grid__item { margin: 0; }

/* Override spacing per la pagina /matching: le griglie .wc-latest__grid
   sono usate come "run" consecutivi (Coppia, 2 Amici, 3 Amici, 4 Amici).
   Servono margine inferiore + row-gap maggiore rispetto alla home. */
.wc-page-matching .wc-latest__grid {
    row-gap: 18px;
    margin-bottom: 18px;
}
.wc-page-matching .wc-latest__grid:last-child { margin-bottom: 0; }

@media (max-width: 720px) {
    .wc-page-matching .wc-latest__grid { row-gap: 22px; margin-bottom: 24px; }
}

.wc-page-matching .wc-empty {
    text-align: center;
    padding: 60px 16px;
    color: var(--wc-muted, #57667d);
    font-size: 15px;
}
