:root {
  --bg: #f6f1e7;
  --ink: #22160f;
  --muted: #6b5d4f;
  --card: #ffffff;
  --line: #e2d6c2;
  --brand: #7c1d2b;
  --brand-2: #c19a4b;
  --green: #1f3d2b;
  --radius: 14px;
  --shadow: 0 6px 22px rgba(40, 24, 12, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(193, 154, 75, 0.14), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(124, 29, 43, 0.10), transparent 45%),
    var(--bg);
  line-height: 1.5;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

header.top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  background: var(--green);
  color: #f4ecd8;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: var(--shadow);
}

header.top .brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #f4ecd8;
}

header.top .brand-logo { width: 40px; height: 33px; flex: 0 0 auto; }
header.top .brand .brand-name { display: flex; flex-direction: column; line-height: 1.12; }
header.top .brand small { display: block; font-size: 0.7rem; color: var(--brand-2); font-weight: 600; }

header.top nav { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; align-items: center; }

.navbtn {
  background: transparent;
  color: #f4ecd8;
  border: 1px solid rgba(244, 236, 216, 0.25);
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
}
.navbtn:hover { background: rgba(244, 236, 216, 0.12); }
.navbtn.active { background: var(--brand-2); color: #22160f; border-color: transparent; font-weight: 600; }

main { max-width: 1080px; margin: 0 auto; padding: 24px 18px 64px; }

h1, h2, h3 { color: var(--green); }
h1 { font-size: 1.7rem; margin: 0 0 4px; }
.lede { color: var(--muted); margin: 0 0 22px; max-width: 60ch; }

/* ---- مندوس الحِرف interactive brand hero ------------------------------ */
.mandoos-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  background:
    radial-gradient(circle at 80% 20%, rgba(193, 154, 75, 0.22), transparent 55%),
    linear-gradient(135deg, var(--green) 0%, #16281c 55%, #3a1d11 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 30px;
  margin-bottom: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.mandoos-copy .kicker {
  display: inline-block; font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.4px; color: var(--brand-2); margin-bottom: 8px;
}
.mandoos-copy h1 { color: #f6eed8; font-size: 2.3rem; margin: 0 0 10px; }
.mandoos-copy .lede { color: #e7ddc7; max-width: 46ch; margin: 0 0 6px; }
.mandoos-copy .lede.en { color: #c6bca6; font-size: 0.9rem; margin-bottom: 18px; }
.mandoos-copy .row { gap: 10px; }
.mandoos-hint { display: block; margin-top: 12px; font-size: 0.78rem; color: var(--brand-2); }
.mandoos-art { display: flex; justify-content: center; }
.mandoos { width: 100%; max-width: 420px; cursor: pointer; display: block; }

.mandoos .lid {
  transform-box: fill-box; transform-origin: center bottom;
  transition: transform 0.55s cubic-bezier(0.2, 0.85, 0.25, 1);
}
.mandoos:hover .lid, .mandoos.open .lid { transform: translateY(-36px) rotate(-7deg); }

.mandoos .loot {
  transform-box: fill-box; transform-origin: center bottom;
  opacity: 0; transform: translateY(18px) scale(0.9);
  transition: opacity 0.5s 0.08s ease, transform 0.55s 0.08s cubic-bezier(0.2, 0.85, 0.25, 1);
}
.mandoos:hover .loot, .mandoos.open .loot { opacity: 1; transform: translateY(0) scale(1); }

.mandoos .glow { opacity: 0; transition: opacity 0.6s ease; }
.mandoos:hover .glow, .mandoos.open .glow { opacity: 1; }

.mandoos .sparkle { opacity: 0.2; }
.mandoos:hover .sparkle, .mandoos.open .sparkle { animation: mdTwinkle 1.6s ease-in-out infinite; }
@keyframes mdTwinkle { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

@media (max-width: 760px) {
  .mandoos-hero { grid-template-columns: 1fr; text-align: center; padding: 22px 18px; }
  .mandoos-copy .kicker, .mandoos-copy .lede { margin-inline: auto; }
  .mandoos-copy h1 { font-size: 1.85rem; }
  .mandoos-copy .row { justify-content: center; }
  .mandoos-art { order: -1; }
  .mandoos { max-width: 320px; }
}
@media (prefers-reduced-motion: reduce) {
  .mandoos .lid, .mandoos .loot, .mandoos .glow { transition: none; }
  .mandoos:hover .sparkle, .mandoos.open .sparkle { animation: none; opacity: 1; }
}

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card .body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card img.thumb, .card .thumb {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #efe6d4;
  display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.card h3 { margin: 0; font-size: 1.05rem; }
.card .price { color: var(--brand); font-weight: 700; }
.card .meta { font-size: 0.82rem; color: var(--muted); }

.tag {
  display: inline-block; font-size: 0.72rem; padding: 2px 9px; border-radius: 999px;
  background: #efe6d4; color: var(--green); border: 1px solid var(--line);
}
.tag.brand { background: var(--brand); color: #fff; border-color: transparent; }
.tag.gold { background: var(--brand-2); color: #22160f; border-color: transparent; }

button.btn, .btn {
  background: var(--brand); color: #fff; border: none; border-radius: 10px;
  padding: 10px 16px; cursor: pointer; font-size: 0.92rem; font-weight: 600;
}
button.btn:hover { filter: brightness(1.08); }
button.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
button.btn.gold { background: var(--brand-2); color: #22160f; }
button.btn.small { padding: 6px 11px; font-size: 0.82rem; }
button.btn:disabled { opacity: 0.5; cursor: not-allowed; }

label { display: block; font-size: 0.85rem; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 90px; resize: vertical; }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.hidden { display: none !important; }

.toast {
  position: fixed; right: 18px; bottom: 18px; background: var(--green); color: #f4ecd8;
  padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); z-index: 50;
  max-width: 340px;
}
.toast.error { background: var(--brand); }

.concept {
  width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #efe6d4;
  display: block;
}

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }

.state {
  font-size: 0.75rem; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line);
  background: #efe6d4; color: var(--green); text-transform: capitalize;
}
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filters select, .filters input { width: auto; min-width: 160px; }
.muted { color: var(--muted); }
.escrow-line { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed var(--line); }
