/* =========================================================
   ملامح — Design System v2
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

/* ── Variables ── */
:root {
  --pink:       #d63f72;
  --pink-dk:    #a8305c;
  --pink-lt:    #e8789d;
  --pink-xl:    #f5c8da;
  --pink-bg:    #fdf5f8;
  --pink-bg2:   #fae8f0;
  --pink-bg3:   #f5d5e4;
  --white:      #ffffff;
  --border:     #edd9e5;
  --text:       #1c1c1e;
  --text-2:     #4a4a52;
  --text-3:     #8a8a95;
  --text-4:     #b8b8c0;

  --grad:       linear-gradient(135deg, #e05585 0%, #c93f72 50%, #a8305c 100%);
  --grad-lt:    linear-gradient(135deg, #f08baa 0%, #e05585 100%);
  --grad-pink:  linear-gradient(135deg, #fde8f0 0%, #ffd6e7 100%);

  --shadow-xs:  0 1px 4px rgba(168,48,92,.06);
  --shadow-sm:  0 2px 10px rgba(168,48,92,.09);
  --shadow:     0 4px 18px rgba(168,48,92,.12);
  --shadow-lg:  0 8px 32px rgba(168,48,92,.18);

  --r-xs:   6px;
  --r-sm:   10px;
  --r:      14px;
  --r-lg:   20px;
  --r-xl:   26px;
  --r-full: 9999px;

  --trans: .2s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Tajawal', sans-serif;
  background: var(--pink-bg);
  color: var(--text);
  direction: rtl;
  min-height: 100vh;
  line-height: 1.65;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: 'Tajawal', sans-serif; }
ul { list-style: none; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 10px 22px;
  border-radius: var(--r-sm); border: 2px solid transparent;
  font-size: .88rem; font-weight: 700; line-height: 1;
  cursor: pointer; transition: all var(--trans); white-space: nowrap;
  text-decoration: none; letter-spacing: .01em;
}
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 3px 14px rgba(200,60,110,.28);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(200,60,110,.38);
  color: #fff;
}
.btn-outline {
  background: var(--white); color: var(--pink);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--pink-lt); background: var(--pink-bg2); color: var(--pink);
}
.btn-ghost {
  background: var(--pink-bg2); color: var(--pink); border-color: var(--border);
}
.btn-ghost:hover { background: var(--pink-bg3); border-color: var(--pink-lt); color: var(--pink); }
.btn-wa { background: linear-gradient(135deg,#25d366,#128c7e); color:#fff; border-color:transparent; }
.btn-wa:hover { transform: translateY(-2px); color:#fff; }
.btn-sm  { padding: 7px 16px; font-size: .82rem; border-radius: var(--r-xs); }
.btn-lg  { padding: 14px 32px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity:.5; pointer-events:none; }
.btn:active { transform: translateY(0) scale(.98); }

/* =========================================================
   FORMS
   ========================================================= */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: .80rem; font-weight: 700;
  color: var(--text-2); margin-bottom: 7px;
}
.form-label .req { color: var(--pink); }
.form-control {
  display: block; width: 100%;
  padding: 11px 14px;
  background: var(--white); color: var(--text);
  border: 2px solid var(--border); border-radius: var(--r-sm);
  font-size: .90rem; outline: none;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.form-control:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(198,60,108,.10);
}
.form-control::placeholder { color: var(--text-4); }
.form-control.is-error { border-color: #e04545; }
select.form-control {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23b8b8c0' fill='none' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 13px center;
}
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint  { font-size: .74rem; color: var(--text-4); margin-top: 5px; }
.form-error { font-size: .74rem; color: #e04545; margin-top: 5px; }
.input-icon-wrap { position: relative; }
.input-icon-wrap .form-control { padding-right: 40px; }
.input-icon { position:absolute; right:13px; top:50%; transform:translateY(-50%); color:var(--text-4); }

/* =========================================================
   ALERTS
   ========================================================= */
.alert {
  padding: 13px 16px; border-radius: var(--r-sm);
  font-size: .87rem; margin-bottom: 18px;
  border-right: 4px solid transparent; line-height: 1.5;
}
.alert-danger  { background:#fff0f3; border-right-color:var(--pink);   color:var(--pink-dk); }
.alert-success { background:#f0fff6; border-right-color:#27ae60;        color:#1a6e3a; }
.alert-info    { background:#fffbec; border-right-color:#e8a020;        color:#6b4700; }

/* =========================================================
   NAVBAR
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1.5px solid var(--border);
}
.navbar {
  max-width: 1200px; margin: 0 auto; padding: 0 28px;
  height: 80px; display: flex; align-items: center; gap: 16px;
}
/* ── LOGO STACK ── */
.navbar-logo {
  flex-shrink: 0; text-decoration: none;
}
.navbar-logo-stack {
  display: flex; flex-direction: column;
  align-items: center; gap: 0;
  line-height: 1;
}
.navbar-logo-crown-wrap {
  display: flex; justify-content: center;
  margin-bottom: -3px; /* يلتصق التاج بالكلمة */
  filter: drop-shadow(0 0 5px rgba(201,160,48,.7))
          drop-shadow(0 1px 2px rgba(0,0,0,.25));
}
.navbar-crown-svg {
  width: 52px; height: auto;
}
.navbar-logo-name {
  font-size: 1.55rem; font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: .04em; line-height: 1.1;
  text-shadow: none;
}
.navbar-logo-tag {
  font-size: .58rem; font-weight: 600;
  letter-spacing: .22em;
  color: #c9a050;
  -webkit-text-fill-color: #c9a050;
  margin-top: 2px;
  opacity: .88;
}

/* ── PROFILE AVATAR ICON ── */
.nav-user-ava-wrap {
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.nav-user-ava-svg {
  width: 34px; height: 34px;
  transition: transform var(--trans), filter var(--trans);
}
.nav-user-btn:hover .nav-user-ava-svg {
  filter: drop-shadow(0 2px 8px rgba(200,60,100,.35));
  transform: scale(1.06);
}
.nav-user-ava-emoji {
  font-size: 1.5rem; line-height: 1;
}
.nav-user-badge {
  position: absolute; top: -4px; left: -4px;
  background: var(--pink); color: #fff;
  font-size: .52rem; font-weight: 800;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px; line-height: 1;
}
.navbar-search {
  flex: 1; max-width: 380px; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  background: var(--pink-bg); border: 2px solid var(--border);
  border-radius: var(--r-full); padding: 0 16px; height: 40px;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.navbar-search:focus-within {
  border-color: var(--pink-lt);
  box-shadow: 0 0 0 3px rgba(198,60,108,.08);
}
.navbar-search svg { flex-shrink: 0; color: var(--text-4); }
.navbar-search input {
  flex:1; border:none; background:transparent;
  font-size:.87rem; outline:none; color:var(--text); min-width:0;
}
.navbar-search input::placeholder { color: var(--text-4); }
.navbar-actions {
  display: flex; align-items: center; gap: 8px;
  margin-right: auto; flex-shrink: 0;
}
.navbar-icon {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; cursor: pointer; transition: all var(--trans);
  text-decoration: none; flex-shrink: 0; color: var(--text-2);
}
.navbar-icon:hover { border-color: var(--pink-lt); transform: scale(1.05); }

/* ── User Menu Dropdown ── */
.nav-user-menu {
  position: relative;
}
.nav-user-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0;
  border: none; border-radius: 50%;
  background: transparent; cursor: pointer;
  transition: all var(--trans);
}
.nav-user-btn:hover { background: var(--pink-bg); }
.nav-user-ava { font-size: 1.3rem; line-height: 1; }

/* زر حسابي — نص بدل أيقونة */
.nav-user-text-btn {
  width: auto !important; height: 35px !important;
  padding: 0 15px !important; border-radius: 8px !important;
  background: #fff !important;
  border: 1.5px solid var(--border) !important;
  font-size: .8rem !important; font-weight: 700 !important;
  color: var(--pink-dk) !important;
  gap: 5px; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(201,63,114,.08);
}
.nav-user-text-btn:hover {
  background: var(--pink-bg) !important;
  border-color: var(--pink) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(201,63,114,.16) !important;
}
.nav-user-badge-inline {
  background: var(--pink); color: #fff;
  border-radius: 20px; padding: 1px 6px;
  font-size: .65rem; font-weight: 800;
}
.nav-user-chevron { display: none; }
.nav-user-menu.open .nav-user-chevron { display: none; }

.nav-user-dropdown {
  display: none;
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 200px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  box-shadow: 0 8px 24px rgba(166,48,92,.13);
  z-index: 999; overflow: hidden;
  animation: dropIn .18s ease;
}
.nav-user-menu.open .nav-user-dropdown { display: block; }
@keyframes dropIn {
  from { opacity:0; transform:translateY(-6px); }
  to   { opacity:1; transform:translateY(0); }
}
.nav-drop-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; background: var(--pink-bg);
  border-bottom: 1px solid var(--border);
}
.nav-drop-divider {
  height: 1px; background: var(--border); margin: 4px 0;
}
.nav-drop-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; font-size: .84rem;
  color: var(--text-2); text-decoration: none;
  transition: background .15s;
}
.nav-drop-item:hover { background: var(--pink-bg); color: var(--pink); }
.nav-drop-badge {
  margin-right: auto;
  background: var(--pink); color: #fff;
  font-size: .6rem; font-weight: 800;
  padding: 1px 6px; border-radius: 10px;
}
.nav-drop-logout {
  color: #c0392b !important;
  font-weight: 700;
}
.nav-drop-logout:hover { background: #fff5f5 !important; }

/* =========================================================
   CATS GRID — مربعات سطرين
   ========================================================= */
.cats-grid-bar {
  background: var(--pink-bg); /* نفس لون الخلفية */
  padding: 18px 0 4px;
}
.cats-grid-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.cat-circle {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 7px;
  padding: 12px 6px 10px;
  border-radius: var(--r);
  background: var(--white);
  border: 1.5px solid var(--border);
  text-decoration: none; cursor: pointer;
  transition: all var(--trans);
  box-shadow: var(--shadow-xs);
  min-height: 72px;
}
.cat-circle-icon {
  font-size: 1.5rem; line-height: 1;
  transition: transform var(--trans);
}
.cat-circle-label {
  font-size: .75rem; font-weight: 700; color: var(--text-2);
  text-align: center; line-height: 1.35;
  /* يظهر النص كاملاً مهما كان طوله */
  white-space: normal;
  word-break: break-word;
  transition: color var(--trans);
}

/* hover */
.cat-circle:hover {
  border-color: var(--pink-lt);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.cat-circle:hover .cat-circle-icon  { transform: scale(1.15); }
.cat-circle:hover .cat-circle-label { color: var(--pink); }

/* active */
.cat-circle.active {
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(200,60,110,.28);
  transform: translateY(-2px);
}
.cat-circle.active .cat-circle-label { color: #fff; font-weight: 800; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .cats-grid-inner { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 600px) {
  .cats-grid-inner { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .cats-grid-bar { padding: 14px 0 2px; }
  .cat-circle { padding: 10px 4px 8px; min-height: 64px; }
  .cat-circle-icon { font-size: 1.3rem; }
  .cat-circle-label { font-size: .70rem; }
}

/* =========================================================
   LAYOUT
   ========================================================= */
.page-wrap { max-width: 1200px; margin: 0 auto; padding: 24px; }
.layout-2col {
  display: grid; grid-template-columns: 210px 1fr; gap: 24px; align-items: start;
}
.sidebar {
  display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 82px;
}
.sidebar-box {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-xs);
}
.sidebar-title {
  font-size: .68rem; font-weight: 800; color: var(--pink-lt);
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px;
}
.city-list { display: flex; flex-direction: column; gap: 1px; }
.city-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border-radius: var(--r-sm);
  font-size: .84rem; color: var(--text-3);
  cursor: pointer; transition: all .15s; border-right: 3px solid transparent;
  text-decoration: none;
}
.city-item:hover { background: var(--pink-bg2); color: var(--pink); }
.city-item.active {
  background: var(--pink-bg2); color: var(--pink);
  font-weight: 700; border-right-color: var(--pink);
}
.city-count {
  font-size: .68rem; background: #f0f0f0; color: var(--text-4);
  padding: 2px 7px; border-radius: 20px;
}
.city-item.active .city-count { background: rgba(200,60,110,.12); color: var(--pink); }

/* =========================================================
   TOOLBAR
   ========================================================= */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; flex-wrap: wrap; gap: 10px;
}
.toolbar-count { font-size: .85rem; color: var(--text-3); }
.toolbar-count b { color: var(--text-2); font-weight: 700; }
.sort-select {
  padding: 8px 32px 8px 12px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-size: .83rem; font-family: 'Tajawal', sans-serif;
  color: var(--text-2); background: var(--white);
  outline: none; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23b8b8c0' fill='none' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 10px center;
}

/* =========================================================
   ADS GRID
   ========================================================= */
.ads-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 14px;
}
.ad-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
  display: block; text-decoration: none; color: inherit;
  will-change: transform;
}
.ad-card:hover {
  border-color: var(--pink-lt);
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}
.ad-card-img {
  aspect-ratio: 1; position: relative;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.2rem; overflow: hidden;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.ad-card:hover .ad-card-img { transform: scale(1.04); }

.ad-badge {
  position: absolute; top: 9px; right: 9px;
  padding: 3px 10px; border-radius: var(--r-full);
  font-size: .62rem; font-weight: 800; z-index: 1;
  letter-spacing: .02em;
}
.badge-new  { background: var(--grad); color: #fff; }
.badge-sale { background: linear-gradient(135deg,#e07b28,#c96020); color: #fff; }
.badge-feat { background: linear-gradient(135deg,#f5c842,#e8a020); color: #fff; }

.ad-fav {
  position: absolute; top: 9px; left: 9px; z-index: 1;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.92); backdrop-filter: blur(6px);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; box-shadow: 0 2px 8px rgba(0,0,0,.10);
  transition: transform var(--trans);
}
.ad-fav:hover { transform: scale(1.18); }

.ad-card-body { padding: 11px 13px 13px; }
.ad-cat  { font-size: .64rem; font-weight: 800; color: var(--pink-lt); margin-bottom: 3px; }
.ad-name {
  font-size: .88rem; font-weight: 700; line-height: 1.42; margin-bottom: 7px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ad-store-row {
  display: flex; align-items: center; gap: 5px;
  font-size: .73rem; color: var(--text-3); margin-bottom: 8px;
}
.ad-footer { display: flex; align-items: center; justify-content: space-between; }
.ad-price {
  font-size: 1rem; font-weight: 900;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.ad-city { font-size: .70rem; color: var(--text-4); }

/* =========================================================
   AD SINGLE
   ========================================================= */
.ad-single-wrap {
  max-width: 1200px; margin: 0 auto; padding: 20px 24px 60px;
  display: grid; grid-template-columns: 1fr 390px; gap: 32px; align-items: start;
}
.ad-gallery-sticky { position: sticky; top: 82px; }
.ad-main-img {
  border-radius: var(--r-xl); aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 7rem; margin-bottom: 12px;
  box-shadow: var(--shadow-lg); overflow: hidden; transition: all .3s;
}
.ad-thumbs { display: flex; gap: 8px; }
.ad-thumb {
  flex: 1; aspect-ratio: 1; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; cursor: pointer; border: 2.5px solid transparent;
  opacity: .55; transition: all var(--trans);
}
.ad-thumb.active { border-color: var(--pink); opacity: 1; }
.ad-thumb:hover  { opacity: 1; }
.ad-info-stack   { display: flex; flex-direction: column; gap: 14px; }
.ad-info-box {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-xs);
}
.ad-price-large {
  font-size: 2.2rem; font-weight: 900;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.ad-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.ad-price-old { font-size: 1rem; color: var(--text-4); text-decoration: line-through; }
.ad-discount-badge {
  background: linear-gradient(135deg,#e07b28,#c96020); color: #fff;
  padding: 3px 10px; border-radius: var(--r-full); font-size: .68rem; font-weight: 800;
}
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-chip { background: var(--pink-bg); border-radius: var(--r-sm); padding: 10px 14px; }
.detail-chip-lbl { font-size: .62rem; color: var(--text-4); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 3px; }
.detail-chip-val { font-size: .88rem; font-weight: 700; }

/* store mini in single ad */
.store-mini {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-xs);
}
.store-mini-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.store-mini-ava {
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--grad-pink); display: flex; align-items: center;
  justify-content: center; font-size: 1.5rem; flex-shrink: 0;
  border: 2px solid var(--pink-xl);
}
.store-mini-stats {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 1px; background: var(--border); border-radius: var(--r-sm);
  overflow: hidden; margin-bottom: 14px;
}
.store-mini-stat { background: var(--white); padding: 10px; text-align: center; }
.store-mini-stat-n { font-size: .95rem; font-weight: 900; color: var(--pink); }
.store-mini-stat-l { font-size: .62rem; color: var(--text-4); margin-top: 2px; }

/* =========================================================
   STORE PROFILE PAGE
   ========================================================= */
.store-cover {
  height: 190px;
  background: var(--grad);
  position: relative; overflow: hidden;
}

.store-page-wrap {
  max-width: 1000px; margin: 0 auto; padding: 0 24px 50px;
}

/* Profile Card — يخرج فوق الكفر */
.store-profile-header {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 20px 24px 18px;
  margin-top: -56px; /* يتداخل مع الكفر */
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  position: relative; /* فوق الكفر */
  z-index: 10;
}

.store-avatar-ring {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--grad);
  padding: 3px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
  margin-top: -32px; /* يطلع فوق الكارد نفسه */
}
.store-avatar-inner {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--grad-pink);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem; border: 3px solid #fff;
}

.store-profile-body { flex: 1; min-width: 0; }
.store-profile-row1 {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; flex-wrap: wrap; margin-bottom: 10px;
}
.store-name { font-size: 1.2rem; font-weight: 900; margin-bottom: 3px; line-height: 1.3; }
.store-handle { font-size: .78rem; color: var(--pink); font-weight: 600; }

.store-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }

.store-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.store-chip {
  background: var(--pink-bg2); color: var(--text-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-full); padding: 4px 12px;
  font-size: .76rem; font-weight: 600;
}

/* Stats Bar */
.store-page-stats {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 1px; background: var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  border: 1.5px solid var(--border);
  margin-bottom: 4px;
  box-shadow: var(--shadow-xs);
}
.store-page-stat { background: var(--white); padding: 16px; text-align: center; }
.store-page-stat-n { font-size: 1.3rem; font-weight: 900; color: var(--pink); display: block; }
.store-page-stat-l { font-size: .65rem; color: var(--text-4); margin-top: 3px; display: block; }

/* =========================================================
   AUTH PAGE
   ========================================================= */
.auth-page {
  min-height: 80vh; display: flex; align-items: center;
  justify-content: center; padding: 40px 20px;
}
.auth-box-wrap { width: 100%; max-width: 450px; }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo-text {
  font-size: 2.1rem; font-weight: 900;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.auth-logo-sub { font-size: .80rem; color: var(--text-4); margin-top: 5px; }
.auth-tabs-switch {
  display: flex; background: var(--pink-bg2); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 5px; margin-bottom: 18px; gap: 4px;
}
.auth-tab-btn {
  flex: 1; text-align: center; padding: 10px;
  border-radius: var(--r-sm); font-size: .90rem; font-weight: 700;
  color: var(--text-4); cursor: pointer; transition: all var(--trans);
  border: none; background: transparent; font-family: 'Tajawal', sans-serif;
}
.auth-tab-btn.active {
  background: var(--grad); color: #fff;
  box-shadow: 0 3px 12px rgba(200,60,110,.25);
}
.auth-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--r-xl); padding: 30px; box-shadow: var(--shadow);
}
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-footer-link { text-align: center; margin-top: 16px; font-size: .85rem; color: var(--text-3); }
.auth-footer-link a { color: var(--pink); font-weight: 700; }

/* =========================================================
   MY ACCOUNT
   ========================================================= */
.account-header {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--r-xl); padding: 22px 24px;
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 20px; box-shadow: var(--shadow-xs); flex-wrap: wrap;
}
.account-ava {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--grad); display: flex; align-items: center;
  justify-content: center; font-size: 2rem; flex-shrink: 0;
  border: 3px solid var(--pink-xl);
}
.account-name { font-size: 1.1rem; font-weight: 900; margin-bottom: 3px; }
.account-handle { font-size: .80rem; color: var(--pink); font-weight: 700; }
.account-stats { display: flex; gap: 22px; margin-right: auto; }
.account-stat-n { font-size: 1.3rem; font-weight: 900; color: var(--pink); display: block; }
.account-stat-l { font-size: .68rem; color: var(--text-4); }

.account-tabs {
  display: flex; border-bottom: 2px solid var(--border);
  margin-bottom: 22px; gap: 2px;
}
.account-tab {
  padding: 10px 22px; font-size: .88rem; font-weight: 600;
  color: var(--text-3); cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: all var(--trans); text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.account-tab:hover, .account-tab.active { color: var(--pink); border-bottom-color: var(--pink); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.my-ad-row {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 14px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 10px; transition: all var(--trans);
}
.my-ad-row:hover { border-color: var(--pink-lt); box-shadow: var(--shadow-sm); }
.my-ad-thumb {
  width: 58px; height: 58px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; flex-shrink: 0;
}
.my-ad-info { flex: 1; min-width: 0; }
.my-ad-title {
  font-weight: 700; font-size: .90rem; margin-bottom: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.my-ad-meta { font-size: .74rem; color: var(--text-3); display: flex; gap: 12px; flex-wrap: wrap; }
.my-ad-actions { display: flex; gap: 6px; flex-shrink: 0; }

.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--r-full); font-size: .69rem; font-weight: 700;
}
.status-publish { background: #e8fff2; color: #1a7a40; }
.status-pending { background: var(--pink-bg2); color: var(--pink); }
.status-draft   { background: #fff8e0; color: #7a5500; }

/* =========================================================
   ADD AD
   ========================================================= */
.add-ad-wrap { max-width: 700px; margin: 0 auto; }
.add-ad-section {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--r-xl); padding: 24px; margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}
.add-ad-section-title {
  font-size: .72rem; font-weight: 800; color: var(--pink-lt);
  letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.bg-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.bg-option { cursor: pointer; text-align: center; }
.bg-option input[type="radio"] { display: none; }
.bg-swatch {
  width: 52px; height: 52px; border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--border); transition: all var(--trans); font-size: .9rem;
}
.bg-option input:checked + .bg-swatch {
  border-color: var(--pink); box-shadow: 0 0 0 3px rgba(200,60,110,.2);
  transform: scale(1.06);
}
.bg-swatch-label { font-size: .62rem; color: var(--text-4); margin-top: 4px; }
.preview-card {
  border-radius: var(--r-lg); padding: 24px; text-align: center;
  border: 2px dashed var(--border); transition: background .3s;
}
.preview-emoji { font-size: 4rem; margin-bottom: 8px; }

/* =========================================================
   MESSAGES
   ========================================================= */
.messages-layout {
  display: grid; grid-template-columns: 290px 1fr;
  height: 620px; background: var(--white);
  border: 1.5px solid var(--border); border-radius: var(--r-xl);
  overflow: hidden; box-shadow: var(--shadow);
}
.threads-sidebar { border-left: 1.5px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.threads-header { padding: 16px 18px; border-bottom: 1px solid var(--border); font-size: .70rem; font-weight: 800; color: var(--pink-lt); letter-spacing: .12em; flex-shrink: 0; }
.thread-list { flex: 1; overflow-y: auto; }
.chat-thread {
  display: flex; gap: 10px; padding: 13px 16px;
  border-bottom: 1px solid var(--pink-bg2);
  cursor: pointer; transition: background .15s;
  border-right: 3px solid transparent;
  text-decoration: none; color: inherit;
}
.chat-thread:hover  { background: var(--pink-bg2); }
.chat-thread.active { background: var(--pink-bg2); border-right-color: var(--pink); }
.thread-ava {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--grad-pink); display: flex; align-items: center;
  justify-content: center; font-size: 1.2rem; flex-shrink: 0;
}
.thread-name    { font-size: .86rem; font-weight: 700; margin-bottom: 2px; }
.thread-preview { font-size: .73rem; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-area { display: flex; flex-direction: column; overflow: hidden; }
.chat-header { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.chat-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.bubble-wrap { display: flex; }
.bubble-wrap.mine   { justify-content: flex-start; }
.bubble-wrap.theirs { justify-content: flex-end; }
.bubble {
  max-width: 68%; padding: 10px 15px; border-radius: 16px;
  font-size: .88rem; line-height: 1.55;
}
.bubble.mine   { background: var(--grad); color: #fff; border-radius: 4px 16px 16px 16px; }
.bubble.theirs { background: #f2f2f5; color: #333; border-radius: 16px 4px 16px 16px; }
.bubble-time   { font-size: .62rem; opacity: .55; margin-top: 4px; display: block; }
.chat-footer   { padding: 14px 18px; border-top: 1.5px solid var(--border); flex-shrink: 0; }
.chat-input-row { display: flex; gap: 10px; }
.chat-input {
  flex: 1; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--r);
  font-size: .88rem; resize: none; outline: none;
  transition: border-color var(--trans);
}
.chat-input:focus { border-color: var(--pink); }
.chat-send {
  background: var(--grad); color: #fff; border: none;
  border-radius: var(--r); padding: 0 20px; font-size: 1.2rem;
  cursor: pointer; transition: all var(--trans);
}
.chat-send:hover { transform: scale(1.06); }

/* =========================================================
   BREADCRUMB
   ========================================================= */
.breadcrumb {
  max-width: 1200px; margin: 0 auto; padding: 12px 24px 0;
  font-size: .80rem; color: var(--text-4);
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-4); transition: color .15s; }
.breadcrumb a:hover { color: var(--pink); }
.breadcrumb-sep { color: var(--border); }
.breadcrumb-current { color: var(--pink-lt); font-weight: 600; }

/* =========================================================
   PAGINATION
   ========================================================= */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 36px; flex-wrap: wrap; }
.page-numbers {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  border: 1.5px solid var(--border); background: var(--white);
  color: var(--text-2); font-size: .86rem;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; transition: all var(--trans);
}
.page-numbers:hover, .page-numbers.current {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 3px 10px rgba(200,60,110,.28);
}

/* =========================================================
   EMPTY STATE / SPINNER
   ========================================================= */
.empty-state { grid-column: 1/-1; text-align: center; padding: 60px 20px; }
.empty-state-icon { font-size: 3.5rem; opacity: .22; margin-bottom: 14px; }
.empty-state-text { font-size: .92rem; color: var(--text-3); margin-bottom: 22px; }
.spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--pink);
  animation: spin .7s linear infinite; margin: 30px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  border-top: 1.5px solid var(--border); background: var(--white);
  padding: 22px 24px; text-align: center; margin-top: 60px;
}
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 10px; flex-wrap: wrap; }
.footer-links a { font-size: .78rem; color: var(--text-4); transition: color .15s; }
.footer-links a:hover { color: var(--pink); }
.footer-copy { font-size: .72rem; color: var(--border); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .ad-single-wrap { grid-template-columns: 1fr; }
  .ad-gallery-sticky { position: static; }
}
@media (max-width: 900px) {
  .layout-2col { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .ads-grid { grid-template-columns: repeat(2,1fr); }
  .messages-layout { grid-template-columns: 1fr; }
  .threads-sidebar { display: none; }
  .store-profile-header { flex-direction: column; align-items: flex-start; }
  .store-avatar-ring { margin-top: -44px; }
}
@media (max-width: 600px) {
  .navbar { padding: 0 16px; gap: 8px; }
  .navbar-search { max-width: 150px; }
  .ads-grid { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .page-wrap { padding: 16px; }
  .auth-card { padding: 22px 18px; }
  .add-ad-section { padding: 18px; }
  .account-header { padding: 16px; }
  .store-page-wrap { padding: 0 16px 40px; }
  .store-profile-header { padding: 16px; }
}

/* =========================================================
   ACCOUNT & STORE PROFILE CARD — مشترك
   ========================================================= */
.account-page-wrap,
.store-page-wrap {
  max-width: 680px !important;
  margin: 0 auto;
  padding: 24px 20px 60px;
}
.account-profile-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 20px;
}
.account-cover {
  height: 88px;
  background: var(--grad);
}
.account-back-btn {
  position: absolute; top: 14px; right: 16px;
  background: rgba(255,255,255,.22); color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 20px; padding: 4px 14px;
  font-size: .78rem; font-weight: 700;
  text-decoration: none; backdrop-filter: blur(4px);
  transition: background .2s; z-index: 2;
}
.account-back-btn:hover { background: rgba(255,255,255,.38); }
.account-profile-card { position: relative; }
.account-ava-wrap {
  display: flex; justify-content: center;
  margin-top: -36px; margin-bottom: 8px;
}
.account-ava-circle {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--white);
  box-shadow: 0 2px 14px rgba(166,48,92,.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
}
.account-profile-info {
  text-align: center;
  padding: 0 20px 14px;
}
.account-profile-name {
  font-size: 1.08rem; font-weight: 900;
  margin: 0 0 4px; line-height: 1.3;
  display: flex; align-items: center;
  justify-content: center; gap: 6px; flex-wrap: wrap;
}
.account-profile-city {
  font-size: .78rem; color: var(--text-3); margin-bottom: 10px;
}
.account-store-url-row {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--pink-bg);
  border: 1.5px solid var(--border);
  border-radius: 24px; padding: 5px 12px 5px 10px;
  margin-bottom: 4px;
}
.account-store-url-icon { font-size: .85rem; line-height: 1; }
.account-store-url-text {
  font-size: .79rem; font-weight: 700; color: var(--pink);
  text-decoration: none; direction: ltr; letter-spacing: .01em;
  max-width: 240px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.account-store-url-text:hover { text-decoration: underline; }
.account-copy-btn {
  background: none; border: none; cursor: pointer;
  font-size: 1rem; color: var(--text-3);
  padding: 0; line-height: 1; transition: color .15s;
}
.account-copy-btn:hover { color: var(--pink); }

/* إحصائيات */
.account-stats-row {
  display: flex; align-items: stretch;
  border-top: 1.5px solid var(--border);
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 16px;
}
.account-stat-box {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; padding: 14px 8px;
}
.account-stat-n {
  font-size: 1.15rem; font-weight: 900; color: var(--text-1);
  line-height: 1;
}
.account-stat-l { font-size: .68rem; color: var(--text-3); }
.account-stat-sep { width: 1px; background: var(--border); align-self: stretch; }

/* أزرار الإجراءات */
.account-action-btns {
  display: flex; gap: 8px; justify-content: center;
  padding: 0 20px 18px; flex-wrap: wrap;
}
.account-action-btns .btn {
  min-width: 96px;
}

/* Account Tabs */
.account-tabs {
  display: flex; gap: 4px;
  background: var(--pink-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 6px;
  margin-bottom: 20px;
}
.account-tab {
  flex: 1; text-align: center; font-size: .78rem;
  font-weight: 700; color: var(--text-3);
  padding: 8px 6px; border-radius: calc(var(--r) - 4px);
  text-decoration: none; transition: all .18s;
  white-space: nowrap;
}
.account-tab:hover { color: var(--pink); background: var(--white); }
.account-tab.active {
  background: var(--white); color: var(--pink);
  box-shadow: 0 1px 6px rgba(166,48,92,.10);
}

@media (max-width: 600px) {
  .account-page-wrap, .store-page-wrap { padding: 16px 14px 50px; }
  .account-action-btns .btn { min-width: 80px; font-size: .75rem; }
  .account-tabs { gap: 2px; }
  .account-tab { font-size: .70rem; padding: 7px 4px; }
}

/* =========================================================
   RATING WIDGET — تقييم المتجر
   ========================================================= */
.rating-widget {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 16px 20px;
  margin-bottom: 20px;
  text-align: center;
}
.rating-widget-label {
  font-size: .80rem; font-weight: 700;
  color: var(--text-2); margin-bottom: 10px;
}
.rating-stars-input {
  display: flex; justify-content: center;
  gap: 6px; direction: ltr;
}
.star-btn {
  background: none; border: none; cursor: pointer;
  font-size: 2rem; line-height: 1; color: #ddd;
  transition: color .15s, transform .1s;
  padding: 2px;
}
.star-btn.selected,
.star-btn.hover { color: #f5a623; transform: scale(1.15); }

/* نجوم العرض */
.stars-display .star { color: #ddd; }
.stars-display .star.full,
.stars-display .star.half { color: #f5a623; }

/* =========================================================
   COMMENTS — تعليقات الإعلانات
   ========================================================= */
.comments-wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px 60px;
}
.comments-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.comments-head-title {
  font-size: .95rem; font-weight: 900; color: var(--text-1);
}
.comments-head-count {
  background: var(--pink); color: #fff;
  font-size: .62rem; font-weight: 800;
  padding: 2px 9px; border-radius: 12px; line-height: 1.6;
}

/* ── Composer ── */
.comment-composer {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 14px; margin-bottom: 14px;
}
.comment-composer-ava {
  flex-shrink: 0; width: 36px; height: 36px;
  border-radius: 50%; background: var(--pink-bg);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin-top: 2px;
}
.comment-composer-right { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.comment-composer-right textarea {
  width: 100%; border: 1.5px solid var(--border);
  border-radius: var(--r-sm); padding: 10px 12px;
  font-size: .85rem; font-family: inherit;
  resize: none; min-height: 70px; outline: none;
  transition: border-color .2s; direction: rtl;
  background: var(--pink-bg);
}
.comment-composer-right textarea:focus {
  border-color: var(--pink-lt);
  background: var(--white);
}
.comment-composer-footer {
  display: flex; align-items: center;
  justify-content: space-between;
}
.comment-composer-hint {
  font-size: .70rem; color: var(--text-4);
}

/* login bar */
.comment-login-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 14px 16px;
  font-size: .84rem; color: var(--text-3);
  margin-bottom: 14px;
}

/* ── قائمة التعليقات ── */
.comments-list {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.comments-empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; padding: 36px 20px;
  color: var(--text-4); font-size: .85rem;
}

/* تعليق واحد */
.comment-row {
  display: flex; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.comment-row:last-child { border-bottom: none; }
.comment-row:hover { background: var(--pink-bg); }
.comment-row-ava {
  flex-shrink: 0; width: 36px; height: 36px;
  border-radius: 50%; background: var(--pink-bg);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; text-decoration: none;
}
.comment-row-ava a { text-decoration: none; }
.comment-row-body { flex: 1; min-width: 0; }
.comment-row-header {
  display: flex; align-items: center;
  gap: 6px; flex-wrap: wrap; margin-bottom: 4px;
}
.comment-row-name {
  font-weight: 800; font-size: .82rem; color: var(--text-1);
  text-decoration: none;
}
a.comment-row-name { color: var(--pink); }
a.comment-row-name:hover { text-decoration: underline; }
.comment-owner-tag {
  background: var(--grad); color: #fff;
  font-size: .58rem; font-weight: 800;
  padding: 2px 7px; border-radius: 10px;
}
.comment-row-time {
  font-size: .70rem; color: var(--text-4);
  margin-right: auto;
}
.comment-row-del {
  background: none; border: none; cursor: pointer;
  color: var(--text-4); font-size: .72rem;
  padding: 2px 4px; border-radius: 4px;
  transition: all .15s; line-height: 1;
}
.comment-row-del:hover { color: #c0392b; background: #fff0f0; }
.comment-row-text {
  font-size: .84rem; color: var(--text-2); line-height: 1.6;
}

@media (max-width:600px) {
  .comments-wrap { padding: 0 14px 50px; }
  .comment-composer { padding: 10px; }
  .comment-login-bar { flex-direction: column; gap: 10px; text-align: center; }
}

/* ── H-AD aliases (index.php new design) ── */
.h-ad { }
.h-ad-fav { }
.h-ad-fav.liked { }
/* الكلاسات الجديدة في index.php لها CSS خاص بها في الصفحة
   لكن نضمن mlamhToggleFav يعمل على h-ad-fav */

