/* ── Grid ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-auto-rows: 1fr;
    gap: 20px;
    justify-items: center;
    align-items: stretch;
}

/* ── Card ── */
.card {
    display: flex;
    flex-direction: column;
    border: 2px solid var(--secondary-color);
    border-radius: 16px;
    padding: 24px 20px;
    width: 220px;
    height: 100%;
    text-align: center;
    background: #fff;
    transition: transform 0.2s;
    box-sizing: border-box;
}

.card:hover {
    transform: translateY(-4px);
}

.card--featured {
    background: var(--secondary-color);
    color: var(--primary-color);
}

/* ── Icon (optional) ── */
.card-icon {
    margin-bottom: 8px;
    min-height: 2rem;
}

/* ── Badge (optional) ── */
.card-badge {
    display: inline-block;
    background: var(--primary-color);
    color: var(--secondary-color);
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}

/* ── Content ── */
.card-title {
    font-size: 1.25rem;
    font-weight: bold;
    line-height: 1.25;
    margin: 0 0 12px;
    color: inherit;
    /* clamp to 2 lines, reserve the space, ellipsis overflow */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}

.card-value {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    margin: auto 0 16px;
    color: var(--secondary-color);
}

.card--featured .card-value {
    color: var(--primary-color);
}

.card-label {
    font-size: 1.25rem;
    opacity: 0.6;
    margin: 4px 0 16px;
    color: inherit;
}

/* ── Description (optional) ── */
.card-desc {
    font-size: 0.875rem;
    opacity: 0.7;
    line-height: 1.4;
    margin: 0 0 12px;
    /* clamp to 3 lines, reserve the space, ellipsis overflow */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.2em;
}

/* ── Action button ── */
.card-btn {
    display: block;
    text-decoration: none;
    background-color: var(--primary-color);
    color: var(--third-color);
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.2s;
    box-sizing: border-box;
}

.card-btn:hover {
    opacity: 0.88;
}

.card--featured .card-btn {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.card--featured .card-btn--cancel {
    background-color: #c0392b;
    color: #fff;
}

/* ── Responsive ── */
@media screen and (max-width: 750px) {
    .cards-grid {
    grid-template-columns: 1fr;
    }

    .card {
    width: 100%;
    max-width: 300px;
    }
}