/* ============================================================================
   HAVRAZ ESTATE — estate.css (loaded for $headerContext = 'estate')
   ============================================================================ */

/* ---------- Hero ---------- */
.estate-hero {
    position: relative;
    min-height: 420px;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem 1rem;
    overflow: hidden;
}
.estate-hero-bg {
    position: absolute; inset: 0;
    background: url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?w=1400&h=600&fit=crop') center/cover no-repeat;
    opacity: 0.35;
}
.estate-hero-content { position: relative; z-index: 2; max-width: 820px; width: 100%; }
.estate-hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.estate-hero p { color: rgba(255,255,255,.8); font-size: 1rem; margin-bottom: 1.5rem; }

.estate-search {
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius-lg, 12px);
    padding: 1rem;
}
.estate-search-tabs {
    display: inline-flex;
    background: rgba(255,255,255,.1);
    border-radius: 10px;
    padding: 0.25rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255,255,255,.15);
}
.estate-search-tabs .tab-btn {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.4rem 1rem; font-size: 0.8rem; font-weight: 600;
    color: rgba(255,255,255,.75);
    border-radius: 8px; border: none; background: none; cursor: pointer;
    transition: all .2s;
}
.estate-search-tabs .tab-btn.active { background: #e63946; color: #fff; }

.estate-search-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr auto;
    gap: 0.75rem;
    align-items: end;
}
.estate-search-grid input,
.estate-search-grid select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--radius-md, 8px);
    color: #fff; font-size: 0.85rem; outline: none;
}
.estate-search-grid input::placeholder { color: rgba(255,255,255,.55); }
.estate-search-grid select option { background: #1a1a2e; color: #fff; }
.estate-search-grid button {
    padding: 0.625rem 1.5rem;
    background: #e63946; color: #fff; font-weight: 700;
    border-radius: var(--radius-md, 8px);
    border: none; cursor: pointer; white-space: nowrap;
}
.estate-search-grid button:hover { background: #c1121f; }

/* ---------- Property Type Pills ---------- */
.prop-types { background: var(--bg, #f8f9fa); padding: 1.25rem 0; border-bottom: 1px solid var(--border-light, #eee); }
.prop-types-scroll {
    display: flex; gap: 0.75rem; overflow-x: auto;
    scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 4px;
}
.prop-types-scroll::-webkit-scrollbar { display: none; }
.prop-type-card {
    flex: 0 0 auto;
    display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
    padding: 0.875rem 1.25rem;
    background: var(--bg-white, #fff);
    border: 1px solid var(--border-light, #eee);
    border-radius: var(--radius-md, 8px);
    min-width: 96px; text-decoration: none; color: var(--text-primary, #212529);
    transition: all .2s;
}
.prop-type-card:hover { border-color: #e63946; transform: translateY(-2px); box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,.06)); }
.prop-type-card i { font-size: 1.3rem; color: #e63946; }
.prop-type-card span { font-size: 0.75rem; font-weight: 600; }

/* ---------- Sections ---------- */
.estate-section { padding: 1.5rem 0; }
.estate-section.alt { background: var(--bg-white, #fff); border-top: 1px solid var(--border-light, #eee); }
.estate-section .section-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.estate-section .section-title { font-size: 1.3rem; font-weight: 800; color: var(--text-primary, #212529); }
.estate-section .section-title .count { font-size: 0.9rem; font-weight: 500; color: var(--text-muted, #888); }
.estate-section .view-all { font-size: 0.85rem; font-weight: 600; color: #e63946; text-decoration: none; white-space: nowrap; }

/* ---------- Filter chips + sort (same pattern as cars) ---------- */
.filters-bar { background: var(--bg-white, #fff); padding: 0.75rem 0; border-bottom: 1px solid var(--border-light, #eee); }
.filters-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.filter-group { display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.filter-group::-webkit-scrollbar { display: none; }
.filter-chip {
    flex: 0 0 auto;
    padding: 0.45rem 1rem;
    font-size: 0.8rem; font-weight: 600;
    color: var(--text-secondary, #555);
    background: var(--bg, #f8f9fa);
    border: 1px solid var(--border-light, #eee);
    border-radius: 50px; cursor: pointer; transition: all .2s;
}
.filter-chip:hover { border-color: #e63946; color: #e63946; }
.filter-chip.active { background: #e63946; border-color: #e63946; color: #fff; }
.sort-group { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--text-muted, #888); white-space: nowrap; }
.sort-group select {
    padding: 0.45rem 0.75rem; font-size: 0.8rem;
    border: 1px solid var(--border-light, #eee); border-radius: 8px;
    background: var(--bg-white, #fff); color: var(--text-primary, #212529); cursor: pointer;
}

/* ---------- View toggle (grid/list) ---------- */
.view-toggle { display: flex; background: var(--bg, #f8f9fa); border: 1px solid var(--border-light, #eee); border-radius: 8px; padding: 0.2rem; }
.view-btn {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 30px; border: none; background: none;
    border-radius: 6px; color: var(--text-muted, #888); cursor: pointer; transition: all .2s;
}
.view-btn.active { background: var(--bg-white, #fff); color: #e63946; box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* ---------- Property Cards ---------- */
.prop-list { display: flex; flex-direction: column; gap: 0.875rem; }
.prop-item {
    display: flex;
    background: var(--bg-white, #fff);
    border: 1px solid var(--border-light, #eee);
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
    transition: all .25s;
    position: relative; cursor: pointer;
}
.prop-item:hover { box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,.1)); border-color: var(--border, #ddd); transform: translateY(-2px); }
.prop-img { position: relative; width: 260px; min-width: 260px; height: 180px; flex-shrink: 0; overflow: hidden; }
.prop-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.prop-item:hover .prop-img img { transform: scale(1.04); }

.prop-badge {
    position: absolute; top: 0.5rem; left: 0.5rem;
    padding: 0.25rem 0.625rem; border-radius: 50px;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
}
.prop-badge.sale { background: #e63946; color: #fff; }
.prop-badge.rent { background: #457b9d; color: #fff; }
.prop-badge.featured { background: #f4a261; color: #1a1a2e; }
.prop-badge.new { background: #2a9d8f; color: #fff; }

.prop-fav {
    position: absolute; top: 0.5rem; right: 0.5rem;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,.95);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted, #888); font-size: 0.85rem;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,.06)); border: none; cursor: pointer;
}
.prop-fav:hover, .prop-fav.active { background: #e63946; color: #fff; }

.prop-details { flex: 1; padding: 1rem 1.25rem; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.prop-top { margin-bottom: 0.4rem; }
.prop-title { font-size: 1.05rem; font-weight: 700; color: var(--text-primary, #212529); line-height: 1.3; }
.prop-location { font-size: 0.8rem; color: var(--text-muted, #888); display: flex; align-items: center; gap: 0.35rem; margin-top: 0.25rem; }
.prop-meta-row { display: flex; gap: 1rem; margin: 0.6rem 0; flex-wrap: wrap; }
.prop-meta-row span { font-size: 0.8rem; color: var(--text-secondary, #555); display: inline-flex; align-items: center; gap: 0.35rem; }
.prop-meta-row i { font-size: 0.85rem; color: var(--text-light, #aaa); }
.prop-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.prop-tags span {
    font-size: 0.72rem; font-weight: 500; color: var(--text-muted, #888);
    background: var(--bg, #f8f9fa); padding: 0.2rem 0.5rem; border-radius: 4px;
    border: 1px solid var(--border-light, #eee);
}
.prop-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 0.75rem; border-top: 1px solid var(--border-light, #eee); gap: 0.5rem; }
.prop-price { font-size: 1.2rem; font-weight: 800; color: #e63946; }
.prop-price small { font-size: 0.75rem; color: var(--text-muted, #888); font-weight: 500; }
.prop-price .price-old { font-size: 0.8rem; font-weight: 500; color: var(--text-muted, #888); text-decoration: line-through; margin-inline-start: 6px; }
.prop-agent { font-size: 0.75rem; color: var(--text-muted, #888); display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.prop-agent img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: var(--bg-hover, #eee); flex-shrink: 0; }
.prop-agent span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Featured grid (3 cols) ---------- */
.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.featured-grid .prop-item { flex-direction: column; }
.featured-grid .prop-img { width: 100%; min-width: auto; height: 220px; }
.featured-grid .prop-details { padding: 1rem; }

/* ---------- Grid/List container support ---------- */
.props-container[data-view="grid"] .prop-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.props-container[data-view="grid"] .prop-item { flex-direction: column; }
.props-container[data-view="grid"] .prop-img { width: 100%; min-width: auto; height: 200px; }
.props-container[data-view="grid"] .prop-details { padding: 0.875rem; }
.props-container[data-view="grid"] .prop-tags { display: none; }

/* ---------- Services ---------- */
.serv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.serv-card {
    background: var(--bg-white, #fff); border: 1px solid var(--border-light, #eee);
    border-radius: var(--radius-md, 8px); padding: 1.5rem 1rem; text-align: center;
    transition: all .25s;
}
.serv-card:hover { box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,.08)); transform: translateY(-2px); }
.serv-icon {
    width: 48px; height: 48px; margin: 0 auto 0.75rem;
    background: linear-gradient(135deg, #e63946, #c1121f);
    border-radius: var(--radius-md, 8px);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: #fff;
}
.serv-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem; }
.serv-card p { font-size: 0.8rem; color: var(--text-muted, #888); line-height: 1.5; }

/* ---------- CTA ---------- */
.estate-cta { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); padding: 3rem 1rem; text-align: center; }
.estate-cta h2 { color: #fff; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; margin-bottom: 0.5rem; }
.estate-cta p { color: rgba(255,255,255,.7); margin-bottom: 1.5rem; }
.estate-cta .cta-buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.btn-light { background: #fff; color: #1a1a2e; padding: 0.75rem 1.75rem; border-radius: 8px; font-weight: 700; text-decoration: none; }
.btn-outline-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); padding: 0.75rem 1.75rem; border-radius: 8px; font-weight: 600; text-decoration: none; }

/* ---------- Load more ---------- */
.load-more { text-align: center; margin-top: 1.5rem; }
.btn-load {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 2rem; font-size: 0.9rem; font-weight: 700;
    color: var(--text-primary, #212529);
    background: var(--bg-white, #fff); border: 1px solid var(--border, #ddd); border-radius: 8px;
    cursor: pointer; transition: all .2s;
}
.btn-load:hover { border-color: #e63946; color: #e63946; }

/* ---------- Inline / wide / card ads (InlineAdResolver fallback styles) ---------- */
.ad-banner-inline { grid-column: 1 / -1; background: var(--bg-white, #fff); border: 1px dashed #e63946; border-radius: var(--radius-md, 8px); padding: 0.75rem 1rem; }
.ad-inline-content { display: flex; align-items: center; gap: 1rem; }
.ad-inline-content img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.ad-inline-text { flex: 1; min-width: 0; }
.ad-label { font-size: 0.65rem; font-weight: 700; color: #e63946; text-transform: uppercase; letter-spacing: .5px; }
.ad-inline-text h4 { font-size: 0.95rem; margin: 2px 0; color: var(--text-primary, #212529); }
.ad-inline-text p { font-size: 0.78rem; color: var(--text-muted, #888); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-inline-btn { flex-shrink: 0; padding: 0.5rem 1.1rem; background: #e63946; color: #fff; font-size: 0.8rem; font-weight: 700; border-radius: 6px; text-decoration: none; }

.ad-banner-wide { grid-column: 1 / -1; position: relative; border-radius: var(--radius-md, 8px); overflow: hidden; min-height: 160px; display: flex; align-items: flex-end; }
.ad-wide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.ad-wide-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,.15)); }
.ad-wide-content { position: relative; z-index: 2; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem; flex-wrap: wrap; }
.ad-wide-label { font-size: 0.65rem; font-weight: 700; color: #f4a261; text-transform: uppercase; letter-spacing: .5px; }
.ad-wide-info h4 { color: #fff; font-size: 1.1rem; margin: 2px 0; }
.ad-wide-info p { color: rgba(255,255,255,.75); font-size: 0.8rem; }
.ad-wide-btn { flex-shrink: 0; padding: 0.6rem 1.4rem; background: #fff; color: #1a1a2e; font-size: 0.85rem; font-weight: 700; border-radius: 6px; text-decoration: none; }

.ad-banner-card { grid-column: 1 / -1; background: var(--bg-white, #fff); border: 1px solid var(--border-light, #eee); border-radius: var(--radius-md, 8px); overflow: hidden; }
.ad-card-img { position: relative; height: 160px; }
.ad-card-img img { width: 100%; height: 100%; object-fit: cover; }
.ad-card-badge { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 0.65rem; padding: 2px 8px; border-radius: 50px; }
.ad-card-body { padding: 1rem; }
.ad-card-body h4 { font-size: 0.95rem; margin: 0 0 4px; color: var(--text-primary, #212529); }
.ad-card-body p { font-size: 0.78rem; color: var(--text-muted, #888); margin-bottom: 0.75rem; }
.ad-card-btn { display: inline-block; padding: 0.5rem 1.1rem; background: #e63946; color: #fff; font-size: 0.8rem; font-weight: 700; border-radius: 6px; text-decoration: none; }

/* ---------- VIP banner carousel (fallback — may already exist in glob.css) ---------- */
.vip-ads-section { max-width: 1200px; margin: 1rem auto; padding: 0 1rem; }
.vip-carousel { position: relative; overflow: hidden; border-radius: 16px; }
.vip-track { display: flex; height: 340px; }
.vip-slide { position: relative; min-width: 100%; overflow: hidden; }
.vip-slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.05); transition: transform 6s ease; }
.vip-slide[data-active="true"] .vip-slide-bg { transform: scale(1); }
.vip-slide-overlay { position: absolute; inset: 0; background: linear-gradient(105deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,.35) 55%, rgba(0,0,0,.1) 100%); }
.vip-slide-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 0 3rem; max-width: 620px; color: #fff; }
.vip-brand { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.vip-logo-box { width: 36px; height: 36px; background: rgba(255,255,255,.15); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.vip-brand-name { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; opacity: .85; }
.vip-title { font-size: clamp(1.4rem, 3.5vw, 2.2rem); font-weight: 800; margin-bottom: 0.5rem; }
.vip-desc { font-size: 0.95rem; opacity: .85; margin-bottom: 1.25rem; }
.vip-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn-vip-primary { display: inline-flex; align-items: center; gap: 6px; padding: 0.7rem 1.5rem; background: #e63946; color: #fff; font-weight: 700; border-radius: 8px; text-decoration: none; }
.btn-vip-outline { display: inline-flex; align-items: center; gap: 6px; padding: 0.7rem 1.5rem; background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.6); font-weight: 600; border-radius: 8px; text-decoration: none; }
.vip-tag { position: absolute; top: 12px; right: 12px; z-index: 3; background: rgba(0,0,0,.55); color: #fff; font-size: 0.65rem; font-weight: 600; padding: 4px 10px; border-radius: 50px; text-transform: uppercase; letter-spacing: .5px; }
.vip-nav { display: flex; align-items: center; gap: 0.75rem; }
.vip-arrow { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border, #ddd); background: var(--bg-white, #fff); color: var(--text-primary, #212529); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.vip-dots { display: flex; gap: 6px; }
.vip-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: var(--border, #ddd); cursor: pointer; padding: 0; }
.vip-dot.active { background: #e63946; width: 22px; border-radius: 50px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .featured-grid { grid-template-columns: repeat(2, 1fr); }
    .serv-grid { grid-template-columns: repeat(2, 1fr); }
    .prop-img { width: 220px; min-width: 220px; height: 160px; }
    .estate-search-grid { grid-template-columns: repeat(3, 1fr); }
    .estate-search-grid button { grid-column: span 3; }
}
@media (max-width: 768px) {
    .estate-hero { min-height: auto; padding: 2rem 1rem; }
    .estate-search-grid { grid-template-columns: 1fr 1fr; }
    .estate-search-grid button { grid-column: span 2; }
    .featured-grid { grid-template-columns: 1fr; }
    .vip-track { height: 280px; }
    .vip-slide-content { padding: 0 1.25rem; }
    .prop-img { width: 130px; min-width: 130px; height: auto; min-height: 120px; }
    .prop-details { padding: 0.75rem; }
    .prop-title { font-size: 0.9rem; }
    .prop-meta-row { gap: 0.6rem; }
    .prop-meta-row span { font-size: 0.7rem; }
    .prop-tags { display: none; }
    .prop-price { font-size: 1rem; }
    .serv-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .props-container[data-view="grid"] .prop-list { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .props-container[data-view="grid"] .prop-img { height: 140px; }
    .ad-inline-content { flex-wrap: wrap; }
}
@media (max-width: 480px) {
    .props-container[data-view="grid"] .prop-list { grid-template-columns: 1fr; }
    .prop-img { width: 110px; min-width: 110px; min-height: 100px; }
    .estate-search-grid { grid-template-columns: 1fr; }
    .estate-search-grid button { grid-column: span 1; }
    .filters-row { flex-direction: column; align-items: stretch; }
    .sort-group { justify-content: flex-end; }
}
