/* ============================================================
   Elegant Property Listings Pro – style.css v4.0
   Palette: Brown #685c50 | Black #363533 | Cream #e5c99f | Pink #f1e2cd
   ============================================================ */

:root {
    --epp-brown:      #685c50;
    --epp-brown-dk:   #4e433a;
    --epp-black:      #363533;
    --epp-cream:      #e5c99f;
    --epp-pink:       #f1e2cd;
    --epp-white:      #fdf8f4;
    --epp-bg:         #faf6f2;
    --epp-sale:       #c0392b;
    --epp-rent:       #2471a3;
    --epp-radius:     14px;
    --epp-shadow:     0 4px 24px rgba(54,53,51,0.12);
    --epp-shadow-lg:  0 12px 40px rgba(54,53,51,0.18);
    --epp-transition: all 0.25s ease;
    /* ── Card image height – change ONE value to resize all card images ── */
    --epp-card-img-h: 220px;
}

/* ── Listing Header ─────────────────────────────────────── */
.epp-listing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-radius: var(--epp-radius);
    margin-bottom: 28px;
    color: #fff;
}
.epp-listing-header h2 { margin: 0; font-size: 1.5rem; }
.epp-count {
    background: rgba(255,255,255,.25);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: 700;
}
.epp-header--sale { background: linear-gradient(135deg, #c0392b, #e74c3c); }
.epp-header--rent { background: linear-gradient(135deg, #1a5276, #2471a3); }

/* ── Grid ───────────────────────────────────────────────── */
.epp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    align-items: stretch; /* cards in the same row share height */
}

/* ═══════════════════════════════════════════════════════════
   CARD
   Key rule: flex column so footer always sits at the bottom,
   body stretches to fill remaining space.
   The image wrapper uses a FIXED height via --epp-card-img-h
   so the text section is never pushed by a taller/shorter image.
   ═══════════════════════════════════════════════════════════ */
.epp-card {
    background: var(--epp-white);
    border-radius: var(--epp-radius);
    overflow: hidden;
    box-shadow: var(--epp-shadow);
    transition: var(--epp-transition);
    /* flex column keeps footer pinned at bottom */
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(104,92,80,.1);
}
.epp-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--epp-shadow-lg);
}

/* ── Image area: FIXED HEIGHT always, regardless of source image ── */
.epp-card-img-wrap {
    position: relative;
    width: 100%;
    height: var(--epp-card-img-h); /* fixed — never grows or shrinks */
    overflow: hidden;
    flex-shrink: 0;                /* don't let flex compress it */
    background: var(--epp-pink);
}
.epp-card-img-wrap a {
    display: block;
    width: 100%;
    height: 100%;
}
.epp-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;     /* fills the box, crops if needed */
    object-position: center;
    display: block;
    transition: transform .4s ease;
}
.epp-card:hover .epp-card-img-wrap img { transform: scale(1.05); }

/* ── Blank image placeholder (fixed same height as real images) ── */
.epp-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--epp-pink) 0%, var(--epp-cream) 100%);
    color: var(--epp-brown);
    gap: 8px;
}
.epp-no-image-icon { font-size: 3rem; line-height: 1; }
.epp-no-image-label {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--epp-brown);
    text-transform: uppercase;
    opacity: .7;
}

.epp-purpose-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .5px;
    color: #fff;
    text-transform: uppercase;
}
.epp-purpose--sale { background: var(--epp-sale); }
.epp-purpose--rent { background: var(--epp-rent); }

.epp-type-tag {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(54,53,51,.72);
    color: var(--epp-cream);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: .68rem;
    font-weight: 600;
}

/* ── Card body — flex:1 fills space between image and footer ── */
.epp-card-body {
    padding: 18px 18px 12px;
    flex: 1;                /* grow to fill remaining height */
    display: flex;
    flex-direction: column;
    gap: 7px;
    background: var(--epp-pink);
}
.epp-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--epp-black);
    line-height: 1.35;
}
.epp-card-title a { color: inherit; text-decoration: none; }
.epp-card-title a:hover { color: var(--epp-brown); }

.epp-card-location {
    margin: 0;
    font-size: .82rem;
    color: var(--epp-brown);
    display: flex;
    align-items: center;
    gap: 4px;
}
.epp-card-specs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.epp-spec {
    font-size: .78rem;
    color: var(--epp-black);
    background: rgba(104,92,80,.1);
    padding: 3px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

/* Description excerpt */
.epp-card-excerpt {
    margin: 0;
    font-size: .8rem;
    color: #666;
    line-height: 1.5;
    /* clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.epp-card-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 2px;
}
.epp-amenity-tag {
    font-size: .7rem;
    padding: 2px 8px;
    background: var(--epp-cream);
    color: var(--epp-brown);
    border-radius: 4px;
    border: 1px solid rgba(104,92,80,.2);
}
.epp-amenity-more { opacity: .75; }

/* ── Card footer — always at bottom via margin-top:auto ── */
.epp-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-top: 1px solid rgba(104,92,80,.15);
    background: var(--epp-white);
    flex-shrink: 0;
    gap: 10px;
}
.epp-card-price {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--epp-brown);
    white-space: nowrap;
}
.epp-btn {
    background: var(--epp-brown);
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none !important;
    font-size: .8rem;
    font-weight: 600;
    transition: var(--epp-transition);
    white-space: nowrap;
    flex-shrink: 0;
}
.epp-btn:hover { background: var(--epp-black); }

.epp-empty { text-align: center; padding: 60px 20px; color: var(--epp-brown); }
.epp-empty-icon { font-size: 3rem; display: block; margin-bottom: 12px; }

/* ── Tabs ───────────────────────────────────────────────── */
.epp-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--epp-cream);
}
.epp-tab {
    padding: 10px 24px;
    border: none;
    background: transparent;
    color: var(--epp-brown);
    cursor: pointer;
    font-size: .95rem;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: var(--epp-transition);
}
.epp-tab.active {
    color: var(--epp-black);
    border-bottom-color: var(--epp-brown);
}
.epp-tab-content { display: none; }
.epp-tab-content.active { display: block; }

/* ── Notices ────────────────────────────────────────────── */
.epp-notice { padding: 14px 20px; border-radius: 8px; margin-bottom: 20px; font-weight: 600; }
.epp-notice--success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.epp-notice--error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ════════════════════════════════════════════════════════
   SUBMISSION FORM
   ════════════════════════════════════════════════════════ */
.epp-form-wrap {
    max-width: 740px;
    margin: 0 auto;
    background: var(--epp-white);
    border-radius: 18px;
    box-shadow: 0 8px 40px rgba(54,53,51,.12);
    overflow: hidden;
}
.epp-form-header {
    background: linear-gradient(135deg, var(--epp-brown), var(--epp-black));
    padding: 28px 32px;
    color: #fff;
}
.epp-form-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 10px;
}
.epp-badge--sale { background: var(--epp-sale); }
.epp-badge--rent { background: var(--epp-rent); }
.epp-badge-- { background: rgba(255,255,255,.2); }
.epp-form-title { margin: 0; font-size: 1.6rem; color: #fff; }

.epp-form { padding: 32px; }
.epp-section {
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--epp-cream);
}
.epp-section:last-child { border-bottom: none; }
.epp-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--epp-black);
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.epp-step {
    width: 28px; height: 28px;
    background: var(--epp-brown);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Conditional type fields prompt */
.epp-type-prompt { color: #aaa; font-style: italic; font-size: .85rem; margin: 0 0 12px; }

.epp-field-group { display: grid; gap: 16px; margin-bottom: 16px; }
.epp-col-2 { grid-template-columns: 1fr 1fr; }
.epp-col-3 { grid-template-columns: 1fr 1fr 1fr; }
.epp-col-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.epp-field { display: flex; flex-direction: column; gap: 6px; }
.epp-field label { font-size: .82rem; font-weight: 600; color: var(--epp-black); }
.epp-field label .req { color: var(--epp-sale); }

.epp-form input[type="text"],
.epp-form input[type="number"],
.epp-form input[type="tel"],
.epp-form input[type="email"],
.epp-form select,
.epp-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--epp-cream);
    border-radius: 8px;
    font-size: .9rem;
    color: var(--epp-black);
    background: #fff;
    transition: border-color .2s;
    box-sizing: border-box;
    font-family: inherit;
}
.epp-form input:focus,
.epp-form select:focus,
.epp-form textarea:focus {
    outline: none;
    border-color: var(--epp-brown);
    box-shadow: 0 0 0 3px rgba(104,92,80,.15);
}
.epp-form textarea { resize: vertical; min-height: 80px; }
.epp-hint { font-size: .78rem; color: var(--epp-brown); margin: 4px 0 0; }

.epp-quick-amenities { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.epp-quick-tag {
    padding: 5px 12px;
    border: 1.5px solid var(--epp-brown);
    border-radius: 20px;
    background: transparent;
    color: var(--epp-brown);
    font-size: .8rem;
    cursor: pointer;
    transition: var(--epp-transition);
    font-family: inherit;
}
.epp-quick-tag:hover, .epp-quick-tag.selected {
    background: var(--epp-brown);
    color: #fff;
}
.epp-amenities-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.epp-amenity-row { display: flex; gap: 8px; align-items: center; }
.epp-amenity-row input { flex: 1; }
.epp-remove-amenity {
    width: 32px; height: 32px;
    border: none;
    background: #fde8e8;
    color: var(--epp-sale);
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    font-size: .85rem;
}
.epp-add-btn {
    background: transparent;
    border: 1.5px dashed var(--epp-brown);
    color: var(--epp-brown);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 600;
    transition: var(--epp-transition);
    font-family: inherit;
}
.epp-add-btn:hover { background: var(--epp-pink); }

.epp-upload-area {
    border: 2px dashed var(--epp-cream);
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    background: var(--epp-pink);
    transition: var(--epp-transition);
    position: relative;
}
.epp-upload-area:hover { border-color: var(--epp-brown); }
.epp-upload-area input[type="file"] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.epp-upload-icon { font-size: 2.5rem; margin-bottom: 8px; }
.epp-upload-area p { margin: 0 0 4px; font-size: .9rem; color: var(--epp-brown); font-weight: 600; }
.epp-upload-area small { font-size: .76rem; color: #999; }
.epp-image-preview { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.epp-image-preview img {
    width: 80px; height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--epp-cream);
}
.epp-submit-row { text-align: center; padding-top: 8px; }
.epp-submit-btn {
    background: linear-gradient(135deg, var(--epp-brown), var(--epp-black));
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--epp-transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}
.epp-submit-btn:hover { opacity: .88; transform: translateY(-1px); }

/* ════════════════════════════════════════════════════════
   SINGLE PROPERTY PAGE
   ════════════════════════════════════════════════════════ */
.epp-single-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}
.epp-breadcrumb { font-size: .82rem; color: var(--epp-brown); margin-bottom: 24px; }
.epp-breadcrumb a { color: var(--epp-brown); text-decoration: none; }
.epp-breadcrumb a:hover { text-decoration: underline; }

.epp-single-inner {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 32px;
    align-items: start;
}

/* Gallery */
.epp-main-image {
    position: relative;
    border-radius: var(--epp-radius);
    overflow: hidden;
    box-shadow: var(--epp-shadow);
    margin-bottom: 12px;
    background: var(--epp-pink);
}
.epp-main-image img {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    display: block;
}
.epp-single-badge {
    position: absolute; top: 16px; left: 16px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
}
.epp-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.epp-thumb {
    width: 80px; height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--epp-transition);
    opacity: .7;
}
.epp-thumb:hover, .epp-thumb.active { opacity: 1; border-color: var(--epp-brown); }

/* Blank placeholder on single page */
.epp-single-no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 320px;
    background: linear-gradient(145deg, var(--epp-pink) 0%, var(--epp-cream) 100%);
    border-radius: var(--epp-radius);
    color: var(--epp-brown);
    margin-bottom: 12px;
    gap: 12px;
}
.epp-no-img-icon { font-size: 4rem; }
.epp-single-no-image p { margin: 0; font-size: .85rem; font-weight: 600; opacity: .7; }

/* Description */
.epp-single-description {
    margin-top: 24px;
    background: var(--epp-pink);
    padding: 20px 24px;
    border-radius: var(--epp-radius);
}
.epp-single-description h3 { margin: 0 0 12px; font-size: 1rem; color: var(--epp-black); }
.epp-desc-content { font-size: .9rem; color: #555; line-height: 1.7; }

/* Amenities section on left */
.epp-single-amenities-section {
    margin-top: 24px;
    background: var(--epp-white);
    border-radius: var(--epp-radius);
    padding: 20px 24px;
    box-shadow: var(--epp-shadow);
}
.epp-single-amenities-section h3 { margin: 0 0 14px; font-size: 1rem; color: var(--epp-black); }
.epp-amenities-grid-full { display: flex; flex-wrap: wrap; gap: 8px; }
.epp-amenity-chip {
    padding: 6px 14px;
    background: var(--epp-cream);
    color: var(--epp-brown);
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 600;
    border: 1px solid rgba(104,92,80,.2);
}

/* Right panel */
.epp-detail-panel {
    background: var(--epp-pink);
    border-radius: var(--epp-radius);
    box-shadow: var(--epp-shadow);
    padding: 28px;
    position: sticky;
    top: 24px;
}
.epp-detail-header { margin-bottom: 12px; }
.epp-single-title { margin: 0 0 8px; font-size: 1.3rem; color: var(--epp-black); line-height: 1.3; }
.epp-type-pill {
    display: inline-block;
    padding: 3px 12px;
    background: var(--epp-cream);
    color: var(--epp-brown);
    border-radius: 20px;
    font-size: .74rem;
    font-weight: 700;
}
.epp-single-location { margin: 0 0 14px; font-size: .88rem; color: var(--epp-brown); }
.epp-price-block {
    background: var(--epp-cream);
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.epp-single-price { font-size: 1.6rem; font-weight: 800; color: var(--epp-brown); }
.epp-price-suffix { font-size: .85rem; color: #777; }

/* Specs table */
.epp-specs-heading {
    margin: 0 0 10px;
    font-size: .88rem;
    font-weight: 700;
    color: var(--epp-black);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.epp-specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: .85rem;
}
.epp-specs-table tr { border-bottom: 1px solid rgba(104,92,80,.1); }
.epp-specs-table tr:last-child { border-bottom: none; }
.epp-specs-table th {
    text-align: left;
    padding: 8px 6px;
    color: #888;
    font-weight: 600;
    width: 44%;
    vertical-align: top;
}
.epp-specs-table td {
    padding: 8px 6px;
    color: var(--epp-black);
    font-weight: 700;
    vertical-align: top;
}

/* Enquiry form */
.epp-enquiry-form-wrap {
    border-top: 1px solid rgba(104,92,80,.15);
    padding-top: 20px;
    margin-top: 16px;
    margin-bottom: 16px;
}
.epp-enquiry-heading {
    margin: 0 0 14px;
    font-size: .92rem;
    color: var(--epp-black);
    font-weight: 700;
}
.epp-enquiry-form { display: flex; flex-direction: column; gap: 10px; }
.epp-enq-field input,
.epp-enq-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--epp-cream);
    border-radius: 8px;
    font-size: .88rem;
    color: var(--epp-black);
    background: #fff;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color .2s;
}
.epp-enq-field input:focus,
.epp-enq-field textarea:focus {
    outline: none;
    border-color: var(--epp-brown);
}
.epp-enq-field textarea { resize: vertical; min-height: 70px; }
.epp-enquire-btn {
    background: linear-gradient(135deg, var(--epp-brown), var(--epp-black));
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--epp-transition);
    font-family: inherit;
}
.epp-enquire-btn:hover { opacity: .88; }
.epp-enq-hint { font-size: .75rem; color: #888; margin: 8px 0 0; }
.epp-enq-hint a { color: var(--epp-brown); }

.epp-back-btn {
    display: block;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    color: var(--epp-brown) !important;
    border: 1.5px solid var(--epp-brown);
    text-decoration: none !important;
    font-weight: 700;
    font-size: .85rem;
    transition: var(--epp-transition);
}
.epp-back-btn:hover { background: var(--epp-cream); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1000px) {
    .epp-single-inner { grid-template-columns: 1fr; }
    .epp-detail-panel { position: static; }
}
@media (max-width: 760px) {
    .epp-col-4 { grid-template-columns: 1fr 1fr; }
    .epp-col-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 580px) {
    .epp-grid { grid-template-columns: 1fr; gap: 20px; }
    .epp-col-2, .epp-col-3, .epp-col-4 { grid-template-columns: 1fr; }
    .epp-form { padding: 20px; }
    .epp-form-header { padding: 20px; }
    .epp-listing-header { flex-direction: column; gap: 8px; text-align: center; }
}
