/* ==========================================================================
   Single Product — light theme (FIXED layout)
   Image + Title/Price/Description/Add-to-cart side by side.
   Tabs / Reviews / Related products forced to full width, below.
   Works with the STANDARD WooCommerce markup — does not require any
   custom PHP class, so it works even if only this CSS file is updated.
   Scoped entirely under body.single-product.
   ========================================================================== */

body.single-product {
	--gw-bg: #ffffff;
	--gw-surface: #f5f3ef;
	--gw-border: #e4e0d8;
	--gw-text: #1a1a1a;
	--gw-muted: #6b6b6b;
	--gw-accent: #b8860b;
	--gw-accent-dark: #96700a;
	--gw-radius: 10px;
}

body.single-product #primary,
body.single-product .content-area {
	background: var(--gw-bg);
	color: var(--gw-text);
}

/* Breadcrumb */
body.single-product .woocommerce-breadcrumb {
	max-width: 1180px;
	margin: 0 auto;
	padding: 18px 20px 0;
	color: var(--gw-muted);
	font-size: 0.9rem;
}
body.single-product .woocommerce-breadcrumb a {
	color: var(--gw-muted);
	text-decoration: none;
}
body.single-product .woocommerce-breadcrumb a:hover {
	color: var(--gw-accent);
}

/* ==========================================================================
   THE FIX: target the standard WooCommerce product wrapper directly
   (.woocommerce div.product) instead of a custom class, and make it a
   self-clearing flex container so nothing after it (tabs/reviews) can
   ever float up beside it.
   ========================================================================== */
body.single-product .woocommerce div.product {
	max-width: 1180px;
	margin: 0 auto;
	padding: 24px 20px 60px;
	display: flex;
	flex-wrap: wrap;
	gap: 44px;
	align-items: flex-start;
	background: var(--gw-bg);
}

/* Gallery column — bigger, and never allowed to shrink too small */
body.single-product .woocommerce div.product div.images {
	flex: 1 1 480px;
	max-width: 560px;
	float: none !important;   /* cancel WooCommerce's default float */
	width: auto !important;   /* cancel WooCommerce's default 48% width */
	margin: 0;
}

/* Summary column (title, subtitle, rating, price, description, add to cart) */
body.single-product .woocommerce div.product .summary.entry-summary {
	flex: 1 1 360px;
	float: none !important;
	width: auto !important;
	margin: 0;
	color: var(--gw-text);
}

/* Force everything AFTER the product block (tabs, reviews, related,
   upsells) to sit on its own full-width row below — never beside it. */
body.single-product .woocommerce-tabs,
body.single-product #reviews,
body.single-product .related.products,
body.single-product .upsells.products {
	clear: both;
	float: none;
	width: 100%;
	max-width: 1180px;
	margin: 40px auto 0;
	padding: 0 20px;
	color: var(--gw-text);
	box-sizing: border-box;
}

@media (max-width: 768px) {
	body.single-product .woocommerce div.product {
		flex-wrap: wrap;
		gap: 24px;
		padding: 16px 16px 40px;
	}
	body.single-product .woocommerce div.product div.images,
	body.single-product .woocommerce div.product .summary.entry-summary {
		flex-basis: 100%;
		max-width: 100%;
	}
}

/* Gallery — bigger image */
body.single-product .woocommerce-product-gallery {
	position: relative;
	background: var(--gw-surface);
	border: 1px solid var(--gw-border);
	border-radius: var(--gw-radius);
	overflow: hidden;
	opacity: 1 !important;
}
body.single-product .woocommerce-product-gallery__wrapper img,
body.single-product .woocommerce div.product div.images img {
	width: 100% !important;
	height: auto;
	min-height: 420px;
	object-fit: cover;
	display: block;
}

/* "Sale!" badge — circular, top-left over the image */
body.single-product span.onsale {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 5;
	background: var(--gw-accent);
	color: #ffffff;
	font-weight: 700;
	font-size: 0.85rem;
	line-height: 1;
	padding: 10px 14px;
	border-radius: 999px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Thumbnail row */
body.single-product .flex-control-thumbs,
body.single-product ol.flex-control-thumbs {
	display: flex;
	gap: 10px;
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
}
body.single-product .flex-control-thumbs li {
	width: 84px;
	height: 84px;
	flex: 0 0 auto;
}
body.single-product .flex-control-thumbs img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 8px;
	border: 2px solid var(--gw-border);
	cursor: pointer;
	opacity: 0.85;
	transition: opacity 0.15s ease, border-color 0.15s ease;
}
body.single-product .flex-control-thumbs img:hover {
	opacity: 1;
}
body.single-product .flex-control-thumbs img.flex-active {
	opacity: 1;
	border-color: var(--gw-accent);
}

/* Title / subtitle */
body.single-product .summary.entry-summary .product_title {
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 6px;
	color: var(--gw-text);
}
body.single-product .gw-product-subtitle,
body.single-product .summary.entry-summary > span[class*="category"] {
	margin: 0 0 14px;
	color: var(--gw-muted);
	font-size: 1rem;
}

/* Rating */
body.single-product .woocommerce-product-rating {
	margin: 0 0 16px;
	display: flex;
	align-items: center;
	gap: 8px;
}
body.single-product .star-rating {
	color: var(--gw-accent);
}
body.single-product .star-rating span::before {
	color: var(--gw-accent);
}
body.single-product .woocommerce-review-link {
	color: var(--gw-muted);
	font-size: 0.9rem;
	text-decoration: none;
}
body.single-product .woocommerce-review-link:hover {
	color: var(--gw-accent);
}

/* Price + Save badge */
body.single-product .summary.entry-summary p.price,
body.single-product .summary.entry-summary span.price {
	margin: 0 0 18px;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 1.9rem;
	font-weight: 700;
	color: var(--gw-text);
}
body.single-product .summary.entry-summary p.price del {
	color: var(--gw-muted);
	font-weight: 400;
	font-size: 1.1rem;
	opacity: 0.8;
}
body.single-product .summary.entry-summary p.price ins {
	text-decoration: none;
	color: var(--gw-text);
}
body.single-product .gw-save-badge {
	background: rgba(184, 134, 11, 0.12);
	color: var(--gw-accent-dark);
	font-size: 0.85rem;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 999px;
	white-space: nowrap;
}

/* Short description */
body.single-product .woocommerce-product-details__short-description {
	color: var(--gw-muted);
	font-size: 1rem;
	line-height: 1.6;
	margin-bottom: 26px;
	max-width: 46ch;
}

/* Quantity stepper (only appears if add-to-cart/simple.php was customized) */
body.single-product .gw-qty-stepper {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--gw-border);
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 18px;
	width: fit-content;
}
body.single-product .gw-qty-stepper .gw-qty-btn {
	background: var(--gw-surface);
	color: var(--gw-text);
	border: none;
	width: 40px;
	height: 40px;
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
}
body.single-product .gw-qty-stepper .gw-qty-btn:hover {
	background: var(--gw-border);
}
body.single-product .gw-qty-stepper .quantity {
	display: block;
	margin: 0;
}
body.single-product .gw-qty-stepper input.qty,
body.single-product .summary.entry-summary .quantity .qty {
	width: 60px;
	height: 40px;
	border: 1px solid var(--gw-border);
	background: var(--gw-bg);
	color: var(--gw-text);
	text-align: center;
	font-size: 1rem;
	border-radius: 6px;
}

/* Add to Cart + Buy Now buttons */
body.single-product .gw-cart-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}
body.single-product .summary.entry-summary form.cart {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
	margin-top: 12px;
}
body.single-product .gw-btn-primary,
body.single-product .gw-btn-buynow,
body.single-product .single_add_to_cart_button {
	flex: 1 1 160px;
	text-align: center;
	padding: 14px 22px;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	border: 1px solid var(--gw-accent);
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
body.single-product .gw-btn-primary,
body.single-product .single_add_to_cart_button {
	background: var(--gw-accent);
	color: #ffffff;
}
body.single-product .gw-btn-primary:hover,
body.single-product .single_add_to_cart_button:hover {
	background: var(--gw-accent-dark);
	border-color: var(--gw-accent-dark);
}
body.single-product .gw-btn-buynow {
	background: transparent;
	color: var(--gw-accent-dark);
}
body.single-product .gw-btn-buynow:hover {
	background: rgba(184, 134, 11, 0.08);
}

/* Stock text */
body.single-product p.stock {
	color: var(--gw-muted);
	margin: 0 0 14px;
}
body.single-product p.stock.out-of-stock {
	color: #c0392b;
}

/* Meta (SKU / categories / tags) */
body.single-product .product_meta {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid var(--gw-border);
	color: var(--gw-muted);
	font-size: 0.9rem;
}
body.single-product .product_meta a {
	color: var(--gw-muted);
}
body.single-product .product_meta a:hover {
	color: var(--gw-accent);
}

/* Tabs styling */
body.single-product .woocommerce-tabs ul.tabs li a {
	color: var(--gw-muted);
}
body.single-product .woocommerce-tabs ul.tabs li.active a {
	color: var(--gw-accent-dark);
}
body.single-product .related.products h2 {
	color: var(--gw-text);
}

/* Accessibility */
body.single-product a:focus-visible,
body.single-product button:focus-visible,
body.single-product input:focus-visible {
	outline: 2px solid var(--gw-accent);
	outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
	body.single-product * {
		transition: none !important;
	}
}