/* ================== ROOT & GLOBAL ================== */
:root{
  --nav-bg:#bae6fd;
  --nav-h:50px;
  --ad-h:120px;
  --filter-h:52px;
  --gap:6px;
  --cat-pad:8px;
  --bbar-h:62px;
  --card-gap:12px;

  --glass-bg:rgba(255,255,255,.72);
  --glass-bg-strong:rgba(255,255,255,.88);
  --glass-line:rgba(168,215,245,.78);
  --glass-line-strong:rgba(112,193,244,.98);
  --glass-shadow:0 12px 28px rgba(64,105,139,.12);
  --glass-shadow-soft:0 8px 20px rgba(64,105,139,.08);
  --glass-inset:inset 0 1px 0 rgba(255,255,255,.96);
  --accent:#2ea8f6;
  --accent-soft:rgba(46,168,246,.18);
  --accent-glow:rgba(91,192,255,.38);
  --text-main:#102132;
  --text-soft:#35556d;
}

*,
*::before,
*::after{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  width:100%;
  background:
    radial-gradient(circle at top, rgba(194,233,255,.30) 0%, rgba(249,250,251,0) 34%),
    linear-gradient(180deg, #f7fbff 0%, #f9fafb 100%);
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,Cantarell,"Noto Sans",sans-serif;
  overflow-x:hidden;
  overscroll-behavior-x:none;
  touch-action:pan-y;
}

img,video,iframe{ max-width:100%; display:block; }

/* ================== NAVBAR ================== */
.m-navbar{
  position:fixed;
  top:0;
  left:0;
  right:0;
  height:var(--nav-h);
  background:var(--nav-bg);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 10px;
  z-index:1100;
  border-bottom:1px solid rgba(0,0,0,.08);
  transition:transform .35s cubic-bezier(0.4,0,0.2,1),opacity .3s ease;
}

.nav-left{
  display:flex;
  align-items:center;
  gap:8px;
}

.nav-logo{
  width:46px;
  height:46px;
  object-fit:contain;
  border-radius:8px;
}

.nav-center{
  flex:1;
  text-align:center;
  font-weight:700;
  font-size:17px;
  color:#0f172a;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.nav-right button{
  border:0;
  background:none;
  cursor:pointer;
  width:40px;
  height:40px;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.nav-right img{
  width:24px;
  height:24px;
}

.nav-spacer{
  height:var(--nav-h);
}

/* ================== REKLAM BLOKU ================== */
.m-ad-fixed{
  position:fixed;
  top:var(--nav-h);
  left:0;
  right:0;
  height:var(--ad-h);
  z-index:1050;
  background:#fff;
}

.mobile-ad-container-fixed{
  width:100%;
  height:100%;
  overflow:hidden;
}

.mobile-ad-banner-fixed img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.ad-spacer{
  height:calc(var(--ad-h) + 2px);
}

/* ================== FILTER BAR ================== */
.m-filterbar{
  position:fixed;
  top:calc(var(--nav-h) + var(--ad-h));
  left:0;
  right:0;
  height:var(--filter-h);
  z-index:1040;
  background:transparent;
  display:flex;
  align-items:center;
  gap:8px;
  padding:4px 10px 2px;
  border-bottom:0;
}

.m-filterbar .btn{
  position:relative;
  flex:1;
  height:38px;
  border:1px solid rgba(138,208,246,.95);
  border-radius:14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(229,245,255,.90) 100%);
  font-weight:800;
  font-size:14px;
  color:#173247;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:
    0 8px 18px rgba(78,126,158,.12),
    0 2px 6px rgba(78,126,158,.06),
    inset 0 1px 0 rgba(255,255,255,.98),
    inset 0 -1px 0 rgba(132,199,239,.18);
  backdrop-filter:blur(14px) saturate(150%);
  -webkit-backdrop-filter:blur(14px) saturate(150%);
  overflow:hidden;
  isolation:isolate;
  transition:
    transform .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease,
    color .18s ease;
}

.m-filterbar .btn::before{
  content:"";
  position:absolute;
  inset:1px;
  border-radius:inherit;
  background:linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,0));
  pointer-events:none;
}

.m-filterbar .btn::after{
  content:"";
  position:absolute;
  top:0;
  left:-30%;
  width:32%;
  height:100%;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform:skewX(-20deg);
  pointer-events:none;
  opacity:.85;
}

.m-filterbar .btn:hover,
.m-filterbar .btn:focus{
  border-color:rgba(93,188,246,.98);
  box-shadow:
    0 10px 22px rgba(78,126,158,.14),
    0 0 0 3px rgba(101,191,245,.10),
    inset 0 1px 0 rgba(255,255,255,.98),
    inset 0 -1px 0 rgba(132,199,239,.22);
}

.m-filterbar .btn:active{
  transform:translateY(1px) scale(.986);
  box-shadow:
    0 5px 12px rgba(78,126,158,.12),
    0 0 0 3px rgba(101,191,245,.08),
    inset 0 1px 0 rgba(255,255,255,.94);
}

.filter-spacer{
  height:calc(var(--filter-h) + 1px);
}

/* ================== KATEQORİYALAR ================== */
.m-cats{
  background:transparent;
  padding:0 6px 0;
  margin:0 0 4px;
  border-bottom:0;
}

.cats-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:4px;
  padding:6px 6px 5px;
  margin:0;
  overflow:visible;
  background:
    linear-gradient(180deg, rgba(255,255,255,.84) 0%, rgba(238,247,255,.90) 100%);
  border:1px solid rgba(196,225,244,.92);
  border-radius:24px;
  box-shadow:
    0 10px 22px rgba(92,136,172,.09),
    0 2px 8px rgba(92,136,172,.04),
    inset 0 1px 0 rgba(255,255,255,.96);
  backdrop-filter:blur(14px) saturate(145%);
  -webkit-backdrop-filter:blur(14px) saturate(145%);
}

.cat-link{
  position:relative;
  flex:1 1 0;
  min-width:0;
  text-decoration:none;
  color:#111827;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  padding:2px 2px 1px;
  margin:0;
  border:0;
  border-radius:16px;
  background:transparent;
  outline:none !important;
  box-shadow:none !important;
  -webkit-tap-highlight-color:transparent;
  appearance:none;
  transition:transform .20s ease, opacity .18s ease;
}

.cat-link::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:16px;
  background:radial-gradient(circle at 50% 20%, rgba(255,255,255,.34), rgba(255,255,255,0) 70%);
  opacity:0;
  transform:scale(.96);
  transition:opacity .20s ease, transform .20s ease;
  pointer-events:none;
}

.cat-link:hover,
.cat-link:focus,
.cat-link:active{
  background:transparent;
  outline:none !important;
  box-shadow:none !important;
}

.cat-avatar{
  position:relative;
  width:clamp(58px, 15vw, 70px);
  height:clamp(58px, 15vw, 70px);
  border-radius:20px;
  border:1px solid rgba(184,220,244,.95);
  overflow:hidden;
  background:linear-gradient(180deg, #ffffff 0%, #eaf6ff 100%);
  box-shadow:
    0 5px 12px rgba(73,116,150,.10),
    inset 0 1px 0 rgba(255,255,255,.96);
  transition:
    transform .22s cubic-bezier(.2,.9,.2,1),
    border-color .20s ease,
    box-shadow .22s ease,
    filter .20s ease;
}

.cat-avatar::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 46%);
  pointer-events:none;
}

.cat-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:inherit;
  display:block;
}

.cat-text{
  margin-top:4px;
  font-size:11px;
  line-height:1.05;
  font-weight:700;
  text-align:center;
  color:#18344a;
  letter-spacing:-0.1px;
  white-space:nowrap;
  transition:
    color .20s ease,
    text-shadow .20s ease,
    transform .20s ease;
}

.cat-link:active .cat-avatar{
  transform:translateY(-1px) scale(1.04);
}

.cat-link.active,
.cat-link.is-active,
.cat-link.current,
.cat-link.selected,
.cat-link[aria-current="page"],
.cat-link[aria-selected="true"]{
  transform:none;
  z-index:2;
}

.cat-link.active::before,
.cat-link.is-active::before,
.cat-link.current::before,
.cat-link.selected::before,
.cat-link[aria-current="page"]::before,
.cat-link[aria-selected="true"]::before{
  opacity:1;
  transform:scale(1);
}

.cat-link.active .cat-avatar,
.cat-link.is-active .cat-avatar,
.cat-link.current .cat-avatar,
.cat-link.selected .cat-avatar,
.cat-link[aria-current="page"] .cat-avatar,
.cat-link[aria-selected="true"] .cat-avatar{
  transform:translateY(-3px) scale(1.08);
  border-color:rgba(92,182,255,.98);
  box-shadow:
    0 0 0 3px rgba(116,194,255,.18),
    0 10px 20px rgba(70,133,180,.18),
    0 0 16px rgba(102,196,255,.26),
    inset 0 1px 0 rgba(255,255,255,.98);
  filter:saturate(1.04);
}

.cat-link.active .cat-text,
.cat-link.is-active .cat-text,
.cat-link.current .cat-text,
.cat-link.selected .cat-text,
.cat-link[aria-current="page"] .cat-text,
.cat-link[aria-selected="true"] .cat-text{
  color:#0c70bf;
  text-shadow:0 0 8px rgba(118,193,255,.14);
  transform:translateY(-1px);
}

/* ================== ELAN KARTLARI KONTEYNER ================== */
#elanContainerMobile{
  padding:5px 14px 12px;
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  column-gap:12px;
  row-gap:14px;
}

/* ================== ALT MENU BAR FIX ================== */
.m-bbar{
  position:fixed;
  left:12px;
  right:12px;
  bottom:10px;
  height:calc(62px + env(safe-area-inset-bottom));
  padding-bottom:env(safe-area-inset-bottom);
  z-index:1100;
  background:linear-gradient(180deg, rgba(255,255,255,0.78) 0%, rgba(241,247,252,0.74) 100%);
  border:1px solid rgba(186,214,232,0.72);
  border-radius:24px;
  box-shadow:
    0 10px 28px rgba(71,107,136,0.14),
    inset 0 1px 0 rgba(255,255,255,0.72);
  backdrop-filter:blur(18px) saturate(140%);
  -webkit-backdrop-filter:blur(18px) saturate(140%);
}

.bbar-inner{
  height:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:4px;
  padding:5px 10px 3px;
}

.bbtn{
  width:20%;
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:#1f2937;
  background:transparent;
  border:0;
  outline:0;
  padding:0;
  margin:0;
  cursor:pointer;
  -webkit-appearance:none;
  appearance:none;
  transition:transform .16s ease, opacity .16s ease;
}

.bbtn img{
  display:block;
  width:24px;
  height:24px;
  object-fit:contain;
  border-radius:0 !important;
  background:transparent !important;
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
  padding:0 !important;
  margin:0 auto;
}

.bbtn span{
  margin-top:3px;
  font-size:10.5px;
  line-height:1;
  font-weight:700;
  text-align:center;
  color:#18344a;
  letter-spacing:-0.1px;
  white-space:nowrap;
}

.bbtn:hover{
  opacity:1;
}

.bbtn:active{
  transform:translateY(1px);
}

.bbtn:active img{
  transform:scale(0.96);
}

.bbar-spacer{
  height:calc(62px + env(safe-area-inset-bottom) + 18px);
}

/* ================== DİL POPUP ================== */
#mobileLangMenu{
  position:fixed;
  background:linear-gradient(180deg,#ffffff 0%, #eef8ff 100%);
  border:1px solid #cfe8ff;
  border-radius:18px;
  box-shadow:0 16px 36px rgba(0,0,0,.12);
  padding:10px;
  z-index:1110;
  display:none;
  min-width:190px;
}

#mobileLangMenu.open{
  display:block;
}

#mobileLangMenu .langs{
  display:flex;
  gap:10px;
  align-items:flex-start;
  justify-content:center;
}

#mobileLangMenu button{
  border:0;
  background:transparent;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:4px;
}

#mobileLangMenu img{
  width:36px;
  height:36px;
  border-radius:50%;
  border:0;
  box-shadow:none;
  background:transparent;
}

#mobileLangMenu span{
  font-size:11px;
  margin-top:5px;
  color:#374151;
  font-weight:700;
}

#mobileLangMenu::after{
  content:"";
  position:absolute;
  bottom:-7px;
  left:50%;
  transform:translateX(-50%);
  border-width:7px 7px 0 7px;
  border-style:solid;
  border-color:#fff transparent transparent transparent;
  filter:drop-shadow(0 -1px 0 rgba(0,0,0,.08));
}

/* ================== Smooth Scroll States ================== */
.hide-up{
  transform:translateY(-100%);
  opacity:0;
  pointer-events:none;
}

.hide-down{
  transform:translateY(calc(100% + 18px));
  opacity:0;
  pointer-events:none;
}

/* ================== Kiçik ekranlar üçün kompakt 2 sütun tuning ================== */
@media (max-width: 400px){

  #elanContainerMobile{
    padding:4px 6px 10px;
    column-gap:6px;
    row-gap:10px;
  }

  #elanContainerMobile .elan-card{
    padding:5px 5px 4px;
  }

  #elanContainerMobile .elan-card .title{
    font-size:13px;
  }

  #elanContainerMobile .meta-left .chip{
    padding:2px 6px;
    font-size:9.5px;
  }

  #elanContainerMobile .price-chip{
    font-size:9.5px;
    padding:1px 5px;
  }

  .m-filterbar{
    gap:6px;
    padding:4px 8px 2px;
  }

  .m-filterbar .btn{
    height:37px;
    border-radius:13px;
    font-size:13px;
  }

  .m-cats{
    padding:0 4px 0;
    margin:0 0 3px;
  }

  .cats-row{
    gap:3px;
    padding:5px 5px 5px;
    border-radius:20px;
  }

  .cat-link{
    padding:2px 1px 1px;
    border-radius:14px;
  }

  .cat-avatar{
    width:54px;
    height:54px;
    border-radius:18px;
  }

  .cat-text{
    margin-top:4px;
    font-size:10px;
  }

  .cat-link.active .cat-avatar,
  .cat-link.is-active .cat-avatar,
  .cat-link.current .cat-avatar,
  .cat-link.selected .cat-avatar,
  .cat-link[aria-current="page"] .cat-avatar,
  .cat-link[aria-selected="true"] .cat-avatar{
    transform:translateY(-2px) scale(1.06);
  }

  .m-bbar{
    left:6px;
    right:6px;
    bottom:6px;
    border-radius:24px;
  }

  .bbar-inner{
    padding:5px 8px 3px;
  }

  .bbtn img{
    width:24px;
    height:24px;
  }

  .bbtn span{
    font-size:10px;
  }
}

/* =========================
   MOBILE HAMBURGER - ALWAYS ON TOP
   (NO OFFSET CALC, NO FREEZE)
   ========================= */
#dropdownMenu.mobile-visible{
  display:block !important;
  position:fixed !important;
  top:64px !important;
  left:12px !important;
  right:12px !important;
  z-index:2147483647 !important;
  max-height:calc(100vh - 76px);
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  border-radius:16px;
  box-shadow:0 18px 50px rgba(0,0,0,.25);
}

/* reklam/navbar nə qədər yüksək olsa da, yenə dropdown üstə çıxacaq */
.m-navbar,
.m-ad-fixed{
  z-index:1000;
}