/* =========================================================================
   Ponte Villas — accommodation detail CSS (Elementor Phase 3B.1)
   Deploy to wp-content/mu-plugins/ponte-villas-global/room.css
   Enqueued only when the page has _pv_accommodation_type = villa | room.

   SCOPE — translated from prototype/assets/css/style.css v2.4, limited to
   what Elementor's controls cannot express:
     1. page hero composition
     2. breadcrumb
     3. intro / facts two-column grid
     4. the five-slot 12-column gallery and its two empty slots
     5. feature grid and related trio
     6. lightbox
     7. the 1024 / 900 / 720 / 560 breakpoints Elementor's kit lacks

   NOTE ON DUPLICATION — the section rhythm, eyebrow, textlink, group head
   and card rules also exist in stay.css. They are repeated because each
   per-template stylesheet loads alone and global.css is shared by every
   page including ones that need none of this. Once a fourth template needs
   them, lift the common block into global.css and delete the copies.

   Reveal, focus-visible, --pv-gutter, --pv-ease and the Global Colours all
   come from global.css / kit 56 and are not redefined here.
   ========================================================================= */

:root {
	--pv-section-y: clamp(5rem, 13vw, 12rem);
	--pv-section-y-tight: clamp(3.5rem, 8vw, 6.5rem);
}

/* Shared scaffolding (see NOTE ON DUPLICATION above) --------------------- */

.pv-room-section { padding-block: var(--pv-section-y); }
.pv-room-section--tight { padding-block: var(--pv-section-y-tight); }
.pv-room-section--flush-top { padding-top: 0; }

.pv-room-section > .e-con-inner,
.pv-room-crumbs > .e-con-inner,
.pv-ph-inner > .e-con-inner {
	padding-inline: var(--pv-gutter);
}

.pv-eyebrow {
	font-family: "DM Sans", Arial, sans-serif;
	font-size: .66rem;
	font-weight: 500;
	letter-spacing: .26em;
	text-transform: uppercase;
	color: var(--e-global-color-muted, #6B6A63);
}

.pv-textlink .elementor-button {
	display: inline-block;
	font-family: "DM Sans", Arial, sans-serif;
	font-size: .66rem;
	font-weight: 500;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--e-global-color-text, #2B2C28);
	background: none;
	border: 0;
	border-bottom: 1px solid var(--e-global-color-line, rgba(43, 44, 40, .14));
	border-radius: 0;
	padding: 0 0 .45rem;
	transition: border-color .45s var(--pv-ease), color .45s var(--pv-ease);
}

.pv-textlink .elementor-button:hover {
	color: var(--e-global-color-secondary, #7E9481);
	border-bottom-color: var(--e-global-color-secondary, #7E9481);
}

.pv-group-head {
	flex-direction: row;
	justify-content: space-between;
	align-items: baseline;
	gap: 1.5rem;
	padding: 0 0 1.2rem;
	margin-bottom: clamp(2.2rem, 5vw, 3.5rem);
	border-bottom: 1px solid var(--e-global-color-line, rgba(43, 44, 40, .14));
}

.pv-group-head .pv-eyebrow { white-space: nowrap; }

/* 1. PAGE HERO ---------------------------------------------------------- */

.pv-page-hero {
	position: relative;
	min-height: 64svh;
	justify-content: flex-end;
	overflow: hidden;
	padding: 0;
	color: var(--e-global-color-ondark, #F1EFE9);
}

body.admin-bar .pv-page-hero { min-height: calc(64svh - var(--pv-admin-bar)); }

.pv-ph-media {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	margin: 0;
}

.pv-ph-media .elementor-widget-container,
.pv-ph-media figure { height: 100%; }
.pv-ph-media img { width: 100%; height: 100%; object-fit: cover; }

.pv-page-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(30, 36, 32, .34), rgba(30, 36, 32, .08) 45%, rgba(30, 36, 32, .6));
}

.pv-ph-inner {
	position: relative;
	z-index: 2;
	padding-bottom: clamp(2.6rem, 6vw, 4.5rem);
}

.pv-ph-inner > .e-con-inner { gap: 0; align-items: flex-start; }

.pv-page-hero .pv-eyebrow {
	margin-bottom: 1.1rem;
	color: rgba(241, 239, 233, .7);
}

.pv-ph-title { max-width: 15ch; }

/* 2. BREADCRUMB --------------------------------------------------------- */

.pv-room-crumbs { padding: 0; }

.pv-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
	padding-block: 1.5rem;
	font-family: "DM Sans", Arial, sans-serif;
	font-size: .76rem;
	color: var(--e-global-color-muted, #6B6A63);
}

.pv-breadcrumb a { color: inherit; text-decoration: none; }
.pv-breadcrumb a:hover { color: var(--e-global-color-secondary, #7E9481); }
.pv-breadcrumb .pv-crumb-sep { opacity: .5; }
.pv-breadcrumb [aria-current="page"] { color: var(--e-global-color-text, #2B2C28); }

/* 3. INTRO AND FACTS ---------------------------------------------------- */

.pv-room-intro {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: start;
	padding: 0;
}

.pv-room-intro-body { gap: 1.1rem; align-items: flex-start; padding: 0; }
.pv-room-intro-body .pv-room-title { margin-bottom: .3rem; max-width: 16ch; }
.pv-room-actions { margin-top: 2rem; }

.pv-room-book {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 1.05rem 2.1rem;
	font-family: "DM Sans", Arial, sans-serif;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--e-global-color-ondark, #F1EFE9);
	background: var(--e-global-color-primary, #4F6355);
	border: 1px solid var(--e-global-color-primary, #4F6355);
	cursor: pointer;
	transition: background .45s var(--pv-ease), border-color .45s var(--pv-ease);
}

.pv-room-book:hover {
	background: var(--e-global-color-text, #2B2C28);
	border-color: var(--e-global-color-text, #2B2C28);
}

.pv-facts-col { gap: 0; padding: 0; align-items: stretch; }

.pv-facts-list {
	border-top: 1px solid var(--e-global-color-line, rgba(43, 44, 40, .14));
	gap: 0;
	padding: 0;
}

.pv-facts-row {
	flex-direction: row;
	align-items: baseline;
	justify-content: space-between;
	gap: 1.5rem;
	padding: .95rem 0;
	border-bottom: 1px solid var(--e-global-color-line, rgba(43, 44, 40, .14));
}

.pv-facts-label {
	font-family: "DM Sans", Arial, sans-serif;
	font-size: .88rem;
	color: var(--e-global-color-muted, #6B6A63);
}

.pv-facts-value {
	font-family: "DM Sans", Arial, sans-serif;
	font-size: .92rem;
	font-weight: 500;
	text-align: right;
	color: var(--e-global-color-text, #2B2C28);
}

.pv-facts-note { margin-top: 1rem; }

/* 4. FIVE-SLOT GALLERY --------------------------------------------------
   Twelve columns with unequal spans, exactly as the prototype. Slots 3 and
   4 are deliberately empty — the client has not supplied a bathroom or a
   terrace photograph. They render as a tinted, dashed block: no <img>, no
   broken image, nothing focusable. */

.pv-room-gallery {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: clamp(.7rem, 1.6vw, 1.2rem);
	padding: 0;
}

.pv-gallery-slot { padding: 0; overflow: hidden; position: relative; }

.pv-g1 { grid-column: 1 / span 7; aspect-ratio: 16 / 11; }
.pv-g2 { grid-column: 8 / span 5; aspect-ratio: 4 / 3; }
.pv-g3 { grid-column: 1 / span 4; aspect-ratio: 4 / 3; }
.pv-g4 { grid-column: 5 / span 4; aspect-ratio: 4 / 3; }
.pv-g5 { grid-column: 9 / span 4; aspect-ratio: 4 / 3; }

.pv-gallery-slot .elementor-widget-image,
.pv-gallery-slot .elementor-widget-image .elementor-widget-container,
.pv-gallery-slot figure { height: 100%; width: 100%; margin: 0; }

.pv-gallery-slot img { width: 100%; height: 100%; object-fit: cover; }

/* Cream veil on hover — the photo itself never moves or scales. */
.pv-gallery-slot:not(.pv-gallery-placeholder)::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	background: var(--e-global-color-paper, #F4F2ED);
	opacity: 0;
	transition: opacity .6s var(--pv-ease);
	pointer-events: none;
}

.pv-gallery-slot:not(.pv-gallery-placeholder):hover::after,
.pv-gallery-slot:not(.pv-gallery-placeholder):focus-within::after { opacity: .22; }

.pv-gallery-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 1rem;
	background: var(--e-global-color-sagewash, #E4E8DF);
	border: 1px dashed var(--e-global-color-secondary, #7E9481);
	color: var(--e-global-color-primary, #4F6355);
}

.pv-placeholder-label {
	font-family: "DM Sans", Arial, sans-serif;
	font-size: .66rem;
	font-weight: 500;
	letter-spacing: .2em;
	line-height: 1.7;
	text-transform: uppercase;
	color: inherit;
}

/* Only the script marks real photos as openable, so the affordance never
   appears when the lightbox is unavailable. */
.pv-lightbox-ready .pv-gallery-slot[data-pv-lightbox] { cursor: zoom-in; }

/* 5. FEATURE GRID ------------------------------------------------------- */

.pv-feature-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.2rem, 3vw, 2.4rem);
	align-items: start;
	padding: 0;
}

.pv-feature-item {
	gap: 0;
	padding: 1.2rem 0 0;
	border-top: 1px solid var(--e-global-color-line, rgba(43, 44, 40, .14));
	align-items: flex-start;
}

.pv-feature-label {
	display: block;
	margin-bottom: .6rem;
	font-family: "DM Sans", Arial, sans-serif;
	font-size: .62rem;
	font-weight: 500;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--e-global-color-muted, #6B6A63);
}

.pv-feature-note { margin-top: 1.4rem; }

/* 6. RELATED TRIO ------------------------------------------------------- */

.pv-related-trio {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.2rem, 3vw, 2.4rem);
	align-items: start;
	padding: 0;
}

.pv-related-card { position: relative; gap: 0; padding: 0; align-items: flex-start; }

.pv-related-media {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	margin: 0 0 1.1rem;
}

.pv-related-media .elementor-widget-container,
.pv-related-media figure,
.pv-related-media a { display: block; height: 100%; }

.pv-related-media img { width: 100%; height: 100%; object-fit: cover; }

.pv-related-media::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	background: var(--e-global-color-paper, #F4F2ED);
	opacity: 0;
	transition: opacity .6s var(--pv-ease);
	pointer-events: none;
}

.pv-related-card:hover .pv-related-media::after,
.pv-related-card:focus-within .pv-related-media::after { opacity: .22; }

/* One anchor per card — the image link — stretched over the whole card, so
   the card is clickable everywhere but is still a single tab stop with the
   photo's alt text as its accessible name. */
.pv-related-media a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 3;
}

.pv-related-cat {
	display: block;
	margin-bottom: .5rem;
	font-family: "DM Sans", Arial, sans-serif;
	font-size: .62rem;
	font-weight: 500;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--e-global-color-muted, #6B6A63);
}

/* 7. LIGHTBOX ----------------------------------------------------------
   Hidden at first paint and out of the tab order until .is-open, whether
   or not room.js ever runs. */

.pv-lightbox-host { padding: 0; }

.pv-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1200;
	display: none;
	align-items: center;
	justify-content: center;
	padding: clamp(1rem, 5vw, 3.5rem);
	padding-bottom: calc(clamp(1rem, 5vw, 3.5rem) + env(safe-area-inset-bottom, 0px));
	background: rgba(30, 36, 32, .92);
}

.pv-lightbox.is-open { display: flex; }

.pv-lightbox-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: none;
	border: 0;
	padding: 0;
	cursor: zoom-out;
}

.pv-lightbox-figure {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .9rem;
	max-height: 92svh;
}

.pv-lightbox-figure img {
	max-width: 100%;
	max-height: 78svh;
	width: auto;
	height: auto;
	object-fit: contain;
}

.pv-lightbox-caption {
	font-family: "DM Sans", Arial, sans-serif;
	font-size: .78rem;
	text-align: center;
	color: rgba(241, 239, 233, .78);
}

.pv-lightbox-count {
	font-family: "DM Sans", Arial, sans-serif;
	font-size: .68rem;
	font-weight: 500;
	letter-spacing: .18em;
	color: rgba(241, 239, 233, .78);
}

.pv-lightbox-close,
.pv-lightbox-nav {
	position: absolute;
	z-index: 3;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--e-global-color-ondark, #F1EFE9);
	background: none;
	border: 1px solid rgba(241, 239, 233, .22);
	cursor: pointer;
	transition: background .3s var(--pv-ease), color .3s var(--pv-ease), border-color .3s var(--pv-ease);
}

.pv-lightbox-close:hover,
.pv-lightbox-nav:hover {
	background: var(--e-global-color-ondark, #F1EFE9);
	color: var(--e-global-color-primary, #4F6355);
	border-color: var(--e-global-color-ondark, #F1EFE9);
}

.pv-lightbox-close {
	top: clamp(1rem, 3vw, 2rem);
	right: clamp(1rem, 3vw, 2rem);
}

.pv-lightbox-nav { top: 50%; transform: translateY(-50%); }
.pv-lightbox-nav.is-prev { left: clamp(.6rem, 2vw, 1.6rem); }
.pv-lightbox-nav.is-next { right: clamp(.6rem, 2vw, 1.6rem); }

/* 8. RESPONSIVE — the prototype's own breakpoints ------------------------ */

@media (max-width: 1024px) {
	.pv-room-intro { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 900px) {
	/* The gallery collapses to a single stack, exactly as the prototype
	   does — the unequal spans have no meaning at this width. */
	.pv-g1, .pv-g2, .pv-g3, .pv-g4, .pv-g5 {
		grid-column: 1 / -1;
		aspect-ratio: 4 / 3;
	}

	.pv-feature-grid,
	.pv-related-trio { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
	.pv-breadcrumb { font-size: .72rem; gap: .4rem; }
}

@media (max-width: 560px) {
	.pv-feature-grid,
	.pv-related-trio { grid-template-columns: 1fr; }

	.pv-room-actions .pv-room-book { width: 100%; }

	.pv-lightbox { padding: .75rem; padding-bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); }
	.pv-lightbox-figure img { max-height: 68svh; }
	.pv-lightbox-close, .pv-lightbox-nav { width: 44px; height: 44px; }
	.pv-lightbox-nav.is-prev { left: .4rem; }
	.pv-lightbox-nav.is-next { right: .4rem; }
	.pv-facts-row { gap: 1rem; }
}

/* 9. REDUCED MOTION ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.pv-gallery-slot::after,
	.pv-related-media::after,
	.pv-textlink .elementor-button,
	.pv-room-book,
	.pv-lightbox-close,
	.pv-lightbox-nav { transition-duration: .001ms; }
}

/* 10. Elementor editor canvas ------------------------------------------
   The hero media is absolutely positioned and the lightbox is fixed and
   hidden; both must be in flow and visible to be edited. */

body.elementor-editor-active .pv-page-hero {
	min-height: 0;
	background: var(--e-global-color-text, #2B2C28);
}

body.elementor-editor-active .pv-ph-media { position: relative; inset: auto; }
body.elementor-editor-active .pv-page-hero::after { display: none; }

body.elementor-editor-active .pv-lightbox {
	position: relative;
	inset: auto;
	display: flex;
	min-height: 40vh;
}

body.elementor-editor-active .pv-related-media a::after { display: none; }

/* 11. Gallery variants (Phase 3B.2) -------------------------------------
   Taken from the prototype's own .room-gallery--duo / --trio: two or three
   equal 4:3 slots instead of the five-slot twelve-column composition. The
   base twelve-column grid above is left untouched and is still used, as
   authored, by the pages whose source uses it (One-Bedroom, Superior
   Suite). Variant slots carry no .pv-g1..5 class, so the 900px collapse
   rule for those spans never applies to them. */

.pv-room-gallery.pv-gallery--duo { grid-template-columns: repeat(2, 1fr); }
.pv-room-gallery.pv-gallery--trio { grid-template-columns: repeat(3, 1fr); }

.pv-gallery--duo .pv-gallery-slot,
.pv-gallery--trio .pv-gallery-slot { aspect-ratio: 4 / 3; }

@media (max-width: 560px) {
	.pv-room-gallery.pv-gallery--trio { grid-template-columns: 1fr 1fr; }
	.pv-room-gallery.pv-gallery--duo { grid-template-columns: 1fr; }
}
