/* Keep the original phone and desktop layouts; only adjust tablet widths. */
@media (min-width: 551px) and (max-width: 1199px) {
    #ppp.products:has(> .shop-product-card) {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
        justify-content: center;
        justify-items: center;
        align-items: stretch;
    }
    #ppp.products:has(> .shop-product-card) > .product-card {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        max-width: none;
    }
    #ppp.products:has(> .shop-product-card) > #product-cardx {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
    }
}
/* Tablet landscape retains the original five-product row. */
@media (min-width: 551px) and (max-width: 1199px) and (orientation: landscape) {
    #ppp.products:has(> .shop-product-card) {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.product-card.shop-product-card {
    --product-option-control-height: 32px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.product-card.shop-product-card > .product-image {
    flex: 0 0 auto;
    min-width: 0;
}
.product-card.shop-product-card .product-has-image {
    float: none;
}
.product-card.shop-product-card > .shop-product-card__body {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 6px;
    min-width: 0;
    width: 100%;
    margin: 10px 0 0;
    line-height: 1.35;
}
.shop-product-card .shop-product-card__details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.shop-product-card .productname,
.shop-product-card .suppliername {
    max-width: 100%;
    height: auto;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.35;
}
.shop-product-card .shop-product-card__price {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px;
    min-width: 0;
    min-height: 22px;
    margin-top: 0;
}
.shop-product-card .shop-product-card__price > .ns1 {
    margin: 0;
    line-height: 1.35;
}
.shop-product-card .shop-product-card__price > select.selecttimeoption-no-prod {
    box-sizing: border-box;
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: var(--product-option-control-height);
    margin: 0;
    padding: 0 24px 0 6px;
    font: 400 12px/1.3 Inter, system-ui, sans-serif;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.shop-product-card .shop-product-card__availability,
.shop-product-card .shop-product-card__feedback {
    min-width: 0;
    font: 400 12px/1.35 Inter, system-ui, sans-serif;
    overflow-wrap: anywhere;
}
.shop-product-card .shop-product-card__cutoff {
    display: block;
    position: static;
    inset: auto;
    height: auto;
    margin: 0;
    font-size: inherit;
    line-height: inherit;
    background: none;
}
.shop-product-card .shop-product-card__feedback {
    /* AJAX success can contain whitespace. Avoid creating an extra flex gap;
       actual feedback elements still participate in the card layout. */
    display: contents;
}
.shop-product-card .shop-product-card__cutoff .qss {
    box-sizing: border-box;
    max-width: 100%;
    width: auto;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: inherit;
}
.shop-product-card .shop-product-card__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    margin-top: auto;
    padding-top: 4px;
}
.shop-product-card .shop-product-card__actions :is(.linen-add-new-no-prod, .showchangedate3, .cart-info) {
    box-sizing: border-box;
    position: static;
    inset: auto;
    min-height: var(--product-option-control-height);
    max-width: 100%;
    margin: 0;
    line-height: 1.3;
}
.shop-product-card .shop-product-card__actions button.cart-info {
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
}
.shop-product-card .shop-product-card__availability:empty,
.shop-product-card .shop-product-card__feedback:empty,
.shop-product-card .shop-product-card__actions:empty {
    display: none;
}

/* Text-style option prices no longer need the old select box's reserved height. */
.shop-product-card .shop-product-card__price > .ss-main.harvyst-product-option-link {
    min-height: 22px;
    line-height: 1.35;
    gap: 0 8px;
}
.shop-product-card .harvyst-product-option-link .harvyst-option-action {
    padding: 0;
    line-height: 1.35;
}
