/*
 * PNY Products — автоматическая сетка товаров каталога.
 * Вертикальные фотографии 900 × 1200 (3:4).
 */

/* Сетка товаров */

.pny-catalog-products {
    width: 100%;
}

.pny-catalog-products__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

/* Карточка товара */

.pny-catalog-product {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 10px;
}

/* Вертикальная фотография */

.pny-catalog-product__image {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f5f5f5;
}

.pny-catalog-product__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Содержимое карточки */

.pny-catalog-product__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

/* Название товара — без H3 */

.pny-catalog-product__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    overflow-wrap: anywhere;
}

.pny-catalog-product__title a,
.pny-catalog-product__title a:visited {
    color: #222;
    text-decoration: none;
}

.pny-catalog-product__title a:hover,
.pny-catalog-product__title a:focus-visible {
    color: #813131;
    text-decoration: none;
}

/* Краткое описание */

.pny-catalog-product__description {
    margin: 0;
    color: #555;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    overflow-wrap: anywhere;
}

/* Цена */

.pny-catalog-product__price {
    margin-top: auto;
    text-align: center;
    font-size: 18px;
    line-height: 1.4;
}

.pny-catalog-product__price .cart-item-price {
    display: inline-block;
}

/* Кнопка */

.pny-catalog-product__button,
.pny-catalog-product__button:visited {
    display: block;
    padding: 12px 16px;
    border: 1px solid #813131;
    border-radius: 6px;
    background: #faf0f0;
    color: #813131;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    transition: background-color .2s, color .2s;
}

.pny-catalog-product__button:hover,
.pny-catalog-product__button:focus-visible {
    background: #813131;
    color: #fff;
    text-decoration: none;
}

/* Планшет — две карточки */

@media (max-width: 1024px) {
    .pny-catalog-products__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Телефон — одна карточка */

@media (max-width: 767px) {
    .pny-catalog-products__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .pny-catalog-product__body {
        padding: 14px;
    }

    .pny-catalog-product__title {
        font-size: 17px;
    }
}

