/* =========================================================
   ShelJded Gift Preferences — التصميم
   لتغيير الألوان: عدّل المتغيرات تحت :root فقط
   ========================================================= */
:root {
  --bg: #F7F4EF;          /* Off White */
  --surface: #FFFFFF;
  --ink: #141414;         /* أسود النصوص */
  --ink-soft: #5C5852;
  --ink-mute: #8F8A82;
  --line: #E4DED5;
  --line-strong: #CFC7BB;
  --beige: #EFE8DD;
  --accent: #141414;      /* لون الأزرار الأساسية */
  --accent-ink: #FFFFFF;
  --danger: #9A3B32;

  --radius: 14px;
  --radius-sm: 10px;
  --font: "IBM Plex Sans Arabic", -apple-system, "SF Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-brand: "Cormorant Garamond", "Times New Roman", serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --nav-h: 88px;
}

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

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
/* clip بدل hidden: يمنع السكرول الأفقي بدون ما يخرب الهيدر الثابت (sticky) */
body { overflow-x: clip; }

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.noscript { padding: 24px; text-align: center; }

/* ---------- الهيكل ---------- */
.app {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  padding: 18px 24px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.brand {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: .38em;
  /* letter-spacing يضيف مسافة بعد آخر حرف — نعوضها */
  margin-inline-start: .38em;
  direction: ltr;
  color: var(--ink);
}

.progress {
  width: 100%;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.progress.is-visible { opacity: 1; }
.progress__fill {
  height: 100%;
  width: 0;
  background: var(--ink);
  border-radius: 2px;
  transition: width .5s var(--ease);
  margin-inline-start: 0; /* RTL: يملأ من اليمين */
}

.stage {
  flex: 1;
  padding: 8px 24px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
}

/* ---------- الشاشات ---------- */
.screen {
  display: none;
  padding-top: 18px;
}
.screen.is-active {
  display: block;
  animation: enter .45s var(--ease) both;
}
.screen.is-active.from-back { animation-name: enterBack; }

@keyframes enter {
  from { opacity: 0; transform: translateX(-14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes enterBack {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: none; }
}

.q {
  font-size: 23px;
  font-weight: 500;
  line-height: 1.5;
  margin: 8px 0 6px;
  letter-spacing: 0;
}
.hint {
  margin: 0 0 22px;
  color: var(--ink-mute);
  font-size: 14px;
}
.q + .options, .q + .swatches { margin-top: 22px; }

/* ---------- الصفحة الأولى ---------- */
.screen--welcome.is-active,
.screen--done.is-active { animation-name: fade; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.welcome, .done {
  min-height: calc(100dvh - 140px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 12px 0 40px;
}
.welcome__mark, .done__seal {
  color: var(--ink);
  margin: 0 auto 28px;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}
.welcome__title {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.65;
  margin: 0 0 14px;
}
.welcome__text {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0 0 6px;
}
.welcome__note {
  font-size: 15px;
  color: var(--ink-mute);
  margin: 0 0 40px;
}
.welcome__meta {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 14px 0 0;
}

/* ---------- الأزرار ---------- */
.btn {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: 54px;
  padding: 0 26px;
  font-size: 16px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .15s var(--ease), background-color .2s, opacity .2s, border-color .2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: #2A2A2A; }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--block { width: 100%; }
.btn--grow { flex: 1; }
.btn--sm { min-height: 48px; padding: 0 18px; font-size: 15px; flex-shrink: 0; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.spinner {
  display: none;
  width: 16px; height: 16px;
  border: 1.5px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.btn.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.linkbtn {
  background: none;
  border: 0;
  margin: 36px auto 0;
  color: var(--ink-mute);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 8px;
}

/* ---------- شريط التنقل السفلي ---------- */
.nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  gap: 10px;
  padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 78%, rgba(247,244,239,0));
  max-width: 560px;
  margin: 0 auto;
}
.nav #backBtn { min-width: 96px; }

/* ---------- الخيارات ---------- */
.options { display: grid; gap: 10px; }
.options--grid { grid-template-columns: 1fr 1fr; }
.options--stack { grid-template-columns: 1fr; }
.options--chips { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }

.opt, .chip, .sw { position: relative; display: block; -webkit-tap-highlight-color: transparent; }
.opt input, .chip input, .sw input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  pointer-events: none;
}

.opt span {
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 16px;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
  word-break: break-word;
}
.opt input:checked + span {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
  background: var(--surface);
}
.opt input:focus-visible + span,
.chip input:focus-visible + span,
.sw input:focus-visible ~ .sw__dot { outline: 2px solid var(--ink); outline-offset: 2px; }

/* علامة صح صغيرة للخيارات المختارة */
.opt span::after {
  content: "";
  margin-inline-start: auto;
  width: 18px; height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  transition: all .2s;
  margin-inline-end: 0;
  padding-inline-start: 0;
}
.opt span { gap: 10px; }
.opt input:checked + span::after {
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.6 2.6L13 6.5' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
  border-color: var(--ink);
}

.opt--line { margin-top: 14px; }
.opt--line span { min-height: 54px; }
.opt--small span { min-height: 48px; font-size: 15px; background: transparent; }

.chip span {
  display: grid;
  place-items: center;
  min-height: 52px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  direction: ltr;
  cursor: pointer;
  transition: all .2s;
}
.chip--wide { grid-column: 1 / -1; }
.chip--wide span { direction: rtl; font-weight: 400; }
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- الألوان ---------- */
.swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 8px;
}
.sw { text-align: center; cursor: pointer; }
.sw__dot {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--c);
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px transparent;
  transition: box-shadow .2s, transform .2s var(--ease);
  color: var(--ink-soft);
  font-size: 22px;
  font-weight: 300;
}
.sw__dot--light { border-color: var(--line-strong); }
.sw__dot--metal { background: linear-gradient(135deg, var(--c), #fff 55%, var(--c)); }
.sw__dot--other { border: 1px dashed var(--line-strong); }
.sw__name { display: block; font-size: 13px; color: var(--ink-soft); line-height: 1.3; }
.sw input:checked ~ .sw__dot {
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4.5px var(--ink);
  transform: scale(1.02);
}
.sw input:checked ~ .sw__name { color: var(--ink); font-weight: 500; }

/* ---------- الحقول ---------- */
.field-label {
  display: block;
  font-size: 15px;
  color: var(--ink-soft);
  margin: 24px 0 8px;
}
.input {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 16px; /* 16px يمنع الآيفون من تكبير الصفحة */
  line-height: 1.5;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder { color: #B3ADA4; }
.input:focus { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.input--area { resize: vertical; min-height: 120px; }
.input.is-invalid { border-color: var(--danger); }
input[dir="ltr"]::placeholder { text-align: left; }

.reveal { animation: fade .35s var(--ease); }

/* ---------- البراندات ---------- */
.tag-input__row { display: flex; gap: 8px; }
.tag-input__row .input { flex: 1; min-width: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tags:empty { display: none; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 6px 8px 6px 14px;
  font-size: 15px;
  animation: fade .25s var(--ease);
}
.tag__text { direction: ltr; unicode-bidi: isolate; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag__x {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 0;
  background: var(--beige);
  display: grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

/* ---------- رفع الصور ---------- */
.upload__input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.upload__drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .2s;
}
.upload__drop:hover { border-color: var(--ink); }
.upload__input:focus-visible + .upload__drop { outline: 2px solid var(--ink); outline-offset: 2px; }
.upload__preview {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.upload__preview img {
  width: 76px; height: 76px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--beige);
}
.upload__remove {
  margin-inline-start: auto;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}
.upload.is-busy .upload__drop span::after { content: "…"; }

/* ---------- المقاسات ---------- */
.size-block + .size-block { margin-top: 12px; }
#clothOther { margin-top: 10px; }

/* ---------- الأخطاء ---------- */
.error {
  min-height: 0;
  margin: 14px 0 0;
  color: var(--danger);
  font-size: 14px;
}
.error:empty { display: none; }
.error--inline { margin-top: 8px; }
.error--submit {
  background: #FBF1EF;
  border: 1px solid #EFD6D1;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 18px;
}
.error--submit a { color: inherit; }
.shake { animation: shake .35s var(--ease); }
@keyframes shake {
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

/* ---------- صفحة النجاح ---------- */
.done__title { font-size: 26px; font-weight: 500; margin: 0 0 14px; }
.done__text { font-size: 17px; color: var(--ink-soft); margin: 0 0 4px; }
.done__check {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw .7s .25s var(--ease) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- حقل البوتات المخفي ---------- */
.hp {
  /* لا تستخدم left:-9999px — في صفحات RTL يسبب سكرول أفقي ضخم على الآيفون */
  position: absolute; top: 0; inset-inline-start: 0;
  width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); opacity: 0; pointer-events: none;
}

/* ---------- وضع تجريبي ---------- */
.demo-badge {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top));
  left: 8px;
  z-index: 20;
  background: #FFF6DA;
  border: 1px solid #EBD9A4;
  color: #6B5A20;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  pointer-events: none;
}

/* ---------- شاشات صغيرة جداً ---------- */
@media (max-width: 360px) {
  .stage, .topbar { padding-inline: 18px; }
  .nav { padding-inline: 18px; }
  .q { font-size: 21px; }
  .opt span { font-size: 15px; padding: 12px; }
  .swatches { gap: 14px 4px; }
  .sw__dot { width: 46px; height: 46px; }
  .options--chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- ديسكتوب ---------- */
@media (min-width: 768px) {
  .app { padding-top: 32px; }
  .q { font-size: 26px; }
  .welcome__title { font-size: 28px; }
  .swatches { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .nav { padding-bottom: 28px; }
}

/* احترام إعداد تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .done__check { stroke-dashoffset: 0; }
}

/* إخفاء إطار التركيز عن العناوين (التركيز لقارئ الشاشة فقط) */
[tabindex="-1"]:focus { outline: none; }

/* =========================================================
   صفحة خيارات الهدية (offer.html)
   ========================================================= */
.app--offer { max-width: 640px; }
.stage--offer { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.o-state { padding-top: 14px; animation: fade .4s var(--ease); }
.o-center { min-height: calc(100dvh - 160px); display: flex; flex-direction: column; justify-content: center; text-align: center; }
.o-center .btn { margin: 24px auto 0; }
.o-eyebrow { margin: 6px 0 4px; font-size: 13px; letter-spacing: .02em; color: var(--ink-mute); }
.o-title { font-size: 25px; font-weight: 500; line-height: 1.5; margin: 0 0 8px; text-wrap: balance; }
.o-text { margin: 0 0 6px; color: var(--ink-soft); font-size: 16px; }
.o-notice { margin: 16px 0 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--beige); font-size: 14px; color: var(--ink-soft); }
.o-notice--muted { background: transparent; border: 1px solid var(--line); }
.o-notice--warn { background: #FBF1EF; color: var(--danger); border: 1px solid #EFD6D1; }

.o-list { display: grid; gap: 18px; margin-top: 26px; }
.o-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.o-card__media { aspect-ratio: 4 / 5; max-width: 100%; background: var(--beige); display: grid; place-items: center; overflow: hidden; }
.o-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.o-card__ph { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; border: 1px solid var(--line-strong); font-family: var(--font-brand); font-size: 28px; letter-spacing: .08em; color: var(--ink-soft); }
.o-card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.o-card__num { margin: 0; font-size: 12px; color: var(--ink-mute); }
.o-card__brand { margin: 2px 0 0; font-family: var(--font-brand); font-size: 17px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; text-align: right; }
.o-card__item { margin: 0; font-size: 19px; font-weight: 500; line-height: 1.45; }
.o-card__details { margin: 2px 0 0; font-size: 14px; color: var(--ink-soft); }
.o-card__meta { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 14px 0 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.o-card__delivery { margin: 0; display: flex; flex-direction: column; font-size: 14px; color: var(--ink-soft); }
.o-card__label { font-size: 12px; color: var(--ink-mute); }
.o-card__price { margin: 0 0 0 0; margin-inline-start: auto; font-size: 22px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

.o-decline { margin-top: 26px; text-align: center; }
.o-decline .linkbtn { margin-top: 0; }
.o-decline__box { text-align: right; margin-top: 8px; }
.o-decline__box .btn { margin-top: 12px; }
.o-pay { margin-top: 28px !important; }

/* تحميل */
.o-skel { background: linear-gradient(90deg, var(--beige), #F6F1E9, var(--beige)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 10px; }
.o-skel--title { height: 30px; width: 70%; margin: 16px 0 12px; }
.o-skel--line { height: 16px; width: 90%; margin-bottom: 26px; }
.o-skel--card { height: 420px; border-radius: 18px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* نافذة التأكيد */
.no-scroll { overflow: hidden; }
.sheet { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(20, 20, 20, .38); animation: fade .25s var(--ease); }
.sheet__panel {
  position: relative; width: 100%; max-width: 640px;
  background: var(--bg); border-radius: 22px 22px 0 0;
  padding: 22px 24px calc(22px + env(safe-area-inset-bottom));
  max-height: 92dvh; overflow-y: auto;
  animation: sheetUp .35s var(--ease);
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet__title { font-size: 20px; font-weight: 500; margin: 0 0 12px; }
.sheet__pick { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.sheet__item { margin: 0; font-size: 16px; }
.sheet__price { margin: 4px 0 0; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sheet__actions { display: flex; gap: 10px; margin-top: 18px; }
.spinner--dark { border-color: rgba(0,0,0,.15); border-top-color: var(--ink); }

@media (min-width: 768px) {
  .o-list { grid-template-columns: 1fr 1fr; }
  .sheet { align-items: center; }
  .sheet__panel { border-radius: 22px; }
}
.o-card__item, .o-card__details, .sheet__item { text-align: right; }
a.btn { text-decoration: none; }

/* =========================================================
   لوحة الهدايا (admin.html)
   ========================================================= */
.app--admin { max-width: 640px; }
.topbar--admin { gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.a-sub { margin: 0; font-size: 12px; color: var(--ink-mute); }
.stage--admin { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
.a-view { padding-top: 16px; animation: fade .3s var(--ease); }
.a-muted { color: var(--ink-mute); }
.a-small { font-size: 13px; margin: 0 0 10px; }
.a-gap { margin-top: 18px; }
.a-gap-sm { margin-top: 10px; }
.a-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 10px; }
.a-head--tight { margin: 0 0 10px; }
.a-h { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.a-refresh { margin: 0; padding: 4px; }
.a-back { margin: 0 0 6px; padding: 6px 0; text-decoration: none; font-size: 15px; color: var(--ink-soft); }
.a-tip { margin-top: 26px; font-size: 13px; color: var(--ink-mute); }
.a-skel-row { height: 64px; margin-bottom: 10px; }

.a-list { display: grid; gap: 8px; }
.a-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; min-height: 64px; padding: 12px 14px; text-align: right;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  -webkit-tap-highlight-color: transparent;
}
.a-row:active { background: var(--beige); }
.a-row__main { display: flex; flex-direction: column; min-width: 0; }
.a-row__name { font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-row__id { font-size: 12px; color: var(--ink-mute); text-align: right; font-variant-numeric: tabular-nums; }
.a-chipstat { flex-shrink: 0; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--beige); color: var(--ink-soft); white-space: nowrap; }
.a-chipstat--accent { background: #141414; color: #fff; }
.a-chipstat--info { background: #E8F0FE; color: #1F3F7A; }
.a-chipstat--warn { background: #FBEBD9; color: #8A4B08; }
.a-chipstat--ok { background: #E3F4E8; color: #1F6B3A; }

.a-gift-head { margin-bottom: 8px; }
.a-id { margin: 0; font-size: 13px; color: var(--ink-mute); text-align: right; }
.a-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-top: 12px; }
.a-actions { display: flex; gap: 8px; margin-top: 8px; }
.a-grow { flex: 1; }
.btn--wa { background: #1F7A4D; color: #fff; }
.btn--wa.is-disabled { opacity: .45; }
.btn[disabled] { opacity: .45; }
.a-status { margin: 0 0 6px; font-size: 14px; color: var(--ink-soft); white-space: pre-line; }
.a-count { color: var(--ink-mute); font-weight: 400; }

.a-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.a-dl dt { color: var(--ink-mute); white-space: nowrap; }
.a-dl dd { margin: 0; word-break: break-word; }
.a-dl a { color: var(--ink); }

.a-options { display: grid; gap: 8px; }
.a-opt { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.a-opt__thumb { width: 56px; height: 56px; flex-shrink: 0; border-radius: 10px; background: var(--beige); overflow: hidden; display: grid; place-items: center; font-family: var(--font-brand); color: var(--ink-soft); }
.a-opt__thumb img { width: 100%; height: 100%; object-fit: cover; }
.a-opt__info { flex: 1; min-width: 0; }
.a-opt__title { margin: 0; font-size: 14px; font-weight: 500; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-opt__meta { margin: 2px 0 0; font-size: 13px; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.a-opt__del { flex-shrink: 0; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; font-size: 13px; }
.a-opt__del.is-armed { border-color: var(--danger); color: var(--danger); }

.a-upload { margin-top: 12px; }
.a-photo {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  aspect-ratio: 4 / 3; max-width: 100%; border: 1px dashed var(--line-strong); border-radius: 16px;
  background: var(--surface); color: var(--ink-soft); cursor: pointer; position: relative; overflow: hidden;
}
.a-photo--filled { border-style: solid; padding: 0; }
.a-photo--filled img { width: 100%; height: 100%; object-fit: cover; }
.a-photo__x { position: absolute; bottom: 10px; left: 10px; background: rgba(255,255,255,.92); }
.a-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.a-chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; }
.a-chip.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }

.a-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 40; background: var(--ink); color: #fff; font-size: 14px; padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0,0,0,.15); animation: fade .2s var(--ease); max-width: calc(100% - 32px); text-align: center;
}
.a-tip--ltr { margin-top: 4px; text-align: left; font-size: 12px; }

/* إضافة بوكيه الورد */
.addon { display: block; margin-top: 14px; position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.addon input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.addon__box {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.addon__icon { width: 46px; height: 46px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--beige); color: #8A5A3B; }
.addon__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.addon__title { font-size: 15px; font-weight: 500; }
.addon__desc { font-size: 13px; color: var(--ink-mute); line-height: 1.5; }
.addon__price { flex-shrink: 0; font-size: 14px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.addon__box::after {
  content: ""; width: 22px; height: 22px; flex-shrink: 0; border-radius: 6px; border: 1px solid var(--line-strong);
  transition: all .2s;
}
.addon input:checked + .addon__box { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.addon input:checked + .addon__box::after {
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.6 2.6L13 6.5' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat;
  border-color: var(--ink);
}
.addon input:focus-visible + .addon__box { outline: 2px solid var(--ink); outline-offset: 2px; }
.sheet__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-soft); }
.sheet__total span:last-child { font-size: 20px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
