/* ─── ABZ Subcategory Widget v4 ─────────────────── */

.abz-scw-grid {
    display: grid;
    gap: 8px;
    direction: rtl;
}

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

/* ─── Item ───────────────────────────────────────── */
.abz-scw-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border-radius: 8px;
    padding: 8px 6px;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.2s;
    border: 1px solid #f0f0f0;
}

.abz-scw-item:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    text-decoration: none;
}

/* ─── Thumbnail ──────────────────────────────────── */
.abz-scw-thumb {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 5px;
    margin-bottom: 5px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abz-scw-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.abz-scw-no-thumb {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
}

/* ─── Info ───────────────────────────────────────── */
.abz-scw-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
}

.abz-scw-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.abz-scw-count {
    font-size: 10px;
    color: #888;
}

/* ─── Style: title only ──────────────────────────── */
.abz-scw-style-title_only .abz-scw-item {
    justify-content: center;
    min-height: 44px;
    padding: 10px 8px;
}

.abz-scw-style-title_only .abz-scw-name {
    font-size: 13px;
}

/* ─── Style: image only ──────────────────────────── */
.abz-scw-style-image_only .abz-scw-item {
    padding: 6px;
}

.abz-scw-style-image_only .abz-scw-thumb {
    margin-bottom: 0;
}

/* ─── Mobile ─────────────────────────────────────── */
@media (max-width: 768px) {
    .abz-scw-cols-2,
    .abz-scw-cols-3,
    .abz-scw-cols-4,
    .abz-scw-cols-5 {
        grid-template-columns: repeat(3, 1fr);
    }

    .abz-scw-item {
        padding: 6px 5px;
    }

    .abz-scw-name {
        font-size: 11px;
    }

    .abz-scw-count {
        font-size: 10px;
    }
}
