/**
 * MooWoodle School Builder — WooCommerce Page Styles
 *
 * Provides spacing, typography, and layout fixes for WooCommerce
 * pages on the Hello Elementor theme.
 */

/* ----------------------------------------------------------------
 * 0. GLOBAL WC PAGES — layout, width, footer spacing
 * ---------------------------------------------------------------- */

/* Sticky footer: flex the page so .site-main fills remaining space */
.woocommerce-cart,
.woocommerce-checkout {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.woocommerce-cart .site-main,
.woocommerce-checkout .site-main {
	flex: 1 0 auto;
}

.woocommerce-cart .site-main,
.woocommerce-checkout .site-main,
.woocommerce-page.single-product .site-main {
	max-width: 100% !important;
	width: 100%;
	padding-left: 5%;
	padding-right: 5%;
	box-sizing: border-box;
}

/* Neutralise theme .alignwide negative margins on WC pages */
.woocommerce-cart .alignwide,
.woocommerce-checkout .alignwide,
.woocommerce-page.single-product .alignwide {
	margin-inline: 0 !important;
}

/* ----------------------------------------------------------------
 * 0b. CHECKOUT — order summary / renewal widget
 * ---------------------------------------------------------------- */

/* Subscription renewal summary below the order totals */
.woocommerce-checkout .wps_sfw_checkout_subscription_details,
.woocommerce-checkout .wps-sfw-checkout-subscription,
.woocommerce-checkout [class*="subscription"] table {
	width: 100%;
	border-collapse: collapse;
}

.woocommerce-checkout .wps_sfw_checkout_subscription_details td,
.woocommerce-checkout .wps_sfw_checkout_subscription_details th,
.woocommerce-checkout .wps-sfw-checkout-subscription td,
.woocommerce-checkout .wps-sfw-checkout-subscription th {
	padding: 0.5rem 0;
	vertical-align: baseline;
	text-align: left;
}

.woocommerce-checkout .wps_sfw_checkout_subscription_details td:last-child,
.woocommerce-checkout .wps_sfw_checkout_subscription_details th:last-child,
.woocommerce-checkout .wps-sfw-checkout-subscription td:last-child,
.woocommerce-checkout .wps-sfw-checkout-subscription th:last-child {
	text-align: right;
}

/* Renewal heading — keep on one line and tone down the link colour */
.woocommerce-checkout h3[class*="renewal"],
.woocommerce-checkout .wps_sfw_renewal_heading,
.woocommerce-checkout .wps-sfw-checkout-subscription h3 {
	font-size: 1.1rem;
	font-weight: 600;
	margin: 1.25rem 0 0.75rem;
	line-height: 1.4;
}

.woocommerce-checkout h3[class*="renewal"] a,
.woocommerce-checkout .wps_sfw_renewal_heading a,
.woocommerce-checkout .wps-sfw-checkout-subscription h3 a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: #ccc;
}

/* ----------------------------------------------------------------
 * 1. PRODUCT SUMMARY — tighten up the core details
 * ---------------------------------------------------------------- */

.single-product div.product {
	margin-bottom: 3rem;
}

.single-product div.product .product_title {
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: 0.5rem;
}

.single-product div.product .price {
	font-size: 1.25rem;
	margin-bottom: 1.25rem;
}

/* ----------------------------------------------------------------
 * 2. SUBSCRIPTION DETAILS block (output by Course_Bundles class)
 * ---------------------------------------------------------------- */

.moowoodle-product-details {
	margin: 1.5rem 0 0.5rem;
	padding: 0;
}

.moowoodle-product-details h3 {
	font-size: 1.15rem;
	font-weight: 600;
	margin: 0 0 0.5rem;
	color: #333;
}

.moowoodle-product-details ul {
	list-style: disc;
	padding-left: 1.25rem;
	margin: 0 0 0.75rem;
}

.moowoodle-product-details li {
	font-size: 0.95rem;
	line-height: 1.6;
	color: #555;
}

/* ----------------------------------------------------------------
 * 3. ADD TO CART BUTTON
 * ---------------------------------------------------------------- */

.single-product div.product form.cart {
	margin-top: 1.25rem;
	margin-bottom: 1.5rem;
}

.single-product div.product form.cart .single_add_to_cart_button {
	font-size: 1rem;
	padding: 0.75rem 2rem;
	border-radius: 6px;
}

/* ----------------------------------------------------------------
 * 4. PRODUCT META (SKU, Category, Tags)
 * ---------------------------------------------------------------- */

.single-product div.product .product_meta {
	font-size: 0.9rem;
	color: #777;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #eee;
}

/* ----------------------------------------------------------------
 * 5. RELATED / UP-SELL SECTIONS — clear break + heading
 * ---------------------------------------------------------------- */

.single-product section.related.products,
.single-product section.up-sells.products {
	margin-top: 3rem;
	padding-top: 2rem;
	padding-bottom: 3rem;
	margin-bottom: 3rem;
	border-top: 2px solid #eee;
	clear: both;
}

.single-product section.related.products > h2,
.single-product section.up-sells.products > h2 {
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 1.5rem;
	color: #222;
}

/* ----------------------------------------------------------------
 * 6. PRODUCT CARD GRID (related + up-sells)
 *
 *    WooCommerce adds .columns-4 (or similar) and sets inline-ish
 *    widths on li.product. We override everything with CSS grid so
 *    the cards fill the space regardless of the column count class.
 * ---------------------------------------------------------------- */

.single-product section.related.products ul.products,
.single-product section.up-sells.products ul.products {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 1.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

/* Reset WooCommerce forced widths & floats on li.product */
.single-product section.related.products ul.products li.product,
.single-product section.up-sells.products ul.products li.product {
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
	border: 1px solid #eee;
	border-radius: 10px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	background: #fff;
	padding-bottom: 1rem;
	display: flex;
	flex-direction: column;
}

/* Kill WooCommerce clearfix pseudo-elements (float grid remnants) */
.single-product section.related.products ul.products li.product::before,
.single-product section.related.products ul.products li.product::after,
.single-product section.up-sells.products ul.products li.product::before,
.single-product section.up-sells.products ul.products li.product::after,
.single-product section.related.products ul.products::before,
.single-product section.related.products ul.products::after,
.single-product section.up-sells.products ul.products::before,
.single-product section.up-sells.products ul.products::after {
	content: none !important;
	display: none !important;
}

.single-product section.related.products ul.products li.product:hover,
.single-product section.up-sells.products ul.products li.product:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

/* Product image */
.single-product section.related.products ul.products li.product a img,
.single-product section.up-sells.products ul.products li.product a img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

/* Product title */
.single-product section.related.products ul.products li.product .woocommerce-loop-product__title,
.single-product section.related.products ul.products li.product a h2,
.single-product section.up-sells.products ul.products li.product .woocommerce-loop-product__title,
.single-product section.up-sells.products ul.products li.product a h2 {
	font-size: 1.05rem;
	font-weight: 600;
	padding: 0.75rem 1rem 0.25rem;
	margin: 0;
	color: #333;
	line-height: 1.3;
}

/* Price */
.single-product section.related.products ul.products li.product .price,
.single-product section.up-sells.products ul.products li.product .price {
	padding: 0.25rem 1rem;
	font-size: 0.95rem;
	color: #666;
}

/* Add-to-cart button */
.single-product section.related.products ul.products li.product .button,
.single-product section.up-sells.products ul.products li.product .button {
	margin: auto 1rem 0;
	font-size: 0.9rem;
	border-radius: 5px;
	text-align: center;
}

/* ----------------------------------------------------------------
 * 7. RESPONSIVE
 * ---------------------------------------------------------------- */

@media (max-width: 768px) {
	.single-product section.related.products ul.products,
	.single-product section.up-sells.products ul.products {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
		gap: 1rem;
	}

	.single-product section.related.products > h2,
	.single-product section.up-sells.products > h2 {
		font-size: 1.25rem;
	}
}



.wps_recurring_bifurcation_wrapper h4 {
	margin: 20px auto 40px;
}

.wps_recurring_bifurcation_wrapper ul {
	margin: 0 0 20px;
	padding: 0;
}

.wps_recurring_bifurcation_wrapper li {
	margin: 0 0 10px;
}

.wps_recurring_bifurcation_wrapper li label {
	font-weight: 600;
}