/* ==========================================================================
   Global Property Escape — Property Cards & Details
   ========================================================================== */

/* ==========================================================================
   1. Property Cards
   ========================================================================== */
.property-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.property-grid.list { grid-template-columns: 1fr; }

.property-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs);
  transition: transform 0.35s var(--ease-smooth), box-shadow 0.35s var(--ease-smooth);
  position: relative; display: flex; flex-direction: column;
  will-change: transform;
}
.property-card:hover { transform: translate3d(0, -6px, 0); box-shadow: var(--shadow-lg); }

.property-card-img { position: relative; height: 240px; overflow: hidden; display: block; }
.property-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.property-card:hover .property-card-img img { transform: scale(1.05); }

.property-card-tags {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.save-btn {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(16,42,67,0.06);
  background: rgba(255,255,255,0.94); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); transition: all var(--transition-fast);
}
.save-btn svg { width: 19px; height: 19px; }
.save-btn:hover { color: var(--error); transform: scale(1.08); }
.save-btn.saved { color: var(--error); }
.save-btn.saved svg { fill: currentColor; animation: bounceIn 0.35s ease; }

.property-card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.property-card-price {
  font-family: var(--font-heading); font-weight: 800; font-size: 1.35rem;
  color: var(--primary); margin-bottom: 6px;
}
.property-card-price span { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }
.property-card-title { font-size: 1.1rem; margin-bottom: 6px; line-height: 1.3; }
.property-card-title a { color: var(--primary); }
.property-card-title a:hover { color: var(--secondary); }
.property-card-ref {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--secondary); margin: -2px 0 6px;
}
.property-card-loc {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px;
}
.property-card-loc svg { width: 15px; height: 15px; color: var(--secondary); flex-shrink: 0; }
.property-card-agent {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.property-card-agent-img {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  background: var(--light-grey); flex-shrink: 0;
  border: 1px solid var(--border-light);
}
.property-card-agent-initials {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gradient-accent); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; flex-shrink: 0;
  font-family: var(--font-heading);
}
.property-card-agent-name {
  font-size: 0.8rem; font-weight: 600; color: var(--secondary);
}
.property-card-type {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  background: var(--light-grey); font-size: 0.7rem; font-weight: 600;
  color: var(--secondary); margin-bottom: 6px; letter-spacing: 0.02em;
}
.property-card-desc {
  font-size: 0.87rem; color: var(--text-muted); line-height: 1.6;
  margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.property-card-facts {
  display: flex; gap: 16px; padding: 14px 0; margin-top: auto;
  border-top: 1px solid var(--border-light);
}
.fact { display: flex; align-items: center; gap: 7px; font-size: 0.82rem; color: var(--text); }
.fact svg { width: 17px; height: 17px; color: var(--secondary); flex-shrink: 0; }
.property-card-cta { padding: 0 20px 20px; }
.property-card-cta .btn { width: 100%; justify-content: center; }

/* Tags / badges */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(16,42,67,0.82); color: var(--white);
  font-size: 0.74rem; font-weight: 600; padding: 5px 12px;
  border-radius: var(--radius-full); letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}
.tag svg { width: 12px; height: 12px; }
.tag--sale { background: var(--blue); color: var(--white); }
.tag--rent { background: var(--teal); color: var(--white); }
.tag--holiday { background: #E8891C; color: var(--white); }
.tag--featured { background: var(--danger); color: var(--white); }
.tag--verified { background: var(--success); color: var(--white); }
.tag--new { background: var(--primary); color: var(--white); }
.tag--demo { background: #6C5CE7; color: var(--white); }
.tag--draft, .tag--light { background: rgba(16,42,67,0.14); color: var(--primary); }

/* List view card */
.property-grid.list .property-card { flex-direction: row; align-items: stretch; }
.property-grid.list .property-card-img { flex: 0 0 300px; aspect-ratio: auto; min-height: 220px; height: auto; }
.property-grid.list .property-card-body { flex: 1; }

/* ==========================================================================
   2. Property Details Page
   ========================================================================== */
.property-details { padding: 48px 0 80px; }
.details-layout { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start; }
.details-content { min-width: 0; }

/* Gallery */
.gallery-main {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 16 / 9; margin-bottom: 16px; box-shadow: var(--shadow-md);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.92); border: none; color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); cursor: pointer; z-index: 3;
  transition: all var(--transition-fast);
}
.gallery-nav-btn:hover { background: var(--accent); color: var(--white); }
.gallery-nav-btn.prev { left: 16px; }
.gallery-nav-btn.next { right: 16px; }
.gallery-nav-btn svg { width: 22px; height: 22px; }
.gallery-counter {
  position: absolute; bottom: 16px; right: 16px; z-index: 3;
  background: rgba(16,42,67,0.82); color: var(--white);
  font-size: 0.8rem; font-weight: 600; padding: 6px 14px; border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
}
.gallery-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.gallery-thumb {
  aspect-ratio: 16 / 10; border-radius: var(--radius-sm); overflow: hidden;
  border: 2.5px solid transparent; cursor: pointer; padding: 0;
  background: var(--light-grey); transition: all var(--transition-fast);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active { border-color: var(--accent); }
.gallery-thumb:hover:not(.active) { border-color: var(--secondary); }

/* Full-screen lightbox */
.gallery-lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(6, 16, 30, 0.94);
  display: none; align-items: center; justify-content: center;
  padding: 40px 48px;
}
.gallery-lightbox.open { display: flex; }
.gallery-lightbox figure {
  margin: 0; max-width: 1200px; width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.gallery-lightbox img {
  max-width: 100%; max-height: 82vh; width: auto; height: auto;
  object-fit: contain; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.gallery-lb-close {
  position: absolute; top: 20px; right: 24px; z-index: 3;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.14); color: var(--white);
  border: none; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition-fast);
}
.gallery-lb-close:hover { background: var(--accent); color: var(--white); }
.gallery-lb-counter { color: rgba(255,255,255,0.8); font-size: 0.9rem; letter-spacing: 0.04em; }
.gallery-lightbox .gallery-nav-btn { background: rgba(255,255,255,0.16); color: var(--white); border: none; }
.gallery-lightbox .gallery-nav-btn:hover { background: var(--accent); color: var(--white); }

/* Property head */
.property-head { padding: 28px 0 20px; border-bottom: 1px solid var(--border-light); }
.property-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.property-title-row h1,
.property-title-row h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 10px; }
.property-title-actions { display: flex; gap: 10px; }
.property-meta-row { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 14px; }
.property-meta-row .meta-item { display: flex; align-items: center; gap: 6px; }
.property-meta-row svg { width: 16px; height: 16px; color: var(--secondary); }
.property-tag-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Key facts */
.key-facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin: 24px 0; padding: 20px; background: var(--light-grey);
  border-radius: var(--radius-lg);
}
.key-fact { display: flex; align-items: center; gap: 14px; }
.key-fact svg { width: 26px; height: 26px; color: var(--secondary); flex-shrink: 0; }
.key-fact-value { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; color: var(--primary); line-height: 1.1; }
.key-fact-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* Sections */
.details-section { padding: 32px 0; border-bottom: 1px solid var(--border-light); }
.details-section h2 {
  font-size: 1.35rem; margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.details-section h2::before {
  content: ''; width: 6px; height: 26px; border-radius: var(--radius-full);
  background: var(--gradient-accent); display: inline-block;
}
.prop-description { font-size: 1rem; line-height: 1.8; color: var(--text); }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; }
.feature-item { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; }
.feature-item svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }

/* Amenities */
.amenities-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.amenity-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border: 1.5px solid var(--border);
  border-radius: var(--radius-full); font-size: 0.87rem;
  background: var(--white); transition: all var(--transition-fast);
}
.amenity-chip svg { width: 16px; height: 16px; color: var(--accent); }
.amenity-chip:hover { border-color: var(--accent); background: var(--info-bg); }

/* Map */
.map-box {
  border-radius: var(--radius-lg); overflow: hidden; height: 360px;
  background: var(--light-grey); position: relative; border: 1px solid var(--border);
}
.map-placeholder {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; color: var(--text-dim);
  text-align: center; padding: 24px;
}
.map-placeholder svg { width: 48px; height: 48px; }
.map-placeholder p { font-size: 0.95rem; max-width: 320px; margin: 0; }

/* Booking / enquiry sidebar */
.booking-sidebar { position: sticky; top: calc(var(--header-h) + 24px); }
.booking-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-lg);
}
.booking-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 20px; }
.booking-price { font-family: var(--font-heading); font-size: 1.9rem; font-weight: 800; color: var(--primary); }
.booking-price-period { color: var(--text-muted); font-size: 0.9rem; }
.booking-divider { height: 1px; background: var(--border-light); margin: 20px 0; }
.booking-detail { display: flex; justify-content: space-between; font-size: 0.92rem; padding: 7px 0; }
.booking-detail span:first-child { color: var(--text-muted); }
.booking-detail strong { color: var(--primary); }
.booking-total { display: flex; justify-content: space-between; font-size: 1.02rem; padding-top: 16px; margin-top: 8px; border-top: 2px solid var(--border-light); }
.booking-total strong { font-family: var(--font-heading); color: var(--primary); font-size: 1.15rem; }
.booking-sidebar .btn { width: 100%; margin-top: 14px; justify-content: center; }
.booking-card .save-row { display: flex; gap: 10px; }
.booking-card .save-row .btn { flex: 1; }
.booking-card .save-row .save-btn {
  position: static; width: auto; height: auto; border-radius: var(--radius-full);
  border-color: var(--secondary); box-shadow: none;
}
.agent-card {
  margin-top: 20px; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm);
  text-align: center;
}
.agent-avatar {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px;
  background: var(--gradient-primary); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700;
}
.agent-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.agent-card p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }
.agent-card .choice-logo-img { height: 28px; max-width: 130px; margin: 0 auto 12px; display: block; }

/* Similar */
.similar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* List view layout */
.property-grid.list .property-card { flex-direction: row; }
.property-grid.list .property-card-img { height: auto; width: 38%; min-height: 220px; flex-shrink: 0; }
.property-grid.list .property-card-body { padding: 22px 24px; flex: 1; }
.property-grid.list .property-card-desc {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; margin: 8px 0 14px; font-size: 0.9rem; color: var(--text);
}
.property-grid.list .property-card-cta {
  padding: 18px 24px; border-top: 1px solid var(--border-light);
  background: var(--white);
}
.property-grid.list .save-btn { top: 14px; right: 14px; }

/* Title actions (save + share) */
.property-title-actions { display: flex; gap: 10px; align-items: flex-start; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--white);
  color: var(--text-muted); cursor: pointer;
  transition: all var(--transition-fast); flex-shrink: 0;
}
.share-btn svg { width: 20px; height: 20px; }
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Gallery: view-all overlay button */
.gallery-view-all {
  position: absolute; right: 16px; bottom: 16px; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border: none; border-radius: var(--radius);
  background: rgba(10, 30, 50, 0.82); color: var(--white);
  font-family: var(--font-heading); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: background var(--transition-fast);
}
.gallery-view-all svg { width: 16px; height: 16px; }
.gallery-view-all:hover { background: rgba(10, 30, 50, 0.95); }

/* House rules */
.house-rules { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 28px; }
.house-rules li { font-size: 0.93rem; color: var(--text); }
.house-rules li strong { color: var(--primary); }

/* Availability */
.availability-note { background: var(--light-grey); border-radius: var(--radius-lg); padding: 24px; }
.availability-note h3 { font-size: 1rem; margin-bottom: 8px; }
.availability-note p { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 16px; }
.availability-facts { display: flex; flex-wrap: wrap; gap: 24px; }
.availability-facts span { display: flex; flex-direction: column; gap: 2px; font-size: 0.82rem; color: var(--text-muted); }
.availability-facts strong { font-size: 0.9rem; color: var(--primary); }

/* Safety notice */
.safety-notice { background: var(--info-bg); border: 1px solid var(--info-border); border-radius: var(--radius-lg); padding: 24px; }
.safety-notice h3 { font-size: 1rem; margin-bottom: 8px; }
.safety-notice p { font-size: 0.92rem; line-height: 1.7; color: var(--text); }
.safety-notice a { color: var(--secondary); text-decoration: underline; }

/* Stay estimate (calculator) */
.stay-estimate { background: var(--light-grey); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 14px; }
.stay-estimate-title { font-size: 0.95rem; margin-bottom: 12px; color: var(--primary); }
.stay-estimate .form-row { gap: 10px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.stay-estimate .form-row .form-group { min-width: 0; }
.stay-estimate .form-row input[type="date"],
.stay-estimate .form-row select { width: 100%; min-width: 0; }
.stay-estimate .form-row + .form-row { margin-top: 10px; }
.stay-estimate .form-group label { font-size: 0.78rem; }
.stay-estimate-breakdown { margin: 12px 0 8px; }
.stay-row {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 0.86rem; color: var(--text-muted); padding: 5px 0;
}
.stay-row--total {
  border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px;
  font-weight: 700; color: var(--primary); font-size: 0.95rem;
}
.stay-estimate-total { font-size: 0.86rem; font-weight: 600; color: var(--primary); margin: 8px 0 0; }

/* Contact row (call / whatsapp / email) */
.contact-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 16px; }
.contact-row .btn { flex: 1; min-width: 110px; justify-content: center; }

/* Agent fallback card */
.agent-avatar--fallback { background: var(--gradient-accent); }
.agent-card-actions { display: flex; flex-direction: column; gap: 8px; }

/* Empty-state actions */
.empty-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Details page */
.property-details-page { padding: 48px 0 80px; }
.property-details-page .breadcrumb { margin-bottom: 28px; }
.details-section-title { font-size: 1.35rem; margin-bottom: 18px; }
.similar-section { padding: 56px 0 8px; }

/* Direct contact owner / agent block (sidebar) */
.direct-contact {
  margin: 18px 0 20px; padding: 18px 20px;
  border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: var(--radius-md); background: var(--white);
  box-shadow: var(--shadow-sm);
}
.direct-contact h3 {
  display: flex; align-items: center; gap: 8px;
  font-size: 1rem; margin-bottom: 10px; color: var(--primary);
}
.direct-contact h3 svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }
.direct-contact p { font-size: 0.9rem; line-height: 1.65; color: var(--text); margin: 0 0 8px; }
.direct-contact p:last-child { margin-bottom: 0; }
.direct-contact strong { color: var(--primary); }
.direct-contact .direct-contact-strong {
  font-weight: 700; font-size: 0.92rem; color: var(--secondary-dark);
  background: var(--info-bg); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-top: 4px;
}
.owner-agent-contact {
  display: flex; flex-direction: column; gap: 8px; margin-top: 12px;
}
.owner-agent-contact .btn { width: 100%; justify-content: center; }

/* Listing disclaimer (bottom of every listing) */
.listing-disclaimer { padding: 48px 0 0; }
.listing-disclaimer-card {
  background: var(--white); border: 1px solid var(--border);
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-lg); padding: 28px 32px; box-shadow: var(--shadow-sm);
}
.listing-disclaimer-card .details-section-title {
  display: flex; align-items: center; gap: 10px; font-size: 1.2rem; margin-bottom: 14px;
}
.listing-disclaimer-card .details-section-title svg { width: 22px; height: 22px; color: var(--warning); flex-shrink: 0; }
.listing-disclaimer-card p {
  font-size: 0.92rem; line-height: 1.75; color: var(--text-muted); margin: 0 0 12px;
}
.listing-disclaimer-card p:last-child { margin-bottom: 0; }
