/* ================================================================
   OG Estate — Frontend CSS
   Based exactly on apvillas.com design
   ================================================================ */

/* ── Fonts (loaded from server or Google fallback) ─────────────── */
@font-face {
    font-family: 'The Sectarian';
    font-weight: 400;
    src: url('../fonts/TheSectarian.woff2') format('woff2'),
         url('../fonts/TheSectarian.woff')  format('woff'),
         url('../fonts/TheSectarian.ttf')   format('truetype');
}
@font-face {
    font-family: 'Avenir';
    font-weight: 400;
    src: url('../fonts/Avenir-Regular.woff2') format('woff2'),
         url('../fonts/Avenir-Regular.woff')  format('woff'),
         url('../fonts/Avenir-Regular.ttf')   format('truetype');
}
@font-face {
    font-family: 'Avenir';
    font-weight: 500;
    src: url('../fonts/Avenir-Medium.woff2') format('woff2'),
         url('../fonts/Avenir-Medium.woff')  format('woff'),
         url('../fonts/Avenir-Medium.ttf')   format('truetype');
}

/* ── Variables ─────────────────────────────────────────────────── */
:root {
    --primary-color:  #c49c5d;
    --primary-font:   "The Sectarian", Georgia, serif;
    --secondary-font: "Avenir", "Roboto", sans-serif;
    --text-dark:      #181c23;
    --text-muted:     #6f6f6f;
    --border-color:   #e0e0e0;
    --card-shadow:    0px 5px 70px 0px rgb(38 42 76 / 0.1);
    --card-radius:    10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Page wrapper ──────────────────────────────────────────────── */
.og-page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

/* ── Main layout ───────────────────────────────────────────────── */
.og-listing-layout {
    display: flex;
    gap: 0;
}

/* ================================================================
   FILTER SIDEBAR
   ================================================================ */
.og-filter-container {
    width: 25%;
    padding: 0 20px;
    border-radius: 5px;
    flex-shrink: 0;
}

.og-filter-warning {
    background-color: #fff8f0;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    padding: 10px 14px;
    font-family: var(--secondary-font);
    font-size: 13px;
    color: var(--primary-color);
    margin-top: 18px;
    line-height: 1.5;
}

/* Mobile controls */
.og-mobile-controls {
    display: none;
    margin-bottom: 15px;
}
.og-mobile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}
.og-mobile-sort { flex: 1; }
.og-mobile-filter-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    font-family: var(--secondary-font);
    font-size: 13px;
}

/* Filter form */
.og-filter-form { display: block; }

.og-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.og-filter-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
}

/* Location box */
.og-location-box {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.og-location-header {
    padding: 12px 15px;
    font-size: 18px;
    font-weight: 500;
    font-family: var(--primary-font);
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    margin: 0;
}

/* Checkboxes / Radios */
.og-checkbox-container {
    max-height: none;
    overflow-y: visible;
    padding: 0;
}
.og-checkbox-item {
    display: flex;
    align-items: center;
    padding: 3px 15px;
}
.og-checkbox-item input[type="checkbox"],
.og-checkbox-item input[type="radio"] {
    accent-color: var(--primary-color);
    margin-right: 8px;
    flex-shrink: 0;
    cursor: pointer;
}
.og-checkbox-item label {
    font-family: var(--secondary-font);
    cursor: pointer;
    font-size: 14px;
    color: #333;
    margin: 0;
    line-height: 1.2;
}

/* Keyword search */
.og-keyword-search {
    width: 100%;
    margin-bottom: 0;
}
.og-keyword-search input {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 10px 14px;
    font-family: var(--secondary-font);
    font-size: 14px;
    color: var(--text-muted);
    outline: none;
}
.og-keyword-search input:focus { border-color: var(--primary-color); }

/* Budget inputs */
.og-budget-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 15px 12px;
}
.og-budget-label {
    font-family: var(--secondary-font);
    font-size: 13px;
    color: #555;
}
.og-budget-input {
    flex: 1;
    min-width: 70px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    font-family: var(--secondary-font);
    color: var(--text-dark);
    background: #fff;
    outline: none;
}
.og-budget-input:focus { border-color: var(--primary-color); }

/* Filter actions */
.og-filter-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}
.og-reset-btn {
    font-family: var(--secondary-font);
    color: white;
    background: var(--primary-color);
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}
.og-reset-btn:hover { background: #a8834a; }

/* Sort select */
.og-sort-select {
    font-family: var(--secondary-font);
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    color: var(--text-dark);
    cursor: pointer;
    outline: none;
}

/* ================================================================
   RESULTS AREA
   ================================================================ */
.og-results-area { width: 75%; }

.og-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.og-results-count p {
    font-family: var(--secondary-font);
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}
.og-results-sort { min-width: 180px; }

/* Loader */
.og-loader-wrap {
    text-align: center;
    background: #fff;
    padding: 40px 0;
    margin: 20px 0;
    display: none;
}
.og-loader-wrap.visible { display: block; }
.og-loader {
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid var(--primary-color);
    width: 40px;
    height: 40px;
    margin: 0 auto;
    animation: og-spin 1s linear infinite;
}
@keyframes og-spin { 0%{transform:rotate(0deg)} 100%{transform:rotate(360deg)} }

/* ================================================================
   PROPERTY GRID — 2 columns
   ================================================================ */
.og-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, 1fr);
}

/* ================================================================
   PROPERTY CARD — exact apvillas design
   ================================================================ */
.og-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}
.og-card:hover {
    box-shadow: 0px 10px 80px 0px rgb(38 42 76 / 0.18);
}

/* Card image */
.og-card-img-wrap {
    position: relative;
    overflow: hidden;
}
.og-card-img-wrap > a { display: block; }
.og-card-img-wrap img {
    display: block;
    width: 100%;
    height: 230px;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.og-card:hover .og-card-img-wrap img { transform: scale(1.03); }

/* Gradient overlay */
.og-card-gradient {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 72px;
    background: linear-gradient(to top, rgba(0,0,0,0.52), transparent);
    z-index: 1;
    pointer-events: none;
}

/* Overlay details */
.og-card-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 10px 14px;
    pointer-events: none;
}
.og-card-media {
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    color: rgba(255,255,255,0.92);
    font-size: 12.5px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    z-index: 3;
    pointer-events: auto;
}
.og-card-media i { font-size: 13px; }
.og-card-media-spacer { grid-row: 2; }

/* Tag wrapper hidden */
.og-card-tags { display: none; }

/* Card body */
.og-card-body {
    padding: 14px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

/* Title */
.og-card-title {
    font-family: var(--primary-font);
    font-size: 17px;
    font-weight: 400;
    color: var(--text-dark);
    line-height: 1.25;
    margin: 0;
}
.og-card-title a {
    color: var(--text-dark);
    text-decoration: none;
}
.og-card-title a:hover { color: var(--primary-color); }

/* Price */
.og-card-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--primary-color);
    font-family: var(--secondary-font);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}
.og-card-price-from {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
}
.og-card-price-label {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
}

/* Description */
.og-card-desc {
    font-family: var(--secondary-font);
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.55;
    display: block;
}
.og-card-desc a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 12px;
}

/* Specs row */
.og-card-specs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding-top: 10px;
    border-top: 1px solid #f0ece8;
    margin-top: auto;
}
.og-spec {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--secondary-font);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
}
.og-spec svg { flex-shrink: 0; opacity: 0.75; }

/* Empty / no results */
.og-no-results {
    text-align: center;
    padding: 60px 20px;
    font-family: var(--secondary-font);
    color: var(--text-muted);
    font-size: 15px;
    grid-column: 1 / -1;
}

/* ================================================================
   PAGINATION
   ================================================================ */
.og-pagination {
    margin-top: 30px;
    text-align: center;
}
.og-pagination .page-numbers {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    margin: 0 3px;
    display: inline-block;
    text-decoration: none;
    color: var(--text-muted);
    font-family: var(--secondary-font);
    font-size: 13px;
    transition: all 0.15s;
}
.og-pagination .page-numbers:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.og-pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ================================================================
   SINGLE PROPERTY PAGE
   ================================================================ */

/* Swiper hero */
.og-swiper-wrap {
    width: 100%;
    position: relative;
    background: #fff;
    margin-bottom: 20px;
}
.og-swiper {
    width: 100%;
    height: 700px;
    background: #000;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}
.og-swiper .swiper-slide {
    text-align: center;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.og-swiper .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.og-swiper .swiper-button-next,
.og-swiper .swiper-button-prev {
    color: #fff;
    background: rgba(0,0,0,0.7);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}
.og-swiper .swiper-button-next::after,
.og-swiper .swiper-button-prev::after { font-size: 22px; font-weight: bold; }
.og-swiper .swiper-button-next:hover,
.og-swiper .swiper-button-prev:hover { background: rgba(0,0,0,0.9); transform: scale(1.1); }
.og-swiper .swiper-button-prev { left: 20px; }
.og-swiper .swiper-button-next { right: 20px; }
.og-swiper .swiper-pagination { bottom: 15px !important; }
.og-swiper .swiper-pagination-bullet {
    background: #fff; opacity: 0.7; width: 12px; height: 12px; margin: 0 4px;
}
.og-swiper .swiper-pagination-bullet-active { opacity: 1; transform: scale(1.2); }
.og-img-counter {
    position: absolute;
    top: 20px; right: 20px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(5px);
    pointer-events: none;
}

/* Lightbox */
.og-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    animation: og-fadein 0.3s;
}
.og-lightbox.open { display: block; }
.og-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.og-lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}
.og-lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    display: block;
    border-radius: 8px;
}
.og-lightbox-close {
    position: absolute;
    top: -50px; right: 0;
    background: rgba(0,0,0,0.7);
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.og-lightbox-nav {
    position: absolute;
    top: 50%; width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
}
.og-lightbox-btn {
    background: rgba(0,0,0,0.7);
    border: none;
    color: #fff;
    width: 50px; height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.og-lightbox-title { color:#fff; text-align:center; margin-top:15px; font-size:16px; }
.og-lightbox-counter { color:#fff; text-align:center; margin-top:8px; font-size:13px; }
@keyframes og-fadein { from{opacity:0} to{opacity:1} }

/* Single content layout */
.og-single-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 60px;
}
.og-single-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

/* Property title area */
.og-prop-title-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 0 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.og-prop-labels { display: flex; gap: 8px; flex-wrap: wrap; }
.og-prop-label {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    font-family: var(--secondary-font);
    font-size: 12px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.og-prop-label-type {
    background: var(--text-dark);
}
.og-prop-h1 {
    font-family: var(--primary-font);
    font-size: 28px;
    font-weight: 400;
    color: var(--text-dark);
    margin: 0;
}
.og-prop-price-area {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 22px;
    color: var(--primary-color);
    font-family: var(--secondary-font);
    font-weight: 600;
}
.og-prop-price-from {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
}
.og-prop-price-label {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
}
.og-prop-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--secondary-font);
    font-size: 14px;
    color: var(--text-muted);
}
.og-prop-location i { color: var(--primary-color); }
.og-prop-location a { color: var(--text-muted); text-decoration: none; }
.og-prop-location a:hover { color: var(--primary-color); }

/* Left column (content) */
.og-single-content {
    width: 70%;
    padding-right: 24px;
}
/* Right column (sidebar/form) */
.og-single-sidebar {
    width: 30%;
}
.og-single-sidebar-sticky {
    position: sticky;
    top: 100px;
}

/* Panel sections */
.og-panel {
    margin-bottom: 28px;
}
.og-panel-title {
    font-size: 20px;
    color: var(--primary-color);
    font-family: var(--primary-font);
    font-weight: 500;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

/* Overview */
.og-overview-grid {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}
.og-overview-item {
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 80px;
}
.og-overview-val {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--primary-font);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
}
.og-overview-key {
    font-family: var(--secondary-font);
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Description */
.og-description {
    font-family: var(--secondary-font);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-muted);
}
.og-description p { margin-bottom: 12px; }
.og-description ul { margin: 0 0 12px 20px; }
.og-description li { margin-bottom: 4px; }

/* Accordion panels */
.og-accordion { margin-bottom: 16px; border: 1px solid var(--border-color); border-radius: 4px; overflow: hidden; }
.og-accordion-header {
    background: #fafafa;
    border-bottom: 1px solid var(--border-color);
}
.og-accordion-btn {
    width: 100%;
    padding: 14px 18px;
    background: none;
    border: none;
    text-align: left;
    font-family: var(--primary-font);
    font-size: 18px;
    font-weight: 500;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.og-accordion-btn::after { content: '−'; font-size: 22px; line-height: 1; flex-shrink: 0; }
.og-accordion-btn.collapsed::after { content: '+'; }
.og-accordion-body {
    padding: 18px;
    background: #fff;
}
.og-accordion-body.hidden { display: none; }

/* Details grid */
.og-details-grid { display: flex; flex-wrap: wrap; gap: 0; }
.og-detail-full { width: 100% !important; flex: 0 0 100% !important; }
.og-detail-item {
    width: 33.333%;
    padding: 6px 0;
    font-family: var(--secondary-font);
    font-size: 13.5px;
    color: var(--text-muted);
}
.og-detail-item strong { color: var(--text-dark); }
.og-detail-item a { color: var(--primary-color); text-decoration: none; }

/* Features / amenities */
.og-features-grid { display: flex; flex-wrap: wrap; }
.og-feature-item {
    width: 33.333%;
    padding: 5px 0;
    font-family: var(--secondary-font);
    font-size: 13.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.og-feature-item i { color: var(--primary-color); }

/* Video embed */
.og-video-wrap {
    position: relative;
    padding-top: 56.25%;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
}
.og-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Map */
.og-map-wrap iframe {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 6px;
}

/* Contact form card */
.og-contact-card {
    background: #fff;
    box-shadow: var(--card-shadow);
    border-radius: var(--card-radius);
    padding: 24px;
}
.og-contact-card h4 {
    font-family: var(--primary-font);
    font-size: 20px;
    font-weight: 500;
    color: var(--primary-color);
    margin: 0 0 4px;
}
.og-contact-card p.og-contact-subtitle {
    font-family: var(--secondary-font);
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 18px;
    line-height: 1.5;
    font-style: italic;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
}
.og-form-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}
.og-form-field label {
    font-family: var(--secondary-font);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 4px;
}
.og-form-field input,
.og-form-field select,
.og-form-field textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 8px 10px;
    font-family: var(--secondary-font);
    font-size: 14px;
    color: var(--text-dark);
    background: #fff;
    outline: none;
    transition: border-color .2s;
}
.og-form-field input:focus,
.og-form-field select:focus,
.og-form-field textarea:focus { border-color: var(--primary-color); }
.og-form-field textarea { height: 80px; resize: vertical; }
.og-form-submit {
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: var(--secondary-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.og-form-submit:hover { background: #a8834a; }
.og-form-submit.loading { opacity: .7; cursor: wait; }
.og-form-msg { margin-bottom: 12px; }
.og-alert {
    padding: 10px 14px;
    border-radius: 4px;
    font-family: var(--secondary-font);
    font-size: 13px;
    line-height: 1.5;
}
.og-alert-success { background: #ecfdf5; border: 1px solid #10b981; color: #047857; }
.og-alert-error   { background: #fef2f2; border: 1px solid #ef4444; color: #dc2626; }
.og-hp { display: none !important; }

/* Similar listings */
.og-similar { margin-top: 32px; }
.og-similar-title {
    font-family: var(--primary-font);
    font-size: 22px;
    font-weight: 400;
    color: var(--text-dark);
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}
.og-similar-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
    .og-listing-layout { flex-direction: column; }
    .og-filter-container, .og-results-area { width: 100%; padding: 0; }
    .og-mobile-controls { display: block; }
    .og-filter-form { display: none; }
    .og-filter-form.open { display: block; padding: 15px; }
    .og-results-header .og-results-sort { display: none; }
    .og-grid { grid-template-columns: 1fr; }
    .og-card-img-wrap img { height: 200px; }

    .og-single-content, .og-single-sidebar { width: 100%; padding: 0; }
    .og-single-sidebar-sticky { position: static; }
    .og-swiper { height: 350px; }
    .og-swiper .swiper-button-next { right: 10px; top: 50%; }
    .og-swiper .swiper-button-prev { left: 10px; top: 50%; }
    .og-detail-item, .og-feature-item { width: 50%; }
    .og-similar-grid { grid-template-columns: 1fr; }
    .og-overview-grid { gap: 12px; }
}

@media (max-width: 480px) {
    .og-page-wrapper { padding: 14px 12px 40px; }
    .og-detail-item, .og-feature-item { width: 100%; }
}
