/* =========================
   FAVORITES PAGE
   يعتمد على app-ios-2026.css
========================= */

:root {
  --fav-accent: #19bc95;
  --fav-accent-soft: rgba(25, 188, 149, 0.12);
  --fav-border-strong: rgba(2, 52, 58, 0.08);
  --fav-chip-bg: rgba(232, 242, 239, 0.72);
  --fav-empty-bg: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,251,.96));
}

/* =========================
   PAGE
========================= */
.favorites-main {
  padding-bottom: 90px;
}

@media (max-width: 480px) {
  .favorites-main {
    padding-bottom: 84px;
  }
}

/* =========================
   HERO
========================= */
.favorites-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 24px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(25,188,149,.14), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.84));
  border: 1px solid rgba(255,255,255,.58);
  box-shadow:
    0 14px 36px rgba(2, 52, 58, 0.08),
    inset 0 1px 0 rgba(255,255,255,.55);
}

.favorites-hero::before {
  content: "";
  position: absolute;
  top: -55px;
  left: -55px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(25,188,149,.14), transparent 70%);
  pointer-events: none;
}

.favorites-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.favorites-hero-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 250px;
}

.favorites-icon-wrap {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--primary), var(--fav-accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(2, 52, 58, 0.14);
  flex-shrink: 0;
}

.favorites-icon-wrap .material-symbols-rounded {
  font-size: 30px;
}

.favorites-hero-text h1 {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 27px;
  font-weight: 900;
  line-height: 1.3;
}

.favorites-hero-text p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.favorites-hero-left {
  display: flex;
  align-items: center;
}

.favorites-stat-box {
  min-width: 132px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 20px;
  padding: 14px 18px;
  text-align: center;
  box-shadow: 0 8px 18px rgba(2,52,58,.06);
}

.favorites-stat-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
}

.favorites-stat-box strong {
  font-size: 28px;
  color: var(--primary);
  font-weight: 900;
  line-height: 1;
}

/* =========================
   TOOLBAR
========================= */
.favorites-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 0 4px;
}

.favorites-toolbar-right h2 {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 20px;
  font-weight: 900;
}

.favorites-toolbar-right span {
  color: var(--muted);
  font-size: 12px;
}

.fav-action-btn {
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--fav-accent));
  color: #fff;
  border-radius: 14px;
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
  box-shadow: 0 10px 22px rgba(2,52,58,.12);
}

.fav-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(2,52,58,.16);
}

/* =========================
   EMPTY STATE
========================= */
.fav-cards-container.show-center {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 320px;
}

.fav-cards-container.show-center .no-results-center {
  width: 100%;
  min-height: 320px;
  margin: 0 auto;
  border: 1px dashed rgba(2, 52, 58, 0.10);
  background: var(--fav-empty-bg);
  box-shadow: var(--shadow-sm);
}

.fav-cards-container.show-center .no-results-center img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  margin-bottom: 12px;
  opacity: .92;
}

.fav-cards-container.show-center .no-results-center h3 {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 22px;
  font-weight: 900;
}

.fav-cards-container.show-center .no-results-center p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

/* =========================
   GRID
========================= */
.fav-cards-container {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

@media (min-width: 700px) {
  .fav-cards-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .fav-cards-container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1500px) {
  .fav-cards-container {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .fav-cards-container {
    gap: 12px;
  }
}

/* =========================
   CARD
========================= */
.custom-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  width: 100%;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.custom-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(2, 52, 58, 0.10);
}

.custom-card-img {
  position: relative;
  aspect-ratio: 1.6 / 1;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #e8f2ef, #f9fcfb);
}

.custom-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.custom-card:hover .custom-card-img img {
  transform: scale(1.05);
}

/* =========================
   CARD OVERLAY
========================= */
.custom-status-row {
  position: absolute;
  top: 14px;
  right: 14px;
  left: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
}

.custom-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 14px rgba(0,0,0,.10);
}

.custom-badge.available {
  background: rgba(25,188,149,.95);
}

.custom-badge.reserved {
  background: rgba(196,138,27,.92);
}

.custom-badge.sold {
  background: rgba(220,38,38,.92);
}

.custom-fav-btn {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  color: #d4a11d;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.custom-fav-btn .material-symbols-rounded {
  font-size: 21px;
}

.custom-fav-btn:hover {
  transform: scale(1.05);
  background: #fff7dd;
}

.custom-city {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.92);
  color: var(--primary);
  padding: 0 12px;
  min-height: 32px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  max-width: calc(100% - 28px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* =========================
   CARD BODY
========================= */
.custom-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.custom-card-row.card-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.custom-unit-type {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  background: var(--fav-chip-bg);
  color: var(--primary);
  border-radius: 12px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.custom-price {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

/* رقم الترخيص */
.custom-license-number {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(25,188,149,.10), rgba(25,188,149,.06));
  border: 1px solid rgba(25,188,149,.16);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.4;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

.custom-license-number::before {
  content: "verified";
  font-family: 'Material Symbols Rounded';
  font-size: 17px;
  line-height: 1;
  color: var(--fav-accent);
  font-variation-settings:
    'FILL' 1,
    'wght' 500,
    'GRAD' 0,
    'opsz' 24;
}

.custom-card-info-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.custom-card-icon-info {
  min-height: 46px;
  border-radius: 18px;
  background: rgba(232,242,239,.92);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--text);
  font-size: 13px;
  text-align: right;
}

.custom-card-icon-info .material-symbols-rounded {
  font-size: 18px;
  color: var(--fav-accent);
  flex-shrink: 0;
}

.custom-card-details {
  color: #576a6f;
  font-size: 12.5px;
  line-height: 1.8;
  min-height: 44px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.custom-card-actions-flex {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.custom-card-actions-right,
.custom-card-actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.custom-card-specs {
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--fav-accent));
  color: #fff !important;
  font-size: 13px;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.custom-card-specs:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(2,52,58,.12);
}

.custom-copy {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  color: var(--primary);
  border: 1px solid rgba(2,52,58,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
  box-shadow: var(--shadow-sm);
}

.custom-copy:hover {
  background: rgba(232,242,239,.92);
  transform: translateY(-1px);
}

.custom-copy.copied {
  background: var(--fav-accent);
  color: #fff;
  border-color: transparent;
}

.custom-copy .material-symbols-rounded {
  font-size: 18px;
}

/* =========================
   RESPONSIVE
========================= */
@media (min-width: 700px) {
  .custom-card-info-row {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .custom-card-icon-info {
    min-height: 58px;
    padding: 8px 5px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    font-size: 11px;
    text-align: center;
  }

  .custom-card-icon-info .material-symbols-rounded {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .favorites-hero {
    padding: 18px;
    border-radius: 24px;
  }

  .favorites-hero-text h1 {
    font-size: 23px;
  }

  .favorites-hero-text p {
    font-size: 13px;
  }

  .favorites-stat-box {
    min-width: 110px;
    width: 100%;
  }

  .favorites-toolbar-right h2 {
    font-size: 18px;
  }

  .custom-price {
    font-size: 19px;
  }
}

@media (max-width: 480px) {
  .favorites-hero-content,
  .favorites-hero-right {
    align-items: flex-start;
  }

  .favorites-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 18px;
  }

  .favorites-icon-wrap .material-symbols-rounded {
    font-size: 26px;
  }

  .favorites-hero-text h1 {
    font-size: 21px;
  }

  .custom-card-body {
    padding: 12px;
  }

  .custom-card-row.card-row-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .custom-license-number {
    width: 100%;
    justify-content: flex-start;
    min-height: 40px;
    padding: 8px 12px;
  }

  .custom-card-specs {
    flex: 1;
    width: 100%;
  }

  .custom-card-actions-flex {
    gap: 8px;
  }
}