 :root {
  --bg-page: #f8f6f0;
  --surface: #ffffff;
  --surface-alt: #f1ede4;
  --primary: #c2593f;
  --primary-hover: #a3442d;
  --text-dark: #1f2421;
  --text-muted: #6b7570;
  --border: #e3ddd1;
  --accent-gold: #cba135;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 12px 32px rgba(31, 36, 33, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Tajawal', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-dark);
  direction: rtl;
  text-align: right;
  line-height: 1.6;
}

/* القائمة العلوية */
.header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.brand-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background-color: var(--surface-alt);
  color: var(--text-muted);
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.header-actions {
  display: flex;
  gap: 0.75rem;
}

/* الأزرار */
.btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border);
  color: var(--text-dark);
}

.btn-outline:hover {
  background-color: var(--surface-alt);
}

/* الحاوية الرئيسية */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* واجهة البانر */
.hero-banner {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 3.5rem 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.hero-tag {
  display: inline-block;
  background-color: var(--surface-alt);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.3rem;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.hero-title span {
  color: var(--primary);
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 680px;
  line-height: 1.8;
}

/* أزرار الفلترة */
.filter-bar {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.filter-pill {
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 30px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.filter-pill.active,
.filter-pill:hover {
  background-color: var(--text-dark);
  color: #fff;
  border-color: var(--text-dark);
}

/* شبكة المقتنيات */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.item-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.item-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.item-img-wrap {
  width: 100%;
  height: 230px;
  background-color: var(--surface-alt);
  position: relative;
  overflow: hidden;
}

.item-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
 .item-condition-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: rgba(31, 36, 33, 0.85);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  backdrop-filter: blur(6px);
}

.item-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.item-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
  color: var(--text-dark);
}

.item-story {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

/* وسام النزاهة */
.item-honor-badge {
  background-color: #faf6f0;
  border-right: 3px solid var(--accent-gold);
  padding: 0.65rem 0.85rem;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.item-honor-badge strong {
  display: block;
  color: #946c14;
  margin-bottom: 0.15rem;
}

.item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--border);
  padding-top: 1rem;
}

.item-price {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--primary);
}

.claim-btn {
  background-color: #25d366;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.claim-btn:hover {
  background-color: #1ebd5b;
}

/* النوافذ المنبثقة التفاعلية */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1000;
}

.modal-backdrop.active {
  display: flex !important;
}

/* ضبط النافذة المنبثقة لتناسب جميع الشاشات */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  overflow-y: auto;
}

.modal-backdrop.active {
  display: flex !important;
}

.modal-card {
  position: relative;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  max-height: 85vh; /* يمنع نزول النافذة تحت الشاشة */
  overflow-y: auto;  /* يتيح النزول لرؤية الزر وأسفل النموذج */
  box-shadow: var(--shadow-md);
  margin: auto;
}

/* ضبط ذيل الصفحة ليكون واضحاً وبارزاً عند النزول لأسفل الموقع */
.footer {
  text-align: center;
  padding: 3rem 1.5rem 6rem 1.5rem; /* مساحة سفلية كافية حتى لا يغطيه زر الواتساب */
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 4rem;
  background-color: var(--surface);
}

@keyframes popIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  color: var(--text-dark);
}

.modal-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  background: #faf9f6;
}

.form-group textarea {
  height: 85px;
  resize: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: #fff;
}

.calc-result {
  background-color: var(--surface-alt);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  margin-top: 1.5rem;
}

.calc-result span {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.calc-result strong {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary);
}

.footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 3rem;
}

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }
  .hero-title {
    font-size: 1.7rem;
  }
  .hero-banner {
    padding: 2rem 1.25rem;
  }
}
/* زر واتساب العائم للتواصل المباشر */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background-color: #25d366;
  color: #ffffff;
  padding: 0.75rem 1.3rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
  z-index: 999;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.45);
}

.whatsapp-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}