/**
 * Caribe Connection — Property Print Stylesheet
 *
 * Loaded via add_action( 'wp_head', 'property_print_styles' ) on
 * singular 'property' pages. Provides a clean @media print layout
 * for the  standard property page (not the flyer template).
 *
 * For the full 3-page branded flyer, visit:
 *   [property-url]/?cc_print_flyer=1
 *
 * @package NewHome Child
 */

/* ─────────────────────────────────────────────────────────────
   @page — Paper & margins for all property prints
   ───────────────────────────────────────────────────────────── */
@media print {

	@page {
		size: letter portrait;
		margin: 1.2cm 1.4cm;
	}

	/* ── Global resets ──────────────────────────────────── */
	*,
	*::before,
	*::after {
		-webkit-print-color-adjust: exact !important;
		print-color-adjust: exact !important;
	}

	html,
	body {
		font-size: 11pt !important;
		line-height: 1.6 !important;
		color: #111 !important;
		background: #fff !important;
	}

	/* ── Hide all chrome / UI elements ─────────────────── */
	.qodef-header,
	.qodef-mobile-header,
	.qodef-sticky-header,
	.qodef-side-area,
	.qodef-footer,
	.qodef-back-to-top,
	.qodef-social-share,
	.qodef-property-schedule-tour,
	.qodef-property-navigation,
	.qodef-real-estate-property-navigation,
	.qodef-mortgage-calculator,
	.qodef-real-estate-map,
	.qodef-map-holder,
	.qodef-sidebar,
	.widget-area,
	.wp-block-query-pagination,
	.qodef-property-print-button,
	.qodef-schedule-tour-button,
	.cc-print-actions,
	.cc-toolbar,
	nav[role="navigation"],
	aside,
	noscript,
	iframe,
	video,
	audio {
		display: none !important;
	}

	/* ── Widen content to full page width ───────────────── */
	.qodef-page-content-inner,
	.qodef-content-full-width,
	.qodef-layout--no-sidebar,
	.qodef-grid-col-9,
	.qodef-grid-col-8,
	.qodef-property-single {
		max-width: 100% !important;
		width: 100% !important;
		padding: 0 !important;
		margin: 0 !important;
	}

	/* ── Typography ─────────────────────────────────────── */
	h1, h2, h3, h4, h5, h6 {
		page-break-after: avoid;
		break-after: avoid;
		orphans: 3;
		widows: 3;
	}

	p, ul, ol, dl {
		orphans: 3;
		widows: 3;
	}

	img {
		max-width: 100% !important;
		page-break-inside: avoid;
		break-inside: avoid;
	}

	/* ── Property hero/title ─────────────────────────────── */
	.qodef-m-hero-property-name,
	.qodef-property-single h1 {
		font-size: 22pt !important;
		line-height: 1.2 !important;
		margin-bottom: 6pt !important;
	}

	/* ── Price in brand colour ──────────────────────────── */
	.qodef-m-hero-price,
	.qodef-m-hero-price-amount,
	.qodef-property-price,
	.qodef-property-list-item-price {
		font-size: 18pt !important;
		font-weight: 700 !important;
		color: #e0157a !important;
	}

	/* ── Hero image ─────────────────────────────────────── */
	.qodef-m-hero-image img {
		width: 100% !important;
		height: 260pt !important;
		object-fit: cover !important;
	}

	/* ── Gallery — re-layout as a 3-column grid ─────────── */
	.qodef-m-images-content,
	.qodef-property-gallery,
	.qodef-gallery-images {
		display: flex !important;
		flex-wrap: wrap !important;
		gap: 6pt !important;
	}

	.qodef-m-images-content img,
	.qodef-property-gallery img,
	.qodef-gallery-images img {
		width: calc(33.33% - 4pt) !important;
		height: 120pt !important;
		object-fit: cover !important;
	}

	/* ── Gallery page break ─────────────────────────────── */
	.qodef-m-images,
	.qodef-property-single-gallery {
		page-break-before: always;
		break-before: page;
	}

	/* ── Agent contact block ─────────────────────────────── */
	.qodef-m-hero-bottom {
		page-break-inside: avoid;
		break-inside: avoid;
	}

	/* ── Features / amenities block ─────────────────────── */
	.qodef-m-features,
	.qodef-property-features {
		page-break-inside: avoid;
		break-inside: avoid;
	}

	/* ── Details table ───────────────────────────────────── */
	.qodef-m-details {
		page-break-inside: avoid;
		break-inside: avoid;
	}

	/* ── Links — show email addresses in print ───────────── */
	a[href^="mailto"]::after {
		content: " (" attr(href) ")";
		font-size: 0.85em;
		color: #555;
	}

	/* Suppress generic link URL echoing for navigation links */
	a[href^="http"]::after,
	a[href^="/"]::after {
		content: none !important;
	}

	/* ── Wrapper background ──────────────────────────────── */
	.qodef-wrapper,
	.qodef-m {
		max-width: none !important;
		padding: 0 !important;
	}

}
