:root {
  --cream: #fbf3dc;
  --peri: #9aa5e8;
  --blue: #4a5bd0;
  --yellow: #f9c74f;
  --text: #2b3170;
  --bar-h: 70px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Cairo", "Fredoka", sans-serif;
  background: var(--cream);
  color: var(--text);
  padding-top: var(--bar-h);
}
html[lang="en"] body { font-family: "Fredoka", "Cairo", sans-serif; }

/* Toolbar */
.toolbar {
  position: fixed; top: 0; inset-inline: 0; height: var(--bar-h); z-index: 50;
  display: flex; align-items: center; gap: 12px; padding: 0 14px;
  background: rgba(251, 243, 220, .92); backdrop-filter: blur(8px);
  box-shadow: 0 2px 14px rgba(74, 91, 208, .15);
}
.logo img { height: 50px; width: 50px; object-fit: cover; border-radius: 50%; display: block; }
.search {
  flex: 1; min-width: 0; height: 42px; padding: 0 16px;
  border: 2px solid var(--peri); border-radius: 30px; background: #fff;
  font: inherit; color: var(--text); outline: none; transition: .2s;
}
.search:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(154, 165, 232, .3); }
.lang-btn {
  height: 42px; padding: 0 16px; border: none; border-radius: 30px; cursor: pointer;
  background: var(--blue); color: #fff; font: inherit; font-weight: 600;
}
.burger {
  width: 42px; height: 42px; border: none; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; justify-content: center; gap: 6px; align-items: center;
}
.burger span { width: 26px; height: 3px; border-radius: 3px; background: var(--blue); transition: .3s; }
.burger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Menu */
.overlay {
  position: fixed; inset: 0; background: rgba(43, 49, 112, .45); z-index: 60;
  opacity: 0; pointer-events: none; transition: .3s;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.menu {
  position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: 280px; max-width: 80%;
  background: var(--cream); z-index: 70; padding: 90px 20px 20px;
  transform: translateX(-100%); transition: transform .35s ease;
  box-shadow: 4px 0 24px rgba(0, 0, 0, .15);
}
html[dir="rtl"] .menu { transform: translateX(100%); box-shadow: -4px 0 24px rgba(0, 0, 0, .15); }
.menu.open { transform: none !important; }
.menu ul { list-style: none; display: grid; gap: 8px; }
.menu a {
  display: block; padding: 12px 16px; border-radius: 14px; text-decoration: none;
  color: var(--text); font-weight: 600; transition: .2s;
}
.menu a:hover, .menu a.active { background: var(--peri); color: #fff; }

/* Banner */
.banner {
  margin: 18px auto 0; max-width: 1100px; width: calc(100% - 28px);
  display: flex; align-items: center; justify-content: center; gap: 14px; text-align: center;
  padding: 18px; border-radius: 22px; color: #fff; font-size: 1.15rem; font-weight: 800;
  background: linear-gradient(120deg, var(--blue), var(--peri));
  box-shadow: 0 8px 24px rgba(74, 91, 208, .3);
}

/* Sections & grid */
.section { max-width: 1100px; margin: 0 auto; padding: 26px 14px 8px; }
.section h2 {
  font-size: 1.5rem;
  margin-bottom: 18px;
  color: var(--blue);
  text-align: center;
}
.section h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  margin: 8px auto 0;
  border-radius: 4px;
  background: var(--yellow);
}
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 700px)  { .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.empty { text-align: center; padding: 30px; opacity: .6; }

/* Card */
.card {
  background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 6px 18px rgba(74, 91, 208, .12); transition: transform .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-6px) !important; box-shadow: 0 14px 30px rgba(74, 91, 208, .25); }
.card-img { position: relative; aspect-ratio: 1; overflow: hidden; background: #eef0ff; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img img { transform: scale(1.07); }
.badge {
  position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2;
  background: var(--yellow); color: var(--text); font-weight: 800; font-size: .8rem;
  padding: 4px 10px; border-radius: 20px;
}
.card-body { padding: 12px 14px 16px; }
.card-body small { color: var(--peri); font-weight: 600; }
.card-body h3 { font-size: 1rem; margin: 4px 0 8px; }
.price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price b { color: var(--blue); font-size: 1.1rem; }
.price del { color: #e05a5a; opacity: .8; font-size: .9rem; }

/* Scroll animation */
.reveal {
  opacity: 0; transform: translateY(36px) scale(.97);
  transition: opacity .7s ease, transform .7s ease; transition-delay: var(--d, 0ms);
}
.reveal.show { opacity: 1; transform: none; }

/* Footer */
.footer { text-align: center; padding: 40px 14px; margin-top: 30px; }
.footer img { height: 80px; border-radius: 50%; }
.footer p { margin-top: 10px; opacity: .7; }