/* NAFHA — mobile-first RTL landing page. */

:root {
  --terracotta: #C75B39;
  --terracotta-dark: #A6472B;
  --saffron: #E9A522;
  --saffron-dark: #C8871A;
  --mint: #3E8E6A;
  --cream: #FBF3E4;
  --white: #FFFFFF;
  --ink: #2A211C;
  --muted: #7A6A60;
  --line: #EADDC8;
  --err: #C0392B;

  --wrap: 640px;          /* the page is a product page, not a magazine */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(42, 33, 28, .10);
  --font: "Tajawal", system-ui, "Segoe UI", sans-serif;
  --font-head: "Cairo", var(--font);
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.4; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
.section { padding-block: 32px; }
.section--cream { background: var(--cream); }
.section--mint { background: var(--mint); color: #EAF6F0; }
.section--mint h2 { color: var(--white); }
.center { text-align: center; }

/* ---------- 1. Announcement bar ---------- */
.announce {
  background: var(--terracotta);
  color: var(--white);
  font-family: var(--font-head);
  font-size: .92rem;
  font-weight: 600;
  padding: 9px 0;
  overflow: hidden;
  white-space: nowrap;
}
.announce__track {
  display: inline-flex;
  will-change: transform;
  animation: marquee 26s linear infinite;
}
/* Each copy carries its own trailing space so the two units are identical
   widths — a 50% translate then lands exactly one unit on, with no jump. */
.announce__track > span { padding-inline-start: 56px; white-space: nowrap; }
/* RTL: text flows right-to-left, so the track travels to the right. */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(50%); }
}
.announce:hover .announce__track { animation-play-state: paused; }

/* ---------- 2. Header ---------- */
.header { border-bottom: 1px solid var(--line); background: var(--white); }
.header__inner { padding-block: 4px; text-align: center; }
.logo {
  font-family: var(--font-head); font-size: 1.6rem; font-weight: 700;
  letter-spacing: .12em; color: var(--terracotta); text-decoration: none;
  display: inline-block;
}
.logo__sub { display: block; font-family: var(--font); font-size: .6rem; letter-spacing: .04em; color: var(--muted); font-weight: 400; }
/* Image logo: sized by height so the artwork's own proportions decide width. */
.logo--img { line-height: 0; }
.logo--img img { width: 107px; height: auto; margin-inline: auto; }
.nav { display: flex; justify-content: center; gap: 22px; margin-top: 8px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-size: .92rem; }
.nav a:hover { color: var(--terracotta); }

/* ---------- 3. Gallery ---------- */
.gallery { background: var(--cream); }
.gallery__viewport { overflow: hidden; }
.gallery__track {
  display: flex;
  transition: transform .35s ease;
  touch-action: pan-y;
}
.gallery__slide { flex: 0 0 100%; }
.gallery__slide img { width: 100%; aspect-ratio: 900 / 1125; object-fit: cover; }

.gallery__dots { display: flex; justify-content: center; gap: 8px; padding: 12px 0 4px; }
.gallery__dot {
  width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0;
  background: var(--line); cursor: pointer;
}
.gallery__dot.is-on { background: var(--terracotta); width: 22px; border-radius: 999px; }

.gallery__thumbs { display: flex; justify-content: center; gap: 8px; padding-bottom: 14px; }
.gallery__thumb {
  border: 2px solid transparent; border-radius: var(--radius-sm);
  padding: 0; background: none; cursor: pointer; overflow: hidden;
  width: 56px; flex: none; line-height: 0;
}
.gallery__thumb img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.gallery__thumb.is-on { border-color: var(--terracotta); }

/* ---------- 4. Title + price ---------- */
.product { padding-top: 22px; }
.product__title { font-size: 1.35rem; margin-bottom: 10px; }
.product__price {
  font-family: var(--font-head); font-size: 2.3rem; font-weight: 700;
  color: var(--saffron); line-height: 1.2;
}
.product__compare { color: var(--muted); text-decoration: line-through; font-size: 1.05rem; margin-inline-start: 10px; }
.product__suffix {
  font-family: var(--font-head); font-weight: 700;
  color: var(--mint); font-size: 1.02rem;
  margin-inline-start: 10px; white-space: nowrap;
}
.product__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding: 0; list-style: none; }
.product__badges li {
  background: var(--cream); border: 1px solid var(--line); color: var(--terracotta-dark);
  border-radius: 999px; padding: 5px 12px; font-size: .82rem; font-weight: 500;
}

/* ---------- 4b. Pack select (multi-pack pages only) ---------------------- */
.pack-select { padding-top: 6px; display: flex; flex-direction: column; gap: 12px; }

/* A real <button>, not a styled radio/checkbox. The checkmark and the photo
   are pinned to PHYSICAL corners (left / right), not logical start/end —
   deliberately, to match the reference layout exactly regardless of writing
   direction (same reasoning as the floating WhatsApp/sticky-CTA buttons
   elsewhere on this site, which hit the equivalent logical-property bug). */
.pack-row {
  position: relative; display: block; width: 100%;
  text-align: start; cursor: pointer; font: inherit; color: inherit;
  background: var(--white); border: 2px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 14px 12px 52px;   /* left gutter clears the absolute check */
}
.pack-row.is-selected { border-color: var(--terracotta); }

.pack-row__check {
  position: absolute; left: 13px; top: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--line); display: grid; place-items: center;
}
.pack-row.is-selected .pack-row__check { background: var(--terracotta); }
.pack-row__check svg { width: 16px; height: 16px; }
.pack-row__check path { stroke: var(--muted); }
.pack-row.is-selected .pack-row__check path { stroke: var(--white); }

.tiers__heading {
  font-family: var(--font-head); font-size: 1.15rem;
  margin: 18px 0 10px;
}

.pack-row__badge {
  display: inline-block; margin-bottom: 5px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--saffron); color: var(--ink);
  font-family: var(--font-head); font-weight: 700;
  font-size: .76rem; line-height: 1.5;
}

.pack-row__name {
  font-family: var(--font-head); font-weight: 700; font-size: 1.02rem;
  margin: 0 0 2px; line-height: 1.3; color: var(--ink);
}

.pack-row__price {
  font-family: var(--font-head); font-weight: 700; color: var(--terracotta);
  font-size: 1.5rem; margin: 0 0 6px; line-height: 1.25;
}

/* Two columns. In RTL the first flex child lands on the right, so the
   photo sits right and the text column beside it — and crucially the text
   keeps ONE right edge all the way down instead of wrapping underneath. */
.pack-row__body { display: flex; align-items: flex-start; gap: 14px; }
.pack-row__text { flex: 1 1 auto; min-width: 0; }

.pack-row__img {
  flex: none; width: 116px;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--cream);
}
.pack-row__img img { width: 100%; height: auto; display: block; }

/* Bullets, not numbers: the contents of a pack are a set, not a sequence.
   padding-inline-start is correct here (it must flip with the writing
   direction, unlike the fixed-corner floating controls). */
.pack-row__list { list-style: disc; margin: 0; padding-inline-start: 1.1em; }
.pack-row__list li { padding: 1px 0; font-size: .94rem; line-height: 1.6; }
.pack-row__list li::marker { color: var(--terracotta); }

/* Which pack the order form will actually submit. */
.order__selected {
  text-align: center; font-weight: 700; color: var(--mint);
  background: var(--cream); border-radius: var(--radius-sm);
  padding: 10px 14px; margin: 0 0 16px; font-size: .92rem;
}

/* ---------- 5. Order form ---------- */
.order { scroll-margin-top: 12px; }
.order__box {
  background: var(--white); border: 2px solid var(--terracotta);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 16px;
}
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; font: inherit; font-size: 1rem;
  padding: 13px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--cream); color: var(--ink); text-align: right;
}
.field select { appearance: none; background-image: none; }
.field input:focus, .field select:focus {
  outline: 3px solid rgba(233, 165, 34, .35); border-color: var(--terracotta);
}
/* Phone is typed in Latin digits even in an RTL page */
.field input[name="phone"] { direction: ltr; text-align: right; letter-spacing: .04em; }
.field__err { display: none; color: var(--err); font-size: .84rem; font-weight: 700; margin-top: 5px; }
.field.is-invalid input, .field.is-invalid select { border-color: var(--err); background: #FDF1EF; }
.field.is-invalid .field__err { display: block; }

/* Honeypot. Hidden by clipping, never by off-screen offsets: in RTL a
   `right:-9999px` pushes the document wider and shifts the whole page. */
.hp {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; border: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.btn-order {
  width: 100%; border: 0; cursor: pointer;
  background: var(--terracotta); color: var(--white);
  font-family: var(--font-head); font-size: 1.15rem; font-weight: 700;
  padding: 17px 20px; border-radius: 999px;
  box-shadow: 0 5px 0 var(--terracotta-dark);
  animation: pulse 2.6s ease-in-out infinite;
}
.btn-order:hover { background: var(--terracotta-dark); }
.btn-order:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--terracotta-dark); animation: none; }
.btn-order[disabled] { opacity: .65; cursor: not-allowed; animation: none; }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.022); }
}

.order__note { font-size: .84rem; color: var(--muted); text-align: center; margin: 12px 0 0; }
.formmsg { display: none; border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; font-weight: 700; font-size: .92rem; }
.formmsg.is-err { display: block; background: #FDF1EF; color: var(--err); }

/* Thank-you state, swapped in place of the form */
.thanks { text-align: center; padding: 26px 10px; }
.thanks__check { width: 62px; height: 62px; margin: 0 auto 14px; }
.thanks h3 { color: var(--mint); font-size: 1.35rem; }
.thanks__ref { font-size: .9rem; color: var(--muted); }

/* ---------- 6. Description ---------- */
.block { margin-bottom: 26px; }
.block__title { display: flex; align-items: center; gap: 9px; font-size: 1.12rem; }
.block__title .emoji { font-size: 1.3rem; }
.block__img { margin-top: 14px; }
.block__img img { width: 100%; border-radius: var(--radius); }

.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .icon { flex: none; font-size: 1.05rem; line-height: 1.7; }

/* ---------- 7. Scents ---------- */
.scents { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.scent {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.scent img { width: 100%; aspect-ratio: 520 / 770; object-fit: cover; background: var(--cream); }
.scent__body { padding: 12px 12px 14px; }
.scent__name { font-family: var(--font-head); font-weight: 700; font-size: 1rem; margin: 0 0 2px; }
.scent__fr { font-size: .74rem; color: var(--muted); letter-spacing: .02em; margin: 0 0 6px; direction: ltr; text-align: right; }
.scent__notes { font-size: .8rem; color: var(--terracotta-dark); margin: 0 0 6px; }
.scent__desc { font-size: .86rem; margin: 0 0 8px; line-height: 1.65; }
.scent__ideal { font-size: .8rem; color: var(--mint); font-weight: 700; margin: 0; }

/* ---------- 8. How to use ---------- */
.steps { display: grid; gap: 12px; }
.step { display: flex; gap: 12px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.step__num {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--saffron); color: var(--white);
  font-family: var(--font-head); font-weight: 700;
  display: grid; place-items: center;
}
.step h3 { margin: 0 0 2px; font-size: 1rem; }
.step p { margin: 0; font-size: .88rem; color: var(--muted); }

/* ---------- 9. Reviews ---------- */
.review { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.review__stars { color: var(--saffron); letter-spacing: 2px; }
.review__name { font-weight: 700; font-size: .9rem; margin: 6px 0 0; }

/* ---------- 10. FAQ ---------- */
.faq details {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px;
}
.faq summary {
  font-family: var(--font-head); font-weight: 700; cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; gap: 12px;
  font-size: .98rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--terracotta); font-size: 1.3rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { margin-bottom: 8px; }
.faq p { margin: 0; font-size: .9rem; color: var(--muted); }

/* ---------- 12. Footer ---------- */
.footer { background: var(--ink); color: #D9CCC2; padding-block: 26px; font-size: .88rem; }
.footer a { color: var(--cream); text-decoration: none; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; padding: 0; margin: 0 0 14px; list-style: none; }
.footer__pay { display: flex; justify-content: center; align-items: center; gap: 8px; color: var(--saffron); font-weight: 700; margin-bottom: 10px; }

/* ---------- Floating elements ---------- */
.wa {
  position: fixed; left: 14px; bottom: 14px; z-index: 61;   /* physical: RTL must not flip this */
  transition: bottom .18s ease;
  width: 54px; height: 54px; border-radius: 50%;
  background: #25D366; display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.wa svg { width: 30px; height: 30px; }

.sticky {
  /* A floating pill, inset from the edges — NOT a flush full-bleed bar.
     Flush-to-edge made it read as part of the phone browser's own bottom
     chrome (address bar / tab switcher) rather than a page button. */
  position: fixed; left: 16px; right: 16px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 60;
  background: var(--terracotta); color: var(--white);
  font-family: var(--font-head); font-weight: 700; font-size: 1.1rem;
  border: 0; border-radius: 999px; cursor: pointer;
  padding: 16px 20px;
  box-shadow: 0 5px 0 var(--terracotta-dark), 0 8px 20px rgba(0, 0, 0, .22);
  display: none;
}
.sticky.is-on { display: block; }
.sticky:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--terracotta-dark), 0 4px 10px rgba(0, 0, 0, .22); }
/* Reserve room so the floating pill never covers the footer's last line. */
body.has-stickybar { padding-bottom: 96px; }
/* And lift the WhatsApp button clear of it. */
body.has-stickybar .wa { bottom: 86px; }
@media (min-width: 700px) {
  .sticky { display: none !important; }
  body.has-stickybar { padding-bottom: 0; }
  body.has-stickybar .wa { bottom: 14px; }
}

/* ---------- Larger screens: the page stays a centred product column ------- */
@media (min-width: 700px) {
  body { font-size: 17px; }
  h1 { font-size: 1.7rem; }
  .product__title { font-size: 1.6rem; }
  .product__price { font-size: 2.6rem; }
  .scents { grid-template-columns: repeat(4, 1fr); }
  .wrap { padding-inline: 20px; }
  .section { padding-block: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .announce__track, .btn-order { animation: none; }
  .wa { transition: none; }
  .gallery__track { transition: none; }
}
