/* MOBILE FIX: title да не се поклопува од thumbnail */
@media (max-width: 768px){
  .wd-product.wd-hover-small .product-element-title.wd-product-element-title{
    position: relative !important;
    z-index: 10 !important;
    background: #fff; /* само за да не се гледа сликата низ него */
  }

  .wd-product.wd-hover-small .product-element-title .wd-entities-title{
    position: relative !important;
    z-index: 51 !important;
  }
}

@media (max-width: 768px){
  .wd-product.wd-hover-small .product-element-image{
    margin-top: 10px !important; /* смени 8-15px по вкус */
  }
}




/* Wrapper layout */
		.wd-hover-small .cen-small-card .cen-small-atc-wrap{
			margin-top: 8px;
			display:flex;
			align-items:center;
			gap:8px;
			flex-wrap:wrap;
			justify-content: flex-end;
		}

		/* Quantity */
		.wd-hover-small .cen-small-card .cen-small-qty{
			display:flex;
			align-items:center;
			gap:6px;
		}
		.wd-hover-small .cen-small-card .cen-small-qty .btn{
			width:34px;
			height:34px;
			border-radius:12px;
			border:1px solid #ddd;
			background:#fff;
			cursor:pointer;
			transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
		}
		.wd-hover-small .cen-small-card .cen-small-qty .btn:hover{
			transform: translateY(-1px);
			box-shadow: 0 6px 14px rgba(0,0,0,.12);
		}
		.wd-hover-small .cen-small-card .cen-small-qty .qty{
			width:46px;
			height:34px;
			text-align:center;
			border-radius:12px;
			border:1px solid #ddd;
			padding:0;
		}

		/* Make add-to-cart button icon-only */
		.wd-hover-small .cen-small-card a.ajax_add_to_cart.add-to-cart-loop{
			width:44px;
			height:44px;
			min-height:44px;
			padding:0 !important;
			border-radius:999px !important;
			display:flex !important;
			align-items:center !important;
			justify-content:center !important;
			background:#FE5000 !important;
			border:1px solid #FE5000 !important;
			transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease;
		}
		.wd-hover-small .cen-small-card a.ajax_add_to_cart.add-to-cart-loop:hover{
			transform: translateY(-1px) scale(1.03);
			box-shadow: 0 10px 20px rgba(0,0,0,.18);
		}
		.wd-hover-small .cen-small-card a.ajax_add_to_cart.add-to-cart-loop:active{
			transform: scale(.97);
			opacity: .92;
		}

		/* Hide text */
		.wd-hover-small .cen-small-card a.ajax_add_to_cart.add-to-cart-loop > span{
			display:none !important;
		}

		/* SVG icon via ::before */
		.wd-hover-small .cen-small-card a.ajax_add_to_cart.add-to-cart-loop::before{
			content:"";
			width:26px;
			height:26px;
			display:block;
			background-repeat:no-repeat;
			background-position:center;
			background-size:contain;
			/* inline svg (white icon) */
			background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 36 36%27 fill=%27none%27%3E%3Cpath d=%27M27.76 14.2198c0 .02-.02.06-.04.08l-2.12 5.6c-.52 1.34-1.82 2.22-3.26 2.22h-6.4c-1.66 0-3.1-1.18-3.42-2.82l-1.26-6.5c-.14-.72-.7-1.3-1.42-1.44l-.96-.18a.83.83 0 0 1-.64-.98.83.83 0 0 1 .98-.64l.98.2c1.38.28 2.46 1.36 2.72 2.76l1.24 6.5c.18.84.92 1.46 1.8 1.46h6.4c.76 0 1.44-.46 1.7-1.18l2.14-5.56a.83.83 0 0 1 1.04-.54c.44.14.68.62.54 1.04Z%27 fill=%27%23fff%27/%3E%3Cpath d=%27M19 10v6M16 13h6%27 stroke=%27%23fff%27 stroke-width=%271.5%27 stroke-linecap=%27round%27/%3E%3Cpath d=%27M22.24 24.16a1.66 1.66 0 1 0 0 3.32 1.66 1.66 0 0 0 0-3.32ZM15.72 24.16a1.66 1.66 0 1 0 0 3.32 1.66 1.66 0 0 0 0-3.32Z%27 fill=%27%23fff%27/%3E%3C/svg%3E");
		}


/* 1) Make the two columns same height (override inline align-items:flex-start) */
.wd-hover-small .cen-small-card .product-element-columns.wd-product-columns{
  align-items: stretch !important;
}

/* 2) Right column becomes a full-height flex column */
.wd-hover-small .cen-small-card .product-element-retailers.wd-product-retailers{
  display: flex !important;
  flex-direction: column !important;
}

/* 3) The inner wrapper also flex-column so we can push ATC down */
.wd-hover-small .cen-small-card .product-element-retailers .retailer-info-container.wd-retailer-info{
  display: flex !important;
  flex-direction: column !important;
  height: 100%;
}

/* 4) ALWAYS push qty + cart block to the bottom */
.wd-hover-small .cen-small-card .cen-small-atc-wrap{
  margin-top: 8px !important;
}


/* ===========================
   FINAL: Retailers center, ATC bottom
   =========================== */

/* A) columns: stretch so right column gets full height */
.wd-hover-small .cen-small-card .product-element-columns.wd-product-columns{
  align-items: stretch !important;
}

/* B) right column becomes a full-height flex column */
.wd-hover-small .cen-small-card .product-element-retailers.wd-product-retailers{
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
}

/* C) THIS is the key: make this wrapper fill available height */
.wd-hover-small .cen-small-card
.product-element-retailers
.retailer-info-container.wd-retailer-info{
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;     /* fill height */
  min-height: 0 !important;
}

/* D) Center the retailer list vertically (the inner plugin wrapper) */
.wd-hover-small .cen-small-card
.product-element-retailers
.retailer-info-container.wd-retailer-info
> .retailer-info-container{
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-height: 0 !important;
}

/* E) Always push qty + cart to the bottom */
.wd-hover-small .cen-small-card .cen-small-atc-wrap{
  margin-top: auto !important;
}
