/* "You may also like" under the product: the shop's product cards in a grid, sitting on the page background like the other
   cards of the page (the generic product-section shell has big padding meant for the home page). */
body.single-product div.product > .insaf-related.insaf-product-section { grid-column: 1 / -1; margin-top: 32px; padding: 0; overflow: visible; background: none; }
body.single-product .insaf-related .insaf-product-section__inner { max-width: none; }
body.single-product .insaf-related .insaf-product-section__header { margin-bottom: 16px; }
body.single-product .insaf-related .insaf-product-section__title { color: #14301f; font-size: clamp(21px, 1.6vw, 26px); font-weight: 600; line-height: 1.25; }
body.single-product .insaf-related { --insaf-card-gap: 20px; }
@media (max-width: 767px) { body.single-product .insaf-related { --insaf-card-gap: 12px; } }

/* Compact list (Theme Settings > Product page > Related products > Layout): the same product card laid out as a row -- the photo in a soft square
   tile on the left (the whole picture, never cropped), and on the right the name, the price and the usual labelled button, stacked and left-aligned.
   The button keeps its words ("Add To Cart" / "Choose weight"): a bare icon is easy to misread. Behind it nothing changes -- one tap adds, then
   it turns into - 1 in cart + . Four columns on a large screen, two on a tablet, one on a phone (which opens with four and a "Show more" button). */
body.single-product .insaf-related--rows .insaf-product-section__products.insaf-product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
body.single-product .insaf-related--rows .insaf-product-section__item { display: flex; min-width: 0; }
body.single-product .insaf-related--rows .insaf-product-card { display: grid; width: 100%; grid-template-columns: 100px minmax(0, 1fr); align-items: center; column-gap: 14px; padding: 14px; }

/* photo: a square tile, the picture fitted inside with a little air so it never touches or leaves the edge */
body.single-product .insaf-related--rows .insaf-product-card__media { box-sizing: border-box; align-self: center; width: 100px; height: 100px; aspect-ratio: auto; padding: 8px; border-radius: 12px; background: #f6f7f4; }
body.single-product .insaf-related--rows .insaf-product-card__image-link { width: 100%; height: 100%; }
body.single-product .insaf-related--rows .insaf-product-card__image, body.single-product .insaf-related--rows .insaf-product-card__image-link img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
body.single-product .insaf-related--rows .insaf-product-card__actions, body.single-product .insaf-related--rows .insaf-product-card__added-flash { display: none; }
body.single-product .insaf-related--rows .insaf-product-card__sale--media { top: 6px; left: 6px; min-width: 0; min-height: 20px; padding: 3px 7px; border-radius: 10px; font-size: 11px; animation: none; }

/* text: name (two lines reserved so every row is the same height), price, button -- one column, one left edge */
body.single-product .insaf-related--rows .insaf-product-card__content { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; align-self: center; min-width: 0; margin: 0; gap: 6px; }
body.single-product .insaf-related--rows .insaf-product-card__title { width: 100%; min-height: 42px; color: var(--insaf-ink); font-size: 15px; line-height: 21px; }
body.single-product .insaf-related--rows .insaf-product-card .insaf-product-card__title a { -webkit-line-clamp: 2; }
body.single-product .insaf-related--rows .insaf-product-card__price-row { align-self: flex-start; min-height: 0; }
body.single-product .insaf-related--rows .insaf-product-card__price { font-size: 17px; }
body.single-product .insaf-related--rows .insaf-product-card__status:not(:empty) { margin: 0; }

/* button: the normal outlined button, just not stretched across the row */
body.single-product .insaf-related--rows .insaf-product-card__quick-add, body.single-product .insaf-related--rows .insaf-product-card__picker { flex: 0 0 auto; width: 100%; margin: 4px 0 0; }
body.single-product .insaf-related--rows .insaf-product-card__add-btn, body.single-product .insaf-related--rows .insaf-product-card__choose { flex: 1 1 auto; width: 100%; min-width: 0; height: 40px; padding: 0 12px; font-size: 13px; }
body.single-product .insaf-related--rows .insaf-product-card__stepper { flex: 1 1 auto; width: 100%; min-width: 0; height: 40px; }

/* "Show more" under the list on phones: a small centred pill */
body.single-product .insaf-related--rows .insaf-related__more { display: none; }
@media (min-width: 1200px) { body.single-product .insaf-related--rows .insaf-product-section__products.insaf-product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 639px) {
	body.single-product .insaf-related--rows .insaf-product-section__products.insaf-product-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
	body.single-product .insaf-related--rows .insaf-product-card { grid-template-columns: 96px minmax(0, 1fr); column-gap: 12px; padding: 12px; }
	body.single-product .insaf-related--rows .insaf-product-card__media { width: 96px; height: 96px; }
	body.single-product .insaf-related--rows .insaf-product-card__title { min-height: 0; }
	body.single-product .insaf-related--rows .insaf-product-card__add-btn, body.single-product .insaf-related--rows .insaf-product-card__choose, body.single-product .insaf-related--rows .insaf-product-card__stepper { height: 44px; }
	body.single-product .insaf-related--rows:not(.is-expanded) .insaf-product-section__item:nth-child(n+5) { display: none; }
	body.single-product .insaf-related--rows:not(.is-expanded) .insaf-related__more { display: flex; min-height: 44px; margin: 14px auto 0; padding: 0 26px; align-items: center; justify-content: center; border: 1px solid var(--insaf-border); border-radius: 999px; color: var(--insaf-ink); background: #fff; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
	body.single-product .insaf-related--rows .insaf-related__more:hover, body.single-product .insaf-related--rows .insaf-related__more:focus-visible { border-color: var(--insaf-green); color: var(--insaf-green-dark); }
}
/* In the compact rows the photo is only 96-100px wide, too small for a corner ribbon (it sat on the bottle's cap). The ribbon text shows instead as a small
   tag right after the product name, where the name ends, and the ribbon on the photo is hidden. The tag is in the markup of every card but hidden outside these rows. */
body.single-product .insaf-related--rows .insaf-product-card__ribbon { display: none; }
body.single-product .insaf-related--rows .insaf-product-card .insaf-product-card__title a { display: inline; overflow: visible; -webkit-line-clamp: unset; }
body.single-product .insaf-related--rows .insaf-product-card__tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 4px; font-size: 10.5px; font-weight: 600; line-height: 1.5; letter-spacing: 0; white-space: nowrap; vertical-align: 1px; }

/* "Recently viewed": one quiet line INSIDE the card, above the product name, only on products the visitor looked at before: a small clock
   and soft grey text. It takes its own line in the card's text column, so it never hangs over an edge or touches the card above. */
body.single-product .insaf-related .insaf-recent-tag { display: flex; align-items: center; gap: 5px; align-self: flex-start; margin: 0 0 -2px; color: #5d6b63; font-size: 11.5px; font-weight: 500; line-height: 1.3; letter-spacing: .02em; white-space: nowrap; }
body.single-product .insaf-related .insaf-recent-tag::before { content: ""; flex: 0 0 auto; width: 12px; height: 12px; background: currentColor; -webkit-mask: var(--insaf-clock) center / contain no-repeat; mask: var(--insaf-clock) center / contain no-repeat; --insaf-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }

/* In the compact list the photo is only 100px wide: the "Gift" tag is a little smaller and sits closer to the corner. */
body.single-product .insaf-related--rows .insaf-product-card__gift { left: 4px; bottom: 4px; padding: 2px 6px 2px 5px; font-size: 10.5px; }
body.single-product .insaf-related--rows .insaf-product-card__gift-text { display: none; }
