/* ============================
   Category Grid — Frontend
   ============================ */

.ictcg-grid {
    display: grid;
    gap: 24px;
    padding: 8px 0;
}

.columns-1 {
    grid-template-columns: repeat(1, 1fr);
}

.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 1024px) {

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

@media (max-width: 768px) {

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

@media (max-width: 480px) {
    .ictcg-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Card */
.ictcg-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
        box-shadow 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

.ictcg-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.ictcg-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Image area */
.ictcg-image-wrap {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.ictcg-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.ictcg-item:hover .ictcg-image {
    transform: scale(1.08);
}

.ictcg-no-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ictcg-placeholder-icon {
    font-size: 48px;
    opacity: 0.6;
    filter: grayscale(1) brightness(10);
}

/* Gradient overlay on image */
.ictcg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            transparent 40%,
            rgba(0, 0, 0, 0.25) 100%);
    transition: background 0.35s ease;
}

.ictcg-item:hover .ictcg-overlay {
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.05) 0%,
            rgba(0, 0, 0, 0.4) 100%);
}

/* Content below image */
.ictcg-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #ffffff;
    gap: 8px;
}

.ictcg-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.3;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ictcg-count {
    font-size: 0.78rem;
    color: white;
    background: #C0151A;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ictcg-arrow {
    font-size: 1rem;
    color: #C0151A;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    display: inline-block;
}

.ictcg-item:hover .ictcg-arrow {
    transform: translateX(4px);
}

/* Empty state */
.ictcg-empty {
    text-align: center;
    color: #6c757d;
    padding: 40px;
    font-style: italic;
}