/* Two fully visible cards, with the photograph kept intact. Load after all card styles. */
@container storefront (max-width:760px){
 html .home-hits .home-hit-grid,
 html .catalog-page .product-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-auto-flow:row;
  grid-auto-columns:auto;
  gap:18px 12px;
  overflow:visible;
  scroll-snap-type:none;
  padding:0;
  align-items:stretch;
 }
 html .home-hits .home-hit-navigation{display:none}
 html .home-hits .product-card,
 html .catalog-page .product-card{max-width:none;min-width:0;width:100%;border-radius:9px;scroll-snap-align:none}
 html .home-hits .product-card .product-photo,
 html .catalog-page .product-card .product-photo{aspect-ratio:4/5;min-width:0;width:100%;overflow:hidden}
 html .home-hits .product-card .product-photo img,
 html .catalog-page .product-card .product-photo img{width:100%;height:100%;object-fit:contain;transform:none}
 html .home-hits .product-card .product-info,
 html .catalog-page .product-card .product-info{padding:12px 10px;min-width:0;display:flex;flex-direction:column;gap:0}
 html .home-hits .product-card .product-title-row,
 html .catalog-page .product-card .product-title-row{display:block;margin:0 0 8px;min-width:0}
 html .home-hits .product-card .product-name,
 html .catalog-page .product-card .product-name{font-size:16px;line-height:20px;letter-spacing:-.02em;min-height:40px;margin:0;overflow-wrap:anywhere;font-weight:500}
 html .home-hits .product-card .product-code,
 html .catalog-page .product-card .product-code{display:block;white-space:normal;font-size:10px;line-height:15px;margin:5px 0 0;overflow-wrap:anywhere}
 html .home-hits .product-card .product-meta,
 html .catalog-page .product-card .product-meta{font-size:12px;line-height:17px;margin:0 0 6px;min-width:0;overflow-wrap:anywhere}
 html .home-hits .product-card .product-composition,
 html .catalog-page .product-card .product-composition{font-size:12px;line-height:17px;margin:0 0 10px;min-height:34px;min-width:0;overflow-wrap:anywhere}
 html .home-hits .product-card .product-markers,
 html .catalog-page .product-card .product-markers{gap:4px;min-height:22px;margin:0 0 10px;align-content:flex-start}
 html .home-hits .product-card .product-marker,
 html .catalog-page .product-card .product-marker{font-size:10px;line-height:14px;padding:3px 6px;letter-spacing:0;min-height:22px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
 html .home-hits .product-card .product-footer,
 html .catalog-page .product-card .product-footer{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-end;gap:10px;margin-top:auto;padding-top:4px;min-width:0}
 html .home-hits .product-card .product-price,
 html .catalog-page .product-card .product-price{font-size:22px;line-height:28px;font-weight:500;letter-spacing:-.03em;white-space:nowrap}
 html .home-hits .product-card .product-actions,
 html .catalog-page .product-card .product-actions{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;width:100%;max-width:100%;gap:6px;margin:0}
 html .home-hits .product-card .product-actions .product-cart,
 html .catalog-page .product-card .product-actions .product-cart{display:flex;align-items:center;justify-content:center;gap:0;width:100%;min-width:0;max-width:100%;height:44px;min-height:44px;padding:8px 4px;font-size:12px;line-height:16px;letter-spacing:0;border-radius:5px;white-space:nowrap}
 html .home-hits .product-card .product-cart>span,
 html .catalog-page .product-card .product-cart>span{display:block;padding:0!important;overflow-wrap:normal}
 html .home-hits .product-card .product-cart>svg,
 html .catalog-page .product-card .product-cart>svg{display:none}
 html .home-hits .product-card .product-favorite,
 html .catalog-page .product-card .product-favorite{width:44px;min-width:44px;height:44px;min-height:44px;border-radius:5px}
 html .catalog-page .product-grid .catalog-promo{grid-column:1/-1;min-width:0}
}
@container storefront (max-width:380px){
 html .home-hits .home-hit-grid,html .catalog-page .product-grid{gap:16px 10px}
 html .home-hits .product-card .product-info,html .catalog-page .product-card .product-info{padding:10px 8px}
 html .home-hits .product-card .product-name,html .catalog-page .product-card .product-name{font-size:14px;line-height:18px;min-height:36px}
 html .home-hits .product-card .product-price,html .catalog-page .product-card .product-price{font-size:19px;line-height:25px}
 html .home-hits .product-card .product-actions .product-cart,html .catalog-page .product-card .product-actions .product-cart{font-size:12px;padding-inline:3px}
 html .home-hits .product-card .product-marker,html .catalog-page .product-card .product-marker{font-size:10px;line-height:14px;padding:3px 5px;min-height:22px}
}

/* Keep availability and price together. Let actions share a row when they fit. */
html :is(.home-hits, .catalog-page) .product-card .product-composition {
  min-height: 0;
  margin-bottom: 0;
}
html :is(.home-hits, .catalog-page) .product-card .product-availability {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.4;
}
html :is(.home-hits, .catalog-page) .product-card .product-footer {
  margin-top: 6px;
  padding-top: 0;
  gap: 8px;
}
html :is(.home-hits, .catalog-page) .product-card .product-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 116px), 1fr));
  align-items: stretch;
  gap: 6px;
  width: 100%;
  margin: 0;
}
html :is(.home-hits, .catalog-page) .product-card .product-actions :is(.product-cart, .product-favorite) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: auto;
  padding: 6px;
  border-radius: 5px;
  font-size: 13px;
  line-height: 16px;
  text-align: center;
  white-space: normal;
}
html :is(.home-hits, .catalog-page) .product-card .product-actions button > span:first-child {
  display: block;
  min-width: 0;
  padding: 0;
}
html :is(.home-hits, .catalog-page) .product-card .product-actions button > svg {
  display: block;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  order: -1;
}
.product-cart-count {
  display: block;
  font-size: 11px;
  font-weight: 400;
}
.product-actions button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -4px;
}
