/* ============================================
   Category Grid Gallery — Frontend Styles
   ============================================ */

/* ---------- Grid Layout ---------- */
.cgg-grid {
    display: grid;
    gap: 24px;
    margin: 32px 0;
    padding: 0;
    list-style: none;
}

.cgg-cols-1 { grid-template-columns: 1fr; }
.cgg-cols-2 { grid-template-columns: repeat(2, 1fr); }
.cgg-cols-3 { grid-template-columns: repeat(3, 1fr); }
.cgg-cols-4 { grid-template-columns: repeat(4, 1fr); }
.cgg-cols-5 { grid-template-columns: repeat(5, 1fr); }
.cgg-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* ---------- Card ---------- */
.cgg-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cgg-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.cgg-card__link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ---------- Image ---------- */
.cgg-card__img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #f0f0f0;
}

.cgg-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.cgg-card:hover .cgg-card__img {
    transform: scale(1.05);
}

/* ---------- Category Badge ---------- */
.cgg-card__category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 15, 15, 0.72);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
}

/* ---------- Body ---------- */
.cgg-card__body {
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cgg-card__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: #111111;
}

.cgg-card__excerpt {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #555555;
}

/* ---------- Empty State ---------- */
.cgg-no-items {
    padding: 24px;
    text-align: center;
    color: #777;
    font-style: italic;
    border: 2px dashed #ddd;
    border-radius: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .cgg-cols-5,
    .cgg-cols-6 { grid-template-columns: repeat(3, 1fr); }
    .cgg-cols-4  { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .cgg-cols-3,
    .cgg-cols-4,
    .cgg-cols-5,
    .cgg-cols-6 { grid-template-columns: repeat(2, 1fr); }

    .cgg-grid { gap: 16px; }
}

@media (max-width: 480px) {
    .cgg-cols-2,
    .cgg-cols-3,
    .cgg-cols-4,
    .cgg-cols-5,
    .cgg-cols-6 { grid-template-columns: 1fr; }
}
