/* Shop: product cards, product page buttons and layout. Loaded after flatsome-main. */

/* ---- Cards ---- */
/* Equal cards in a grid row: the column already stretches to the row's height; the box grows so
   the card action (quantity and "Buy now", or "View more") sits at the bottom of every card, even
   when one card has a star rating line and its neighbours do not. Sliders do not stretch their
   cells, so the home page sliders use Flatsome's equalize_box instead (inc/home.php). */
.product-small.col > .col-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
}
.product-small.col > .col-inner > .product-small.box {
	flex: 1 0 auto;
}
.ntv-card-form.chowordpress-custom--qty_wrap {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 75px;
}
.ntv-card-form .quantity {
	margin: 0;
}
.ntv-buy-now {
	background-color: #d40000;
	border: 2px solid #d40000;
	border-radius: 5px;
	color: #fff;
	cursor: pointer;
	text-transform: uppercase;
	font-weight: bold;
	margin: 0;
	transition: background-color 0.3s ease;
}
.ntv-buy-now:hover,
.ntv-buy-now:focus {
	background-color: #b30000;
	border-color: #b30000;
	color: #fff;
}
.ntv-card-buy {
	margin-top: 5px;
	padding: 0 14px;
	min-height: 0;
	height: 28px;
	line-height: 24px;
	font-size: 12px;
}
.chowordpress-custom--no-price {
	height: 75px;
	display: flex;
	align-items: center;
	justify-content: center;
}
/* The production Custom CSS option styles `.chowordpress-custom--no-price .button` with padding,
   a 10px font and square corners, which pushed the text below the middle; this selector is more
   specific. Same height, corners and type as the card "Buy now" button. */
.chowordpress-custom--no-price .button.ntv-view-more {
	margin: 0;
	padding: 0 14px;
	min-height: 0;
	height: 28px;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	font-size: 12px;
	font-weight: bold;
	text-transform: uppercase;
	background-color: #f46c84;
	color: #fff;
	border: 2px solid #f46c84;
	border-radius: 5px;
}

/* ---- Product page: quantity, "Buy now" and "Add to cart" on one row ---- */
/* The row container is the simple product's form, or the variation block of a variable product;
   :has() limits it to the forms that carry the redesign's buttons (not grouped or external). */
form.cart:has(> .ntv-buy-row),
.woocommerce-variation-add-to-cart:has(> .ntv-buy-row) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 15px;
}
form.cart .quantity,
.product-info form.cart .quantity {
	float: none;
	display: flex;
	flex: 0 0 auto;
	margin: 0;
}
/* Square +/- buttons and a quantity field the height of the buy buttons. */
form.cart .ux-quantity .ux-quantity__button,
form.cart .ux-quantity input.qty {
	box-sizing: border-box;
	height: 44px;
	min-height: 0;
	margin: 0;
}
form.cart .ux-quantity .ux-quantity__button {
	width: 44px;
	padding: 0;
	text-align: center;
}
form.cart .ux-quantity input.qty {
	width: 48px;
	max-width: none; /* Flatsome caps it at 2.5em */
}
/* Flatsome gives every child of the form `flex: 1 1 100%`; the row takes the rest of the line. */
.ntv-buy-row,
form.cart > .ntv-buy-row,
.woocommerce-variation-add-to-cart > .ntv-buy-row {
	display: flex;
	flex: 1 1 0;
	gap: 10px;
	min-width: 0;
}
/* The "added" note, and WooCommerce's own fields when a plugin adds some, take a full line. */
form.cart > :not(.quantity):not(.ntv-buy-row),
.woocommerce-variation-add-to-cart > :not(.quantity):not(.ntv-buy-row) {
	flex-basis: 100%;
}
.ntv-buy-row .button {
	flex: 1 1 0;
	min-width: 0;
	box-sizing: border-box;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1.1;
	font-size: 15px;
	border-radius: 5px;
	text-align: center;
	white-space: normal;
}
.ntv-buy-row .single_add_to_cart_button {
	background-color: #f46c84;
	border: 2px solid #f46c84;
	color: #fff;
}
/* "Buy now" comes after "Add to cart" in the markup (so Enter in the quantity field adds to the
   cart instead of going to checkout) but is shown first, as the client asked. */
.ntv-buy-row .ntv-product-buy {
	order: -1;
}
/* Phones: the whole row still fits beside the quantity field. */
@media (max-width: 549px) {
	.ntv-buy-row {
		gap: 6px;
	}
	.ntv-buy-row .button {
		font-size: 13px;
		padding: 0 4px;
	}
}
.ntv-buy-now.ntv-disabled,
.ntv-buy-now.loading {
	opacity: 0.5;
}
.ntv-added-note {
	margin: 0;
	color: #2e7d32;
	font-weight: bold;
}
.ntv-shake {
	animation: ntv-shake 0.4s ease-in-out;
}
@keyframes ntv-shake {
	0% { transform: translateX(0); }
	25% { transform: translateX(-3px); }
	50% { transform: translateX(3px); }
	75% { transform: translateX(-3px); }
	100% { transform: translateX(0); }
}

/* ---- Product page without sidebar: details and reviews full width, heading on top ---- */
.product-page-sections .product-section .row > .col {
	flex-basis: 100%;
	max-width: 100%;
}
.product-page-sections .product-section .row > .col h5 {
	margin-top: 15px;
	margin-bottom: 10px;
}
