/*
 * K2Fish Store UX — homepage WooCommerce/Elessi card adapter (RC46)
 *
 * Elessi/WooCommerce owns the product block, slide width, carousel, columns,
 * navigation and responsive behaviour. Store UX owns only the canonical card
 * inside each native slide.
 */

/*
 * Pre-initialisation contract.
 *
 * The previous adapter set min-width:0 on every outer slide. In an Elessi flex track that made
 * all native 20%-width products shrink simultaneously into a single row until
 * Slick finished calculating widths. Preserve the width supplied by Elessi and
 * explicitly block flex shrinking without inventing a Store UX slide width.
 */
[data-k2sux-homepage-product-slide]{
  box-sizing:border-box!important;
  flex-shrink:0!important;
  list-style:none!important;
  background:transparent!important;
}

[data-k2sux-homepage-product-slide] > [data-k2sux-product-card="canonical"]{
  width:100%!important;
  min-width:0!important;
}

/*
 * Equal-height stretching is safe only after the theme has created a real
 * Slick/Owl slide. Before that point the native wrapper must remain untouched.
 */
.slick-initialized [data-k2sux-homepage-product-slide],
.owl-loaded .owl-item > [data-k2sux-homepage-product-slide],
.owl-loaded .owl-item [data-k2sux-homepage-product-slide]{
  display:flex!important;
  align-items:stretch!important;
  min-width:0;
  height:100%;
}

.slick-initialized [data-k2sux-homepage-product-slide] > [data-k2sux-product-card="canonical"],
.owl-loaded .owl-item [data-k2sux-homepage-product-slide] > [data-k2sux-product-card="canonical"]{
  flex:1 1 auto!important;
  height:100%!important;
}

/*
 * Last-resort bounds against broad Elessi/Nasa SVG rules. The canonical card
 * stylesheet remains the owner of iconography; these rules only guarantee that
 * an icon can never expand to the intrinsic SVG viewport during an AJAX refresh.
 */
[data-k2sux-homepage-product-slide] [data-k2sux-product-card="canonical"] svg.k2sux-inline-icon{
  display:inline-block!important;
  flex:0 0 18px!important;
  width:18px!important;
  min-width:18px!important;
  max-width:18px!important;
  height:18px!important;
  min-height:18px!important;
  max-height:18px!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
}
[data-k2sux-homepage-product-slide] [data-k2sux-product-card="canonical"] .k2sux-recommendation-card__stock svg.k2sux-inline-icon{
  flex-basis:14px!important;
  width:14px!important;
  min-width:14px!important;
  max-width:14px!important;
  height:14px!important;
  min-height:14px!important;
  max-height:14px!important;
}
[data-k2sux-homepage-product-slide] [data-k2sux-product-card="canonical"] .k2sux-recommendation-card__button svg.k2sux-inline-icon{
  flex-basis:17px!important;
  width:17px!important;
  min-width:17px!important;
  max-width:17px!important;
  height:17px!important;
  min-height:17px!important;
  max-height:17px!important;
}
[data-k2sux-homepage-product-slide] [data-k2sux-product-card="canonical"] .k2sux-product-card__members-icon{
  flex-basis:16px!important;
  width:16px!important;
  min-width:16px!important;
  max-width:16px!important;
  height:16px!important;
  min-height:16px!important;
  max-height:16px!important;
}

.slick-initialized .slick-track > [data-k2sux-homepage-product-slide],
.owl-loaded .owl-stage > [data-k2sux-homepage-product-slide]{
  align-self:stretch;
}

@media (prefers-reduced-motion:reduce){
  [data-k2sux-homepage-product-slide] > [data-k2sux-product-card="canonical"] *{
    scroll-behavior:auto!important;
  }
}

/*
 * RC47 — inline variable selector inherited from the shop card.
 *
 * The selector is part of the card flow, exactly like in the store grid. Elessi
 * remains owner of the slide width and carousel. Opening the panel may increase
 * the row height, but must never change slide width, create a popup or overflow
 * the card horizontally.
 */
[data-k2sux-homepage-product-slide] [data-k2sux-card-surface="homepage"]{
  width:100%;
  min-width:0;
}
[data-k2sux-homepage-product-slide] [data-k2sux-card-surface="homepage"] .k2sux-product-card__variable-panel,
[data-k2sux-homepage-product-slide] [data-k2sux-card-surface="homepage"] .k2sux-product-card__variable-form,
[data-k2sux-homepage-product-slide] [data-k2sux-card-surface="homepage"] .variations,
[data-k2sux-homepage-product-slide] [data-k2sux-card-surface="homepage"] .single_variation_wrap{
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
[data-k2sux-homepage-product-slide].is-k2sux-options-open,
.slick-initialized [data-k2sux-homepage-product-slide].is-k2sux-options-open,
.owl-loaded .owl-item [data-k2sux-homepage-product-slide].is-k2sux-options-open{
  height:auto!important;
  align-self:flex-start;
}
[data-k2sux-homepage-product-slide].is-k2sux-options-open > [data-k2sux-product-card="canonical"]{
  height:auto!important;
}

