/* Local Cairo (no Google Fonts) */
@font-face{
  font-family: "Cairo";
  src: url("/assets/fonts/Cairo-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Cairo";
  src: url("/assets/fonts/Cairo-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Cairo";
  src: url("/assets/fonts/Cairo-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Cairo";
  src: url("/assets/fonts/Cairo-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* AqarSY Web — v7 (App UI style reference) */
/* Brand */
/* ===== AqarSY UI Theme (Hotel-style) ===== */
:root{
  --brand:#0B5594;
  --brand2:#3BC1C6;
  --cta:#FFC107;

  --bg:#F5F8FC;
  --bg2:#ECF3FA;
  --surface:#FFFFFF;
  --surface2:#F8FBFF;

  --text:#0A1B2C;
  --muted:rgba(10,27,44,.62);
  --border:rgba(11,85,148,.14);

  --shadow: 0 14px 30px rgba(2,16,32,.10);
  --shadow2: 0 8px 18px rgba(2,16,32,.08);

  --chip:rgba(11,85,148,.08);
  --chipBorder:rgba(11,85,148,.18);

  --icon:rgba(10,27,44,.78);
}

html, body{
  margin:0;
  font-family:"Cairo", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(59,193,198,.22), transparent 60%),
              radial-gradient(900px 500px at 90% 0%, rgba(11,85,148,.18), transparent 55%),
              linear-gradient(180deg, var(--bg2), var(--bg));
  color: var(--text);
}
[data-theme="dark"] body{
  background: radial-gradient(900px 500px at 20% -10%, rgba(59,193,198,.18), transparent 60%),
              radial-gradient(900px 500px at 90% 0%, rgba(11,85,148,.22), transparent 55%),
              linear-gradient(180deg, var(--bg2), var(--bg));
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family: "Cairo", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: 0;
}

html[data-theme="light"]{
  --bg:#F5F8FC;
  --surface:#FFFFFF;
  --surface2:#F9FBFF;
  --border:rgba(10,27,44,.10);
  --text:#0A1B2C;
  --muted:rgba(10,27,44,.62);
  --chip:rgba(11,85,148,.07);
  --icon:rgba(10,27,44,.66);
  --nav:rgba(255,255,255,.92);
}

html[data-theme="dark"]{
  --brand:#0B5594;
  --brand2:#3BC1C6;
  --cta:#FFC107;

  --bg:#06131E;
  --bg2:#0B1E2F;
  --surface:rgba(255,255,255,.06);
  --surface2:rgba(255,255,255,.08);

  --text:#FFFFFF;
  --muted:rgba(255,255,255,.70);
  --border:rgba(255,255,255,.14);

  --shadow: 0 18px 40px rgba(0,0,0,.40);
  --shadow2: 0 10px 24px rgba(0,0,0,.32);

  --chip:rgba(255,255,255,.08);
  --chipBorder:rgba(255,255,255,.16);

  --icon:rgba(255,255,255,.88);
}

body{
  background:
    radial-gradient(900px 520px at 20% 0%, rgba(59,193,198,.16), transparent 60%),
    radial-gradient(820px 520px at 90% 10%, rgba(11,85,148,.12), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg));
  color: var(--text);
}

a{color:inherit}
.container{max-width:1100px;margin:0 auto;padding:0 14px}
.page{padding:14px}

/* Top bar like app */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow2);
}
html[data-theme="dark"] .topbar{
  background: linear-gradient(180deg, rgba(8,18,30,.88), rgba(8,18,30,.62));
}
.topbar-inner{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color: var(--text);
}
.brand img{width:34px;height:34px;object-fit:contain}
.brand .name{font-weight:900;font-size:16px;letter-spacing:.2px}
.brand .sub{font-size:11px;color:var(--muted);margin-top:-2px}

.actions-right{display:flex;align-items:center;gap:8px}
.pill, .btn{
  border:1px solid var(--border);
  background: var(--surface);
  border-radius:999px;
  padding:10px 12px;
  font-weight:800;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  box-shadow: var(--shadow-sm);
}
html[data-theme="dark"] .pill, html[data-theme="dark"] .btn{
  background: var(--surface2);
  box-shadow: none;
}
.pill.small, .btn-small{padding:8px 10px;font-size:12px}
.pill:active, .btn:active{transform: translateY(1px)}

.btn-primary{
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
  border: none;
}
.btn-cta{
  background: var(--cta);
  color: #1A1A1A;
  border: none;
}

.input{
  width:100%;
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-lg);
  padding:12px 14px;
  outline:none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
html[data-theme="dark"] .input{background: var(--surface2); box-shadow:none}
.input.small{border-radius:999px;padding:10px 12px}

/* Cards */
.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow2);
}
html[data-theme="dark"] .card{background: var(--surface2); box-shadow:none}
.section-title{font-weight:900;font-size:14px;margin:0 0 10px 0;color:var(--text)}
.muted{color:var(--muted)}
.h-title{font-weight:1000;margin:0}

/* Hero (app-like) */
.hero{
  padding:16px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(800px 360px at 0% 0%, rgba(59,193,198,.16), transparent 60%),
    radial-gradient(740px 360px at 100% 0%, rgba(11,85,148,.12), transparent 60%),
    var(--surface);
  border:1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
html[data-theme="dark"] .hero{background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.05)); box-shadow:none}
.hero .row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.hero .cta-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:12px}

/* Grid */
.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:900px){ .grid{grid-template-columns:1fr} }

/* Results list like app cards */
.results{display:grid;grid-template-columns:repeat(3, 1fr);gap:12px}
@media(max-width:980px){ .results{grid-template-columns:repeat(2, 1fr)} }
@media(max-width:640px){ .results{grid-template-columns:1fr} }

.item-card{
  display:block;text-decoration:none;
  border-radius: var(--radius-xl);
  overflow:hidden;
  border:1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
html[data-theme="dark"] .item-card{background: var(--surface2); box-shadow:none}
.item-thumb{position:relative;height:140px;background: var(--surface2)}
.item-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.badge{
  position:absolute;left:10px;top:10px;
  background: rgba(255,255,255,.92);
  color:#0A1B2C;
  border:1px solid rgba(10,27,44,.10);
  border-radius:999px;
  padding:6px 10px;
  font-weight:900;font-size:11px;
}
html[data-theme="dark"] .badge{
  background: rgba(8,18,30,.82);
  color:#fff;
  border-color: rgba(255,255,255,.14);
}
.item-body{padding:12px 12px 14px 12px}
.item-title{font-weight:1000;font-size:15px;line-height:1.2;margin-bottom:6px}
.item-sub{font-size:12px;color:var(--muted);font-weight:800}
.item-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px}
.item-price{font-weight:1000;color: var(--tech-blue)}
html[data-theme="dark"] .item-price{color: var(--cta)}

/* Chips */
.chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.chip{
  display:inline-flex;align-items:center;gap:6px;
  background: var(--chip);
  border:1px solid var(--border);
  border-radius:999px;
  padding:6px 10px;
  font-weight:900;font-size:12px;
}

/* Map area */
.map{
  border-radius: var(--radius-xl);
  overflow:hidden;
  border:1px solid var(--border);
  box-shadow: var(--shadow-md);
}
html[data-theme="dark"] .map{box-shadow:none}
.map .map-canvas{height:360px}
@media(max-width:640px){ .map .map-canvas{height:320px} }

/* Footer */
.footer{
  margin-top:18px;
  padding:18px 0 86px 0; /* leave room for bottom nav */
  color: var(--muted);
}
.footer a{color:inherit;text-decoration:underline}

/* Bottom nav (mobile) */
.bottom-nav{
  position:fixed;left:0;right:0;bottom:0;z-index:60;
  background: var(--nav);
  backdrop-filter: blur(16px);
  border-top:1px solid var(--border);
  padding:10px 12px;
}
.bottom-nav .nav-inner{display:flex;align-items:center;justify-content:space-between;gap:10px;max-width:520px;margin:0 auto}
.nav-item{
  flex:1;
  text-decoration:none;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:6px;
  padding:10px 8px;
  border-radius: 16px;
  color: var(--icon);
  font-weight:900;
  font-size:11px;
}
.nav-item.active{
  color: var(--tech-blue);
  background: rgba(11,85,148,.10);
  border:1px solid rgba(11,85,148,.18);
}
html[data-theme="dark"] .nav-item.active{
  color: var(--cta);
  background: rgba(255,193,7,.14);
  border-color: rgba(255,193,7,.25);
}

/* Modal */
.modal-backdrop{
  position:fixed;inset:0;display:none;align-items:flex-end;justify-content:center;
  background: rgba(0,0,0,.45);
  z-index:70;
  padding:16px;
}
.modal{
  width:min(680px, 100%);
  border-radius: var(--radius-xl);
  background: var(--surface);
  border:1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding:16px;
}
html[data-theme="dark"] .modal{background: rgba(8,18,30,.92); box-shadow:none}
.modal h3{margin:0 0 8px 0}
.modal .cta-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}

/* Language dropdown (premium) */
.actions-right{display:flex;align-items:center;gap:10px}
.lang-dd{position:relative;display:inline-block}
.lang-btn{display:inline-flex;align-items:center;gap:8px}
.lang-ic{opacity:.9}
.lang-chev{opacity:.75;font-size:12px}
.lang-menu{
  position:absolute;
  top:calc(100% + 8px);
  inset-inline-end:0;
  min-width:180px;
  background: var(--surface);
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow: var(--shadow-md);
  padding:8px;
  display:none;
  z-index:50;
}
.lang-dd.open .lang-menu{display:block}
.lang-menu a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border-radius:12px;
  text-decoration:none;
  color: var(--text);
}
.lang-menu a:hover{background: var(--chip)}

/* Segmented toggle */
.toggle{display:inline-flex; padding:4px; border-radius:999px; border:1px solid var(--border); background:var(--surface2); gap:6px}
.toggle button{border:0; background:transparent; padding:9px 12px; border-radius:999px; cursor:pointer; color:var(--muted); font-weight:900}
.toggle button.active{background:var(--surface); color:var(--text); box-shadow: var(--shadow2)}
/* Inputs */
.input{
  width:100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline:none;
}
.input.small{padding:10px 12px; border-radius: 14px}
.input:focus{border-color: rgba(11,85,148,.35); box-shadow: 0 0 0 4px rgba(11,85,148,.08)}
/* Listing cards */
.listing-card{overflow:hidden}
.listing-hero{height:170px; background: linear-gradient(135deg, rgba(11,85,148,.18), rgba(59,193,198,.20)); position:relative}
[data-theme="dark"] .listing-hero{background: linear-gradient(135deg, rgba(11,85,148,.28), rgba(59,193,198,.22))}
.badge{position:absolute; top:12px; right:12px; padding:7px 10px; border-radius:999px; background: rgba(255,255,255,.92); border:1px solid rgba(0,0,0,.06); font-weight:900; font-size:12px}
[data-theme="dark"] .badge{background: rgba(255,255,255,.90); color:#0A1B2C}
.listing-body{padding:12px 12px 14px}
.listing-title{font-weight:900; font-size:15px; margin:0}
.listing-sub{margin:6px 0 0; font-weight:800; font-size:12px; color: var(--muted)}
.listing-price{margin:10px 0 0; font-weight:900; color: var(--brand)}
/* Bottom nav */
.bottom-nav{position:sticky; bottom:12px; display:flex; gap:8px; margin-top:14px; background: var(--surface); border:1px solid var(--border); border-radius: 22px; padding: 10px 12px; box-shadow: var(--shadow2)}
.bottom-nav a{flex:1; text-decoration:none; color: var(--muted); font-weight:900; font-size:12px; display:flex; flex-direction:column; align-items:center; gap:6px; padding:8px 6px; border-radius:18px}
.bottom-nav a svg{width:20px;height:20px}
.bottom-nav a.active{color: var(--brand); background: rgba(11,85,148,.10)}
/* Language dropdown */
.lang-dd{position:relative}
.lang-dd .lang-menu{position:absolute; right:0; top:calc(100% + 8px); min-width:160px; background: var(--surface); border:1px solid var(--border); border-radius:16px; box-shadow: var(--shadow2); display:none; overflow:hidden}
.lang-dd.open .lang-menu{display:block}
.lang-dd .lang-menu a{display:block; padding:11px 12px; text-decoration:none; color: var(--text); font-weight:900}
.lang-dd .lang-menu a:hover{background: var(--surface2)}

/* Filters overlay */
.filters-panel{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.35);
  display:none;
  padding: 14px;
  z-index: 50;
}
.filters-panel .card{
  max-width: 520px;
  margin: 90px auto 0;
}

@media (max-width: 900px){
  #filtersRow > div{grid-template-columns: repeat(2, minmax(0, 1fr)) !important}
  #filtersRow select, #filtersRow input{grid-column: span 2 !important}
}


/* Bottom nav sizing fix */
.bottom-nav .nav-item svg{
  width:20px;height:20px;
}

/* OAuth buttons */
.oauth-btn{display:flex;align-items:center;justify-content:center;gap:10px}
.oauth-ic{width:18px;height:18px;object-fit:contain}

/* Store floating pill (mobile only; hidden by JS on desktop) */
.store-pill{
  position: fixed;
  left: 14px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 65;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 12px 14px;
  border-radius: 999px;
  text-decoration:none;
  font-weight: 900;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--tech-blue), var(--cyan));
  box-shadow: 0 10px 26px rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.25);
}
.store-pill__ic{width:18px;height:18px;object-fit:contain;filter: drop-shadow(0 2px 6px rgba(0,0,0,.25))}
.store-pill.disabled{opacity:.65}
html[data-theme="dark"] .store-pill{
  box-shadow: 0 14px 32px rgba(0,0,0,.28);
}
