/*
 * NatureStone Purpose Selection
 * Scoped styles only. Typography is inherited from the active NatureStone/Storefront theme.
 */

.ns-purpose-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin: 28px 0 38px;
}

.ns-purpose-card,
.ns-purpose-card:visited {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    color: #414459 !important;
    text-decoration: none !important;
    border: 1px solid #e8e1dc;
    border-radius: 12px;
    box-shadow: 0 2px 2px rgba(0, 0, 0, .12);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.ns-purpose-card:hover,
.ns-purpose-card:focus {
    color: #414459 !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    border-color: #ded2c8;
    box-shadow: 0 5px 14px rgba(0, 0, 0, .12);
}

.ns-purpose-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #fbf3eb;
}

.ns-purpose-card__image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    object-fit: cover;
    transition: transform .25s ease;
}

.ns-purpose-card:hover .ns-purpose-card__image {
    transform: scale(1.025);
}

.ns-purpose-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 22px;
    color: #777;
    text-align: center;
}

.ns-purpose-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 17px 18px 16px;
}

.ns-purpose-card__title {
    display: block;
    margin: 0 0 7px;
    color: #282828;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
}

.ns-purpose-card__description {
    display: block;
    margin: 0 0 14px;
    color: #606060;
    font-size: 15px;
    line-height: 1.45;
}

.ns-purpose-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #eee7e1;
}

.ns-purpose-card__count {
    color: #777;
    font-size: 14px;
    line-height: 1.3;
}

.ns-purpose-card__link {
    color: #b53000;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.ns-purpose-card:hover .ns-purpose-card__link {
    color: #8f2600;
}

@media (max-width: 980px) {
    .ns-purpose-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 600px) {
    .ns-purpose-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 20px;
    }

    .ns-purpose-card__body {
        padding: 15px 16px;
    }

    .ns-purpose-card__title {
        font-size: 19px;
    }
}
