/* CategoryCard restyle (shop.pen hDfwG). Scope to .pen-category — do not set * / body font-family. */

div.row.pen-category-grid {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

div.row.pen-category-grid:before,
div.row.pen-category-grid:after {
    display: none;
    content: none;
}

.pen-category-col {
    display: flex;
    margin-bottom: 16px;
    float: none;
}

.pen-category,
.pen-category__name {
    font-family: var(--pen-font-head);
}

.pen-category {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--pen-bg);
    border: 1px solid var(--pen-line);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(18, 57, 71, 0.06);
    overflow: hidden;
    text-decoration: none;
    color: var(--pen-ink-navy);
}

.pen-category:hover,
.pen-category:focus {
    text-decoration: none;
    color: var(--pen-brand-ink);
    border-color: var(--pen-cyan);
}

.pen-category__media {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    background: var(--pen-bg-soft);
    color: var(--pen-brand);
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    overflow: hidden;
}

.pen-category__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pen-category__name {
    display: block;
    padding: 12px 16px 16px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

@media (max-width: 767px) {
    .pen-category__media {
        height: 88px;
        font-size: 28px;
    }

    .pen-category__name {
        font-size: 14px;
        padding: 10px 12px 12px;
    }
}
