:root {
  --cream: #FFE8A9;
  --cream-2: #FFF5D6;
  --brown: #88480F;
  --brown-2: #9E7047;
  --ink: #3B2418;
  --muted: #7A6A5A;
  --red: #c0392b;
  --green: #25a244;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(59, 36, 24, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; overflow-x: hidden; }
body {
  margin: 0; padding-top: 60px;
  font-family: "Rubik", sans-serif;
  color: var(--ink); background: #fffdf7;
  direction: rtl; text-align: right; overflow-x: hidden;
}
html[dir="ltr"] body { direction: ltr; text-align: left; }
body.no-scroll { overflow: hidden; }
[hidden] { display: none !important; }
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; }

/* ===== أنيميشن الظهور مع السكرول ===== */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.js .reveal.in-view { opacity: 1; transform: none; transition-delay: var(--d, 0ms); }
.js .card.reveal.in-view:hover { transform: translateY(-4px); transition-delay: 0ms; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== الشريط العائم ===== */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; height: 60px; z-index: 50;
  display: flex; align-items: center; gap: 12px; padding: 0 14px;
  background: rgba(255, 232, 169, .94); backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(59, 36, 24, .12);
}
.nav-burger {
  width: 42px; height: 42px; flex-shrink: 0; border: none; border-radius: 12px;
  background: var(--brown); display: grid; place-content: center; gap: 5px; cursor: pointer;
}
.nav-burger span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; }
.nav-logo img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; display: block; }
.nav-search { position: relative; flex: 1; min-width: 0; max-width: 520px; margin-inline: auto; }
.nav-search input {
  width: 100%; height: 40px; border: none; outline: none; border-radius: 50px;
  padding: 0 16px; padding-inline-end: 84px; font: inherit;
}
.nav-search button {
  position: absolute; inset-inline-end: 4px; top: 4px; height: 32px; padding: 0 16px;
  border: none; border-radius: 50px; background: var(--brown); color: #fff; cursor: pointer;
}
.nav-search button:hover { background: var(--brown-2); }

/* ===== القائمة الجانبية ===== */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .4);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 100;
  width: min(300px, 82vw); padding: 18px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
  background: #fffaf0; box-shadow: 0 0 24px rgba(0, 0, 0, .2); transition: transform .3s ease;
}
[dir="rtl"] .drawer { transform: translateX(100%); }
[dir="ltr"] .drawer { transform: translateX(-100%); }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; color: var(--brown); }
.drawer-head img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.drawer-head strong { flex: 1; }
.drawer-head button { border: none; background: none; font-size: 1.3rem; cursor: pointer; color: var(--ink); }
.drawer-links { display: grid; gap: 4px; }
.drawer-links a { padding: 12px 14px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.drawer-links a:hover, .drawer-links a.active { background: var(--cream); color: var(--brown); }
.drawer-title { margin-top: 6px; color: var(--muted); font-size: .9rem; }
.drawer-social { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.social { padding: 10px; border-radius: 10px; color: #fff; text-decoration: none; font-weight: 600; text-align: center; }
.social.ig { background: #c13584; } .social.tt { background: #111; }
.social.wa { background: var(--green); } .social.fb { background: #1877f2; }
.lang-btn { margin-top: auto; padding: 12px; border: none; border-radius: 10px; background: var(--brown); color: #fff; cursor: pointer; }

/* ===== البانر ===== */
.banner-slot { margin: 12px 14px 0; border-radius: var(--radius); overflow: hidden; }
.banner-slot a { display: block; text-decoration: none; }
.banner-text p {
  background: var(--brown); color: #fff; text-align: center; padding: 14px 18px;
  font-weight: 600; line-height: 1.8; white-space: pre-line;
}
.banner-image img { display: block; width: 100%; max-height: 360px; object-fit: cover; }

/* ===== الهيرو ===== */
.hero { max-width: 760px; margin: 0 auto; padding: 28px 20px 8px; text-align: center; }
.hero img { width: 140px; border-radius: 24px; box-shadow: var(--shadow); }
.hero h1 { font-size: 1.6rem; margin: 16px 0 8px; line-height: 1.5; }
.hero p { color: var(--muted); line-height: 1.9; }

/* ===== الأقسام والكروت ===== */
.section { padding: 36px 20px 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.section-head h2 { font-size: 1.5rem; }
.pill {
  display: inline-block; padding: 8px 20px; border: 2px solid var(--brown); border-radius: 50px;
  background: transparent; color: var(--brown); font-weight: 600; text-decoration: none; cursor: pointer;
}
.pill:hover { background: var(--brown); color: #fff; }
.pill.big { padding: 12px 32px; font-size: 1.05rem; }
.shop-all { text-align: center; padding: 28px 20px 40px; }
.empty { text-align: center; color: #999; padding: 40px 20px; }

.grid {
  display: grid; gap: 24px; justify-content: start;
  grid-template-columns: repeat(auto-fill, minmax(220px, 260px));
}
.card {
  position: relative; display: block; text-decoration: none; background: #fff;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: var(--cream); }
.card-info { padding: 14px 16px 18px; display: grid; gap: 6px; }
.card-info h3 { font-size: 1.05rem; }
.card-info p {
  font-size: .9rem; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.price-row strong { color: var(--brown); font-size: 1.05rem; }
.old-price { color: #999; font-size: .9rem; }
.badge {
  position: absolute; top: 10px; inset-inline-start: 10px; z-index: 1;
  background: var(--red); color: #fff; font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 50px;
}

/* ===== صفحة المنتج ===== */
.product-page {
  max-width: 1000px; margin: 28px auto; padding: 0 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start;
}
.back-link { grid-column: 1 / -1; text-decoration: none; font-weight: 600; color: var(--ink); }
.main-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 20px; background: var(--cream); display: block; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumbs img {
  width: 72px; height: 72px; object-fit: cover; border-radius: 10px; cursor: pointer;
  border: 2px solid transparent; opacity: .7;
}
.thumbs img.active { border-color: var(--brown); opacity: 1; }
.details h1 { font-size: 1.7rem; margin-bottom: 8px; }
.big-price { margin-bottom: 20px; align-items: center; }
.big-price strong { font-size: 1.4rem; }
.pill-red { background: var(--red); color: #fff; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 50px; }
.details h3 { margin-bottom: 8px; }
.desc { margin-bottom: 28px; line-height: 1.9; color: #555; white-space: pre-line; }
.buy-box { background: var(--cream-2); border: 1px solid var(--cream); border-radius: var(--radius); padding: 18px; text-align: center; }
.buy-box strong { display: block; font-size: 1.3rem; color: var(--brown); margin: 6px 0 14px; }
.btn-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn {
  flex: 1; min-width: 120px; max-width: 220px; padding: 12px; border: none; border-radius: 10px;
  color: #fff; text-decoration: none; font-weight: 600; text-align: center; cursor: pointer;
}
.btn-wa { background: var(--green); } .btn-call { background: var(--brown); }
.btn-main { background: var(--brown); padding: 14px 40px; max-width: none; flex: none; font-size: 1.05rem; }

/* ===== صفحة الترحيب ===== */
.welcome-page { max-width: 560px; margin: 24px auto 60px; padding: 0 18px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.welcome-logo { width: 170px; max-width: 60%; border-radius: 24px; box-shadow: var(--shadow); }
.welcome-page h1 { font-size: 1.6rem; }
.welcome-text { color: var(--muted); line-height: 1.9; white-space: pre-line; }
.lang-row { display: flex; gap: 10px; justify-content: center; }
#infoCards { width: 100%; display: grid; gap: 14px; margin: 8px 0; }
.info-card { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); text-align: start; }
.info-card h3 { margin-bottom: 10px; color: var(--brown); }
.info-card p { line-height: 1.9; white-space: pre-line; }
.pay-number { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--cream-2); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; }
.pay-number strong { font-size: 1.2rem; letter-spacing: .5px; }
.copy-btn { border: none; background: var(--brown); color: #fff; padding: 6px 14px; border-radius: 8px; cursor: pointer; }

/* ===== الموبايل ===== */
@media (max-width: 768px) {
  .product-page { grid-template-columns: 1fr; gap: 22px; margin: 20px auto; }
  .details h1 { font-size: 1.4rem; }
}
@media (max-width: 600px) {
  .section { padding: 28px 14px 8px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-info { padding: 10px 12px 14px; }
  .card-info h3 { font-size: .95rem; }
  .hero h1 { font-size: 1.3rem; }
}
@media (max-width: 480px) {
  .nav-search button { padding: 0 12px; }
  .nav-search input { padding-inline-end: 66px; }
  .section-head h2 { font-size: 1.25rem; }
}