/* صفحة التجار — جوال أولاً، خط التطبيق Noto Kufi Arabic */
:root {
  --green: #0e4a38;
  --green-600: #135f47;
  --deep: #0a3628;
  --gold: #f2b544;
  --gold-deep: #d99a24;
  --cream: #f7f4ec;
  --ink: #12211b;
  --muted: #5a6b63;
  --border: #e4ddd0;
  --paper: #ffffff;
  --shadow: 0 16px 40px rgba(10, 54, 40, 0.12);
  --radius: 20px;
  --font: "Noto Kufi Arabic", Tahoma, "Segoe UI", sans-serif;
}

html[data-lang="en"] {
  --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

html[data-lang="ur"] {
  --font: "Noto Nastaliq Urdu", "Noto Kufi Arabic", Tahoma, sans-serif;
}

html[data-lang="hi"] {
  --font: "Noto Sans Devanagari", "Source Sans 3", "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body.page-merchants {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body.page-merchants h1,
body.page-merchants h2,
body.page-merchants h3,
body.page-merchants h4,
body.page-merchants button,
body.page-merchants input,
body.page-merchants textarea,
body.page-merchants .btn {
  font-family: var(--font);
}

.m-skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -80px;
  z-index: 100;
  background: var(--green);
  color: #fff;
  padding: 10px 14px;
  border-radius: 0 0 12px 12px;
}
.m-skip:focus { top: 0; }

/* Header */
.m-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  display: flex;
  justify-content: center;
  background: rgba(247, 244, 236, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.m-header-inner {
  width: 100%;
  max-width: 560px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.m-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.m-lang {
  position: relative;
  z-index: 60;
}

.m-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--deep);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.m-lang-btn:hover,
.m-lang.is-open .m-lang-btn {
  border-color: rgba(14, 74, 56, 0.35);
  background: #fff;
}

.m-lang-caret {
  flex-shrink: 0;
  opacity: 0.75;
  transition: transform 0.15s ease;
}

.m-lang.is-open .m-lang-caret {
  transform: rotate(180deg);
}

.m-lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 148px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 14px 32px rgba(10, 54, 40, 0.14);
}

.m-lang-menu button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
}

.m-lang-menu button:hover,
.m-lang-menu button.is-active {
  background: rgba(14, 74, 56, 0.08);
  color: var(--deep);
}

.m-header-cta-ghost {
  background: transparent !important;
  border: 1px solid rgba(14, 74, 56, 0.28);
  color: var(--deep) !important;
  box-shadow: none !important;
}

html[dir="ltr"] .m-header-cta-ghost {
  border-color: rgba(14, 74, 56, 0.28);
}
.m-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.m-brand img {
  width: 36px;
  height: 36px;
  border-radius: 22%;
  display: block;
}
.m-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.m-brand-ar {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--deep);
}
.m-brand-en {
  font-weight: 600;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.m-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--deep);
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(242, 181, 68, 0.28);
}

@media (max-width: 420px) {
  .m-brand-text { display: none; }
  .m-header-cta-ghost { display: none; }
  .m-header-cta { padding: 9px 12px; font-size: 0.78rem; }
}

/* Layout shell */
.m-main {
  width: 100%;
  max-width: 560px;
  padding: 16px 16px 40px;
  flex: 1;
}

.m-hero {
  background: linear-gradient(160deg, var(--green) 0%, var(--deep) 100%);
  color: #fff;
  border-radius: 24px;
  padding: 28px 20px 24px;
  box-shadow: var(--shadow);
}
.m-kicker {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}
.m-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 5.5vw, 1.85rem);
  font-weight: 700;
  line-height: 1.45;
  color: #fff;
}
.m-hero .lead {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.98rem;
  line-height: 1.75;
}
.m-hero .emph {
  color: var(--gold);
  font-weight: 700;
}
.m-points {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.m-points li {
  position: relative;
  padding-inline-start: 28px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.92rem;
  line-height: 1.55;
}
.m-points li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.35em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(242, 181, 68, 0.25);
  box-shadow: inset 0 0 0 1px rgba(242, 181, 68, 0.55);
}
.m-points li::after {
  content: "";
  position: absolute;
  inset-inline-start: 5px;
  top: 0.42em;
  width: 5px;
  height: 9px;
  border: solid var(--gold);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.m-actions {
  display: grid;
  gap: 10px;
}
.m-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  border: none;
  cursor: pointer;
  line-height: 1.3;
  white-space: normal;
}
.m-btn-gold {
  background: var(--gold);
  color: var(--deep);
  box-shadow: 0 10px 22px rgba(242, 181, 68, 0.3);
}
.m-btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}
.m-btn-ghost[hidden],
.m-wa[hidden] {
  display: none !important;
}
.m-city-note {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
}
.m-points strong {
  color: var(--gold);
  font-weight: 700;
}

.m-benefit-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.m-benefit-list li {
  padding: 14px;
  border-radius: 14px;
  background: #fbf9f3;
  border: 1px solid var(--border);
  display: grid;
  gap: 4px;
}
.m-benefit-list strong {
  color: var(--deep);
  font-size: 0.95rem;
  line-height: 1.45;
}
.m-benefit-list span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Card sections */
.m-card {
  margin-top: 16px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  box-shadow: 0 8px 24px rgba(10, 54, 40, 0.05);
}
.m-card h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: var(--deep);
  line-height: 1.4;
}
.m-card .sub {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.m-steps {
  display: grid;
  gap: 12px;
}
.m-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 14px;
  background: #fbf9f3;
  border: 1px solid var(--border);
}
.m-step-num {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eef5f1;
  color: var(--green);
  font-weight: 700;
  font-size: 1.05rem;
}
.m-step h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  color: var(--ink);
}
.m-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

/* Form */
.m-form label {
  display: block;
  margin-bottom: 12px;
}
.m-form label > span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #35473e;
}
.m-form input,
.m-form textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #fbf9f3;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
}
.m-form textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.55;
}
.m-form input:focus,
.m-form textarea:focus {
  outline: none;
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(14, 74, 56, 0.1);
}
.m-form .m-btn {
  margin-top: 4px;
  background: var(--green);
  color: #fff;
}
.m-privacy {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
}

/* FAQ */
.m-faq details {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbf9f3;
  margin-bottom: 10px;
  overflow: hidden;
}
.m-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}
.m-faq summary::-webkit-details-marker { display: none; }
.m-faq .answer {
  padding: 0 16px 14px;
  color: var(--muted);
  font-size: 0.9rem;
}
.m-faq .answer p { margin: 0; }

/* Stores + footer */
.m-stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  /* منع قلب شعارات المتاجر داخل صفحة RTL */
  direction: ltr;
  unicode-bidi: isolate;
}
.m-stores a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  width: 148px;
  line-height: 0;
}
.m-stores a img {
  display: block;
  height: 44px !important;
  width: 148px !important;
  object-fit: contain;
  object-position: center;
  transform: none;
}
.m-footer {
  width: 100%;
  max-width: 560px;
  padding: 8px 16px 28px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}
.m-footer a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}
.m-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 18px;
  margin-bottom: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  z-index: 120;
  max-width: min(92vw, 420px);
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--deep);
  color: #fff;
  font-family: var(--font);
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 720px) {
  .m-hero { padding: 36px 32px 30px; }
  .m-actions {
    grid-template-columns: 1fr 1fr;
  }
  .m-actions .m-btn-gold {
    grid-column: 1 / -1;
  }
  .m-card { padding: 28px 26px; }
  .m-steps {
    grid-template-columns: 1fr 1fr;
  }
}
