/*------------------------------------------------------------------------
 Product detail page redesign for Eprom PCE Child.

 Loaded by functions.php on is_product() only, so it cannot collide with
 the shop/listing styles in style.css. It layers over the parent's
 woocommerce.css + light.css (2013-era): floats become CSS grid, the gray
 gradient buttons become flat accent buttons, and the boxed tab bar
 becomes an underline nav. The accent #fa4c29 and Open Sans come from the
 parent's light skin.

 functions.php also enables the WooCommerce gallery features (slider,
 zoom, lightbox); the flexslider/thumbnail rules below style that markup,
 which the parent theme predates.
 ------------------------------------------------------------------------*/


/* ----------------------------------------------------------------------
	Layout: white card, two columns

	The parent floats .images (44%) against .summary (52%). Grid replaces
	that; tabs and related products span both columns. The sale badge is
	rendered as a direct child of div.product, so it must be absolutely
	positioned or it would occupy a grid cell of its own.
/* ---------------------------------------------------------------------- */

.single-product div.product {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: 32px 48px;
	align-items: start;
	background: #fff;
	border-radius: 14px;
	padding: 36px;
	margin-bottom: 40px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 10px 30px rgba(0, 0, 0, .07);
}

.single-product div.product .images,
.single-product div.product .summary {
	float: none;
	width: 100%;
	margin-bottom: 0;
}

.single-product div.product .woocommerce-tabs,
.single-product div.product .related.products {
	grid-column: 1 / -1;
	min-width: 0;
}

.single-product div.product span.onsale {
	position: absolute;
	top: 48px;
	left: 48px;
	z-index: 5;
	background: #fa4c29;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	padding: 8px 12px;
	border-radius: 999px;
}


/* ----------------------------------------------------------------------
	Gallery

	Markup produced by WooCommerce with slider/zoom/lightbox support
	enabled: .flex-viewport around the main image, ol.flex-control-thumbs
	for thumbnails, a.woocommerce-product-gallery__trigger for the
	lightbox. The WooCommerce frontend stylesheets are not loaded on this
	install, so everything is styled here.
/* ---------------------------------------------------------------------- */

.single-product .woocommerce-product-gallery {
	position: relative;
}

.single-product .woocommerce-product-gallery .flex-viewport,
.single-product .woocommerce-product-gallery__image {
	border-radius: 10px;
	overflow: hidden;
	background: #f4f4f4;
}

.single-product .woocommerce-product-gallery__image a {
	display: block;
}

.single-product .woocommerce-product-gallery img {
	display: block;
	width: 100%;
	height: auto;
}

.single-product .woocommerce-product-gallery__trigger {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 9;
	width: 40px;
	height: 40px;
	background: rgba(255, 255, 255, .92);
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
	font-size: 17px;
	line-height: 40px;
	text-align: center;
	text-decoration: none;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs li {
	margin: 0;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs img {
	border-radius: 8px;
	cursor: pointer;
	opacity: .55;
	transition: opacity .15s ease-in-out;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs img:hover,
.single-product .woocommerce-product-gallery .flex-control-thumbs img.flex-active {
	opacity: 1;
}


/* ----------------------------------------------------------------------
	Summary: title, price, legal info, stock, description
/* ---------------------------------------------------------------------- */

/*
	Some products carry a full spec sheet (a pasted Wikipedia infobox
	table) in the short description, which sits before the cart form in
	the DOM and pushed the buy button ~1100px down the column. Flex order
	puts price and buy controls first and the long details after; the
	catch-all keeps unknown (e.g. Germanized) elements between the two
	groups instead of jumping to the top. Order only affects direct
	children, so nested elements with the same classes are unaffected.
*/
.single-product div.product .summary {
	display: flex;
	flex-direction: column;
}

.single-product div.product .summary > * {
	order: 60;
	min-width: 0;
}

.single-product div.product .summary > h1.product_title { order: 10; }
.single-product div.product .summary > p.price { order: 20; }
.single-product div.product .summary > .legal-price-info { order: 30; }
.single-product div.product .summary > p.wc-gzd-additional-info { order: 40; }
.single-product div.product .summary > p.stock { order: 41; }
.single-product div.product .summary > form.cart { order: 50; }
.single-product div.product .summary > .woocommerce-product-details__short-description { order: 70; }
.single-product div.product .summary > .product_meta { order: 80; }

.single-product div.product .summary h1.product_title {
	font-size: 27px;
	line-height: 1.3;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 14px;
	padding: 0;
}

.single-product div.product .summary p.price {
	font-size: 30px;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 2px;
}

.single-product div.product .summary p.price ins {
	color: #1a1a1a;
	text-decoration: none;
}

.single-product div.product .summary p.price del {
	font-size: 19px;
	font-weight: 400;
	color: #9a9a9a;
}

/* Germanized: "inkl. 19 % MwSt. zzgl. Versandkosten" */
.single-product div.product .summary .legal-price-info {
	font-size: 12px;
	color: #8a8a8a;
	margin-bottom: 18px;
}

.single-product div.product .summary .legal-price-info a {
	color: #8a8a8a;
	text-decoration: underline;
}

.single-product div.product .summary .woocommerce-product-details__short-description {
	font-size: 15px;
	line-height: 1.65;
	color: #4a4a4a;
	margin-bottom: 18px;
	border-top: 1px solid #ececec;
	padding-top: 16px;
}

/*
	Spec tables in the short description (pasted Wikipedia infoboxes,
	table.infobox): the browser squeezed the label column to ~126px so
	labels wrapped over three lines. Fixed label width and hairline row
	separators turn it into a tidy spec sheet.
*/
.single-product div.product .summary .woocommerce-product-details__short-description table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 12px;
	font-size: 13px;
	line-height: 1.5;
}

.single-product div.product .summary .woocommerce-product-details__short-description th,
.single-product div.product .summary .woocommerce-product-details__short-description td {
	padding: 7px 0;
	border: 0;
	border-bottom: 1px solid #f0f0f0;
	vertical-align: top;
	text-align: left;
	background: transparent;
}

.single-product div.product .summary .woocommerce-product-details__short-description th {
	width: 42%;
	padding-right: 14px;
	color: #8a8a8a;
	font-weight: 600;
}

.single-product div.product .summary .woocommerce-product-details__short-description td {
	color: #4a4a4a;
}

/* Germanized delivery time ("Lieferzeit: ...") */
.single-product div.product .summary p.wc-gzd-additional-info {
	font-size: 13px;
	color: #8a8a8a;
	margin: 0 0 4px;
}

.single-product div.product .summary p.stock {
	font-size: 13px;
	font-weight: 600;
	margin: 0 0 6px;
}

.single-product div.product .summary p.stock.in-stock { color: #1e7e34; }
.single-product div.product .summary p.stock.out-of-stock { color: #c0392b; }

.single-product div.product .summary p.stock:before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
	margin-right: 7px;
	vertical-align: 1px;
}


/* ----------------------------------------------------------------------
	Cart form

	The parent gives .quantity top:5px + padding-right:20px reserved for
	plus/minus buttons its JS no longer renders, and paints the button
	with a gray gradient (.button.alt). Flat accent button instead;
	48px controls for comfortable touch targets.
/* ---------------------------------------------------------------------- */

.single-product form.cart {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 6px 0 22px;
}

.single-product form.cart .variations {
	flex: 1 1 100%;
	margin-bottom: 0;
}

.single-product form.cart div.quantity {
	float: none;
	margin: 0;
	padding: 0;
	top: 0;
	overflow: visible;
}

.single-product form.cart .quantity input.qty {
	width: 70px;
	height: 48px;
	box-sizing: border-box;
	border: 1px solid #d5d5d5;
	border-radius: 8px;
	background: #fff;
	color: #1a1a1a;
	font-size: 16px;
	text-align: center;
	margin: 0;
}

.single-product form.cart .quantity input.qty:focus {
	border-color: #fa4c29;
	outline: none;
}

.single-product form.cart .single_add_to_cart_button {
	float: none;
	height: 48px;
	padding: 0 34px;
	border: 0;
	border-radius: 8px;
	background: #fa4c29;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .2px;
	cursor: pointer;
	transition: background .15s ease-in-out;
}

.single-product form.cart .single_add_to_cart_button:hover,
.single-product form.cart .single_add_to_cart_button:focus {
	background: #d03f22;
	color: #fff;
	border: 0;
}

.single-product div.product .product_meta {
	border-top: 1px solid #ececec;
	padding-top: 14px;
	font-size: 12px;
	color: #9a9a9a;
}

.single-product div.product .product_meta a {
	color: #9a9a9a;
	text-decoration: underline;
}


/* ----------------------------------------------------------------------
	Description ("tabs")

	The boxed 2013 tab bar becomes an underline nav; it still works if a
	product grows a second tab. The description panel ships its own
	"Beschreibung" h2, which would duplicate the active tab label.
/* ---------------------------------------------------------------------- */

.single-product .woocommerce-tabs {
	border-top: 1px solid #ececec;
	padding-top: 26px;
	margin-bottom: 0;
	overflow: visible;
}

.single-product .woocommerce-tabs ul.tabs {
	width: 100%;
	height: auto;
	border: 0;
	border-bottom: 1px solid #e5e5e5;
	margin: 0 0 20px;
	overflow: hidden;
}

.single-product .woocommerce-tabs ul.tabs li {
	width: auto;
	float: left;
	margin: 0 28px 0 0;
}

.single-product .woocommerce-tabs ul.tabs li a,
.single-product .woocommerce-tabs ul.tabs li:first-child a {
	float: none;
	display: inline-block;
	width: auto;
	height: auto;
	line-height: 1.4;
	margin: 0;
	padding: 0 0 12px;
	background: transparent;
	border: 0;
	color: #777;
	font-size: 15px;
	font-weight: 600;
}

.single-product .woocommerce-tabs ul.tabs li a:hover {
	color: #1a1a1a;
	background: transparent;
}

.single-product .woocommerce-tabs ul.tabs li.active a,
.single-product .woocommerce-tabs ul.tabs li.active:hover a:hover {
	height: auto;
	background: transparent;
	color: #1a1a1a;
	box-shadow: inset 0 -2px 0 #fa4c29;
}

.single-product .woocommerce-tabs .panel {
	margin: 0;
	font-size: 15px;
	line-height: 1.7;
	color: #4a4a4a;
}

.single-product .woocommerce-Tabs-panel--description > h2:first-child {
	display: none;
}


/* ----------------------------------------------------------------------
	Related products

	Only the section heading and spacing: the product cards themselves
	follow the shop-wide listing styles.
/* ---------------------------------------------------------------------- */

.single-product .related.products {
	border-top: 1px solid #ececec;
	padding-top: 26px;
}

.single-product .related.products > h2 {
	font-size: 21px;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 20px;
}


/* ----------------------------------------------------------------------
	Small screens
/* ---------------------------------------------------------------------- */

@media only screen and (max-width: 768px) {

	.single-product div.product {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
		padding: 18px;
		border-radius: 10px;
	}

	.single-product div.product span.onsale {
		top: 28px;
		left: 28px;
	}

	.single-product div.product .summary h1.product_title {
		font-size: 21px;
	}

	.single-product div.product .summary p.price {
		font-size: 25px;
	}

	.single-product form.cart .single_add_to_cart_button {
		flex: 1 1 auto;
	}
}


/* ----------------------------------------------------------------------
	Contrast corrections

	Measured on the live product page: the muted greys and the flat accent
	fill sit under the 4.5:1 that WCAG AA asks of text, which the BFSG has
	made a compliance question for German shops since June 2025. Darkened
	only as far as needed, keeping the three-step grey hierarchy this page
	was designed around.

	  #9a9a9a  2.81:1  ->  #767676  4.54:1
	  #8a8a8a  3.45:1  ->  #6f6f6f  5.13:1
	  #777     4.48:1  ->  #666     5.74:1
	  white on #fa4c29  3.43:1  ->  white on #d03f22  4.74:1

	A button label is text, so 4.5:1 applies to it as well - the 3:1 rule
	covers the button's shape, not the words on it. #d03f22 is no new
	colour: it is this file's own hover state, and what the loop buttons
	already resolve to.
   ---------------------------------------------------------------------- */

.single-product div.product .summary p.price del,
.single-product div.product .product_meta,
.single-product div.product .product_meta a {
	color: #767676;
}

.single-product div.product .summary .legal-price-info,
.single-product div.product .summary .legal-price-info a,
.single-product div.product .summary p.wc-gzd-additional-info {
	color: #6f6f6f;
}

.single-product .woocommerce-tabs ul.tabs li a,
.single-product .woocommerce-tabs ul.tabs li:first-child a {
	color: #666;
}

.single-product form.cart .single_add_to_cart_button {
	background: #d03f22;
}