.product-categories-random-block {
    width: 100%;
    padding: 2rem 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    width: 100%;
}

.category-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.category-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.category-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.category-card:hover .category-thumbnail::before {
    opacity: 1;
}

.category-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover .category-image {
    transform: scale(1.05);
}

.product-count {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 3;
    transition: background 0.3s ease;
}

.category-card:hover .product-count {
    background: rgba(0, 0, 0, 0.9);
}

.category-info {
    padding: 1.25rem;
}

.category-name {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
}

.category-card:hover .category-name {
    color: #007bff;
}

.category-description {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.no-categories {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #999;
}

.no-categories p {
    margin: 0;
    font-size: 1.1rem;
}

@media (max-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .category-info {
        padding: 1rem;
    }
    
    .category-name {
        font-size: 1.1rem;
    }
    
    .category-description {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .product-categories-random-block {
        padding: 1rem 0;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-card:hover {
        transform: translateY(-4px);
    }
}