/*
 * Property styles — card component, archive page, single property page.
 * All tokens come from tokens.css. No hardcoded values.
 */

/*--------------------------------------------------------------
# Property Card (.ph-card)
# Used in: archive results grid, home featured strip, related properties
--------------------------------------------------------------*/

.ph-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background-color: var(--paper);
	border: 1px solid var(--rule);
	border-radius: 4px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	text-decoration: none;
	color: inherit;
}

.ph-card:hover {
	box-shadow: 0 8px 24px rgba(26, 31, 36, 0.1);
	transform: translateY(-2px);
}

/* Image */
.ph-card__image-wrap {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background-color: var(--rule);
	flex-shrink: 0;
}

.ph-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.ph-card:hover .ph-card__img {
	transform: scale(1.03);
}

.ph-card__no-image {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--rule);
}

.ph-card__no-image span {
	font-size: var(--text-xs);
	color: var(--mute);
	font-family: 'Inter', sans-serif;
}

/* Availability badge — overlays the photo */
.ph-card__badge {
	position: absolute;
	top: var(--space-3);
	left: var(--space-3);
	z-index: 2;
	background-color: var(--wine);
	color: var(--paper);
	font-family: 'Inter', sans-serif;
	font-size: var(--text-xs);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 2px;
	line-height: 1.4;
}

.ph-card__badge--lettings {
	background-color: var(--ink);
}

/* Body */
.ph-card__body {
	padding: var(--space-4);
	display: flex;
	flex-direction: column;
	flex: 1;
}

/* Address / title */
.ph-card__address {
	font-size: var(--text-sm);
	color: var(--mute);
	margin: 0 0 var(--space-1);
	line-height: 1.4;
}

/* The title link is the real link — its ::after covers the entire card */
.ph-card__title-link {
	color: var(--ink);
	text-decoration: none;
	font-weight: 500;
}

.ph-card__title-link::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}

.ph-card__title-link:focus {
	outline: none;
}

.ph-card:focus-within .ph-card__title-link:focus::after {
	outline: 2px solid var(--wine);
	outline-offset: -2px;
}

/* Price */
.ph-card__price {
	font-family: 'Fraunces', Georgia, serif;
	font-size: var(--text-xl);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--ink);
	margin: 0 0 var(--space-3);
	line-height: 1.2;
}

/* Bed / bath / reception facts row */
.ph-card__facts {
	list-style: none;
	margin: auto 0 0;
	padding: var(--space-3) 0 0;
	border-top: 1px solid var(--rule);
	display: flex;
	align-items: center;
	gap: var(--space-4);
}

.ph-card__fact {
	display: flex;
	align-items: center;
	gap: var(--space-1);
	font-family: 'Inter', sans-serif;
	font-size: var(--text-sm);
	color: var(--mute);
	position: relative;
	z-index: 2;
}

.ph-card__fact svg {
	flex-shrink: 0;
	color: var(--mute);
}

/*--------------------------------------------------------------
# Archive Page — property search/listing
--------------------------------------------------------------*/

.archive-property {
	min-height: 60vh;
}

/* Page header */
.archive-header {
	background-color: var(--ink);
	padding: var(--space-7) 0 var(--space-6);
	color: var(--paper);
}

.archive-header .eyebrow {
	color: var(--gold);
}

.archive-header h1 {
	color: var(--paper);
	font-size: var(--text-3xl);
	margin-bottom: var(--space-2);
}

.archive-header .lead {
	color: rgba(250, 247, 242, 0.75);
	max-width: 560px;
}

/* Search filter bar */
.search-filter-wrap {
	background-color: var(--wine-dark);
	padding: var(--space-5) 0;
	border-bottom: 1px solid rgba(201, 169, 97, 0.2);
}

/* Override PH's default search form layout */
.property-search-form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: var(--space-3);
}

.property-search-form p,
.property-search-form .ph-form-field {
	margin: 0;
	flex: 1 1 180px;
}

.property-search-form label {
	display: block;
	font-family: 'Inter', sans-serif;
	font-size: var(--text-xs);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(250, 247, 242, 0.65);
	margin-bottom: var(--space-1);
}

.property-search-form input[type="text"],
.property-search-form input[type="number"],
.property-search-form select {
	width: 100%;
	background-color: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: var(--paper);
	border-radius: 4px;
	padding: 0.625rem 0.875rem;
	font-family: 'Inter', sans-serif;
	font-size: var(--text-sm);
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.property-search-form input[type="text"]::placeholder,
.property-search-form input[type="number"]::placeholder {
	color: rgba(250, 247, 242, 0.45);
}

.property-search-form input[type="text"]:focus,
.property-search-form input[type="number"]:focus,
.property-search-form select:focus {
	outline: none;
	border-color: var(--gold);
	background-color: rgba(255, 255, 255, 0.15);
}

.property-search-form select option {
	background-color: var(--ink);
	color: var(--paper);
}

.property-search-form input[type="submit"] {
	flex: 0 0 auto;
	background-color: var(--gold);
	border-color: var(--gold);
	color: var(--ink);
	font-family: 'Inter', sans-serif;
	font-size: var(--text-sm);
	font-weight: 700;
	padding: 0.625rem 1.5rem;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.15s ease;
	white-space: nowrap;
	align-self: flex-end;
}

.property-search-form input[type="submit"]:hover {
	background-color: #b89449;
	border-color: #b89449;
	color: var(--ink);
}

/* Results area */
.archive-results {
	padding-top: var(--space-5);
	padding-bottom: var(--space-8);
}

/* Meta bar: result count + sort dropdown */
.search-meta-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--space-3) 0 var(--space-5);
	border-bottom: 1px solid var(--rule);
	margin-bottom: var(--space-5);
}

/* PH result count template */
.propertyhive-result-count {
	font-family: 'Inter', sans-serif;
	font-size: var(--text-sm);
	color: var(--mute);
	margin: 0;
}

/* PH ordering form */
.propertyhive-ordering {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	margin: 0;
}

.propertyhive-ordering select.orderby {
	font-family: 'Inter', sans-serif;
	font-size: var(--text-sm);
	color: var(--ink);
	background-color: var(--paper);
	border: 1px solid var(--rule);
	border-radius: 4px;
	padding: 0.375rem 0.75rem;
	cursor: pointer;
}

/* No properties found */
.no-properties-found {
	padding: var(--space-8) 0;
	text-align: center;
}

.no-properties-found h2 {
	font-size: var(--text-2xl);
	margin-bottom: var(--space-3);
}

.no-properties-found p {
	color: var(--mute);
	max-width: 480px;
	margin: 0 auto var(--space-5);
}

/* Pagination */
.propertyhive-pagination {
	margin-top: var(--space-7);
	display: flex;
	justify-content: center;
}

.propertyhive-pagination ul {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: var(--space-1);
}

.propertyhive-pagination ul li a,
.propertyhive-pagination ul li span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 var(--space-2);
	font-family: 'Inter', sans-serif;
	font-size: var(--text-sm);
	font-weight: 500;
	color: var(--ink);
	border: 1px solid var(--rule);
	border-radius: 4px;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.propertyhive-pagination ul li a:hover {
	border-color: var(--wine);
	color: var(--wine);
}

.propertyhive-pagination ul li span.current {
	background-color: var(--wine);
	border-color: var(--wine);
	color: var(--paper);
}

/*--------------------------------------------------------------
# Single Property Page
--------------------------------------------------------------*/

/* Not-on-market banner */
.property-not-on-market {
	background-color: #fef3c7;
	border: 1px solid #f59e0b;
	color: #92400e;
	padding: var(--space-3) var(--space-4);
	font-family: 'Inter', sans-serif;
	font-size: var(--text-sm);
	text-align: center;
}

/* Gallery */
.single-property-gallery {
	background-color: var(--ink);
	line-height: 0;
}

/* Override Flexslider defaults for a cleaner look */
.single-property-gallery .flexslider {
	margin: 0;
	border: none;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
}

.single-property-gallery .flexslider .slides img {
	max-height: 560px;
	width: 100%;
	object-fit: cover;
	display: block;
}

.single-property-gallery .flex-control-nav {
	bottom: var(--space-3);
}

.single-property-gallery .flex-control-paging li a {
	background: rgba(255, 255, 255, 0.5);
}

.single-property-gallery .flex-control-paging li a.flex-active {
	background: var(--paper);
}

.single-property-gallery .flex-direction-nav a {
	opacity: 0.7;
}

.single-property-gallery .flex-direction-nav a:hover {
	opacity: 1;
}

/* Gallery placeholder (no photos) */
.single-property-gallery--placeholder {
	background-color: var(--rule);
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 320px;
}

.single-property-gallery--placeholder span {
	font-size: var(--text-sm);
	color: var(--mute);
}

/* Key facts strip */
.key-facts-strip {
	background-color: var(--paper);
	border-bottom: 1px solid var(--rule);
}

.key-facts-inner {
	display: flex;
	align-items: stretch;
	flex-wrap: wrap;
	padding: 0;
}

.key-fact {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	padding: var(--space-4) var(--space-5);
	border-right: 1px solid var(--rule);
	min-width: 0;
}

.key-fact:last-child {
	border-right: none;
}

.key-fact__icon {
	flex-shrink: 0;
	color: var(--mute);
}

.key-fact__content {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.key-fact__value {
	font-family: 'Fraunces', Georgia, serif;
	font-size: var(--text-xl);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--ink);
	line-height: 1.1;
	white-space: nowrap;
}

.key-fact__label {
	font-family: 'Inter', sans-serif;
	font-size: var(--text-xs);
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--mute);
	margin-top: 2px;
}

/* Price key fact — no icon, larger text, wine-coloured */
.key-fact--price {
	padding-left: var(--space-6);
}

.key-fact--price .key-fact__value {
	font-size: var(--text-2xl);
	color: var(--wine);
}

.key-fact--price .key-fact__label {
	color: var(--mute);
}

/* Two-column layout */
.single-property-wrap {
	padding-top: var(--space-7);
	padding-bottom: var(--space-8);
}

.single-property-layout {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: var(--space-7);
	align-items: start;
}

/* Main column */
.single-property-main > * + * {
	margin-top: var(--space-6);
}

.single-property-main h2 {
	font-size: var(--text-xl);
	margin-bottom: var(--space-3);
}

/* Property address / title */
.single-property-title {
	margin-bottom: 0;
}

.single-property-title h1 {
	font-size: var(--text-3xl);
	margin-bottom: var(--space-2);
}

.single-property-title .property-type-tag {
	display: inline-block;
	font-family: 'Inter', sans-serif;
	font-size: var(--text-xs);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mute);
	background-color: var(--bone);
	border: 1px solid var(--rule);
	border-radius: 2px;
	padding: 2px 8px;
}

/* Features */
.property-features {
	padding: var(--space-5);
	background-color: var(--bone);
	border-radius: 4px;
}

.property-features h2 {
	font-size: var(--text-lg);
	margin-bottom: var(--space-3);
}

.property-features ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-2) var(--space-5);
}

.property-features li {
	font-family: 'Inter', sans-serif;
	font-size: var(--text-sm);
	color: var(--ink);
	padding-left: var(--space-4);
	position: relative;
	margin: 0;
}

.property-features li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.45em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background-color: var(--gold);
}

/* Description */
.property-description h2 {
	font-size: var(--text-xl);
	margin-bottom: var(--space-4);
}

.property-description .description-contents {
	font-size: var(--text-base);
	line-height: 1.7;
	color: var(--ink);
}

.property-description .description-contents p {
	margin-bottom: var(--space-4);
}

/* Floorplan */
.property-floorplan h2 {
	font-size: var(--text-xl);
	margin-bottom: var(--space-4);
}

.property-floorplan__images {
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
}

.property-floorplan__item {
	display: block;
	border: 1px solid var(--rule);
	border-radius: 4px;
	overflow: hidden;
	text-decoration: none;
}

.property-floorplan__item img {
	width: 100%;
	height: auto;
	display: block;
}

/* Map */
.property-map h2 {
	font-size: var(--text-xl);
	margin-bottom: var(--space-4);
}

.property-map__embed {
	border-radius: 4px;
	overflow: hidden;
	border: 1px solid var(--rule);
	height: 360px;
}

.property-map__embed iframe {
	width: 100%;
	height: 100%;
	display: block;
	border: none;
}

.property-map__placeholder {
	height: 260px;
	background-color: var(--rule);
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	border: 2px dashed rgba(107, 107, 107, 0.3);
}

.property-map__placeholder span {
	font-size: var(--text-sm);
	color: var(--mute);
}

/* Enquiry sidebar */
.single-property-sidebar {
	position: sticky;
	top: calc(var(--header-height) + var(--space-4));
}

.enquiry-box {
	background-color: var(--paper);
	border: 1px solid var(--rule);
	border-radius: 4px;
	overflow: hidden;
}

.enquiry-box__header {
	background-color: var(--wine);
	padding: var(--space-4) var(--space-5);
}

.enquiry-box__header h3 {
	font-family: 'Fraunces', Georgia, serif;
	font-size: var(--text-lg);
	color: var(--paper);
	margin: 0;
}

.enquiry-box__header p {
	font-size: var(--text-sm);
	color: rgba(250, 247, 242, 0.75);
	margin: var(--space-1) 0 0;
}

.enquiry-box__body {
	padding: var(--space-5);
}

.enquiry-box__body .btn {
	width: 100%;
	justify-content: center;
	font-size: var(--text-base);
	padding: 0.875rem 1.5rem;
}

.enquiry-box__divider {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	margin: var(--space-4) 0;
	font-size: var(--text-xs);
	color: var(--mute);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.enquiry-box__divider::before,
.enquiry-box__divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background-color: var(--rule);
}

.enquiry-box__contact {
	text-align: center;
}

.enquiry-box__contact a {
	font-family: 'Inter', sans-serif;
	font-size: var(--text-lg);
	font-weight: 700;
	color: var(--ink);
	text-decoration: none;
	display: block;
	margin-bottom: var(--space-1);
}

.enquiry-box__contact a:hover {
	color: var(--wine);
}

.enquiry-box__contact .office-label {
	font-size: var(--text-xs);
	color: var(--mute);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* Fancybox enquiry modal overrides */
#makeEnquiry {
	max-width: 540px;
	padding: var(--space-6);
}

/* PH make-enquiry form styles */
.propertyhive-enquiry-form label {
	font-size: var(--text-sm);
	font-weight: 500;
	color: var(--ink);
	margin-bottom: var(--space-1);
}

.propertyhive-enquiry-form input[type="text"],
.propertyhive-enquiry-form input[type="email"],
.propertyhive-enquiry-form input[type="tel"],
.propertyhive-enquiry-form textarea {
	width: 100%;
	margin-bottom: var(--space-3);
}

/*--------------------------------------------------------------
# Related Properties
--------------------------------------------------------------*/

.related-properties {
	background-color: var(--bone);
	padding: var(--space-8) 0;
	border-top: 1px solid var(--rule);
}

.related-properties .section-header {
	margin-bottom: var(--space-5);
}

/*--------------------------------------------------------------
# Single Property — Responsive
--------------------------------------------------------------*/

@media (max-width: 1024px) {
	.single-property-layout {
		grid-template-columns: 1fr 300px;
		gap: var(--space-5);
	}
}

@media (max-width: 800px) {
	.single-property-layout {
		grid-template-columns: 1fr;
	}

	.single-property-sidebar {
		position: static;
		order: -1;
	}

	.key-facts-inner {
		flex-wrap: wrap;
	}

	.key-fact {
		flex: 1 1 calc(50% - 1px);
		border-right: 1px solid var(--rule);
		border-bottom: 1px solid var(--rule);
	}

	.key-fact:nth-child(2n) {
		border-right: none;
	}

	.key-fact--price {
		flex: 1 1 100%;
		border-right: none;
	}

	.property-features ul {
		grid-template-columns: 1fr;
	}

	.single-property-gallery .flexslider .slides img {
		max-height: 300px;
	}
}

@media (max-width: 600px) {
	.archive-header h1 {
		font-size: var(--text-2xl);
	}

	.search-meta-bar {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--space-2);
	}

	.key-fact {
		flex: 1 1 100%;
		border-right: none;
	}
}
