
/*
 * Print / Save as PDF styles for the site.
 *
 * Enqueued with media="print" (see dcp_enqueue_print_styles() in functions.php), so
 * browsers do not use it for the screen and it never blocks page rendering. Everything
 * is also wrapped in @media print as a safeguard in case a caching/optimisation plugin
 * ever merges this file into a screen stylesheet.
 *
 * Sections: Global (header/footer, CookieYes) | Product Detail | Home |
 * Content pages | My Account (menu, Wishlist, Address Book, View Order).
 * No Cart-page-specific rules live here.
 */
@media print {
	/* Print / PDF - Global: site header/footer are not printed */
	#top-header, #main-header, #main-footer, .et-l--header, .et-l--footer {
		display: none !important;
	}
	
	/* CookieYes (and the legacy Cookie Law Info bar) is position:fixed, so the browser
       repeats it at the same spot on EVERY printed page and it covers page text. It is
       not page content: never print it, on any page. */
	.cky-btn-revisit-wrapper, .cky-consent-container, .cky-overlay, .cky-modal, .cky-preference-center, #cookie-law-info-bar, .cli-modal, .cli-modal-backdrop {
		display: none !important;
	}
	
	/* Print / Save as PDF - Product Detail page only. Screen view is not affected. */
	
	/* Not needed on paper: Download PDF, quantity, Add to Cart, wishlist + zoom
       (search) icons over the image, gallery thumbnails/arrows, Related Products. */
	.single-product .ebs-product-pdf-btn, .single-product form.cart .quantity, .single-product form.cart .single_add_to_cart_button, .single-product .woocommerce-product-gallery__trigger, .single-product .wc-add-to-list, .single-product .alg-wc-wl-btn, .single-product .flex-control-nav, .single-product .flex-direction-nav, .single-product .et_pb_wc_breadcrumb, .single-product .et_pb_wc_related_products {
		display: none !important;
	}
	
	.single-product .et_pb_section:has(.et_pb_wc_related_products) {
		display: none !important;
	}
	
	/* Layout: the product title is the first row at FULL width; below it a two-column
       row - basic details (QR code, SKU, price, ...) on the LEFT, the product image on
       the RIGHT. Every other product-content module (everything after the Add to Cart
       module, whatever the product has) then runs FULL WIDTH below that top area. The
       two Theme Builder columns are dissolved (display: contents) so their modules can
       share one grid; this also makes the "sticky" image column's inline
       position:fixed irrelevant. */
	.single-product .single-pro-row {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) minmax(0, 44%);
		column-gap: 30px;
		row-gap: 0;
		align-items: start;
		width: 100% !important;
		max-width: none !important;
		/* drop the row's 20px side padding so the content starts at the same left edge
           as the browser's print header (date) and ends at the matching right edge */
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
	
	.single-product .single-pro-row .single-pro-left-col, .single-product .single-pro-row .single-pro-right-col {
		display: contents !important;
	}
	
	.single-product .single-pro-row .single-pro-left-col > * {
		grid-column: 1;
	}
	
	.single-product .single-pro-row .single-pro-left-col > .et_pb_wc_title {
		grid-column: 1/-1;
		grid-row: 1;
		/* a little breathing room above the title and between the title and the SKU */
		padding-top: 12px !important;
		margin-bottom: 14px !important;
	}
	
	.single-product .single-pro-row .single-pro-right-col > * {
		grid-column: 2;
		grid-row: 2/span 30;
	}
	
	/* zero-height <style> holder modules must not take the first details row */
	.single-product .single-pro-row .single-pro-left-col > .et_pb_code {
		grid-column: 2;
		grid-row: 1;
	}
	
	.single-product .single-pro-row .single-pro-left-col > .et_pb_wc_add_to_cart ~ * {
		grid-column: 1/-1;
	}
	
	/* keep the QR code anchored inside the details column, beside the SKU / price
       (its box has no height; SKU + price keep clear of it via padding-right) */
	.single-product .qr-code {
		position: relative;
	}
	
	.single-product .qr-code img {
		top: 0 !important;
	}
	
	.single-product .single-pro-row .single-pro-left-col > .ebs-additional-info, .single-product .single-pro-row .single-pro-left-col > .et_pb_wc_price {
		padding-right: 80px !important;
	}
	
	/* compact top details: spacing between SKU, price and the option rows */
	.single-product .single-pro-row .single-pro-left-col > .ebs-additional-info {
		margin-bottom: 10px !important;
	}
	
	.single-product .single-pro-row .single-pro-left-col > .et_pb_wc_price {
		margin-bottom: 18px !important;
	}
	
	.single-product .single-pro-row .single-pro-left-col > .et_pb_wc_add_to_cart {
		margin-bottom: 0 !important;
	}
	
	.single-product .et_pb_wc_add_to_cart .custom-variation-wrapper {
		margin-bottom: 21px !important;
	}
	
	/* slightly larger product image: less white padding inside its card */
	.single-product .woocommerce-product-gallery__image img {
		padding: 20px !important;
	}
	
	/* Product image: fit the (narrower) print column instead of the screen-sized
       slider (its inline pixel widths/height are set by JS for the screen layout). */
	.single-product .woocommerce-product-gallery .flex-viewport {
		height: auto !important;
	}
	
	.single-product .woocommerce-product-gallery__wrapper {
		width: 100% !important;
		transform: none !important;
	}
	
	.single-product .woocommerce-product-gallery__image {
		width: 100% !important;
		float: none !important;
	}
	
	.single-product .woocommerce-product-gallery__image:not(.flex-active-slide):not(:only-child) {
		display: none !important;
	}
	
	.single-product .woocommerce-product-gallery .zoomImg {
		display: none !important;
	}
	
	/* Scroll-reveal / animation styles must not leave any content faded or hidden. */
	.single-product #main-content .et_pb_module, .single-product #main-content .et_animated, .single-product #main-content .et-waypoint, .single-product #main-content [class*="et_pb_animation_"] {
		opacity: 1 !important;
		animation: none !important;
	}
	
	.single-product #main-content .et_animated, .single-product #main-content .et-waypoint, .single-product #main-content [class*="et_pb_animation_"] {
		transform: none !important;
	}
	
	/* Print / Save as PDF - Product Detail typography, colour and spacing.
   Screen view is not affected. Nothing here depends on product content or section names. */
	
	/* Black text only. Links stay real <a href> links (still clickable in the PDF);
       they are underlined so they remain recognisable without the blue. */
	.single-product #main-content, .single-product #main-content * {
		color: #000 !important;
	}
	
	.single-product #main-content a {
		text-decoration: underline !important;
	}
	
	/* One typography for all product-content modules (everything after Add to Cart):
       same family (inherited), size and line-height for text, lists, labels and values,
       so e.g. General Information and Additional Information look identical. */
	.single-product #main-content .single-pro-left-col > .et_pb_wc_add_to_cart ~ .et_pb_module, .single-product #main-content .single-pro-left-col > .et_pb_wc_add_to_cart ~ .et_pb_module * {
		font-family: inherit !important;
		font-size: 13px !important;
		line-height: 1.5 !important;
	}
	
	.single-product #main-content .single-pro-left-col > .et_pb_wc_add_to_cart ~ .et_pb_module :is(h1, h2, h3, h4, h5, h6) {
		font-size: 18px !important;
		line-height: 1.3 !important;
		font-weight: 700 !important;
		text-transform: capitalize !important;
		margin: 0 !important;
		padding: 0 0 6px !important;
	}
	
	.single-product #main-content .single-pro-left-col > .et_pb_wc_add_to_cart ~ .et_pb_module :is(h1, h2, h3, h4, h5, h6) * {
		font-size: inherit !important;
		line-height: inherit !important;
		font-weight: inherit !important;
		text-transform: inherit !important;
	}
	
	/* label / value tables: same alignment and cell spacing everywhere */
	.single-product #main-content .single-pro-left-col > .et_pb_wc_add_to_cart ~ .et_pb_module :is(th, td) {
		padding: 3px 8px !important;
		text-align: left !important;
		vertical-align: top !important;
	}
	
	/* empty spacer rows (empty label cell) in label-value tables must not add height */
	.single-product #main-content .single-pro-left-col > .et_pb_wc_add_to_cart ~ .et_pb_module tr:has(> :is(th, td):first-child:empty) > :is(th, td) {
		padding: 0 !important;
	}
	
	.single-product #main-content .single-pro-left-col > .et_pb_wc_add_to_cart ~ .et_pb_module p {
		margin: 0 !important;
		padding: 0 0 6px !important;
	}
	
	/* values wrapped in <p> inside table cells (e.g. Additional Information rows such as
       Volume) must not add extra white space under the value */
	.single-product #main-content .single-pro-left-col > .et_pb_wc_add_to_cart ~ .et_pb_module :is(th, td) p {
		padding: 0 !important;
	}
	
	.single-product #main-content .single-pro-left-col > .et_pb_wc_add_to_cart ~ .et_pb_module :is(ul, ol) {
		margin: 0 !important;
		padding-bottom: 6px !important;
	}
	
	/* Compact spacing between and inside the content boxes. */
	.single-product #main-content .single-pro-left-col > .et_pb_wc_add_to_cart ~ .et_pb_module.dfw-4-heading {
		margin-top: 14px !important;
		padding: 14px 20px 4px !important;
	}
	
	.single-product #main-content .single-pro-left-col > .et_pb_wc_add_to_cart ~ .et_pb_module.dfw-4-additional-info {
		margin: 14px 0 0 !important;
		padding: 14px 20px !important;
	}
	
	.single-product #main-content .single-pro-left-col > .et_pb_wc_add_to_cart ~ .et_pb_module:not(.dfw-4-heading):not(.dfw-4-additional-info) {
		padding: 0 20px 14px !important;
	}
	
	/* Print / Save as PDF - Product Detail: nothing may cut product text at page breaks. */
	
	/* Never split a table row / list item / paragraph across two pages, and keep a
       section heading together with the content that follows it. */
	.single-product #main-content .single-pro-left-col > .et_pb_wc_add_to_cart ~ .et_pb_module tr, .single-product #main-content .single-pro-left-col > .et_pb_wc_add_to_cart ~ .et_pb_module li, .single-product #main-content .single-pro-left-col > .et_pb_wc_add_to_cart ~ .et_pb_module p {
		break-inside: avoid;
	}
	
	.single-product #main-content .single-pro-left-col > .et_pb_wc_add_to_cart ~ .et_pb_module.dfw-4-heading {
		break-after: avoid;
	}
	
	/* Print / Save as PDF - Home page only. Screen view is not affected. */
	
	/* Banner: the slide image is a CSS background, which the browser skips unless
       "Background graphics" is ticked - force it to print. */
	.home .home-slider-section, .home .home-slider-section * {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
	
	/* Featured Products: exactly 3 cards in 3 columns instead of the sliding carousel
       (its pixel widths and translate are set by JS for the screen layout). */
	.home .dfw-4-featured-products .owl-stage-outer {
		overflow: visible !important;
	}
	
	.home .dfw-4-featured-products .owl-stage {
		display: grid !important;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 15px;
		width: 100% !important;
		transform: none !important;
		transition: none !important;
	}
	
	.home .dfw-4-featured-products .owl-item {
		width: auto !important;
		margin: 0 !important;
		float: none !important;
		break-inside: avoid;
	}
	
	.home .dfw-4-featured-products .owl-item.cloned, .home .dfw-4-featured-products .owl-item:not(.cloned) ~ .owl-item:not(.cloned) ~ .owl-item:not(.cloned) ~ .owl-item:not(.cloned), .home .dfw-4-featured-products .owl-nav, .home .dfw-4-featured-products .owl-dots {
		display: none !important;
	}
	
	.home .dfw-4-featured-products li.product {
		width: 100% !important;
		margin: 0 !important;
		float: none !important;
	}
	
	.home .dfw-4-featured-products li.product img {
		max-width: 100%;
		height: auto;
	}
	
	/* product titles must show in full (the screen clamps them to two lines) */
	.home .dfw-4-featured-products .product-info-wrapper, .home .dfw-4-featured-products .woocommerce-loop-product__title {
		height: auto !important;
		max-height: none !important;
		overflow: visible !important;
		-webkit-line-clamp: unset !important;
		line-clamp: unset !important;
	}
	
	/* no quantity controls / Add to Cart buttons on paper */
	.home .dfw-4-featured-products .quantity, .home .dfw-4-featured-products .add_to_cart_button {
		display: none !important;
	}
	
	/* black text; titles stay real links, the wishlist icon stays in place */
	.home #main-content .FP-section, .home #main-content .FP-section * {
		color: #000 !important;
	}
	
	/* keep the "Featured Products" heading together with its cards */
	.home .FP-section .et_pb_row {
		break-inside: avoid;
	}
	
	/* scroll-reveal styles must not leave the section faded */
	.home .FP-section .et_pb_module, .home .FP-section .et_animated, .home .FP-section .et-waypoint {
		opacity: 1 !important;
		animation: none !important;
	}
	
	/* Print / PDF - Home banner: full printable width, print-friendly height, no slider controls */
	.home .home-slider-section .et_pb_slider, .home .home-slider-section .et_pb_slides, .home .home-slider-section .et_pb_slide, .home .home-slider-section .et_pb_container {
		height: 300px !important;
		min-height: 0 !important;
		max-height: 300px !important;
	}
	
	.home .home-slider-section .et_pb_slide {
		background-size: cover !important;
		background-position: center !important;
	}
	
	.home .home-slider-section .et-pb-slider-arrows, .home .home-slider-section .et-pb-controllers {
		display: none !important;
	}
	
	/* Print / PDF - Content pages (Terms, Return, Privacy...): black titles, slightly larger subtitles */
	.inner-banner-section {
		background: none !important;
	}
	
	#main-content .inner-banner-section h1, #main-content .inner-banner-section h1 *, #main-content .inner-banner-section ~ .et_pb_section .et_pb_promo_description h2 {
		color: #000 !important;
	}
	
	.inner-banner-section ~ .et_pb_section .et_pb_promo {
		background: none !important;
	}
	
	.inner-banner-section ~ .et_pb_section p strong, .inner-banner-section ~ .et_pb_section p > span > strong {
		font-size: 16px !important;
	}
	
	/* Print / PDF: My Account navigation, Wishlist table columns, Multi Address Book title gap */
	
	/* account menu (Dashboard, Orders, Address Book, Payment Methods, Account Details, Wishlist, Logout...) */
	.woocommerce-MyAccount-navigation {
		display: none !important;
	}
	
	/* Wishlist: keep only thumbnail, product name, price and Add to Cart */
	.alg-wc-wl-view-table .drag-drop, .alg-wc-wl-view-table .arrow-sorting, .alg-wc-wl-view-table .product-removal, .alg-wc-wl-view-table .product-category, .alg-wc-wl-view-table .product-cat, .alg-wc-wl-view-table .product-tax, .alg-wc-wl-view-table .product-description, .alg-wc-wl-view-table .product-stock, .alg-wc-wl-view-table .product-qty, .alg-wc-wl-view-table .product-note {
		display: none !important;
	}
	
	/* Multi Address Book: title gap 32px -> 16px */
	.woocommerce-MyAccount-content > h1 {
		margin-bottom: 16px !important;
	}
	
	/* Print / PDF: View Order - keep each address (title + content) on one page */
	.woocommerce-customer-details .woocommerce-column {
		break-inside: avoid;
		page-break-inside: avoid;
	}
	
	.woocommerce-customer-details .woocommerce-column__title {
		break-after: avoid;
		page-break-after: avoid;
	}
	
	/* Print / PDF - Checkout: Order Summary first at full width, the checkout fields
   (contact, billing, shipping, shipping options, payment, place-order button) below it
   at full width. Scoped to the Checkout layout (.wc-block-checkout) so the Cart block is untouched. */
	.wc-block-components-sidebar-layout.wc-block-checkout {
		flex-direction: column !important;
	}
	
	.wc-block-components-sidebar-layout.wc-block-checkout .wc-block-components-main, .wc-block-components-sidebar-layout.wc-block-checkout .wc-block-components-sidebar {
		width: 100% !important;
		margin: 0 !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
	
	.wc-block-components-sidebar-layout.wc-block-checkout .wc-block-components-sidebar {
		order: -1;
		position: static !important;
		margin-bottom: 20px !important;
	}
	
	/* On a portrait page the checkout container is narrower than 700px, so WooCommerce's
       own narrow layout applies to the printed page: the sidebar copy of the Order Summary
       is left empty (only its title prints, in a tall blank box) and the real, full
       Order Summary is the copy at the top of the fields column. Print that copy, not the
       empty sidebar one. (Wider pages keep the sidebar copy, which is then complete.) */
	@container (max-width: 699px) {
		.wc-block-components-sidebar-layout.wc-block-checkout .wc-block-components-sidebar {
			display: none !important;
		}
		
		.wp-block-woocommerce-checkout-order-summary-block.checkout-order-summary-block-fill-wrapper {
			display: block !important;
		}
		
		.checkout-order-summary-block-fill-wrapper .wc-block-components-checkout-order-summary__content {
			display: block !important;
		}
		
		.checkout-order-summary-block-fill-wrapper .wc-block-components-checkout-order-summary__title-icon {
			display: none !important;
		}
	}
	
	/* Order Summary: black text on white (the screen version is white on a dark panel,
       which prints as pale gray). The quantity badge keeps a white disc so its number stays readable. */
	#main-content .wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block {
		background: none !important;
	}
	
	#main-content .wc-block-checkout__sidebar, #main-content .wc-block-checkout__sidebar *, #main-content .checkout-order-summary-block-fill-wrapper, #main-content .checkout-order-summary-block-fill-wrapper * {
		color: #000 !important;
	}
	
	#main-content .wc-block-checkout__sidebar .wc-block-components-order-summary-item__quantity, #main-content .checkout-order-summary-block-fill-wrapper .wc-block-components-order-summary-item__quantity {
		background: #fff !important;
		border: 1px solid #000;
	}
}
