/* ── Grid container ── */
.cg-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0 0 16px;
}

/* ── Card ── */
.cg-card {
    border-radius: 14px;
    border: 1px solid #e8e8e8;
    background-color: #fff;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s, transform 0.1s;
}

    .cg-card:hover {
        border-color: #d0d0d0;
        text-decoration: none;
    }

    .cg-card:active {
        transform: scale(0.98);
    }

/* ── Top area: photo or color placeholder ── */
.cg-card-top {
    width: 100%;
    height: 110px;
    display: block;
    flex-shrink: 0;
}

    /* When photo exists — img tag */
    .cg-card-top.cg-has-image {
        object-fit: cover;
        object-position: center;
    }

    /* When no photo — colored div with icon */
    .cg-card-top.cg-no-image {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }

.cg-no-image .cg-no-img-icon {
    font-size: 28px;
    line-height: 1;
    opacity: 0.5;
}

.cg-no-image .cg-no-img-label {
    font-size: 10px;
    color: #888;
}

/* ── Footer: name + meta row ── */
.cg-card-footer {
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
}

.cg-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    /*white-space: nowrap;*/
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.cg-card-meta {
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ── Item count badge ── */
.cg-card-count {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 8px;
    background-color: #fef3c7;
    color: #92400e;
    line-height: 1.5;
}

/* ── Arrow button ── */
.cg-arrow-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    /*background-color: #c0392b;*/
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .cg-arrow-btn svg {
        width: 11px;
        height: 11px;
        stroke: #fff;
        stroke-width: 2.5;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
