.gb-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 32px 0;
}

/* Nasconde forzatamente i blocchi nativi di sottocategoria di WooCommerce/Astra
   che possono comparire tramite un percorso di rendering diverso dal nostro. */
ul.products li.product-category,
.products .product-category,
li.product-category {
    display: none !important;
}

@media (max-width: 768px) {
    .gb-cat-grid {
        grid-template-columns: 1fr;
    }
}

.gb-cat-card {
    position: relative;
    display: block;
    background: linear-gradient(180deg, #1a1a1a 0%, #000000 100%);
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    padding: 24px;
    min-height: 320px;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gb-cat-card--has-image {
    background-color: #000;
}

.gb-cat-card__overlay {
    display: none;
}

.gb-cat-card--has-image .gb-cat-card__overlay {
    display: block;
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 55%, rgba(0,0,0,0.92) 100%);
    z-index: 1;
}

.gb-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.gb-cat-card__badge {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    font-size: 28px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 30px;
    border-radius: 4px;
    overflow: hidden;
}

.gb-cat-card__badge--generic {
    background: #d21f2c;
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    color: #fff;
}

.gb-cat-card__body {
    position: absolute;
    bottom: 24px;
    left: 24px;
    right: 24px;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

.gb-cat-card__title {
    color: #ffffff;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.gb-cat-card__subtitle {
    color: #d21f2c;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.gb-cat-card__line {
    display: block;
    width: 48px;
    height: 4px;
    background: #d21f2c;
    margin-top: 14px;
    border-radius: 2px;
}
