/**
 * 商品分类导航样式
 */

.hoshinoai-cn-wrapper {
    width: 100%;
    overflow: hidden;
}

.cn-grid {
    display: grid;
    grid-template-columns: repeat(var(--cn-columns, 5), 1fr);
    gap: var(--cn-gap, 15px);
}

.cn-item {
    text-align: center;
    transition: transform 0.3s ease;
}

.cn-item:hover {
    transform: translateY(-3px);
}

.cn-link {
    text-decoration: none;
    display: block;
}

.cn-icon {
    margin: 0 auto 8px;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cn-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cn-icon-placeholder {
    font-size: 24px;
    color: #999;
}

.cn-name {
    color: #333;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cn-count {
    font-size: 11px;
    color: #999;
}

/* 暗色模式 */
body.dark .cn-name {
    color: #e0e0e0;
}

body.dark .cn-icon {
    background: #2a2a2a;
}

/* 响应式 */
@media (max-width: 768px) {
    .cn-grid {
        gap: calc(var(--cn-gap, 15px) * 0.8);
    }
    .cn-name {
        font-size: 11px;
    }
}