/*
Theme Name: YEERAF Real Estate
Theme URI: https://example.com/
Author: Custom Development
Description: Custom WordPress real-estate theme with property listing, search/filter UI and Sale/Admin dashboard styling.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: yeeraf-re
*/

:root{
  --re-primary:#0d2945;
  --re-primary-2:#163b5f;
  --re-accent:#d9a441;
  --re-bg:#f6f8fb;
  --re-card:#fff;
  --re-text:#17212b;
  --re-muted:#6b7785;
  --re-border:#e5eaf0;
  --re-success:#2e9b63;
  --re-danger:#d9534f;
  --re-warning:#d49a22;
  --re-radius:14px;
  --re-shadow:0 10px 30px rgba(13,41,69,.08);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Inter,"Noto Sans Thai",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--re-text);background:#fff;line-height:1.65}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}
button,input,select,textarea{font:inherit}
.container{width:min(1180px,calc(100% - 40px));margin-inline:auto}
.site-main{min-height:70vh}
.screen-reader-text{position:absolute!important;clip:rect(1px,1px,1px,1px);width:1px;height:1px;overflow:hidden}

.site-header{position:sticky;top:0;z-index:100;background:#fff;border-bottom:1px solid var(--re-border)}
.header-inner{height:74px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.logo{display:flex;align-items:center;gap:10px;font-weight:800;letter-spacing:.04em;color:var(--re-primary)}
.logo-mark{width:42px;height:42px;background:var(--re-primary);color:#fff;display:grid;place-items:center;font-size:13px;line-height:1}
.primary-nav ul{display:flex;gap:28px;list-style:none;margin:0;padding:0}
.primary-nav a{font-size:14px;color:#4e5965}
.primary-nav a:hover{color:var(--re-primary)}
.header-actions{display:flex;align-items:center;gap:10px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:9px;padding:11px 18px;cursor:pointer;font-weight:700;font-size:14px;transition:.2s}
.btn-primary{background:var(--re-primary);color:#fff}
.btn-primary:hover{background:#081d32}
.btn-outline{background:#fff;border:1px solid var(--re-border);color:var(--re-primary)}
.btn-danger{background:#fff;border:1px solid #efb4b2;color:var(--re-danger)}
.btn-success{background:var(--re-success);color:#fff}
.btn-sm{padding:8px 12px;font-size:12px}

.hero{position:relative;min-height:510px;display:grid;align-items:center;background:
linear-gradient(90deg,rgba(7,25,43,.82),rgba(7,25,43,.35)),
url('assets/images/hero-placeholder.svg') center/cover no-repeat;color:#fff}
.hero-content{max-width:700px;padding:80px 0}
.hero-eyebrow{font-size:13px;text-transform:uppercase;letter-spacing:.16em;opacity:.8}
.hero h1{font-size:clamp(38px,5vw,64px);line-height:1.08;margin:12px 0 18px}
.hero p{font-size:17px;max-width:590px;color:rgba(255,255,255,.86)}
.hero-search{margin-top:30px;background:#fff;padding:10px;border-radius:13px;display:grid;grid-template-columns:1.6fr 1fr 1fr auto;gap:8px;box-shadow:0 18px 45px rgba(0,0,0,.18)}
.hero-search input,.hero-search select{border:0;background:#f6f7f8;padding:14px;border-radius:8px;min-width:0;outline:0}
.hero-search .btn{padding-inline:25px}

.stat-strip{background:#fff;border-bottom:1px solid var(--re-border)}
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1px}
.stat-item{text-align:center;padding:28px 16px;border-right:1px solid var(--re-border)}
.stat-item:last-child{border-right:0}
.stat-number{font-size:25px;font-weight:800;color:var(--re-primary)}
.stat-label{font-size:13px;color:var(--re-muted)}

.section{padding:72px 0}
.section-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:28px}
.section-head h2{margin:0;font-size:30px;color:var(--re-primary)}
.section-head p{margin:5px 0 0;color:var(--re-muted)}
.section-link{font-weight:700;color:var(--re-primary);font-size:14px}

.property-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
.property-card{background:var(--re-card);border:1px solid var(--re-border);border-radius:var(--re-radius);overflow:hidden;box-shadow:var(--re-shadow);transition:.2s}
.property-card:hover{transform:translateY(-3px)}
.property-thumb{position:relative;aspect-ratio:16/10;background:#e8edf2;overflow:hidden}
.property-thumb img{width:100%;height:100%;object-fit:cover}
.property-badge{position:absolute;top:12px;left:12px;background:rgba(13,41,69,.92);color:#fff;border-radius:6px;padding:5px 9px;font-size:11px;font-weight:700}
.property-fav{position:absolute;top:12px;right:12px;width:34px;height:34px;border-radius:50%;background:#fff;display:grid;place-items:center;border:0}
.property-body{padding:18px}
.property-title{margin:0 0 6px;font-size:17px;color:var(--re-primary);line-height:1.35}
.property-location{font-size:13px;color:var(--re-muted);margin-bottom:12px}
.property-price{font-size:20px;font-weight:800;color:var(--re-primary);margin-bottom:12px}
.property-meta{display:flex;flex-wrap:wrap;gap:12px;color:var(--re-muted);font-size:12px}
.property-meta span{display:inline-flex;gap:5px}

.listing-layout{display:grid;grid-template-columns:280px 1fr;gap:28px;padding:45px 0 75px}
.filter-panel{background:#fff;border:1px solid var(--re-border);border-radius:var(--re-radius);padding:20px;align-self:start;position:sticky;top:95px}
.filter-panel h3{font-size:16px;margin:0 0 16px;color:var(--re-primary)}
.form-group{margin-bottom:15px}
.form-group label{display:block;font-size:12px;font-weight:700;margin-bottom:6px}
.form-control{width:100%;border:1px solid var(--re-border);border-radius:8px;padding:10px 12px;background:#fff;outline:0}
.form-control:focus{border-color:var(--re-primary)}
.range-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.listing-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;gap:15px}
.result-count{font-weight:700;color:var(--re-primary)}
.listing-toolbar{display:flex;gap:8px}
.property-list{display:grid;gap:14px}
.property-list .property-card{display:grid;grid-template-columns:245px 1fr;box-shadow:none}
.property-list .property-thumb{aspect-ratio:auto;min-height:180px}
.property-list .property-body{padding:18px}

.property-detail{padding:35px 0 80px}
.breadcrumbs{font-size:12px;color:var(--re-muted);margin-bottom:18px}
.gallery-main{aspect-ratio:16/8;background:#edf1f4;border-radius:14px;overflow:hidden}
.gallery-main img{width:100%;height:100%;object-fit:cover}
.gallery-thumbs{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-top:10px}
.gallery-thumbs img{aspect-ratio:4/3;object-fit:cover;border-radius:8px}
.detail-head{display:grid;grid-template-columns:1fr 290px;gap:30px;margin-top:28px}
.detail-title{font-size:34px;line-height:1.2;color:var(--re-primary);margin:0 0 8px}
.detail-price{font-size:28px;font-weight:800;color:var(--re-primary);text-align:right}
.detail-meta{display:flex;flex-wrap:wrap;gap:22px;color:var(--re-muted);margin-top:20px}
.detail-card{border:1px solid var(--re-border);border-radius:var(--re-radius);padding:24px;margin-top:24px}
.detail-card h3{margin:0 0 15px;color:var(--re-primary)}
.agent-box{display:flex;gap:14px;align-items:center}
.avatar{width:48px;height:48px;border-radius:50%;background:#dce6ef;display:grid;place-items:center;font-weight:800;color:var(--re-primary)}

.site-footer{background:var(--re-primary);color:#fff;padding:55px 0 25px;margin-top:50px}
.footer-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:35px}
.site-footer h3{font-size:15px;margin:0 0 15px}
.site-footer p,.site-footer a{font-size:13px;color:rgba(255,255,255,.7)}
.footer-bottom{border-top:1px solid rgba(255,255,255,.15);margin-top:35px;padding-top:20px;font-size:12px;color:rgba(255,255,255,.6)}

.dashboard-shell{min-height:calc(100vh - 74px);background:var(--re-bg);display:grid;grid-template-columns:245px 1fr}
.dashboard-sidebar{background:#0b2239;color:#fff;padding:25px 14px}
.dashboard-brand{padding:0 12px 25px;font-weight:800}
.dashboard-nav{display:grid;gap:5px}
.dashboard-nav a{padding:11px 12px;border-radius:8px;color:rgba(255,255,255,.72);font-size:13px}
.dashboard-nav a:hover,.dashboard-nav a.active{background:rgba(255,255,255,.1);color:#fff}
.dashboard-main{padding:30px}
.dashboard-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}
.dashboard-header h1{font-size:27px;margin:0;color:var(--re-primary)}
.dashboard-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.dashboard-card{background:#fff;border:1px solid var(--re-border);border-radius:12px;padding:20px}
.dashboard-card .label{font-size:12px;color:var(--re-muted)}
.dashboard-card .value{font-size:27px;font-weight:800;color:var(--re-primary);margin-top:3px}
.dashboard-card .delta{font-size:11px;color:var(--re-success);margin-top:5px}
.dashboard-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:18px;margin-top:18px}
.panel{background:#fff;border:1px solid var(--re-border);border-radius:12px;padding:20px}
.panel h2{font-size:16px;color:var(--re-primary);margin:0 0 18px}
.fake-chart{height:260px;border-radius:8px;background:
linear-gradient(180deg,rgba(13,41,69,.03),rgba(13,41,69,.08)),
repeating-linear-gradient(to bottom,transparent 0,transparent 50px,#e8edf2 51px);
position:relative;overflow:hidden}
.fake-chart:after{content:"";position:absolute;left:4%;right:4%;top:55%;height:2px;background:var(--re-primary);transform:skewY(-8deg) rotate(2deg);box-shadow:100px 30px 0 -1px var(--re-accent),220px -35px 0 -1px var(--re-success)}
.table-wrap{overflow:auto}
.admin-table{width:100%;border-collapse:collapse;font-size:12px}
.admin-table th,.admin-table td{text-align:left;padding:12px;border-bottom:1px solid var(--re-border);white-space:nowrap}
.admin-table th{color:var(--re-muted);font-weight:700;background:#fafbfc}
.status{display:inline-flex;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:800}
.status-pending{background:#fff3d7;color:#9b6a00}
.status-approved{background:#e3f6eb;color:#20734a}
.status-rejected{background:#fde8e7;color:#a53c38}
.status-sold{background:#e8eef7;color:#1f4c78}

.empty-state{padding:60px 20px;text-align:center;color:var(--re-muted);border:1px dashed var(--re-border);border-radius:12px}
.pagination{display:flex;justify-content:center;gap:7px;margin-top:28px}
.pagination a,.pagination span{min-width:36px;height:36px;display:grid;place-items:center;border:1px solid var(--re-border);border-radius:7px;font-size:13px}
.pagination .current{background:var(--re-primary);color:#fff;border-color:var(--re-primary)}

@media(max-width:1000px){
  .primary-nav{display:none}
  .property-grid{grid-template-columns:repeat(2,1fr)}
  .dashboard-shell{grid-template-columns:1fr}
  .dashboard-sidebar{display:none}
  .dashboard-cards{grid-template-columns:repeat(2,1fr)}
  .dashboard-grid{grid-template-columns:1fr}
}
@media(max-width:700px){
  .container{width:min(100% - 28px,1180px)}
  .hero{min-height:600px}
  .hero-search{grid-template-columns:1fr}
  .stat-grid{grid-template-columns:repeat(2,1fr)}
  .stat-item:nth-child(2){border-right:0}
  .property-grid{grid-template-columns:1fr}
  .listing-layout{grid-template-columns:1fr}
  .filter-panel{position:static}
  .property-list .property-card{grid-template-columns:1fr}
  .detail-head{grid-template-columns:1fr}
  .detail-price{text-align:left}
  .footer-grid{grid-template-columns:1fr 1fr}
  .dashboard-main{padding:18px}
  .dashboard-cards{grid-template-columns:1fr 1fr}
}
