/* ============================================================
   NEWSLETTER / SUBSCRIBE styles — brand-tuned
   ============================================================ */

/* shared form */
.nl-form { display: flex; gap: 10px; align-items: stretch; }
.nl-input {
  flex: 1; min-width: 0; font: inherit; font-size: 15px;
  padding: 13px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.nl-input::placeholder { color: var(--muted); }
.nl-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 20%, transparent); }
.nl-input.is-err { border-color: var(--c-roast); box-shadow: 0 0 0 3px color-mix(in oklab, var(--c-roast) 18%, transparent); }
.nl-btn {
  flex: none; border: none; cursor: pointer; white-space: nowrap;
  background: var(--ink); color: var(--surface);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0 22px; border-radius: 999px; transition: background .16s ease, transform .12s ease;
}
.nl-btn:hover { background: var(--accent); color: var(--accent-ink, #fff); }
.nl-btn:active { transform: scale(.97); }
.nl-done { display: inline-flex; align-items: center; gap: 10px; color: var(--c-green); font-size: 15px; font-weight: 600; }
.nl-done__tick {
  width: 24px; height: 24px; flex: none; border-radius: 999px; background: var(--c-green); color: #fff;
  display: grid; place-items: center; font-size: 14px;
}

/* ---- footer band ---- */
.nl-bar {
  display: grid; grid-template-columns: 1fr minmax(300px, 420px); align-items: center; gap: clamp(24px, 5vw, 64px);
  padding: clamp(28px, 4vw, 44px) 0; margin-bottom: clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
}
.nl-bar__title {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -0.015em; margin: 0; color: var(--ink);
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.nl-bar__title-ar { font-family: "Thmanyah Display", var(--font-serif); font-weight: 700; font-size: .68em; color: var(--c-green); }
.nl-bar__sub { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: 8px 0 0; max-width: 52ch; }
[data-lang="ar"] .nl-bar__title-ar { display: none; }

/* ---- small dismissible corner card (bottom-right) ---- */
.nl-toast {
  position: fixed; inset-inline-end: 22px; bottom: 22px; z-index: 1200;
  width: min(338px, calc(100vw - 30px));
  background: var(--surface); border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 16px; padding: 20px 20px 18px;
  box-shadow: 0 30px 70px -30px rgba(24,22,19,.55);
  animation: nlToastIn .42s cubic-bezier(.2,.7,.3,1);
}
@keyframes nlToastIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.nl-toast__x {
  position: absolute; top: 10px; inset-inline-end: 10px;
  width: 28px; height: 28px; border: none; background: var(--paper-2);
  border-radius: 999px; font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.nl-toast__x:hover { background: var(--line); color: var(--ink); }
.nl-toast__eyebrow { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.nl-toast__title { font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 1.16; letter-spacing: -.01em; margin: 7px 0 0; color: var(--ink); }
.nl-toast__sub { font-size: 12.5px; line-height: 1.5; color: var(--ink-2); margin: 7px 0 14px; }
.nl-form--toast { flex-direction: column; gap: 8px; }
.nl-form--toast .nl-input { padding: 11px 14px; font-size: 14px; }
.nl-form--toast .nl-btn { padding: 11px; font-size: 12px; }
[data-lang="ar"] .nl-toast { text-align: right; }
[data-lang="ar"] .nl-toast__title { font-family: "Thmanyah Display", var(--font-serif); }
[data-lang="ar"] .nl-toast__sub { font-family: "Thmanyah Sans", system-ui, sans-serif; }
@media (max-width: 520px) {
  /* float toast above the cart FAB (56px tall + 16px bottom = 72px) */
  .nl-toast { inset-inline-end: 12px; bottom: 90px; left: 12px; width: auto; }
  /* larger touch target for dismiss button */
  .nl-toast__x { width: 40px; height: 40px; font-size: 20px; top: 8px; inset-inline-end: 8px; }
}

/* ---- one-time popup ---- */
.nl-pop {
  position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; z-index: 1300; background: rgba(24,22,19,.52); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 24px; animation: nlFade .25s ease;
}
@keyframes nlFade { from { opacity: 0; } to { opacity: 1; } }
.nl-pop__card {
  position: relative; width: min(460px, 100%); max-height: calc(100vh - var(--nav-h) - 48px); overflow-y: auto; background: var(--surface);
  border-radius: 22px; padding: 38px 36px 30px;
  box-shadow: 0 50px 110px -45px rgba(24,22,19,.65);
  border-top: 6px solid var(--accent);
  animation: nlPop .3s cubic-bezier(.2,.7,.3,1);
}
@keyframes nlPop { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
.nl-pop__x {
  position: absolute; top: 16px; inset-inline-end: 18px; width: 34px; height: 34px;
  border: none; background: var(--paper-2); border-radius: 999px; font-size: 22px; line-height: 1;
  color: var(--muted); cursor: pointer; transition: background .16s ease, color .16s ease;
}
.nl-pop__x:hover { background: var(--line); color: var(--ink); }
.nl-pop__eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
}
.nl-pop__title {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 4vw, 32px); line-height: 1.08;
  letter-spacing: -0.02em; margin: 12px 0 0; color: var(--ink); white-space: pre-line;
}
.nl-pop__sub { color: var(--ink-2); font-size: 15px; line-height: 1.6; margin: 14px 0 22px; text-wrap: pretty; }
.nl-form--pop { flex-direction: column; }
.nl-form--pop .nl-input { padding: 15px 18px; }
.nl-form--pop .nl-btn { padding: 15px; font-size: 13px; }
.nl-pop__cap { display: block; text-align: center; margin-top: 14px; font-size: 12px; color: var(--muted); }
.nl-pop .nl-done { justify-content: center; margin-top: 6px; }

[dir] .nl-pop__title { text-align: start; }

@media (max-width: 720px) {
  .nl-bar { grid-template-columns: 1fr; gap: 20px; }
  .nl-form--bar { flex-direction: column; }
  .nl-form--bar .nl-btn { padding: 13px; }
}
