/*
Theme Name: Property Listings
Theme URI: https://example.com
Author: Your Name
Description: A simple property listings theme. Each listing has details plus an attached PDF brochure shown inline and available for download.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: property-listings
*/

:root {
    --pl-primary: #1f3a5f;
    --pl-accent: #c98a3b;
    --pl-bg: #f7f7f5;
    --pl-text: #222222;
    --pl-muted: #6b6b6b;
    --pl-border: #e2e2df;
    --pl-white: #ffffff;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--pl-bg);
    color: var(--pl-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

a { color: var(--pl-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.pl-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.pl-site-header {
    background: var(--pl-white);
    border-bottom: 1px solid var(--pl-border);
    padding: 20px 0;
}

.pl-site-header .pl-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.pl-site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pl-primary);
    margin: 0;
}

.pl-site-title a { color: inherit; }

.pl-nav ul {
    list-style: none;
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.pl-nav a {
    color: var(--pl-text);
    font-weight: 500;
}

/* Main content wrapper */
.pl-main {
    padding: 40px 0 60px;
    min-height: 60vh;
}

.pl-page-title {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--pl-primary);
}

/* Archive grid */
.pl-property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.pl-property-card {
    background: var(--pl-white);
    border: 1px solid var(--pl-border);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.pl-property-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.pl-property-card__image {
    width: 100%;
    height: 190px;
    object-fit: cover;
    background: #ddd;
}

.pl-property-card__body {
    padding: 18px;
}

.pl-property-card__title {
    font-size: 1.15rem;
    margin: 0 0 6px;
}

.pl-property-card__title a { color: var(--pl-text); }

.pl-property-card__price {
    color: var(--pl-accent);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.pl-property-card__meta {
    display: flex;
    gap: 14px;
    color: var(--pl-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.pl-badge-pdf {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pl-white);
    background: var(--pl-primary);
    padding: 3px 9px;
    border-radius: 20px;
}

/* Single property */
.pl-single-property__header {
    margin-bottom: 24px;
}

.pl-single-property__price {
    color: var(--pl-accent);
    font-weight: 700;
    font-size: 1.4rem;
}

.pl-single-property__meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin: 16px 0;
    padding: 16px 0;
    border-top: 1px solid var(--pl-border);
    border-bottom: 1px solid var(--pl-border);
}

.pl-single-property__meta div strong {
    display: block;
    color: var(--pl-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pl-single-property__gallery {
    margin-bottom: 30px;
}

.pl-single-property__gallery img {
    border-radius: 10px;
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}

.pl-pdf-section {
    background: var(--pl-white);
    border: 1px solid var(--pl-border);
    border-radius: 10px;
    padding: 24px;
    margin-top: 30px;
}

.pl-pdf-section h2 {
    margin-top: 0;
    font-size: 1.3rem;
    color: var(--pl-primary);
}

.pl-pdf-embed {
    width: 100%;
    height: 800px;
    border: 1px solid var(--pl-border);
    border-radius: 6px;
    margin: 16px 0;
}

.pl-pdf-download {
    display: inline-block;
    background: var(--pl-primary);
    color: var(--pl-white) !important;
    padding: 12px 22px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none !important;
}

.pl-pdf-download:hover {
    background: var(--pl-accent);
}

.pl-pdf-fallback {
    color: var(--pl-muted);
    font-size: 0.9rem;
    margin-top: 10px;
}

.pl-no-pdf {
    color: var(--pl-muted);
    font-style: italic;
}

/* Footer */
.pl-site-footer {
    background: var(--pl-primary);
    color: var(--pl-white);
    padding: 24px 0;
    text-align: center;
    font-size: 0.9rem;
}

.pl-site-footer a { color: var(--pl-white); text-decoration: underline; }

@media (max-width: 640px) {
    .pl-pdf-embed { height: 500px; }
}
