/* Premium Product Categories Grid Block matching the mockup */
.ych-category-boxes {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    justify-content: center;
    align-items: stretch;
    margin: 30px 0;
    box-sizing: border-box;
    max-width: 1200px !important;
}

.ych-category-boxes.cols-1 .ych-cat-box {
    width: 100%;
    max-width: 320px;
}

.ych-category-boxes.cols-2 .ych-cat-box {
    width: calc(50% - 14px);
}

.ych-category-boxes.cols-3 .ych-cat-box {
    width: calc(33.333% - 19px);
}

.ych-category-boxes.cols-4 .ych-cat-box {
    width: calc(25% - 21px);
}

.ych-category-boxes.cols-5 .ych-cat-box {
    width: calc(20% - 23px);
}

.ych-cat-box {
    position: relative;
    box-sizing: border-box;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.ych-cat-inner {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
    width: 100%;
}

/* Image wrapper allowing overlapping element overflow */
.ych-cat-image-wrap {
    position: relative;
    width: 100%;
    overflow: visible;
}

.ych-cat-image {
    width: 100%;
    aspect-ratio: 1/1;
    /* Perfect square category image */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    background: #f8f9fa;
    transition: box-shadow 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.ych-cat-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Overlapping round arrow button */
.ych-cat-arrow-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    transform: translate(25%, 25%);
    width: 32px;
    height: 32px;
    background: #ffffff;
    color: #0056b3;
    /* theme blue arrow color */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Hover transitions moving the block up and displaying shadows */
.ych-cat-box:hover {
    transform: translateY(-8px);
}

.ych-cat-box:hover .ych-cat-image {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.ych-cat-box:hover .ych-cat-image img {
    transform: scale(1.04);
}

.ych-cat-box:hover .ych-cat-arrow-btn {
    background: #0056b3;
    /* active background changes to blue */
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
}

/* Title typography below image card */
.ych-cat-title {
    margin-top: 18px;
    font-weight: 700;
    color: #333e48;
    /* dark grey text matching Electro */
    text-align: center;
    line-height: 1.35;
    padding: 0 8px;
    font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
    transition: color 0.2s ease;
}

.ych-cat-box:hover .ych-cat-title {
    color: #0056b3;
    /* changes to matching blue on hover */
}

/* Small screens adjustments */
@media (max-width: 992px) {
    .ych-category-boxes {
        gap: 20px;
    }

    .ych-category-boxes.cols-4 .ych-cat-box,
    .ych-category-boxes.cols-5 .ych-cat-box {
        width: calc(33.333% - 14px) !important;
    }
}

@media (max-width: 768px) {

    .ych-category-boxes.cols-3 .ych-cat-box,
    .ych-category-boxes.cols-4 .ych-cat-box,
    .ych-category-boxes.cols-5 .ych-cat-box {
        width: calc(50% - 10px) !important;
    }
}

@media (max-width: 480px) {
    .ych-category-boxes {
        gap: 15px;
    }

    .ych-category-boxes .ych-cat-box {
        width: 100% !important;
        max-width: none !important;
    }
}