/*
 * Featured part-category cards (mod_partfinder_categories).
 * White product-category cards on the dark page, matching the site's homepage
 * category cards: light-grey image well, dark uppercase name, muted subtitle,
 * yellow "View Details" button.
 */

/* Fill the module's container (don't collapse in a flex/shrink-to-fit position). */
.mod-pf-cats {
    width: 100%;
}

/* Up to 4 columns, reducing to 3 / 2 / 1 as the viewport narrows. */
.mod-pf-cats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    width: 100%;
}

@media (max-width: 1024px) {
    .mod-pf-cats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .mod-pf-cats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .mod-pf-cats-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.mod-pf-cat-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 2px;
    overflow: hidden;
}

.mod-pf-cat-media {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    padding: 1rem;
    background: #efefef;
}

.mod-pf-cat-media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.mod-pf-cat-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
}

.mod-pf-cat-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2;
}

.mod-pf-cat-name a {
    color: #1a1a1a;
    text-decoration: none;
}

.mod-pf-cat-name a:hover,
.mod-pf-cat-name a:focus {
    color: #b8940e;
}

.mod-pf-cat-desc {
    margin: 0;
    color: #777777;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mod-pf-cat-btn {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.4rem 0.85rem;
    background: #f6c518;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-decoration: none;
    border-radius: 2px;
}

.mod-pf-cat-btn:hover,
.mod-pf-cat-btn:focus {
    background: #ffd63a;
    color: #1a1a1a;
}
