/* Galvan Properties – front end. Colours follow the Divi global palette set in Phase 4;
   override the variables in Divi → Theme Options → Custom CSS if needed. */
:root {
	--gp-accent: #a57a5a;
	--gp-text: #0d0d0d;
	--gp-muted: #5f6368;
	--gp-bg-soft: #f0f2f4;
	--gp-radius: 12px;
}

/* Cards / grid */
.gp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.gp-card { background: #fff; border-radius: var(--gp-radius); overflow: hidden; box-shadow: 0 2px 14px rgba(0,0,0,.07); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.gp-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.gp-card-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--gp-bg-soft); }
.gp-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gp-card-badge { position: absolute; top: 12px; left: 12px; background: var(--gp-accent); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.gp-card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.gp-card-body p { margin: 0; padding: 0; }
.gp-card-price { color: var(--gp-accent); font-weight: 700; font-size: 18px; }
.gp-card-title { font-size: 19px; font-weight: 500; line-height: 1.25; margin: 0; padding: 0; }
.gp-card-title a { color: var(--gp-text); }
.gp-card-location { color: var(--gp-muted); font-size: 14px; }
.gp-card-specs { font-size: 14px; color: var(--gp-text); border-top: 1px solid #eceef0; padding-top: 10px !important; margin-top: 6px !important; }

/* Search */
.gp-search { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; background: #fff; padding: 18px; border-radius: var(--gp-radius); box-shadow: 0 2px 14px rgba(0,0,0,.07); }
.gp-search-sidebar { grid-template-columns: 1fr; }
.gp-search label span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--gp-text); }
.gp-search select { width: 100%; padding: 10px; border: 1px solid #d9dde1; border-radius: 8px; background: #fff; font: inherit; }
.gp-search button { background: var(--gp-accent); color: #fafafa; border: 0; border-radius: 8px; padding: 11px 18px; font-weight: 600; font-size: 16px; cursor: pointer; }
.gp-search button:hover { filter: brightness(.92); }

/* Gallery */
.gp-gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 8px; aspect-ratio: 16 / 7; }
.gp-gallery-item { position: relative; display: block; overflow: hidden; border-radius: 8px; background: var(--gp-bg-soft); }
.gp-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.gp-gallery-item:hover img { transform: scale(1.03); }
.gp-gallery-main { grid-row: 1 / 3; }
.gp-gallery-item:nth-child(n+6) { display: none; }
.gp-gallery-more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.45); color: #fff; font-size: 24px; font-weight: 600; }
.gp-gallery[data-count="1"] { grid-template-columns: 1fr; }
.gp-gallery[data-count="1"] .gp-gallery-main { grid-row: auto; }
@media (max-width: 767px) {
	.gp-gallery { grid-template-columns: 1fr 1fr; grid-template-rows: auto; aspect-ratio: auto; }
	.gp-gallery-main { grid-column: 1 / 3; grid-row: auto; aspect-ratio: 4 / 3; }
	.gp-gallery-item:not(.gp-gallery-main) { aspect-ratio: 1; }
}

/* Lightbox */
.gp-lightbox { position: fixed; inset: 0; z-index: 100000; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; }
.gp-lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; }
.gp-lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 40px; cursor: pointer; padding: 12px 18px; line-height: 1; }
.gp-lb-close { top: 8px; right: 8px; }
.gp-lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.gp-lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.gp-lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #ddd; font-size: 14px; }

/* Specs, features, agent, map */
.gp-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 0; }
.gp-specs div { background: var(--gp-bg-soft); border-radius: 8px; padding: 12px 14px; }
.gp-specs dt { font-size: 13px; color: var(--gp-muted); }
.gp-specs dd { margin: 2px 0 0; font-weight: 600; color: var(--gp-text); }
.gp-price-note { color: var(--gp-accent); font-weight: 600; margin-top: 10px; }
.gp-features { columns: 3 180px; list-style: none; padding: 0 !important; margin: 0; }
.gp-features li { padding: 4px 0 4px 22px; position: relative; break-inside: avoid; }
.gp-features li::before { content: "✓"; position: absolute; left: 0; color: var(--gp-accent); font-weight: 700; }
.gp-agent { display: flex; gap: 16px; align-items: center; background: #fff; border-radius: var(--gp-radius); padding: 18px; box-shadow: 0 2px 14px rgba(0,0,0,.07); }
.gp-agent-photo { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex: none; }
.gp-agent-body p { margin: 0; padding: 0; }
.gp-agent-name { font-weight: 600; font-size: 18px; }
.gp-agent-title { color: var(--gp-muted); font-size: 14px; }
.gp-agent-links { list-style: none; padding: 0 !important; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }
.gp-agent-links a { color: var(--gp-accent); font-weight: 600; }
.gp-map { width: 100%; border-radius: var(--gp-radius); overflow: hidden; z-index: 0; }

/* Testimonials */
.gp-testimonials { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.gp-testimonial { margin: 0; background: #fff; border-radius: var(--gp-radius); padding: 24px; box-shadow: 0 2px 14px rgba(0,0,0,.07); }
.gp-testimonial blockquote { border: 0; margin: 0 0 14px; padding: 0; font-style: normal; }
.gp-testimonial figcaption span { display: block; color: var(--gp-muted); font-size: 14px; }
.gp-stars { color: var(--gp-accent); letter-spacing: 2px; margin: 0 0 8px !important; }
