/* Homepage category showcase — style 1.
 * Add future designs beside this file and expose them in the plugin configuration.
 */
.home-page-category-grid {
    width: calc(100% - 48px);
    max-width: 1560px;
    margin: clamp(44px, 5vw, 76px) auto 90px;
}

.home-page-category-grid .item-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(16px, 1.4vw, 24px);
}

.home-page-category-grid .item-box {
    float: none !important;
    width: auto !important;
    min-width: 0;
}

.home-page-category-grid .category-item {
    isolation: isolate;
    overflow: hidden;
    border-radius: 18px;
    background: #eee;
    box-shadow: 0 10px 30px rgba(20, 20, 20, .12);
    transition: transform .3s ease, box-shadow .3s ease;
}

.home-page-category-grid .category-item:after {
    content: '';
    position: absolute;
    z-index: 2;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(to top, rgba(14, 14, 14, .78) 0%, rgba(14, 14, 14, .25) 42%, transparent 70%);
    pointer-events: none;
}

.home-page-category-grid .category-item:hover {
    box-shadow: 0 18px 42px rgba(20, 20, 20, .2);
    transform: translateY(-6px);
}

.home-page-category-grid .category-item .title {
    right: 18px;
    bottom: 18px;
    left: 18px;
    z-index: 3;
    border-radius: 11px;
    text-align: right;
}

.home-page-category-grid .category-item .title:before {
    display: none;
}

.home-page-category-grid .category-item .title a {
    height: auto;
    min-height: 46px;
    padding: 12px 14px;
    border-right: 4px solid var(--venture-primary-color, var(--iw-primary, #d90a0a));
    border-radius: 10px;
    color: #fff !important;
    background: rgba(18, 18, 18, .48);
    font-size: 16px;
    font-weight: 600;
    line-height: 22px;
    text-align: right;
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
}

.home-page-category-grid .category-item .picture img {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: none;
    transition: transform .55s ease;
}

.home-page-category-grid .category-item:hover .picture img {
    transform: scale(1.045);
}

@media (max-width: 1200px) {
    .home-page-category-grid { width: calc(100% - 32px); margin-top: 42px; }
    .home-page-category-grid .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

@media (max-width: 600px) {
    .home-page-category-grid { width: calc(100% - 20px); margin-top: 34px; margin-bottom: 55px; }
    .home-page-category-grid .item-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .home-page-category-grid .category-item .title { right: 12px; bottom: 12px; left: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .home-page-category-grid .category-item,
    .home-page-category-grid .category-item .picture img { transition: none; }
    .home-page-category-grid .category-item:hover { transform: none; }
}
