/**
 * Custom Category Images Styles
 *
 * @package Custom_Cat_Img
 */

/* Main container */
.custom-category-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* Single category item */
.custom-category-images .single-category {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Overlay effect */
.custom-category-images .single-category::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    transition: background 0.3s ease;
}

/* Image styling */
.custom-category-images .single-category img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

/* Hover effects */
.custom-category-images .single-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.custom-category-images .single-category:hover::before {
    background: rgba(0, 0, 0, 0.5);
}

.custom-category-images .single-category:hover img {
    transform: scale(1.05);
}

/* Category name */
.custom-category-images .single-category .category-name {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.5em;
    font-weight: bold;
    width: 100%;
    text-align: center;
    z-index: 2;
    margin: 0;
    padding: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Link styling */
.custom-category-images .single-category a {
    text-decoration: none;
    display: block;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .custom-category-images {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .custom-category-images .single-category img {
        height: 150px;
    }

    .custom-category-images .single-category .category-name {
        font-size: 1.2em;
    }
}

@media screen and (max-width: 480px) {
    .custom-category-images {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .custom-category-images .single-category img {
        height: 180px;
    }
}
