/* Palm Yachts & Leads — front end. Colours match palmlifestyle.ae; change the variables to restyle. */
:root {
	--py-navy: #18212b;
	--py-ink: #1d232a;
	--py-muted: #5f6b76;
	--py-line: #dfe3e6;
	--py-bg: #f4f5f4;
	--py-card: #ffffff;
	--py-gold: #a8792e;
	--py-gold-dark: #8c6322;
	--py-wa: #1f9d55;
	--py-radius: 6px;
}

.py-yachts, .py-yacht, .py-archive, .py-form-wrap, .py-contact { color: var(--py-ink); }
.py-yachts *, .py-yacht *, .py-form-wrap * { box-sizing: border-box; }
.py-form-wrap [hidden], .py-modal [hidden], .py-yachts [hidden], .py-form[hidden] { display: none !important; }

/* Buttons */
.py-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 18px; border: 1px solid var(--py-gold); border-radius: var(--py-radius);
	background: var(--py-gold); color: #fff !important; font: inherit; font-size: 14px; font-weight: 600; letter-spacing: .02em;
	text-decoration: none !important; cursor: pointer; transition: background .15s, border-color .15s;
}
.py-btn:hover, .py-btn:focus-visible { background: var(--py-gold-dark); border-color: var(--py-gold-dark); }
.py-btn:disabled { opacity: .7; cursor: wait; }
.py-btn-ghost { background: transparent; color: var(--py-ink) !important; border-color: var(--py-line); }
.py-btn-ghost:hover, .py-btn-ghost:focus-visible { background: var(--py-bg); border-color: var(--py-ink); }
.py-btn-wa { background: var(--py-wa); border-color: var(--py-wa); }
.py-btn-wa:hover, .py-btn-wa:focus-visible { background: #17834a; border-color: #17834a; }

/* Grid + cards */
.py-yachts-title { margin: 0 0 16px; }
.py-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.py-card { display: flex; flex-direction: column; background: var(--py-card); border: 1px solid var(--py-line); border-radius: var(--py-radius); overflow: hidden; }
.py-card-media { position: relative; display: block; aspect-ratio: 3 / 2; background: var(--py-bg); overflow: hidden; }
.py-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.py-card:hover .py-card-media img { transform: scale(1.03); }
.py-noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #dfe5ea, #c9d2d9); }
.py-card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.py-kicker { margin: 0 0 4px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--py-muted); }
.py-card-title { margin: 0 0 2px; font-size: 22px; line-height: 1.2; }
.py-card-title a { color: inherit; text-decoration: none; }
.py-card-title a:hover { text-decoration: underline; }
.py-card-tag { margin: 0 0 10px; color: var(--py-muted); font-size: 14px; }
.py-card-price { margin: 0 0 10px; font-size: 16px; }
.py-vat { display: inline-block; font-size: 12px; padding: 2px 6px; border-radius: 4px; background: var(--py-bg); color: var(--py-muted); margin-inline-start: 4px; vertical-align: middle; }
.py-facts { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--py-muted); }
.py-facts li { margin: 0; }
.py-card-actions { margin-top: auto; display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.py-card-actions .py-btn { padding-inline: 12px; white-space: nowrap; font-size: 13px; }
.py-badge { position: absolute; top: 12px; inset-inline-start: 12px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; background: #fff; color: var(--py-ink); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.py-badge-sold, .py-badge-charter_unavailable { background: #8a1f1f; color: #fff; }
.py-badge-under_offer { background: #f3d58a; }
.py-more { text-align: center; margin: 24px 0 0; }
.py-no-results { padding: 24px; background: var(--py-bg); border-radius: var(--py-radius); }

/* Filters */
.py-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 16px; margin: 0 0 12px; background: var(--py-card); border: 1px solid var(--py-line); border-radius: var(--py-radius); }
.py-filter { display: flex; flex-direction: column; gap: 4px; flex: 1 1 170px; font-size: 13px; color: var(--py-muted); margin: 0; }
.py-filter select { min-height: 44px; width: 100%; padding: 8px 10px; border: 1px solid var(--py-line); border-radius: var(--py-radius); background: #fff; color: var(--py-ink); font: inherit; font-size: 15px; }
.py-filter-actions { display: flex; align-items: center; gap: 14px; }
.py-reset { font-size: 14px; color: var(--py-muted); }
.py-count { margin: 0 0 16px; font-size: 14px; color: var(--py-muted); }

/* Single yacht */
.py-yacht { max-width: 1240px; margin: 0 auto; padding: 16px 16px 96px; }
.py-breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--py-muted); margin: 8px 0 16px; }
.py-breadcrumbs a { color: inherit; }
.py-hero { margin-bottom: 24px; }
.py-hero-media { position: relative; border-radius: var(--py-radius); overflow: hidden; background: var(--py-bg); aspect-ratio: 16 / 9; max-height: min(620px, 70vh); width: 100%; }
.py-hero-media img, .py-hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.py-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.py-thumbs a { flex: 0 0 132px; aspect-ratio: 3 / 2; border-radius: 4px; overflow: hidden; scroll-snap-align: start; }
.py-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.py-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.py-head h1 { margin: 0 0 4px; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; }
.py-tagline { margin: 0 0 20px; color: var(--py-muted); font-size: 17px; }
.py-keyfacts { list-style: none; margin: 0 0 28px; padding: 16px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; border-top: 1px solid var(--py-line); border-bottom: 1px solid var(--py-line); }
.py-keyfacts li { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.py-keyfacts span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--py-muted); }
.py-keyfacts strong { font-size: 17px; }
.py-keyfacts em { font-style: normal; font-size: 12px; color: var(--py-muted); }
.py-closed-note { padding: 14px 16px; background: #fbf3e4; border-inline-start: 3px solid var(--py-gold); border-radius: 4px; }
.py-section { margin: 0 0 32px; }
.py-section h2 { font-size: 24px; margin: 0 0 12px; }
.py-highlights { margin: 0; padding-inline-start: 20px; }
.py-highlights li { margin: 0 0 6px; }
.py-specs { width: 100%; border-collapse: collapse; font-size: 15px; }
.py-specs th, .py-specs td { padding: 10px 0; border-bottom: 1px solid var(--py-line); text-align: start; vertical-align: top; }
.py-specs th { width: 45%; font-weight: 400; color: var(--py-muted); }
.py-amenities { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.py-amenities li { margin: 0; padding: 6px 12px; border: 1px solid var(--py-line); border-radius: 20px; font-size: 14px; }
.py-video { position: relative; aspect-ratio: 16 / 9; }
.py-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.py-side { position: sticky; top: 24px; }
.py-side-box { background: var(--py-card); border: 1px solid var(--py-line); border-radius: var(--py-radius); padding: 20px; box-shadow: 0 8px 24px rgba(24, 33, 43, .06); }
.py-side-title { margin: 0 0 12px; font-size: 20px; font-weight: 600; }
.py-side-box > .py-btn-wa { width: 100%; margin-top: 10px; }
.py-similar { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--py-line); }
.py-similar h2 { margin: 0 0 20px; }
.py-mobile-bar { display: none; }

/* Archive */
.py-archive { max-width: 1240px; margin: 0 auto; padding: 32px 16px 64px; }
.py-archive-head h1 { margin: 0 0 16px; }

/* Forms */
.py-form-title { margin: 0 0 12px; font-size: 22px; }
.py-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.py-form-wrap.is-compact .py-fields { grid-template-columns: 1fr; }
.py-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.py-field.py-wide, .py-form-yacht { grid-column: 1 / -1; }
.py-field label { font-size: 13px; color: var(--py-muted); margin: 0; }
.py-field input, .py-field select, .py-field textarea, .py-phone select, .py-phone input {
	width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--py-line); border-radius: var(--py-radius);
	background: #fff; color: var(--py-ink); font: inherit; font-size: 16px; margin: 0;
}
.py-field textarea { min-height: 88px; resize: vertical; }
.py-field input:focus, .py-field select:focus, .py-field textarea:focus { outline: 2px solid var(--py-gold); outline-offset: 0; border-color: var(--py-gold); }
.py-phone { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 8px; direction: ltr; }
.py-form-yacht { margin: 0; padding: 10px 12px; background: var(--py-bg); border-radius: var(--py-radius); font-size: 14px; }
.py-form-yacht span { color: var(--py-muted); }
/* Honeypot: invisible without off-screen offsets (offsets widen right-to-left pages). */
.py-hp { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap; opacity: 0; pointer-events: none; }
.py-form { position: relative; }
.py-submit { width: 100%; margin-top: 16px; }
.py-privacy { margin: 8px 0 0; font-size: 12px; color: var(--py-muted); }
.py-form-error { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--py-radius); background: #fbeaea; color: #8a1f1f; font-size: 14px; }
.py-thanks { padding: 8px 0; outline: none; }
.py-thanks-title { font-size: 20px; font-weight: 600; margin: 0 0 6px; }
.py-thanks .py-btn { width: 100%; margin-top: 10px; }

/* Modal */
.py-modal { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 28px; border: 0; border-radius: 10px; box-shadow: 0 24px 64px rgba(0,0,0,.3); }
.py-modal::backdrop { background: rgba(14, 20, 27, .6); }
.py-modal-close { position: absolute; top: 10px; inset-inline-end: 12px; width: 40px; height: 40px; border: 0; background: transparent; font-size: 28px; line-height: 1; cursor: pointer; color: var(--py-muted); }

/* WhatsApp float */
.py-wa-float {
	position: fixed; z-index: 9990; bottom: 20px; inset-inline-end: 20px; display: inline-flex; align-items: center; gap: 8px;
	padding: 12px 16px; border-radius: 999px; background: var(--py-wa); color: #fff !important; font-size: 14px; font-weight: 600;
	text-decoration: none !important; box-shadow: 0 6px 18px rgba(0,0,0,.2);
}
.py-wa-float:hover { background: #17834a; }

/* Contact details */
.py-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.py-contact li { margin: 0; display: flex; flex-direction: column; }
.py-contact span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }

/* Photo viewer */
.py-lb { position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center; background: rgba(8, 12, 16, .92); }
.py-lb.is-open { display: flex; }
.py-lb img { max-width: calc(100vw - 120px); max-height: calc(100vh - 80px); object-fit: contain; }
.py-lb button { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; cursor: pointer; }
.py-lb-close { top: 16px; right: 16px; }
.py-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.py-lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.py-lb-lock { overflow: hidden; }

[dir="rtl"] .py-breadcrumbs span[aria-hidden] { transform: scaleX(-1); display: inline-block; }

@media (max-width: 960px) {
	.py-layout { grid-template-columns: 1fr; gap: 8px; }
	.py-side { position: static; }
	.py-mobile-bar {
		display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; z-index: 9991; left: 0; right: 0; bottom: 0;
		padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--py-line); box-shadow: 0 -4px 16px rgba(0,0,0,.08);
	}
	.single-yacht .py-wa-float { display: none; }
}
@media (max-width: 560px) {
	.py-fields { grid-template-columns: 1fr; }
	.py-grid { grid-template-columns: 1fr; }
	.py-modal { padding: 22px 16px; }
	.py-wa-float span { display: none; }
	.py-wa-float { padding: 14px; bottom: 16px; inset-inline-end: 16px; }
	.py-lb img { max-width: 100vw; }
	.py-filter { flex-basis: 100%; }
	.py-filter-actions { width: 100%; }
	.py-filter-actions .py-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.py-card-media img { transition: none; }
}
