/* Samanko: ONLY /electronics/ and /iatrika-proionta/ Woo Product Collection blocks. */
/* Spectra containers are NOT modified. */

/* Keep the 3-column Woo product collection stable on the two homepages */
body.gp-shop-home-products .wp-block-woocommerce-product-collection ul.wc-block-product-template__responsive.columns-3{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:24px !important;
  list-style:none !important;
  margin:0 !important;
  padding:0 !important;
}

/* Make each product card behave consistently */
body.gp-shop-home-products .wp-block-woocommerce-product-collection ul.wc-block-product-template__responsive.columns-3 > li.wc-block-product{
  box-sizing:border-box !important;
  min-width:0 !important;
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  float:none !important;
  clear:none !important;
  list-style:none !important;
  display:flex !important;
  flex-direction:column !important;
  height:100% !important;
}

/* Keep images inside their product cards */
body.gp-shop-home-products .wp-block-woocommerce-product-collection ul.wc-block-product-template__responsive.columns-3 > li.wc-block-product .wp-block-woocommerce-product-image{
  box-sizing:border-box !important;
  min-width:0 !important;
  width:100% !important;
  max-width:100% !important;
}
body.gp-shop-home-products .wp-block-woocommerce-product-collection ul.wc-block-product-template__responsive.columns-3 > li.wc-block-product .wp-block-woocommerce-product-image > a{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
}
body.gp-shop-home-products .wp-block-woocommerce-product-collection ul.wc-block-product-template__responsive.columns-3 > li.wc-block-product .wp-block-woocommerce-product-image img{
  display:block !important;
  box-sizing:border-box !important;
  width:100% !important;
  max-width:100% !important;
  height:auto !important;
  min-height:0 !important;
  object-fit:contain !important;
}

/* Product title spacing */
body.gp-shop-home-products .wp-block-woocommerce-product-collection li.wc-block-product .wp-block-post-title{
  margin-bottom:0.75rem !important;
}

/* Push the add-to-cart area to the bottom so buttons align better across each row */
body.gp-shop-home-products .wp-block-woocommerce-product-collection li.wc-block-product .wp-block-woocommerce-product-button{
  margin-top:auto !important;
  width:100% !important;
}

/* SAME BUTTON LOOK/SIZE for both <button> and <a>, and NO UNDERLINE */
body.gp-shop-home-products .wp-block-woocommerce-product-collection li.wc-block-product .wp-block-woocommerce-product-button .wp-block-button__link,
body.gp-shop-home-products .wp-block-woocommerce-product-collection li.wc-block-product .wc-block-components-product-button__button,
body.gp-shop-home-products .wp-block-woocommerce-product-collection li.wc-block-product .added_to_cart{
  text-decoration:none !important;
  -webkit-text-decoration:none !important;
  text-decoration-line:none !important;
}

body.gp-shop-home-products .wp-block-woocommerce-product-collection li.wc-block-product .wp-block-woocommerce-product-button .wp-block-button__link,
body.gp-shop-home-products .wp-block-woocommerce-product-collection li.wc-block-product .wc-block-components-product-button__button{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:100% !important;
  min-height:48px !important;
  padding:10px 16px !important;
  line-height:1.2 !important;
  text-align:center !important;
  box-sizing:border-box !important;
}

/* Prevent hover/focus states from re-adding underline */
body.gp-shop-home-products .wp-block-woocommerce-product-collection li.wc-block-product .wp-block-woocommerce-product-button .wp-block-button__link:hover,
body.gp-shop-home-products .wp-block-woocommerce-product-collection li.wc-block-product .wp-block-woocommerce-product-button .wp-block-button__link:focus,
body.gp-shop-home-products .wp-block-woocommerce-product-collection li.wc-block-product .wc-block-components-product-button__button:hover,
body.gp-shop-home-products .wp-block-woocommerce-product-collection li.wc-block-product .wc-block-components-product-button__button:focus{
  text-decoration:none !important;
  -webkit-text-decoration:none !important;
  text-decoration-line:none !important;
}

@media (max-width:991px){
  body.gp-shop-home-products .wp-block-woocommerce-product-collection ul.wc-block-product-template__responsive.columns-3{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media (max-width:575px){
  body.gp-shop-home-products .wp-block-woocommerce-product-collection ul.wc-block-product-template__responsive.columns-3{
    grid-template-columns:minmax(0,1fr) !important;
  }
}
