/* تصميم بسيط: أبيض + ذهبي. يدعم RTL و LTR عبر الخصائص المنطقية */
:root {
  --bg: #ffffff;
  --soft: #faf8f3;
  --text: #2b2b2b;
  --muted: #7a7468;
  --gold: #b8963e;
  --gold-light: #e9dcb8;
  --line: #eee8da;
  --sidebar-w: 260px;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- القائمة الجانبية ---------- */
.sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: var(--sidebar-w);
  background: var(--bg);
  border-inline-end: 1px solid var(--line);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 20;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 22px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.logo-mark { color: var(--gold); font-size: 28px; line-height: 1; }
.logo-text { font-size: 22px; font-weight: 700; margin-top: 6px; }
.logo small { color: var(--muted); font-size: 13px; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a {
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--soft); color: var(--gold); }
.nav a.active { background: var(--soft); color: var(--gold); font-weight: 700; }
.nav a.sub { padding-inline-start: 28px; font-size: 15px; font-weight: 400; }
.nav-title {
  margin: 14px 14px 4px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .5px;
}

.lang-switch {
  margin-top: 18px;
  text-align: center;
  padding: 9px;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 999px;
  font-weight: 500;
}
.lang-switch:hover { background: var(--gold); color: #fff; }

/* ---------- الشريط العلوي (للجوال فقط) ---------- */
.topbar { display: none; }
.overlay { display: none; }

/* ---------- المحتوى ---------- */
.main {
  margin-inline-start: var(--sidebar-w);
  padding: 32px clamp(16px, 4vw, 48px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.main > section { flex: none; }
.footer {
  margin-top: auto;
  padding-top: 40px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.hero {
  text-align: center;
  padding: 48px 16px;
  margin-bottom: 32px;
  background: var(--soft);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius);
}
.hero h1 { margin: 0; font-size: clamp(28px, 5vw, 42px); }
.hero p { margin: 6px 0 0; color: var(--muted); font-size: 18px; }

.section-title {
  font-size: 26px;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--gold-light); }
.sub-title { font-size: 20px; margin: 32px 0 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  padding: 5px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
}
.chip:hover { border-color: var(--gold); color: var(--gold); }
.chip.active { background: var(--gold); border-color: var(--gold); color: #fff; }

/* ---------- بطاقات المنتجات وإطار الصور ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 8px 24px rgba(184, 150, 62, .12); transform: translateY(-2px); }

/* الإطار الذهبي المزدوج حول الصورة */
.frame {
  position: relative;
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 5px;
  background: var(--bg);
}
.frame::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid var(--gold-light);
  border-radius: 8px;
  pointer-events: none;
}
.frame img, .no-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
}
.no-img {
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--gold-light);
  font-size: 48px;
}

.card-body { padding: 12px 4px 2px; }
.card-body h3 { margin: 0; font-size: 18px; }
.card-body p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.price { color: var(--gold); font-weight: 700; font-size: 17px; }
.tag { font-size: 12px; color: var(--muted); background: var(--soft); padding: 2px 10px; border-radius: 999px; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* ---------- الصفحات ---------- */
.page { max-width: 760px; }
.prose { font-size: 17px; }

.contact-list { display: grid; gap: 12px; }
.contact-item {
  display: flex;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contact-item span { min-width: 120px; color: var(--muted); }
.contact-item p { margin: 0; }
.contact-item a { color: var(--gold); font-weight: 500; }
.social { display: flex; gap: 16px; }

.map iframe { width: 100%; height: 340px; border: 0; border-radius: 6px; display: block; }

/* ---------- الجوال ---------- */
@media (max-width: 860px) {
  .topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 12px 16px;
  }
  .topbar-logo { font-weight: 700; font-size: 19px; }
  .menu-btn {
    width: 40px; height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
    cursor: pointer;
  }
  .menu-btn span { width: 18px; height: 2px; background: var(--gold); border-radius: 2px; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 0 0 30px rgba(0,0,0,.08);
  }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  body.menu-open .sidebar { transform: none; }
  body.menu-open .overlay {
    display: block;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.25);
    z-index: 15;
  }

  .main { margin-inline-start: 0; padding: 20px 16px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .contact-item { flex-direction: column; gap: 2px; }
}

/* ---------- عدد الصور على البطاقة ---------- */
a.card { display: block; color: inherit; }
.frame .count {
  position: absolute; inset-block-end: 12px; inset-inline-end: 12px;
  background: rgba(255,255,255,.92); color: var(--text);
  font-size: 12px; padding: 1px 8px; border-radius: 999px;
}

/* ---------- صفحة المنتج ---------- */
.page.item { max-width: 1000px; }
.back { display: inline-block; color: var(--muted); margin-bottom: 18px; }
.back:hover { color: var(--gold); }
.item-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.thumbs .thumb {
  width: 68px; height: 68px; padding: 2px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
}
.thumbs .thumb.active, .thumbs .thumb:hover { border-color: var(--gold); }
.thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.info h1 { margin: 0 0 8px; font-size: 30px; }
.price.big { font-size: 26px; margin: 14px 0; }
.lang-switch.inline { display: inline-block; padding: 8px 28px; margin-top: 10px; }

@media (max-width: 860px) {
  .item-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- الشعار ---------- */
.logo-img { width: 100%; max-width: 190px; height: auto; }
.topbar-logo { display: flex; align-items: center; gap: 8px; }
.topbar-logo img { width: 34px; height: 34px; object-fit: contain; }
