/* Homepage shell; rail geometry and current product cards have their own shared sources. */
#homepage-hits { box-sizing:border-box; width:min(calc(100% - 2 * var(--im-site-gutter,32px)),var(--im-site-content-max,1598px)); margin:0 auto; padding:0 0 40px; color:#433228; font:500 16px/1.5 Montserrat,Arial,sans-serif; }
#homepage-hits [hidden] { display:none!important; }
#homepage-hits .gf-recommendations { margin-top:0; }
#homepage-hits .gf-recommendations__head { align-items:center; margin-bottom:28px; }
#homepage-hits .home-hits__heading { display:flex; align-items:center; flex-wrap:wrap; gap:16px 40px; min-width:0; }
#homepage-hits .home-hits__heading h2 { overflow-wrap:anywhere; }
#homepage-hits .home-hits__catalog { display:inline-flex; align-items:center; gap:8px; max-width:100%; padding:3px 0; border-bottom:2px solid #faa61a; color:#433228; font:700 16px/1.4 Montserrat,Arial,sans-serif; text-decoration:none; overflow-wrap:anywhere; }
#homepage-hits :is(a,button,[tabindex]):focus { outline:none; }
#homepage-hits :is(a,button,[tabindex]):focus-visible { outline:2px solid #faa61a; outline-offset:4px; }
@media(max-width:1000px) { #homepage-hits { --im-site-gutter:16px; } }
@media(max-width:800px) { #homepage-hits .home-hits__heading { gap:12px 24px; } }
@media(max-width:639px) { #homepage-hits .gf-recommendations__head { margin-bottom:24px; } #homepage-hits .gf-recommendations h2 { font-size:24px; } #homepage-hits .home-hits__catalog { font-size:14px; } }
@media(hover:hover) and (pointer:fine) { #homepage-hits .home-hits__catalog:hover { color:#ba1b1e; } }

/* Homepage controls stay available on touch screens; the shared wishlist layout is unchanged. */
@media(max-width:800px) {
  #homepage-hits .gf-recommendations__head { align-items:flex-start; gap:16px; }
  #homepage-hits .home-hits__heading { display:grid; gap:8px; }
  #homepage-hits .home-hits__heading h2 { display:flex; align-items:center; min-height:40px; }
  #homepage-hits .gf-recommendations__controls { display:flex; gap:8px; }
  #homepage-hits .gf-recommendations__controls button { width:40px; height:40px; }
  #homepage-hits .gf-recommendations__controls img { width:18px; height:18px; }
}

/* Match the adjacent 44px actions instead of the shared rail's two-row counter. */
@media(min-width:640px) and (max-width:800px) {
  #homepage-hits .gf-recommendations .product-card__actions,
  #homepage-hits .gf-recommendations .product-card__actions > :is(.product-card__buy,.product-card__detail) { min-height:44px; }
  #homepage-hits .gf-recommendations .related-qty.quantity-control {
    flex-wrap:nowrap;
    padding:5px;
    gap:4px;
    height:44px !important;
    min-height:44px !important;
    max-height:44px !important;
  }
  #homepage-hits .gf-recommendations .related-qty span { flex:0 1 auto; margin:0 8px; }
}

#homepage-hits .gf-recommendations .related-qty.quantity-control { container:im7vt-hits-quantity / inline-size; }
/* Keep the normal card's spacing; a narrow button shows only the centered counter. */
@container im7vt-hits-quantity (max-width:190px) {
  #homepage-hits .gf-recommendations .related-qty span { display:none; }
}
#homepage-hits .gf-recommendations .related-qty input.quantity-control__input {
  -moz-appearance:textfield;
  appearance:textfield;
}
#homepage-hits .related-qty input.quantity-control__input::-webkit-inner-spin-button,
#homepage-hits .related-qty input.quantity-control__input::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }

/* Shared content rows for the rail; product actions keep their existing component. */
@supports (grid-template-rows:subgrid) {
  #homepage-hits .gf-recommendations .product-grid {
    grid-template-rows:repeat(6,auto);
    row-gap:10px !important;
  }
  #homepage-hits .gf-recommendations .product-card {
    display:grid;
    grid-row:span 6;
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:subgrid;
    align-items:start;
  }
  #homepage-hits .product-card > .product-card__media { grid-row:1; }
  #homepage-hits .product-card > .product-card__title { grid-row:2; }
  #homepage-hits .product-card__title-link { min-width:0; overflow-wrap:anywhere; }
  #homepage-hits .product-card > .product-card__price { grid-row:3; align-self:baseline; }
  #homepage-hits .product-card > div:has(> p) { grid-row:4; }
  #homepage-hits .product-card > div > p { margin:0; }
  #homepage-hits .product-card > .product-card__actions { grid-row:5; }
  #homepage-hits .product-card > .product-card__retail { grid-row:6; margin-top:0; }
  #homepage-hits .product-card__actions .related-qty.quantity-control { margin-top:0 !important; }
}
