/* =====================================================================
   TelefonBazarı — əsas stil faylı
   Mobile-first: əvvəl telefon, sonra planşet (≥768px) və desktop (≥1024px)
   ===================================================================== */

:root {
  --navy-900: #0b2a5b;
  --navy-800: #12357a;
  --blue-600: #1d4ed8;
  --blue-500: #2563eb;
  --blue-100: #dbe7ff;
  --blue-50:  #eef4ff;
  --accent:   #f59e0b;
  --accent-600: #d97706;

  --bg:        #f4f7fb;
  --surface:   #ffffff;
  --border:    #e3e9f2;
  --text:      #0f1f3d;
  --muted:     #5b6b86;
  --success:   #16a34a;
  --danger:    #dc2626;
  --warning:   #b45309;

  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;
  --pill:      999px;
  --shadow-sm: 0 1px 2px rgba(15, 31, 61, .06);
  --shadow:    0 6px 20px rgba(15, 31, 61, .08);
  --shadow-lg: 0 16px 40px rgba(15, 31, 61, .12);

  --header-h: 64px;
  --container: 1200px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--navy-800); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--navy-900); }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; border-radius: 6px; }

.icon { width: 20px; height: 20px; flex-shrink: 0; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.site-main { flex: 1; padding-bottom: 88px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: var(--pill); z-index: 100; }
.skip-link:focus { left: 8px; }
.text-muted { color: var(--muted); }

/* ---------- Düymələr ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border: 2px solid transparent; border-radius: var(--pill);
  font-weight: 600; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .1s;
  white-space: nowrap; text-align: center; line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue-600); color: #fff; }
.btn-primary:hover { background: var(--navy-800); color: #fff; }
.btn-accent { background: var(--accent); color: #1f1300; }
.btn-accent:hover { background: var(--accent-600); color: #1f1300; }
.btn-outline { background: transparent; border-color: var(--blue-600); color: var(--blue-600); }
.btn-outline:hover { background: var(--blue-50); }
.btn-light { background: var(--surface); color: var(--navy-900); border-color: var(--border); }
.btn-light:hover { border-color: var(--blue-500); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: var(--navy-900); color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
}
.header-inner {
  display: grid; align-items: center; gap: 10px 12px;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "burger logo post" "search search search";
  padding-top: 10px; padding-bottom: 10px;
}
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.hamburger {
  grid-area: burger; width: 44px; height: 44px; display: inline-flex; flex-direction: column;
  justify-content: center; align-items: center; gap: 5px; cursor: pointer; border-radius: var(--radius-sm);
}
.hamburger span { width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle:focus-visible + .hamburger { outline: 3px solid rgba(255,255,255,.5); }
.nav-toggle:checked + .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle:checked + .hamburger span:nth-child(2) { opacity: 0; }
.nav-toggle:checked + .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.logo { grid-area: logo; display: inline-flex; align-items: center; gap: 8px; color: #fff; font-size: 20px; min-width: 0; }
.logo:hover { color: #fff; }
.logo-mark { display: inline-flex; width: 34px; height: 34px; border-radius: 10px; background: var(--blue-500); align-items: center; justify-content: center; }
.logo-mark .icon { width: 20px; height: 20px; }
.logo-text { font-weight: 500; letter-spacing: -.2px; white-space: nowrap; }
.logo-text b { font-weight: 800; color: #9cc0ff; }

.header-search { grid-area: search; display: flex; background: #fff; border-radius: var(--pill); overflow: hidden; }
.header-search input { flex: 1; min-width: 0; border: 0; padding: 0 18px; height: 44px; outline: none; color: var(--text); background: transparent; }
.header-search button { border: 0; background: var(--blue-600); color: #fff; width: 52px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }

.post-btn { grid-area: post; min-height: 42px; padding: 0 14px; }
.post-btn span { display: none; }

/* Mobil çəkmə menyu */
.main-nav {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(82vw, 320px); background: var(--surface);
  color: var(--text); z-index: 60; transform: translateX(-100%); transition: transform .25s ease;
  display: flex; flex-direction: column; padding: 72px 16px 20px; gap: 4px; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.nav-toggle:checked ~ .main-nav { transform: translateX(0); }
.nav-toggle:checked ~ .hamburger { position: relative; z-index: 61; }
.nav-toggle:checked ~ .hamburger span { background: var(--navy-900); }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm);
  color: var(--text); font-weight: 500; min-height: 48px;
}
.nav-link .icon { color: var(--blue-600); }
.nav-link:hover, .nav-link.is-active { background: var(--blue-50); color: var(--navy-900); }
.nav-register { margin-top: 8px; }

/* İstifadəçi menyusu */
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 10px 12px; border-radius: var(--radius-sm); min-height: 48px; }
.user-menu summary::-webkit-details-marker { display: none; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--blue-100); color: var(--navy-900);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.avatar-lg { width: 52px; height: 52px; font-size: 18px; }
.user-name { font-weight: 600; }
.badge-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--pill); background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; margin-left: auto;
}
.dropdown { display: flex; flex-direction: column; padding: 4px 0; }
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--radius-sm);
  color: var(--text); background: none; border: 0; width: 100%; text-align: left; cursor: pointer; min-height: 44px;
}
.dropdown a:hover, .dropdown button:hover { background: var(--blue-50); }
.dropdown .icon { color: var(--muted); }
.dropdown form { margin: 0; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }

/* Arxa fon qaralması */
.nav-toggle:checked ~ .main-nav::before { content: none; }
body:has(.nav-toggle:checked)::after {
  content: ""; position: fixed; inset: 0; background: rgba(8, 20, 45, .45); z-index: 45;
}

/* ---------- Flash ---------- */
.flash-stack { margin-top: 16px; display: grid; gap: 10px; }
.alert {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--radius);
  border: 1px solid; background: var(--surface); box-shadow: var(--shadow-sm);
}
.alert span { flex: 1; }
.alert-success { border-color: #b7e4c7; background: #effaf3; color: #14532d; }
.alert-error   { border-color: #fecaca; background: #fef2f2; color: #7f1d1d; }
.alert-warning { border-color: #fde68a; background: #fffbeb; color: #78350f; }
.alert-info    { border-color: var(--blue-100); background: var(--blue-50); color: var(--navy-900); }
.alert-close { background: none; border: 0; cursor: pointer; color: inherit; padding: 2px; opacity: .7; }
.alert-close .icon { width: 18px; height: 18px; }

/* ---------- Bölmələr ---------- */
.section { margin-top: 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 20px; margin: 0; }
.section-head a { font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.section-head a .icon { width: 16px; height: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.empty-state { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty-state .icon { width: 44px; height: 44px; color: var(--blue-500); margin: 0 auto 10px; }

/* ---------- Hero / ana axtarış ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--blue-600) 100%);
  color: #fff; padding: 28px 0 32px; border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.hero h1 { color: #fff; font-size: 26px; margin-bottom: 6px; }
.hero p { color: #c9dbff; margin-bottom: 20px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: #c9dbff; margin-top: 16px; }
.hero-stats b { color: #fff; }
.search-panel {
  background: var(--surface); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-lg);
  display: grid; gap: 10px; grid-template-columns: 1fr 1fr;
}
.search-panel .field-q { grid-column: 1 / -1; }
.search-panel .btn { grid-column: 1 / -1; }

/* ---------- Formalar ---------- */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; gap: 0 14px; }
label, .label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--navy-900); }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
.input::placeholder { color: #8a97ad; }
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235b6b86' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
textarea.input { min-height: 120px; resize: vertical; }
.input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.input.is-invalid { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 13px; margin-top: 6px; }
.field-hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue-600); flex-shrink: 0; }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 76px; }
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--blue-50);
  color: var(--blue-600); border-radius: var(--pill); padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.segmented label { margin: 0; }
.segmented input { position: absolute; opacity: 0; }
.segmented span {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-weight: 600; font-size: 13px; text-align: center; cursor: pointer; background: var(--surface);
}
.segmented .icon { color: var(--blue-600); }
.segmented input:checked + span { border-color: var(--blue-600); background: var(--blue-50); color: var(--navy-900); }
.segmented input:focus-visible + span { outline: 3px solid rgba(37, 99, 235, .45); }

/* ---------- Auth səhifələri ---------- */
.auth-wrap { padding: 28px 0 16px; }
.auth-card { max-width: 480px; margin: 0 auto; padding: 26px 20px; }
.auth-card h1 { font-size: 24px; margin-bottom: 4px; }
.auth-card .lead { color: var(--muted); margin-bottom: 22px; }
.auth-links { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 18px; font-size: 14px; }
.auth-foot { text-align: center; margin-top: 18px; color: var(--muted); font-size: 15px; }

/* ---------- Kateqoriyalar ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cat-item {
  display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); min-height: 64px; transition: border-color .15s, box-shadow .15s;
}
.cat-item:hover { border-color: var(--blue-500); box-shadow: var(--shadow); color: var(--text); }
.cat-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--blue-50); color: var(--blue-600); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cat-item strong { display: block; font-size: 14px; line-height: 1.3; }
.cat-item small { color: var(--muted); font-size: 12px; }

/* ---------- Markalar ---------- */
.brand-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.brand-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px 8px 8px; border-radius: var(--pill);
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 600; white-space: nowrap; min-height: 46px;
}
.brand-chip:hover { border-color: var(--blue-500); color: var(--navy-900); }
.brand-initial { width: 30px; height: 30px; border-radius: 50%; background: var(--navy-900); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.brand-chip img { width: 30px; height: 30px; object-fit: contain; border-radius: 50%; }

/* ---------- Elan kartları ---------- */
.listing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.listing-card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s;
}
.listing-card:hover { box-shadow: var(--shadow); }
.listing-card.is-vip { border-color: #f7c65b; }
.card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e9eef6; }
/* Şəkil ölçüsündən asılı olmayaraq kart eyni hündürlükdə qalır (şaquli şəkillər kəsilir, uzanmır) */
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.badge { position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: var(--pill); font-size: 11px; font-weight: 800; letter-spacing: .3px; }
.badge-vip { background: var(--accent); color: #1f1300; }
.badge-new { background: var(--success); color: #fff; top: auto; bottom: 8px; }
.is-vip .badge-new { left: 8px; }
.fav-form { position: absolute; top: 6px; right: 6px; margin: 0; }
.fav-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-sm);
}
.fav-btn .icon { width: 19px; height: 19px; }
.fav-btn:hover { color: var(--danger); }
.fav-btn.is-active { color: var(--danger); }
.fav-btn.is-active .icon { fill: currentColor; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-price { font-weight: 800; font-size: 17px; color: var(--navy-900); }
.card-title { font-size: 14px; font-weight: 500; margin: 0; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a { color: var(--text); }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.fav-form { z-index: 2; }
.card-meta { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.card-meta span { display: inline-flex; align-items: center; gap: 3px; }
.card-meta .icon { width: 14px; height: 14px; }

/* ---------- IMEI blok ---------- */
.imei-box {
  background: linear-gradient(135deg, #0e3372, var(--navy-900)); color: #fff; border-radius: var(--radius-lg);
  padding: 22px 18px; display: grid; gap: 16px;
}
.imei-box h2 { color: #fff; display: flex; align-items: center; gap: 10px; font-size: 20px; }
.imei-box p { color: #c9dbff; margin: 0; font-size: 15px; }
.imei-form { display: flex; flex-direction: column; gap: 10px; }
.imei-form .input { border-color: transparent; letter-spacing: 1.5px; font-variant-numeric: tabular-nums; }

/* ---------- Mağaza / servis tanıtım ---------- */
.promo-grid { display: grid; gap: 12px; }
.promo-card { padding: 20px; display: flex; gap: 14px; align-items: flex-start; }
.promo-card h3 { font-size: 17px; margin-bottom: 4px; }
.promo-card p { color: var(--muted); font-size: 14px; margin-bottom: 12px; }

/* ---------- Panel (Mərhələ 5) ---------- */
.panel-layout { display: grid; gap: 16px; margin-top: 20px; }
.panel-layout > * { min-width: 0; }
.panel-sidebar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px; }
.panel-user { display: flex; align-items: center; gap: 12px; padding: 6px 6px 12px; }
.panel-user small { display: block; color: var(--muted); }
.panel-nav { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.panel-nav a {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--pill);
  color: var(--text); white-space: nowrap; background: var(--bg); font-size: 14px; min-height: 42px;
}
.panel-nav a.is-active { background: var(--blue-600); color: #fff; }
.panel-nav a.is-active .icon { color: #fff; }
.panel-nav .icon { width: 18px; height: 18px; color: var(--blue-600); }

/* ---------- Pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 28px 0 8px; }
.pagination a, .pagination span {
  min-width: 44px; height: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--pill); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600;
}
.pagination .is-current { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #c9d6ef; padding: 36px 0 90px; margin-top: 40px; }
.footer-grid { display: grid; gap: 26px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand p { margin: 10px 0 0; }
.site-footer h3 { color: #fff; font-size: 15px; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: #c9d6ef; }
.site-footer a:hover { color: #fff; }
.footer-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.footer-social a { padding: 6px 14px; border: 1px solid rgba(255,255,255,.2); border-radius: var(--pill); font-size: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 26px; padding-top: 18px; font-size: 13px; }

/* Mobil üzən "Elan yerləşdir" düyməsi */
.fab-post {
  position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40; width: 58px; height: 58px;
  border-radius: 50%; background: var(--accent); color: #1f1300; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(217, 119, 6, .45);
}
.fab-post .icon { width: 28px; height: 28px; stroke-width: 2.4; }
.fab-post:hover { color: #1f1300; }

/* ---------- Statik səhifə məzmunu ---------- */
.prose { padding: 24px 20px; line-height: 1.7; }
.prose h1 { font-size: 26px; }

/* =====================================================================
   Planşet ≥ 600px
   ===================================================================== */
@media (min-width: 600px) {
  .listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .search-panel { grid-template-columns: 2fr 1fr 1fr; }
  .search-panel .field-q { grid-column: 1 / -1; }
  .search-panel .btn { grid-column: auto; }
  .promo-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 32px 30px; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .imei-form { flex-direction: row; }
  .imei-form .input { flex: 1; }
  .post-btn span { display: inline; }
  .post-btn { padding: 0 18px; }
}

/* =====================================================================
   Desktop ≥ 1024px
   ===================================================================== */
@media (min-width: 1024px) {
  :root { --header-h: 72px; }
  .site-main { padding-bottom: 0; }
  .header-inner {
    grid-template-columns: auto minmax(220px, 1fr) auto auto;
    grid-template-areas: "logo search nav post"; gap: 20px; min-height: var(--header-h);
  }
  .hamburger, .fab-post { display: none; }
  .logo { min-width: max-content; }
  body:has(.nav-toggle:checked)::after { content: none; }

  .main-nav {
    position: static; transform: none; width: auto; background: transparent; color: #fff; box-shadow: none;
    flex-direction: row; align-items: center; padding: 0; gap: 2px; overflow: visible;
  }
  .nav-link { color: #dbe6ff; padding: 8px 12px; min-height: 40px; font-size: 15px; white-space: nowrap; }
  .nav-link .icon { display: none; }
  .nav-link:hover, .nav-link.is-active { background: rgba(255,255,255,.1); color: #fff; }
  .nav-register { margin: 0 0 0 6px; border-color: rgba(255,255,255,.6); color: #fff; }
  .nav-register:hover { background: rgba(255,255,255,.1); color: #fff; }

  .user-menu summary { color: #fff; padding: 6px 8px; min-height: 44px; }
  .user-menu summary:hover { background: rgba(255,255,255,.1); }
  .user-menu .dropdown {
    position: absolute; right: 0; top: calc(100% + 8px); width: 250px; background: var(--surface); color: var(--text);
    border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; border: 1px solid var(--border);
  }
  .user-menu summary .badge-count { margin-left: 0; }

  .hero { padding: 48px 0 56px; }
  .hero h1 { font-size: 36px; }
  .search-panel { grid-template-columns: 2.2fr 1fr 1fr .8fr .8fr auto; padding: 12px; align-items: center; }
  .search-panel .field-q { grid-column: auto; }
  .search-panel .input { min-height: 50px; }
  .search-panel .btn { min-height: 50px; }

  .section { margin-top: 44px; }
  .section-head h2 { font-size: 24px; }
  .listing-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .cat-grid { grid-template-columns: repeat(7, 1fr); }
  .cat-item { flex-direction: column; text-align: center; padding: 18px 10px; }
  .imei-box { grid-template-columns: 1fr 1.2fr; align-items: center; padding: 32px; }

  .panel-layout { grid-template-columns: 260px 1fr; align-items: start; }
  .panel-sidebar { position: sticky; top: calc(var(--header-h) + 16px); }
  .panel-nav { flex-direction: column; overflow: visible; }
  .panel-nav a { border-radius: var(--radius-sm); background: transparent; }
  .panel-nav a:hover { background: var(--bg); }

  .site-footer { padding-bottom: 28px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
}


/* =====================================================================
   Mərhələ 4: elanlar
   ===================================================================== */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 13px; color: var(--muted); margin: 16px 0 10px; }
.breadcrumbs a, .breadcrumbs span { display: inline-flex; align-items: center; }
.breadcrumbs > * + *::before { content: "›"; margin: 0 8px; color: #a6b2c6; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--blue-600); }
.page-head h1, .listings-head h1 { font-size: 22px; margin: 0; }
.page-head { margin-bottom: 14px; }
.page-head .alert { margin-top: 12px; }
.listings-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 14px; }

/* Siyahı + filtr */
.listings-layout { display: grid; gap: 12px; }
.filters-check { position: absolute; opacity: 0; pointer-events: none; }
.filters-toggle { cursor: pointer; }
.filters { display: none; padding: 16px; }
.filters-check:checked ~ .filters { display: block; }
.filters .form-group { margin-bottom: 12px; }
.range-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filters-actions { display: grid; gap: 8px; margin-top: 6px; }
.chip-radio { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-radio label { margin: 0; font-weight: 500; }
.chip-radio input { position: absolute; opacity: 0; }
.chip-radio span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: var(--pill); border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; font-size: 14px; }
.chip-radio input:checked + span { border-color: var(--blue-600); background: var(--blue-50); color: var(--navy-900); font-weight: 600; }
.chip-radio input:focus-visible + span { outline: 3px solid rgba(37, 99, 235, .45); }
.sort-bar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
.sort-bar label { margin: 0; font-weight: 500; color: var(--muted); }
.sort-bar .input-sm { width: auto; }
.input-sm { min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
#results { transition: opacity .15s; }
#results.is-loading { opacity: .45; pointer-events: none; }
.pagination-gap { border: 0 !important; background: none !important; min-width: 20px !important; }

/* Elan səhifəsi */
/* Mobil: şəkil → qiymət/əlaqə → xüsusiyyətlər → satıcı (display: contents ilə sıra dəyişir) */
.listing-view { display: flex; flex-direction: column; gap: 14px; }
.lv-main, .lv-side { display: contents; }
.lv-main > .gallery { order: 1; }
.lv-side > .lv-box:first-child { order: 2; }
.lv-main > .lv-section { order: 3; }
.lv-side > .lv-box { order: 4; }
.gallery { overflow: hidden; padding: 0; }
.gallery-main { position: relative; background: #0f1f3d; aspect-ratio: 4 / 3; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.gallery-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.9); color: var(--navy-900); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: var(--shadow);
}
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.gallery-counter { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; padding: 3px 10px; border-radius: var(--pill); }
.gallery-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.gallery-thumbs a { flex: 0 0 auto; width: 76px; height: 57px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; opacity: .7; }
.gallery-thumbs a.is-active { border-color: var(--blue-600); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.lv-section { padding: 18px; }
.lv-section h2 { font-size: 18px; }
.spec-list { display: grid; grid-template-columns: 1fr; margin: 0; }
.spec-list div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.spec-list div:last-child { border-bottom: 0; }
.spec-list dt { color: var(--muted); }
.spec-list dd { margin: 0; font-weight: 600; text-align: right; }
.lv-description { white-space: normal; overflow-wrap: anywhere; line-height: 1.65; }
.video-wrap { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lv-box { padding: 18px; }
.lv-title { font-size: 20px; margin-bottom: 8px; overflow-wrap: anywhere; }
.lv-price { font-size: 28px; font-weight: 800; color: var(--navy-900); display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.lv-price small { font-size: 13px; font-weight: 600; color: var(--success); background: #effaf3; padding: 2px 10px; border-radius: var(--pill); }
.price-drop { color: var(--success); font-size: 14px; font-weight: 600; margin-top: 4px; }
.price-drop s { color: var(--muted); font-weight: 400; }
.lv-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; margin: 12px 0 16px; }
.lv-meta span { display: inline-flex; align-items: center; gap: 4px; }
.lv-meta .icon { width: 15px; height: 15px; }
.lv-actions { display: grid; gap: 8px; }
.lv-actions form { margin: 0; }
.btn-whatsapp { background: #25d366; color: #073b1d; }
.btn-whatsapp:hover { background: #1fb959; color: #073b1d; }
.btn-whatsapp[aria-disabled="true"] { background: #d7f5e3; }
.fav-btn-wide.is-active { color: var(--danger); border-color: #fecaca; }
.fav-btn-wide.is-active .icon { fill: currentColor; }
.seller-box { display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: center; }
.seller-box .btn { grid-column: 1 / -1; }
.seller-name { font-weight: 700; color: var(--navy-900); display: block; }
.seller-box small { display: block; }
.verified { display: inline-flex !important; align-items: center; gap: 4px; color: var(--success); font-weight: 600; }
.verified .icon { width: 15px; height: 15px; }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 14px; }
.share-row .label { margin: 0; }
.link-btn { background: none; border: 0; color: var(--blue-600); cursor: pointer; padding: 0; font-weight: 500; }
.report { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.report summary { cursor: pointer; color: var(--danger); font-size: 14px; font-weight: 600; }
.report form { display: grid; gap: 8px; margin-top: 10px; }
.safety-note { display: flex; gap: 8px; font-size: 13px; color: var(--muted); margin: 14px 0 0; background: var(--bg); padding: 10px 12px; border-radius: var(--radius-sm); }
.safety-note .icon { color: var(--warning); width: 18px; height: 18px; }
.seller-hero { display: flex; align-items: center; gap: 14px; padding: 18px; margin-top: 16px; }
.seller-hero h1 { font-size: 22px; margin: 0; }
.seller-hero p { margin: 4px 0 0; }

/* Elan forması */
.listing-form { display: grid; gap: 14px; }
.form-card { padding: 18px; margin: 0; border: 1px solid var(--border); min-width: 0; }
.form-card legend { font-weight: 800; font-size: 17px; color: var(--navy-900); padding: 0 6px; }
.form-row-price { grid-template-columns: 2fr 1fr !important; }
.form-row-3 { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; }
.check-row { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.upload-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 120px; padding: 18px;
  border: 2px dashed #b9c7dd; border-radius: var(--radius); background: var(--blue-50); color: var(--navy-900); cursor: pointer; text-align: center; font-weight: 400;
}
.upload-drop .icon { width: 30px; height: 30px; color: var(--blue-600); }
.upload-drop.is-drag, .upload-drop:hover { border-color: var(--blue-600); }
.upload-drop.is-invalid { border-color: var(--danger); background: #fef2f2; }
#images:focus-visible + .image-preview, .upload-drop:focus-within { outline: 3px solid rgba(37,99,235,.45); }
.image-preview, .image-manage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.image-manage { margin: 0 0 10px; }
.image-tile { background: var(--bg); border-radius: var(--radius-sm); padding: 6px; display: grid; gap: 4px; font-size: 13px; }
.image-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.image-tile .check { font-size: 13px; gap: 6px; }
.image-tile .check input { width: 16px; height: 16px; }
.check-danger { color: var(--danger); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (min-width: 600px) {
  .form-row-3 { grid-template-columns: repeat(3, 1fr); }
  .image-preview, .image-manage { grid-template-columns: repeat(5, 1fr); }
  .spec-list { grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .spec-list div:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
}
@media (min-width: 1024px) {
  .listings-layout { grid-template-columns: 280px 1fr; align-items: start; gap: 20px; }
  .filters-toggle { display: none; }
  .filters { display: block; position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; }
  .results .listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .listing-view { display: grid; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; gap: 20px; }
  .lv-main, .lv-side { display: grid; gap: 14px; align-content: start; min-width: 0; }
  .lv-side { position: sticky; top: calc(var(--header-h) + 16px); }
  .page-head h1, .listings-head h1 { font-size: 26px; }
}


/* =====================================================================
   Mərhələ 5: istifadəçi paneli
   ===================================================================== */
img.avatar { object-fit: cover; }
.avatar-xl { width: 96px; height: 96px; font-size: 32px; }
.page-head-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.page-head-row p { margin: 4px 0 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.page-actions form { margin: 0; }
.panel-content { display: grid; gap: 14px; align-content: start; }
.panel-content > .page-head { margin-bottom: 0; }
.panel-section { padding: 18px; }
.panel-section h2 { font-size: 18px; }
.panel-section .section-head { margin-bottom: 12px; }
.panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.narrow-form { max-width: 560px; }
.text-danger { color: var(--danger) !important; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 14px 16px; min-height: 88px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text);
}
a.stat-card:hover { border-color: var(--blue-500); color: var(--text); box-shadow: var(--shadow-sm); }
.stat-label { font-size: 13px; color: var(--muted); line-height: 1.3; }
.stat-card strong { font-size: 26px; color: var(--navy-900); line-height: 1; }
.stat-success strong { color: var(--success); }
.stat-warning strong { color: var(--warning); }

.mini-chart { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 18px; }
.mini-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.mini-bar-fill { width: 100%; max-width: 28px; background: var(--blue-500); border-radius: 4px 4px 0 0; min-height: 2px; }
.mini-bar:hover .mini-bar-fill { background: var(--navy-800); }
.mini-bar-value { font-size: 11px; color: var(--muted); height: 16px; }
.mini-bar-label { font-size: 11px; color: var(--muted); margin-top: 4px; }

.row-list { display: grid; }
.row-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.row-item:last-child { border-bottom: 0; }
a.row-item:hover { background: var(--bg); color: var(--text); }
.row-item img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: var(--bg); }
.row-main { flex: 1; min-width: 0; display: grid; }
.row-main b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main small { color: var(--muted); }
.row-item form { margin: 0; }
.row-item.is-muted img { filter: grayscale(1); opacity: .6; }
.card.row-list { padding-top: 6px; padding-bottom: 6px; }

.status-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--pill); font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-active { background: #e7f7ee; color: #166534; }
.status-pending { background: #fff4db; color: #92400e; }
.status-rejected { background: #fdecec; color: #991b1b; }
.status-sold { background: var(--blue-50); color: var(--navy-800); }
.status-inactive, .status-expired { background: #eef1f5; color: #475569; }
.status-vip { background: var(--accent); color: #1f1300; }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: var(--pill); background: var(--surface); border: 1px solid var(--border); color: var(--text); white-space: nowrap; font-weight: 500; min-height: 42px; }
.tab.is-active { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.tab-count { font-size: 12px; background: var(--bg); color: var(--muted); border-radius: var(--pill); padding: 1px 8px; }
.tab.is-active .tab-count { background: rgba(255,255,255,.18); color: #fff; }

.my-listings { display: grid; gap: 10px; }
.my-listing { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 12px; }
.ml-thumb img { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--bg); }
.ml-body { min-width: 0; display: grid; gap: 3px; align-content: start; }
.ml-top { display: flex; flex-wrap: wrap; gap: 6px; }
.ml-title { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.ml-price { font-weight: 800; color: var(--navy-900); }
.my-listing .card-meta { padding-top: 2px; }
.reject-reason { background: #fdecec; color: #7f1d1d; padding: 8px 10px; border-radius: 8px; font-size: 13px; margin-top: 4px; }
.ml-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--border); padding-top: 10px; }
.ml-actions form { margin: 0; }

.avatar-section { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.avatar-preview img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.inline-form { display: inline-flex; gap: 8px; margin: 0 8px 0 0; align-items: center; }
.label-link { font-weight: 500; font-size: 13px; margin-left: 8px; }
label .verified { margin-left: 8px; font-size: 13px; }

.notif-list { padding: 4px; }
.notif-item { margin: 0; }
.notif-btn { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 0; background: none; text-align: left; cursor: pointer; border-radius: var(--radius-sm); }
.notif-btn:hover { background: var(--bg); }
.notif-item + .notif-item { border-top: 1px solid var(--border); }
.notif-item.is-unread .notif-btn { background: var(--blue-50); }
.notif-icon { width: 38px; height: 38px; border-radius: 50%; background: var(--bg); color: var(--blue-600); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-listing_rejected, .notif-stolen_match { color: var(--danger); }
.notif-listing_approved { color: var(--success); }
.notif-price_drop, .notif-favorite_updated { color: #db2777; }
.notif-text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.notif-text span { color: var(--muted); font-size: 14px; }
.notif-text small { color: var(--muted); font-size: 12px; }
.unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue-600); margin-top: 6px; flex-shrink: 0; }

.danger-zone { border-color: #fecaca; }
.danger-zone h2 { color: var(--danger); }
.danger-zone ul { padding-left: 20px; color: var(--muted); margin: 0 0 18px; }

@media (min-width: 600px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .panel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .my-listing { grid-template-columns: 120px 1fr auto; align-items: start; }
  .ml-thumb img { width: 120px; height: 90px; }
  .ml-actions { grid-column: auto; flex-direction: column; border-top: 0; padding-top: 0; align-items: stretch; min-width: 120px; }
  .ml-actions .btn { width: 100%; }
}


/* =====================================================================
   Mərhələ 6: mağaza və servis
   ===================================================================== */
.store-search { display: grid; gap: 8px; padding: 12px; margin-bottom: 16px; }
.store-grid { display: grid; gap: 14px; }
.store-card { overflow: hidden; color: var(--text); display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s; }
.store-card:hover { color: var(--text); box-shadow: var(--shadow); border-color: var(--blue-100); }
.store-card-cover { height: 96px; background: linear-gradient(135deg, var(--navy-900), var(--blue-600)); }
.store-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.store-card-body { padding: 0 16px 16px; display: grid; gap: 6px; }
.store-card h2 { font-size: 17px; margin: 4px 0 0; display: flex; align-items: center; gap: 6px; }
.store-logo {
  width: 64px; height: 64px; border-radius: 16px; background: var(--surface); border: 3px solid var(--surface); box-shadow: var(--shadow);
  margin-top: -32px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  font-size: 26px; font-weight: 800; color: var(--blue-600); position: relative;
}
.store-logo img { width: 100%; height: 100%; object-fit: cover; }
.store-logo-lg { width: 96px; height: 96px; margin-top: -56px; font-size: 38px; border-radius: 22px; flex-shrink: 0; }
.store-services-preview { font-size: 13px; color: var(--muted); margin: 0; }
.verified-mark { color: var(--blue-600); display: inline-flex; }
.verified-mark .icon { width: 18px; height: 18px; }
.open-now { color: var(--success); font-weight: 600; }
.closed-now { color: var(--danger); font-weight: 600; }

.stars { --size: 16px; display: inline-block; width: calc(var(--size) * 5); height: var(--size); position: relative; vertical-align: -2px;
  background: linear-gradient(90deg, #f59e0b calc(var(--rating) / 5 * 100%), #d8dee9 0);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3 6.9 7.5.6-5.7 4.9 1.8 7.3L12 17.8 5.4 21.7l1.8-7.3L1.5 9.5 9 8.9z'/%3E%3C/svg%3E") 0 0 / var(--size) var(--size) repeat-x;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3 6.9 7.5.6-5.7 4.9 1.8 7.3L12 17.8 5.4 21.7l1.8-7.3L1.5 9.5 9 8.9z'/%3E%3C/svg%3E") 0 0 / var(--size) var(--size) repeat-x; }
.stars-sm { --size: 13px; margin-left: auto; }
.rating-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14px; }

.store-hero { overflow: hidden; margin-bottom: 14px; }
.store-cover { height: 140px; background: linear-gradient(135deg, var(--navy-900), var(--blue-600)); }
.store-cover img { width: 100%; height: 100%; object-fit: cover; }
.store-hero-body { padding: 0 18px 18px; display: grid; gap: 12px; }
.store-hero-info { display: grid; gap: 6px; }
.store-hero-info h1 { font-size: 24px; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.store-hero-info .status-badge { justify-self: start; }
.store-hero-actions { display: grid; gap: 8px; }

/* Mobil sıra: xidmətlər → iş saatları/ünvan → qalanı */
.store-view .lv-main > * { order: 3; }
.store-view .lv-main > #xidmetler { order: 1; }
.store-view .lv-side > .lv-box { order: 2; }
.lv-section-plain { min-width: 0; }
.lv-section-plain h2 { font-size: 18px; }

.price-list { display: grid; }
.price-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.price-row:last-child { border-bottom: 0; }
.price-row small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.price-tag { font-weight: 800; color: var(--navy-900); white-space: nowrap; text-align: right; }
.store-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.store-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.box-title { font-size: 16px; margin-bottom: 10px; }
.hours-list { margin: 0; display: grid; }
.hours-list div { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; border-bottom: 1px solid var(--border); }
.hours-list div:last-child { border-bottom: 0; }
.hours-list dt { color: var(--muted); }
.hours-list dd { margin: 0; font-weight: 600; }
.hours-list .is-today dt, .hours-list .is-today dd { color: var(--blue-600); font-weight: 700; }
.map-wrap { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; margin: 10px 0; background: var(--bg); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; }
.contact-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.store-social a { color: var(--blue-600); border-color: var(--border); }

.rating-summary { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.rating-big { display: grid; justify-items: center; gap: 4px; min-width: 110px; }
.rating-big strong { font-size: 40px; line-height: 1; color: var(--navy-900); }
.rating-big small { color: var(--muted); }
.rating-bars { flex: 1; min-width: 180px; display: grid; gap: 4px; }
.rating-bar-row { display: grid; grid-template-columns: 34px 1fr 28px; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.rating-bar { height: 8px; border-radius: var(--pill); background: var(--bg); overflow: hidden; }
.rating-bar span { display: block; height: 100%; background: var(--accent); border-radius: var(--pill); }
.review-form { display: grid; gap: 10px; padding: 14px; background: var(--bg); border-radius: var(--radius); margin-bottom: 16px; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input input { position: absolute; opacity: 0; }
.star-input label { font-size: 34px; line-height: 1; color: #cfd6e2; cursor: pointer; margin: 0; padding: 0 2px; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #f59e0b; }
.star-input input:focus-visible + label { outline: 3px solid rgba(37, 99, 235, .45); border-radius: 4px; }
.review-login { background: var(--bg); padding: 12px 14px; border-radius: var(--radius-sm); }
.review-list { display: grid; }
.review { padding: 14px 0; border-top: 1px solid var(--border); }
.review-head { display: flex; align-items: center; gap: 10px; }
.review-head small { display: block; font-size: 12px; }
.review p { margin: 8px 0 0; overflow-wrap: anywhere; }

.current-image { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.current-image img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }
.current-image img.is-wide { width: 128px; height: 48px; }
.hours-grid { display: grid; gap: 8px; }
.hours-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "day closed" "open close"; gap: 6px 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.hours-row:last-child { border-bottom: 0; }
.hours-day { grid-area: day; font-weight: 600; }
.hours-row .check { grid-area: closed; }
.hours-row input[type="time"]:first-of-type { grid-area: open; }
.hours-row input[type="time"]:last-of-type { grid-area: close; }
.hours-sep { display: none; }
.hours-row input[type="time"]:disabled { opacity: .45; }
.service-rows { display: grid; gap: 10px; margin: 10px 0; }
.service-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; background: var(--bg); border-radius: var(--radius-sm); }
.service-row .service-name, .service-row .service-desc { grid-column: 1 / -1; }
.service-row .input { min-height: 42px; }

@media (min-width: 600px) {
  .store-search { grid-template-columns: 2fr 1fr 1fr auto; align-items: center; }
  .store-grid { grid-template-columns: repeat(2, 1fr); }
  .store-gallery { grid-template-columns: repeat(4, 1fr); }
  .hours-row { grid-template-columns: 170px 120px 16px 120px auto; grid-template-areas: none; }
  .hours-row > * { grid-area: auto !important; }
  .hours-sep { display: block; text-align: center; color: var(--muted); }
  .service-row { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .service-row .service-name { grid-column: auto; }
  .store-cover { height: 220px; }
}
@media (min-width: 1024px) {
  .store-grid { grid-template-columns: repeat(3, 1fr); }
  .store-hero-body { grid-template-columns: auto 1fr auto; align-items: end; gap: 18px; }
  .store-hero-actions { grid-auto-flow: row; min-width: 220px; }
  .store-listings { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}


/* =====================================================================
   Mərhələ 7: mesajlaşma
   ===================================================================== */
.inbox { padding: 4px; }
.inbox-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-sm); color: var(--text); }
.inbox-item + .inbox-item { border-top: 1px solid var(--border); }
.inbox-item:hover { background: var(--bg); color: var(--text); }
.inbox-item.is-unread { background: var(--blue-50); }
.inbox-avatar { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: var(--bg); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--blue-600); }
.inbox-avatar img { width: 100%; height: 100%; object-fit: cover; }
.inbox-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.inbox-top { display: flex; justify-content: space-between; gap: 8px; }
.inbox-top small { white-space: nowrap; font-size: 12px; }
.inbox-listing { font-size: 12px; color: var(--blue-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-preview { font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-unread .inbox-preview { font-weight: 600; }
.inbox-item .badge-count { margin-left: 0; }

.chat { display: flex; flex-direction: column; overflow: hidden; }
.chat-listing { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--text); border-bottom: 1px solid var(--border); }
.card.chat-listing { border-bottom: 1px solid var(--border); }
.chat-listing img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; background: var(--bg); flex-shrink: 0; }
.chat-listing span { display: grid; min-width: 0; }
.chat-listing b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-listing small { color: var(--muted); }
.chat-listing[aria-disabled="true"] { pointer-events: none; opacity: .7; }
.chat-thread { height: min(60vh, 560px); min-height: 300px; overflow-y: auto; padding: 16px 12px; display: flex; flex-direction: column; gap: 6px; background: #f8fafd; overscroll-behavior: contain; }
.chat-date { align-self: center; font-size: 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 3px 12px; border-radius: var(--pill); margin: 8px 0; }
.chat-msg { max-width: 82%; align-self: flex-start; display: grid; gap: 2px; }
.chat-msg.is-mine { align-self: flex-end; justify-items: end; }
.chat-bubble { padding: 9px 13px; border-radius: 16px 16px 16px 4px; background: var(--surface); border: 1px solid var(--border); overflow-wrap: anywhere; line-height: 1.45; }
.is-mine .chat-bubble { background: var(--blue-600); color: #fff; border-color: var(--blue-600); border-radius: 16px 16px 4px 16px; }
.chat-meta { font-size: 11px; color: var(--muted); padding: 0 4px; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); align-items: flex-end; }
.chat-form textarea { min-height: 46px; max-height: 160px; resize: none; flex: 1; }
.chat-form .btn { flex-shrink: 0; min-width: 52px; padding: 0 14px; }
.chat-hint { font-size: 12px; color: var(--muted); margin: 0; padding: 0 14px 10px; display: none; }
.chat-blocked { padding: 14px; text-align: center; color: var(--muted); border-top: 1px solid var(--border); }
.compose-form { display: grid; gap: 10px; }
.compose-form label { margin: 0; }
.quick-replies { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--border); background: var(--surface); border-radius: var(--pill); padding: 6px 12px; font-size: 13px; cursor: pointer; color: var(--text); }
.chip-btn:hover { border-color: var(--blue-500); color: var(--blue-600); }
.hide-mobile { display: none; }
@media (min-width: 600px) { .hide-mobile { display: inline; } }
@media (pointer: fine) { .chat-hint { display: block; } }


/* =====================================================================
   Mərhələ 8: IMEI yoxlama
   ===================================================================== */
.imei-page { display: grid; gap: 16px; }
.imei-page .breadcrumbs { margin-bottom: 0; }
.imei-hero h1 { color: #fff; display: flex; align-items: center; gap: 10px; font-size: 24px; margin-bottom: 6px; }
.imei-hero h1 .icon { width: 26px; height: 26px; }
.imei-result { padding: 18px; display: grid; gap: 14px; }
.imei-verdict { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); }
.imei-verdict > .icon { width: 28px; height: 28px; flex-shrink: 0; }
.imei-verdict b { display: block; font-size: 17px; margin-bottom: 2px; }
.imei-verdict.is-ok { background: #effaf3; color: #14532d; }
.imei-verdict.is-bad { background: #fef2f2; color: #7f1d1d; }
.imei-details dd.ok { color: var(--success); }
.imei-details dd.bad { color: var(--danger); }
.imei-details code, .imei-result code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; letter-spacing: .5px; }
.imei-subtitle { font-size: 17px; margin: 6px 0 0; }
.imei-info { display: grid; gap: 14px; }
.plain-list { padding-left: 20px; margin: 0; display: grid; gap: 6px; }
@media (min-width: 1024px) { .imei-info { grid-template-columns: 1fr 1fr; } .imei-hero h1 { font-size: 30px; } }


/* =====================================================================
   Mərhələ 9: admin panel
   ===================================================================== */
.admin-body { background: #eef2f8; }
.admin-top {
  position: sticky; top: 0; z-index: 50; background: var(--navy-900); color: #fff; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; min-height: 60px;
}
.admin-top .logo small { font-size: 12px; font-weight: 600; color: #9cc0ff; margin-left: 4px; text-transform: uppercase; letter-spacing: .5px; }
.admin-burger { display: inline-flex; }
.admin-top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 14px; }
.admin-top-link { color: #c9dbff; }
.admin-top-link:hover { color: #fff; }
.admin-top-user { color: #c9dbff; display: none; }
.admin-nav {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(84vw, 280px); background: var(--surface); color: var(--text); z-index: 60;
  transform: translateX(-100%); transition: transform .25s ease; overflow-y: auto; padding: 70px 10px 20px; box-shadow: var(--shadow-lg);
}
.nav-toggle:checked ~ .admin-nav { transform: translateX(0); }
.admin-nav-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 14px 12px 6px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text); font-size: 14px; min-height: 40px; }
.admin-nav a:hover { background: var(--bg); }
.admin-nav a.is-active { background: var(--blue-600); color: #fff; }
.admin-nav a.is-active .icon { color: #fff; }
.admin-nav .icon { width: 18px; height: 18px; color: var(--blue-600); }
.admin-nav .badge-count { margin-left: auto; }
.admin-main { padding: 16px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.admin-main > *, .admin-two-col > * { min-width: 0; }
.admin-top-right { white-space: nowrap; }
.admin-site-link { display: none; }
.admin-main .flash-stack { margin-top: 0; padding: 0; }
.admin-head h1 { font-size: 22px; margin: 0; }
.admin-stats { grid-template-columns: repeat(2, 1fr); }
.admin-two-col { display: grid; gap: 14px; align-items: start; }
.admin-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-filter .input { flex: 1 1 180px; width: auto; min-height: 44px; }
.admin-filter .btn { min-height: 44px; }
.admin-table-wrap { overflow-x: auto; padding: 0; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 10px 12px; background: #f8fafd; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: #fafcff; }
.admin-table small { display: block; color: var(--muted); font-size: 12px; }
.admin-table .icon { width: 16px; height: 16px; vertical-align: -3px; color: var(--blue-600); }
.cell-main { display: flex; align-items: center; gap: 10px; min-width: 240px; }
.cell-main img { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; background: var(--bg); flex-shrink: 0; }
.cell-main span { display: grid; min-width: 0; }
.cell-wide { min-width: 240px; }
.nowrap { white-space: nowrap; }
.empty-cell { text-align: center; color: var(--muted); padding: 30px !important; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.admin-actions { display: grid; gap: 8px; }
.admin-actions h3, .panel-section h3 { font-size: 16px; margin-bottom: 8px; }
.admin-actions .inline-form { display: block; margin: 0; }
.reject-form, .vip-form { display: grid; gap: 6px; margin: 4px 0; }
.vip-form { grid-template-columns: 1fr auto; }
.reject-form label { margin: 0; font-size: 13px; }
.admin-listing-title { font-size: 20px; margin: 10px 0 4px; }
.admin-images { margin: 12px 0; }
.admin-cover { width: 100%; max-height: 200px; object-fit: cover; border-radius: var(--radius); margin: 10px 0; }
.admin-logo { border-radius: 10px; object-fit: cover; }
.report-list { display: grid; gap: 10px; }
.report-item { display: grid; gap: 6px; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.report-head > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.report-item p { margin: 0; }
.report-details { background: var(--bg); padding: 10px 12px; border-radius: var(--radius-sm); overflow-wrap: anywhere; }
.report-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.report-actions .input-sm { flex: 1 1 200px; }
.admin-thread { height: auto; max-height: 70vh; }
.is-hidden-msg .chat-bubble { opacity: .45; text-decoration: line-through; }
.chat-meta .inline-form { display: inline; margin: 0 0 0 6px; }
.chat-meta .link-btn { font-size: 11px; }
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.settings-form { max-width: 760px; }
.chart-legend { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--blue-500); display: inline-block; margin-left: 8px; }
.chart-legend i.lg-b { background: var(--accent); }
.dual-bars { display: flex; align-items: flex-end; gap: 2px; width: 100%; height: 100%; justify-content: center; }
.dual-bars .mini-bar-fill { max-width: 12px; }
.mini-bar-fill.fill-b { background: var(--accent); }
.dual-chart .mini-bar { height: 100%; }
.admin-login-body { min-height: 100vh; display: flex; align-items: center; background: linear-gradient(135deg, var(--navy-900), var(--blue-600)); }
.admin-login-body .auth-wrap { width: 100%; }
.admin-login-logo { color: var(--navy-900); margin-bottom: 18px; }
.admin-login-logo:hover { color: var(--navy-900); }
.admin-login-logo .logo-text b { color: var(--blue-600); }
body.admin-body:has(.nav-toggle:checked)::after { content: ""; position: fixed; inset: 0; background: rgba(8, 20, 45, .45); z-index: 45; }

@media (min-width: 600px) {
  .admin-stats { grid-template-columns: repeat(4, 1fr); }
  .admin-top-user { display: inline; }
  .admin-site-link { display: inline; }
}
@media (min-width: 1100px) {
  .admin-body { display: grid; grid-template-columns: 250px 1fr; grid-template-rows: auto 1fr; }
  .admin-top { grid-column: 1 / -1; }
  .admin-burger { display: none; }
  .admin-nav { position: fixed; top: 60px; transform: none; width: 250px; padding: 8px 10px 20px; box-shadow: none; border-right: 1px solid var(--border); z-index: 10; }
  .admin-main { grid-column: 2; padding: 22px 28px; max-width: 1400px; width: 100%; }
  .admin-two-col { grid-template-columns: minmax(0, 1fr) 380px; }
  .admin-detail { grid-template-columns: minmax(0, 1fr) 340px; }
  body.admin-body:has(.nav-toggle:checked)::after { content: none; }
}


/* =====================================================================
   Mərhələ 10: VIP, ödəniş, reklam
   ===================================================================== */
.ad-slot { position: relative; margin: 16px 0; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.ad-slot a { display: block; }
.ad-slot img { width: 100%; height: auto; max-height: 180px; object-fit: cover; }
.ad-label { position: absolute; top: 6px; right: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; background: rgba(255,255,255,.9); color: var(--muted); padding: 2px 8px; border-radius: var(--pill); }
.ad-sidebar img, .ad-listing_page img { max-height: none; }
.filters .ad-slot { margin: 16px 0 0; }
.lv-side .ad-slot { margin: 0; }
.package-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.package-card { margin: 0; cursor: pointer; }
.package-card input { position: absolute; opacity: 0; }
.package-body { display: grid; gap: 4px; padding: 14px; border: 2px solid var(--border); border-radius: var(--radius); background: var(--surface); height: 100%; font-weight: 400; }
.package-card input:checked + .package-body { border-color: var(--accent); background: #fffbeb; box-shadow: 0 0 0 3px rgba(245, 158, 11, .2); }
.package-card input:focus-visible + .package-body { outline: 3px solid rgba(37, 99, 235, .45); }
.package-card.is-disabled { opacity: .5; cursor: not-allowed; }
.package-type { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--accent-600); }
.package-price { font-size: 22px; font-weight: 800; color: var(--navy-900); }
.package-body small { color: var(--muted); }
.vip-benefits ul { margin-bottom: 0; }
.payment-box { display: grid; gap: 14px; }
.manual-instructions { background: var(--bg); padding: 14px; border-radius: var(--radius-sm); }
.stat-text { font-size: 15px !important; line-height: 1.3 !important; }
@media (min-width: 600px) { .package-grid { grid-template-columns: repeat(4, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}