/* =========================================================
   BASE: BODY & GLOBAL
========================================================= */
html, body {
  overflow-x: hidden !important;
  max-width: 100% !important;
  font-family: 'Almarai', sans-serif;
  background: #f8f8fc;
  margin: 0;
  color: #222240;
  direction: rtl;
  padding-bottom: 70px;
  min-height: 100vh;
}

/* عناصر الإدخال */
input, select, textarea, button {
  font-family: inherit;
  box-sizing: border-box;
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

/* إخفاء التحديد الأزرق لكل العناصر القابلة للنقر */
button,
input[type="button"],
input[type="submit"],
a,
.side-menu-btn,
.login-btn {
  -webkit-tap-highlight-color: transparent;
  outline: none !important;
  box-shadow: none !important;
}

/* =========================================================
   SIDE NAV
========================================================= */

.side-nav { display: none; }

@media (min-width: 900px) {
  .side-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: #fff;
    border-right: 1px solid #f3f3fa;
    min-width: 95px;
    max-width: 130px;
    min-height: 100vh;
    padding: 24px 10px 24px 0;
    position: fixed;
    right: 0; top: 0;
    z-index: 1100;
    box-shadow: 0 0 14px #eee5ff3a;
  }

  .side-nav a {
    color: #afafaf;
    text-decoration: none;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    padding: 7px 8px 7px 0;
    border-radius: 12px 0 0 12px;
    transition: .2s;
  }

  .side-nav .nav-icon {
    width: 24px; height: 24px;
    margin-left: 8px;
    filter: grayscale(70%) brightness(1.08);
    transition: .2s;
  }

  .side-nav a.active,
  .side-nav a:hover {
    color: #9e67ff;
    background: #f5f0ff;
  }

  .side-nav a.active .nav-icon,
  .side-nav a:hover .nav-icon {
    filter: grayscale(0%) brightness(1.15);
  }
}

@media (min-width: 901px) { .bottom-nav { display: none !important; } }
@media (max-width: 901px) {
  .side-nav { display: none !important; }
  .bottom-nav { display: flex; }
}

/* =========================================================
   USER PROFILE SECTION
========================================================= */
.user-profile-section {
  background: linear-gradient(180deg,#ffffffa8 0%,#f3f0ffcf 100%);
  border-radius: 28px;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 28px rgba(110,61,233,0.07);
  max-width: 950px;
  margin: 34px auto;
  padding: 26px 22px 34px;
}

/* =========================================================
   BANNER
========================================================= */
.user-banner.user-banner-slider {
  width: 100%;
  max-width: 700px;
  border-radius: 18px;
  overflow: hidden;
  margin: 25px auto 0;
}

.user-banner.user-banner-slider img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(110,61,233,0.1);
  transition: opacity .4s;
}

@media(max-width:600px) {
  .user-banner.user-banner-slider img { height: 180px; }
}

/* =========================================================
   IOS SEARCH BAR
========================================================= */
.ios-search-wrap {
  max-width: 700px;
  margin: 28px auto 18px;
  padding: 0 12px;
}

.ios-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: #f1f2f6;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.ios-search-input {
  border: none;
  flex: 1;
  background: transparent;
  font-size: 15px;
  color: #222240;
}

.ios-search-input:focus { outline: none; }

@media(max-width:600px) {
  .ios-search-wrap { margin-top: 18px; margin-bottom: 12px; }
  .ios-search-field { padding: 8px 10px; }
  .ios-search-input { font-size: 14px; }
}

/* =========================================================
   CARDS GRID
========================================================= */
.cards-container-unite {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 28px;
  padding: 40px 12px;
  max-width: 1440px;
  margin: auto;
}

@media(max-width:1100px){ .cards-container-unite{grid-template-columns:repeat(3,1fr);} }
@media(max-width:900px){ .cards-container-unite{grid-template-columns:repeat(2,1fr);} }
@media(max-width:600px){
  .cards-container-unite{
    grid-template-columns:1fr;
    padding:20px 6px 80px;
    gap:14px;
  }
}

/* =========================================================
   CARD
========================================================= */
.custom-card {
  background:#fff;
  border-radius:28px;
  width:100%;
  max-width:400px;
  min-width:300px;
  min-height:260px;
  display:flex;
  flex-direction:column;
  position:relative;
  transition:.18s ease-out;
}

.custom-card:hover {
  box-shadow:0 13px 42px #b6a6ea36,0 2px 15px #ede1ff42;
  transform:translateY(-2px);
}

/* HEADER */
.custom-card-header-line { display:none; }

/* =========================================
   CARD IMG
========================================= */
.custom-card-img {
  width:100%;
  height:200px;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(90deg,#faf8fc 70%,#f5efff 100%);
  border-bottom:1px solid #f1ebff;
  border-radius:18px;
}

.custom-card-img img {
  width:100%; height:100%;
  object-fit:cover;
  border-radius:18px;
  transition:transform .28s;
}
.custom-card:hover .custom-card-img img { transform:scale(1.04); }

/* STATUS */
.custom-status-row {
  position:absolute;
  top:0; left:0;
  width:100%;
  display:flex;
  justify-content:flex-end;
}

.custom-badge {
  padding:7px 30px;
  border-radius:15px 0 15px 0;
  background:#5c999c;
  color:#fff;
  font-weight:bold;
}

.custom-badge.sold { background:#b42f2f !important; }
.custom-badge.reserved { background:#ae8fe4 !important; }

/* FAVORITE */
.custom-fav-btn {
  position:absolute;
  right:15px;
  top:15px;
  background:#fff;
  color:#daa620;
  border-radius:50%;
  padding:7px;
  font-size:22px;
  border:1.5px solid #ede8f7;
  cursor:pointer;
  display:flex;
  box-shadow:0 1px 8px #f7efe242;
  transition:background .13s,color .13s;
}
.custom-fav-btn.active,
.custom-fav-btn:hover {
  background:#fff8da;
  color:#e5b700;
}

/* CITY DESKTOP */
.custom-city-desktop {
  position:absolute;
  left:50%; bottom:-16px;
  transform:translateX(-50%);
  background:#fff;
  padding:5px 18px;
  border-radius:12px;
  color:#8658e0e9;
  font-weight:700;
  box-shadow:0 4px 12px rgba(0,0,0,0.06);
}
@media(max-width:600px){ .custom-city-desktop{display:none;} }

/* CITY MOBILE */
.custom-city-mobile {
  font-size:13px;
  font-weight:700;
  color:#6a4cc3;
  margin-bottom:6px;
}
@media(min-width:601px){ .custom-city-mobile{display:none;} }

/* BODY */
.custom-card-body {
  flex:1;
  padding:30px 15px 10px;
  display:flex;
  flex-direction:column;
  gap:20px;
  position:relative;
}

.custom-card-row {
  display:flex;
  justify-content:space-between;
  align-items:center;
}

/* UNIT TYPE */
.custom-unit-type {
  background:#f5f3fa;
  padding:6px 14px;
  border-radius:8px;
  font-size:15px;
  font-weight:700;
  color:#232343;
}

/* PRICE */
.custom-price {
  font-size:24px;
  font-weight:bold;
  color:#5c999c;
  display:flex;
  align-items:center;
}
.sar-sign-img { width:20px; margin-right:4px; }

/* INFO */
.custom-card-info-row {
  display:flex;
  justify-content:space-between;
  gap:10px;
}

.custom-card-icon-info {
  background:#f7f4fa;
  padding:4px 7px;
  border-radius:10px;
  font-size:12px;
  color:#978cbd;
  display:flex;
  flex-direction:column;
  align-items:center;
}
.custom-card-icon-info .material-symbols-rounded {
  font-size:20px;
  color:#8658e0;
}

/* DETAILS */
.custom-card-details {
  font-size:14px;
  color:#555;
  max-height:55px;
  overflow:hidden;
  line-height:1.7;
}

/* ACTIONS */
.custom-card-actions-flex {
  position:absolute;
  bottom:22px;
  left:0; right:0;
  padding:0 12px;
  display:flex;
  justify-content:space-between;
} justify-content:space-between;
}

.custom-card-specs {
  background:#6a4cc3;
  color:#fff;
  padding:8px 18px;
  border-radius:12px;
  font-size:14px;
  font-weight:600;
  text-decoration:none;
  display:flex;
  align-items:center;
  gap:6px;
}
.custom-card-specs:hover { background:#5b3bb5; }

.custom-copy {
  background:#ece6ff;
  color: #8658e0;
  padding:8px 12px;
  border-radius:12px;
  display:flex;
  align-items:center;
  gap:5px;
  cursor:pointer;
  transition:.25s;
}
.custom-copy:hover { background:#ddd4ff; }

/* =========================================================
   MOBILE CARD
========================================================= */
@media(max-width:600px) {

  .custom-card {
    width:100% !important;
    max-width:95% !important;
    display:grid;
    grid-template-columns:42% 1fr;
    grid-template-rows:auto auto 1fr auto;
    gap:10px;
    padding:10px;
    border-radius:22px;
    box-shadow:0 6px 16px #e8e0ff88;
  }

  .custom-card-header-line {
    display:flex;
    flex-direction:column;
    gap:6px;
    color:#6a4cc3;
    grid-column:2;
  }

  .custom-card-img {
    grid-column:1;
    grid-row:1/5;
    height:140px;
    border-radius:18px;
  }

  .custom-card-body {
    grid-column:2;
    grid-row:2/5;
    padding:0;
    gap:12px;
    position:static;
  }

  .custom-card-icon-info { font-size:10px; padding:4px; }

  .custom-card-details { font-size:11px; line-height:1.4; }

  .custom-unit-type {
    font-size:13px;
    padding:4px 10px;
    background:#ece6ff;
    color:#6a4cc3;
  }

  .custom-price { font-size:19px; }
  .sar-sign-img { width:17px; }
}

  .custom-card-actions-flex {
    position: static !important;
    margin-top: 8px !important;
    padding: 0 !important;
  }

  .custom-card {
    min-height: 140px !important;
  }


/* =========================================================
   SECTION TABS
========================================================= */
.section-tabs-wrap {
  display:flex;
  justify-content:center;
  min-height:32vh;
}

.section-tab-btn {
  background:#ede7fa;
  color:#7a51e0;
  border-radius:11px;
  padding:10px 32px;
  font-size:17px;
  font-weight:bold;
  box-shadow:0 1px 8px #ede1ff44;
  transition:.13s;
}
.section-tab-btn:hover,
.section-tab-btn.active {
  background:#8e53ee;
  color:#fff;
}

@media(max-width:600px){
  .section-tabs{flex-direction:column; gap:10px;}
  .section-tab-btn{ width:70vw; padding:10px 0; }
}

/* =========================================================
   PAGINATION
========================================================= */
.custom-pagination-bar {
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
}

.pagination-btn {
  background:#f4f3fd;
  border:1px solid #ece8ff;
  padding:6px 14px;
  border-radius:16px;
  color:#4930c4;
}
.pagination-btn:disabled { opacity:.6; }

/* =========================================================
   LOADER (Circle rotates – logo static)
========================================================= */

.app-loader {
  position: fixed;
  inset: 0;
  background: #f8f8fc;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

/* الحاوية */
.app-loader-inner {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items:center;
  justify-content:center;
}

/* الدائرة الدوّارة فقط */
.app-loader-spinner {
  width: 80px;
  height: 80px;
  border: 5px solid #eee;
  border-top: 5px solid #9d80f6;
  border-radius: 50%;
  animation: spin 1.05s linear infinite;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  margin: auto;
}

/* الشعار — ثابت في المنتصف */
.app-loader-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  position: relative;
  z-index: 3;
}

/* الدوران */
@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* =========================================================
   البحث
========================================================= */
.pagination-input-wrap input[type="number"] {
  width: 55px;
  height: 38px;
  border: 1px solid #dcd4ff;
  border-radius: 12px;
  padding: 0 8px;
  font-size: 15px;
  text-align: center;
  color: #4a449b;
  background: #fcfbff;
  transition: 0.25s;
}

.pagination-input-wrap input[type="number"]:focus {
  border-color: #9a75ff;
  box-shadow: 0 0 6px #c5b4ff;
  outline: none;
}


/* زر المواصفات */
.custom-card-specs {
  background:#6a4cc3;
  color:#fff;
  padding:8px 18px;
  border-radius:12px;
  font-size:14px;
  font-weight:600;
  text-decoration:none;
  display:flex;
  align-items:center;
  gap:6px;
  transition:.25s;
}

.custom-card-specs:hover {
  background:#5b3bb5;
}


/* زر المفضلة */
.custom-fav-btn {
  position:absolute;
  right:15px;
  top:15px;
  background:#fff;
  color:#daa620;
  border-radius:50%;
  padding:7px;
  font-size:22px;
  border:1.5px solid #ede8f7;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 1px 8px #f7efe242;
  transition:background .13s, color .13s;
}

.custom-fav-btn.active,
.custom-fav-btn:hover {
  background:#fff8da;
  color:#e5b700;
}
