.recent-products{display:none;align-items:center;gap:20px;margin:0 0 24px;padding:12px 16px;background:var(--paper);border-top:2px solid var(--ink);box-shadow:0 6px 20px #00000010}
:root[data-has-recent="true"] .recent-products{display:flex}
.recent-products-heading{display:flex;flex:0 0 250px;flex-direction:column;align-items:flex-start;gap:4px;min-width:0}
.recent-products-heading .eyebrow{margin:0 0 5px;color:var(--brand);font-size:10px;font-weight:700;letter-spacing:.11em}
.recent-products-heading h2{margin:0;font-size:clamp(20px,2.2vw,25px);line-height:1.1}
.recent-products-heading small{display:block;color:var(--muted);font-size:11px}
.recent-products-heading button{flex:none;border:0;border-bottom:1px solid currentColor;border-radius:0;padding:3px 0;background:none;color:var(--muted);font:inherit;font-size:12px;cursor:pointer}
.recent-products-heading button:hover,.recent-products-heading button:focus-visible{color:var(--brand)}
.recent-products-list{display:grid;flex:1;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;min-width:0;min-height:90px}
.recent-product{display:flex;align-items:center;gap:10px;min-width:0;min-height:90px;padding:8px;background:var(--bg);color:var(--ink);text-decoration:none;transition:background-color .2s ease,transform .2s ease}
.recent-product:hover,.recent-product:focus-visible{background:var(--md-sys-color-surface-container-high);transform:translateY(-2px)}
.recent-product img{flex:none;width:72px;height:72px;object-fit:cover;aspect-ratio:1;border-radius:2px}
.recent-product-copy{display:grid;gap:4px;min-width:0}
.recent-product-copy strong{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:13px;line-height:1.3;overflow-wrap:anywhere}
.recent-product-copy small{overflow:hidden;color:var(--muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:900px){.recent-products-heading{flex-basis:210px}.recent-products-list{grid-template-columns:repeat(2,minmax(0,1fr))}:root[data-recent-count="3"] .recent-products-list,:root[data-recent-count="4"] .recent-products-list{min-height:192px}}
@media(max-width:760px){:root[data-has-recent="true"] .recent-products{display:block}.recent-products-heading{flex-direction:row;align-items:end;justify-content:space-between;gap:12px;margin-bottom:12px}.recent-products-list{grid-template-columns:repeat(2,minmax(0,1fr));min-height:76px}:root[data-recent-count="3"] .recent-products-list,:root[data-recent-count="4"] .recent-products-list{min-height:164px}.recent-product img{width:56px;height:56px}.recent-product{min-height:76px}}
@media(max-width:420px){.recent-products{padding:14px}.recent-products-list{gap:8px}.recent-product{gap:7px;padding:6px}.recent-product img{width:48px;height:48px}.recent-product-copy strong{font-size:11px}.recent-product-copy small{font-size:10px}}
@media(prefers-reduced-motion:reduce){.recent-product{transition:none}.recent-product:hover,.recent-product:focus-visible{transform:none}}
/* Returning to one item must not create three empty desktop columns or a half-width phone tile. */
:root[data-recent-count="1"] .recent-products-list{grid-template-columns:minmax(0,320px)}
:root[data-recent-count="2"] .recent-products-list{grid-template-columns:repeat(2,minmax(0,320px))}
:root[data-recent-count="3"] .recent-products-list{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:900px){:root[data-recent-count="3"] .recent-products-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){:root[data-recent-count="1"] .recent-products-list{grid-template-columns:minmax(0,1fr)}}
