.gt-categories__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    justify-content: space-between;
    align-items: center;
}


@media only screen and (min-width:768px) {
    .gt-categories__grid {
        gap: 20px;
        grid-template-columns: repeat(3, 1fr);
    }
}
@media only screen and (min-width:992px) {
    .gt-categories__grid {
        gap: 20px;
        grid-template-columns: repeat(4, 1fr);
    }
}
@media only screen and (min-width:1200px) {
    .gt-categories__grid {
        gap: 20px;
        grid-template-columns: repeat(5, 1fr);
    }
}
.category-link {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
}
.category-link img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    object-position: center;
    display: block;
    pointer-events: none;
    transition: transform 0.4s ease;
}
@media only screen and (min-width:768px){
    .category-link img {
    height: 350px;
}
}

.category-link:hover img {
    transform: scale(1.08);
}

.category-name {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #111;
    font-size: 15px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: calc(100% - 32px);
    transition: background 0.25s ease, color 0.25s ease, gap 0.2s ease;
}

.category-name__text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
@media only screen and (min-width:768px){
    .category-name{
        font-size: 16px;
    }
}

.category-arrow {
    width: 0;
    overflow: hidden;
    opacity: 0;
    flex-shrink: 0;
    transition: width 0.2s ease, opacity 0.2s ease;
}

.category-name:hover {
    background: var(--brand);
    color: #fff;
    gap: 6px;
}

.category-name:hover .category-arrow {
    width: 8px;
    opacity: 1;
}

/* ══════════════════════════════════════════════════════════════════
   SHOP PAGE — "Shop by Category" grid
   Sits above the product loop on the main shop archive.
   ══════════════════════════════════════════════════════════════════ */
.gt-shop-categories {
    margin-top: 0;
    margin-bottom: 32px;
}

.gt-shop-categories__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
}

@media only screen and (min-width: 768px) {
    .gt-shop-categories__title {
        font-size: 24px;
        margin-bottom: 18px;
    }
}

.gt-shop-categories__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media only screen and (min-width: 576px) {
    .gt-shop-categories__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media only screen and (min-width: 768px) {
    .gt-shop-categories__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }
}

@media only screen and (min-width: 992px) {
    .gt-shop-categories__grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 16px;
    }
}

@media only screen and (min-width: 1200px) {
    .gt-shop-categories__grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 16px;
    }
}

/* Text-only category card — no image, brand-accented on hover/focus. */
.shop-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 12px;
    min-height: 76px;
    transition: border-color var(--transition), background var(--transition),
        box-shadow var(--transition), transform var(--transition);
}

@media only screen and (min-width: 768px) {
    .shop-cat-card {
        padding: 22px 16px;
        min-height: 92px;
        gap: 6px;
    }
}

.shop-cat-card:hover,
.shop-cat-card:focus-visible {
    border-color: var(--brand);
    background: var(--brand-soft);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
    outline: none;
}

.shop-cat-card__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    /* Allow up to 2 lines for longer category names, then truncate. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition);
}

@media only screen and (min-width: 768px) {
    .shop-cat-card__name {
        font-size: 15px;
    }
}

.shop-cat-card:hover .shop-cat-card__name,
.shop-cat-card:focus-visible .shop-cat-card__name {
    color: var(--brand);
}

.shop-cat-card__count {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

@media only screen and (min-width: 768px) {
    .shop-cat-card__count {
        font-size: 12px;
    }
}