/*
 * Списки товаров (результаты поиска, корзина, состав заказа):
 *  1) названия товаров переносятся по словам, а не обрезаются троеточием
 *     (дополнительно к теме LUMO_WRAP_CELL_CONTENT на самих Grid-компонентах);
 *  2) на узких экранах (мобильные) вместо таблицы показываются карточки.
 */

/* Обычная таблица видна на десктопе/планшете, скрыта на мобильных */
.product-list-grid {
    width: 100%;
}

/* Карточки скрыты по умолчанию, показываются только на мобильных */
.product-list-cards {
    display: none;
    width: 100%;
    box-sizing: border-box;
}

.product-card {
    display: flex;
    flex-direction: column;
    gap: var(--lumo-space-xs);
    width: 100%;
    box-sizing: border-box;
    padding: var(--lumo-space-m);
    border: 1px solid var(--lumo-contrast-10pct);
    border-radius: var(--lumo-border-radius-m);
    background: var(--lumo-base-color);
}

.product-card-title {
    font-weight: 600;
    white-space: normal;
    overflow-wrap: anywhere;
}

.product-card-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--lumo-space-s);
    width: 100%;
}

.product-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--lumo-space-s);
    margin-top: var(--lumo-space-xs);
}

@media (max-width: 640px) {
    .product-list-grid {
        display: none !important;
    }

    .product-list-cards {
        display: flex !important;
        flex-direction: column;
        gap: var(--lumo-space-s);
    }
}
