/**
 * SnatchFive Product Actions — Add to Cart / Buy Now / sticky bar.
 * Brand: Snatch Black #3b3d43, Snatch Blue #0857f4, Snatch Green #b4e94c.
 */

/* ---- Task 4: single product — Add to Cart + Buy Now equal width on one row ---- */
/* The buttons live in form.cart > .product-sticky-content > .container alongside
   the quantity. Keep quantity at its natural width and split the remaining space
   equally between Add to Cart and Wolmart's native Buy Now. */
.woocommerce div.product form.cart .product-sticky-content > .container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}
.woocommerce div.product form.cart .product-sticky-content > .container .quantity-wrapper,
.woocommerce div.product form.cart .product-sticky-content > .container .quantity {
	flex: 0 0 auto;
	margin: 0;
}
.woocommerce div.product form.cart .single_add_to_cart_button,
.woocommerce div.product form.cart .single_buy_now_button {
	flex: 1 1 0 !important;
	width: auto !important;
	min-width: 0;
	margin: 0 !important;
}

/* Task 5: narrower quantity field with the minus/plus pulled in close to the
   number, so Add to Cart + Buy Now get more room. The theme makes .quantity
   14rem wide with the buttons absolutely positioned at the right edge. */
.woocommerce div.product form.cart .quantity-wrapper {
	width: auto !important;
	flex: 0 0 auto;
}
.woocommerce div.product form.cart .quantity-wrapper .quantity {
	width: 116px !important;
	margin-right: 0;
}

/* ---- Shop Meals loop (page id 16): title + price both left-aligned, tighter gap ---- */
.page-id-16 ul.products li.product .product-details,
.page-id-16 .product-loop .product-details {
	text-align: left;
}
.page-id-16 .product-loop .woocommerce-loop-product__title {
	margin-bottom: 2px;
}
.page-id-16 .product-loop .product-details .price {
	margin-top: 0;
}

/* ---- Loop: cart icon on the image + Buy Now on hover ---- */

/* The image is the positioning context for the overlay actions. */
.woocommerce ul.products li.product .product-media,
.product-wrap .product-media {
	position: relative;
	overflow: hidden;
}

/* Circular AJAX add-to-cart icon, attached to the bottom-right of the image. */
.product-media a.button.sf-atc-icon,
.woocommerce ul.products li.product .product-media a.button.sf-atc-icon {
	position: absolute;
	right: 12px;
	bottom: 12px;
	z-index: 4;
	width: 46px;
	height: 46px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: #ffffff;
	box-shadow: 0 4px 14px rgba(16, 24, 40, 0.18);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b3d43' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 22px;
	font-size: 0 !important;
	line-height: 0;
	color: transparent !important;
	transition: bottom .25s ease, transform .12s ease, background-color .15s ease;
}
.product-media a.button.sf-atc-icon:hover {
	transform: scale(1.06);
	background-color: #f3f5f9;
}
/* loading + added states */
.product-media a.button.sf-atc-icon.loading { opacity: .65; pointer-events: none; }
.product-media a.button.sf-atc-icon.added {
	background-color: #b4e94c;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b3d43' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}
/* Hide WooCommerce's auto "View cart" link that appears after an AJAX add. */
.product-media a.added_to_cart,
.woocommerce ul.products li.product .product-media a.added_to_cart { display: none !important; }

/* Buy Now: hidden, slides up across the bottom of the image on hover. */
.product-media a.sf-buy-now-hover {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	display: block;
	text-align: center;
	/* Symmetric padding so the label is truly centered. The cart icon lifts to
	   bottom:58px on hover (rule below), clearing the bar, so no right inset is
	   needed to avoid it. */
	padding: 12px 14px;
	background: #0857f4;
	color: #ffffff !important;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none !important;
	transform: translateY(100%);
	opacity: 0;
	transition: transform .25s ease, opacity .2s ease;
}
.product-wrap:hover .product-media a.sf-buy-now-hover,
.woocommerce ul.products li.product:hover .product-media a.sf-buy-now-hover {
	transform: translateY(0);
	opacity: 1;
}
.product-media a.sf-buy-now-hover:hover { background: #0746c9; color: #fff !important; }

/* On hover, lift the cart icon so it sits above the Buy Now bar. */
.product-wrap:hover .product-media a.button.sf-atc-icon,
.woocommerce ul.products li.product:hover .product-media a.button.sf-atc-icon { bottom: 58px; }

/* The single-product sticky add-to-cart bar is now provided by Wolmart's native
   feature (task 3), so this plugin no longer renders its own sticky bar. */
