/* Single product page design. Loaded on every product page. */
body.ffu-product-page {
	--ffu-blue: #0057b7;
	--ffu-blue-dark: #00408a;
	--ffu-yellow: #ffd500;
	--ffu-ink: #1a1f36;
	--ffu-muted: #5b6275;
	--ffu-line: #e4e7ee;
	overflow-x: clip;
}

/* Show content straight away: scroll animations left it blank and made the page too wide. */
.ffu-product-page .elementor-location-single .elementor-element,
.ffu-product-page .elementor-location-single .elementor-invisible {
	visibility: visible !important;
	opacity: 1 !important;
	animation: none !important;
	transform: none !important;
}

.ffu-product-page .elementor-location-single .woocommerce-product-gallery {
	opacity: 1 !important;
}

/* Remove the fixed heights that created the long empty space. */
.ffu-product-page .elementor-location-single .elementor-section,
.ffu-product-page .elementor-location-single .elementor-container,
.ffu-product-page .elementor-location-single .elementor-column,
.ffu-product-page .elementor-location-single .elementor-widget-wrap {
	min-height: 0 !important;
}

/* Tighten the gap between the product and its description. */
.ffu-product-page .elementor-location-single .elementor-inner-section {
	padding-bottom: 24px !important;
}

/* Image */
.ffu-product-page .woocommerce-product-gallery img {
	border-radius: 16px;
	box-shadow: 0 12px 32px rgba(26, 31, 54, 0.12);
}

/* Title first, then price */
.ffu-product-page .elementor-inner-column:last-child > .elementor-widget-wrap {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-left: 40px;
}

.ffu-product-page .elementor-widget-woocommerce-product-title { order: 1; }
.ffu-product-page .elementor-widget-woocommerce-product-price { order: 2; }
.ffu-product-page .elementor-widget-woocommerce-product-short-description { order: 3; }
.ffu-product-page .elementor-widget-woocommerce-product-add-to-cart { order: 4; }

.ffu-product-page .elementor-widget-woocommerce-product-title .product_title {
	margin: 0;
	color: var(--ffu-ink);
	font-size: clamp(28px, 4vw, 40px);
	font-weight: 700;
	line-height: 1.15;
}

.ffu-product-page .elementor-widget-woocommerce-product-price .price {
	margin: 4px 0 8px;
	color: var(--ffu-blue) !important;
	font-size: clamp(22px, 3vw, 28px) !important;
	font-weight: 700;
}

.ffu-product-page .elementor-widget-woocommerce-product-short-description {
	color: var(--ffu-muted);
	font-size: 17px;
	line-height: 1.55;
}

/* Subscription details */
.ffu-product-page .reepay_subscription_info_container {
	margin: 12px 0 20px;
	padding: 20px 22px;
	border: 1px solid var(--ffu-line);
	border-left: 4px solid var(--ffu-yellow);
	border-radius: 12px;
	background: #f7f9fc;
}

.ffu-product-page .reepay_subscription_info_container h1,
.ffu-product-page .reepay_subscription_info_container h2,
.ffu-product-page .reepay_subscription_info_container h3,
.ffu-product-page .reepay_subscription_info_container h4 {
	margin: 0 0 10px;
	color: var(--ffu-ink);
	font-size: 17px;
	font-weight: 700;
}

.ffu-product-page .reepay_subscription_info {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffu-product-page .reepay_subscription_info li {
	position: relative;
	margin: 6px 0;
	padding-left: 24px;
	color: var(--ffu-ink);
	font-size: 15px;
	line-height: 1.45;
}

.ffu-product-page .reepay_subscription_info li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: var(--ffu-blue);
	font-weight: 700;
}

/* Add to cart */
.ffu-product-page form.cart {
	display: flex;
	align-items: stretch;
	gap: 12px;
	margin: 0;
}

.ffu-product-page form.cart .quantity {
	flex: 0 0 88px;
	margin: 0 !important;
}

.ffu-product-page form.cart .quantity .qty {
	width: 100%;
	height: 100%;
	min-height: 54px;
	border: 1px solid var(--ffu-line);
	border-radius: 12px;
	color: var(--ffu-ink);
	font-size: 18px;
	font-weight: 700;
	text-align: center;
}

.ffu-product-page form.cart .quantity .qty:focus-visible {
	outline: 3px solid var(--ffu-yellow);
	outline-offset: 2px;
}

.ffu-product-page form.cart .single_add_to_cart_button {
	display: block;
	flex: 1 1 auto;
	margin-left: 0 !important;
	padding: 16px 24px !important;
	border: 0;
	border-radius: 12px !important;
	background: var(--ffu-blue) !important;
	color: #fff !important;
	font-size: 18px !important;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.ffu-product-page form.cart .single_add_to_cart_button:hover,
.ffu-product-page form.cart .single_add_to_cart_button:focus-visible {
	background: var(--ffu-blue-dark) !important;
}

.ffu-product-page form.cart .single_add_to_cart_button:focus-visible {
	outline: 3px solid var(--ffu-yellow);
	outline-offset: 2px;
}

/* Long description */
.ffu-product-page .elementor-widget-woocommerce-product-data-tabs {
	margin-top: 32px;
}

.ffu-product-page .woocommerce-tabs .wc-tabs {
	display: none;
}

.ffu-product-page .woocommerce-tabs .panel {
	display: block !important;
	margin: 0 !important;
	padding: 24px 0 0 !important;
	border-top: 1px solid var(--ffu-line);
	color: var(--ffu-ink);
	font-size: 16px;
	line-height: 1.65;
}

.ffu-product-page .woocommerce-tabs .panel > h2:first-child {
	display: none;
}

@media (max-width: 767px) {
	.ffu-product-page .elementor-inner-column:last-child > .elementor-widget-wrap {
		padding-left: 0;
		padding-top: 16px;
	}

	.ffu-product-page .woocommerce-product-gallery img {
		max-height: 360px;
		object-fit: contain;
	}
}
