:root {
  --bg: #f3f7f2;
  --ink: #102117;
  --muted: #4c6b59;
  --panel: #ffffff;
  --line: #cfe1d2;
  --primary: #155d3b;
  --primary-dark: #174227;
  --secondary: #2c6788;
  --success: #1f8751;
  --soft: #edf3ec;
  --gold: #c99b3b;
  --gold-soft: #f7edd9;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-lg: 0 24px 42px rgba(15, 36, 23, 0.12);
  --shadow-md: 0 12px 24px rgba(16, 34, 21, 0.09);
}

* { box-sizing: border-box; }
html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  line-height: 1.45;
  background:
    radial-gradient(900px 420px at -10% -12%, #dbeeda 0%, transparent 58%),
    radial-gradient(800px 400px at 114% -6%, #e7f2df 0%, transparent 55%),
    linear-gradient(180deg, #f8faf4 0%, var(--bg) 78%);
}

.app-shell {
  width: 100%;
  max-width: 1200px;
  margin: 1.2rem auto 2.4rem;
  padding: 0 1rem;
}

body[dir="rtl"] {
  background:
    radial-gradient(900px 420px at 110% -12%, #dbeeda 0%, transparent 58%),
    radial-gradient(800px 400px at -14% -6%, #e7f2df 0%, transparent 55%),
    linear-gradient(180deg, #f8faf4 0%, var(--bg) 78%);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
}

h1 {
  margin: 0.35rem 0 0.2rem;
  font-family: "DM Serif Display", serif;
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  line-height: 1.08;
}

.subtitle { margin: 0; color: var(--muted); max-width: 58ch; }
.site-link {
  margin: 0.25rem 0 0;
  font-weight: 800;
  color: #1d4f30;
  letter-spacing: 0.02em;
}

.hero-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  justify-content: flex-end;
}

.chip {
  border: 1px solid #c9d3c0;
  background: #f7faf5;
  color: #2a4a35;
  border-radius: 999px;
  padding: 0.42rem 0.75rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.chip.active {
  border-color: #a0b59c;
  background: #eaf2e7;
}

.progress {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.4rem;
}

.step-pill {
  display: flex;
  align-items: center;
  gap: 0.46rem;
  border: 1px solid #cdd8c7;
  background: #f8fbf7;
  border-radius: 999px;
  padding: 0.36rem 0.54rem;
  color: #4f6557;
  font-weight: 700;
  min-width: 0;
  min-height: 40px;
}

.step-pill span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eaf2e6;
  color: #2a5336;
  font-size: 0.78rem;
  flex: 0 0 auto;
}

.step-pill small {
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-pill.active {
  border-color: var(--gold);
  background: linear-gradient(180deg, #fffdf8, var(--gold-soft));
  color: #3f3220;
}

.step-pill.active span {
  background: var(--gold);
  color: #fff;
}

.step-pill.current {
  border-color: #19633d;
  box-shadow: 0 0 0 2px rgba(23, 98, 60, 0.14);
}

.step {
  display: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 1.12rem;
}

.step.active { display: block; }

h2 {
  margin: 0.1rem 0 0.9rem;
  font-size: clamp(1.04rem, 2.1vw, 1.32rem);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  justify-items: center;
}

.card {
  border: 1px solid #cad6c7;
  border-radius: var(--radius-lg);
  padding: 0.9rem;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: center;
  margin: 0 auto;
  width: 100%;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #a7bea4;
  box-shadow: 0 16px 28px rgba(20, 46, 29, 0.1);
}

.card.selected {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px #d8bd86, 0 16px 28px rgba(31, 60, 38, 0.12);
  background: linear-gradient(165deg, #fffdf8, #f9f2e4);
}

.card-media {
  width: 100%;
  max-width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  min-height: 190px;
  max-height: 190px;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  border: 1px solid #d9e3d3;
  background: #eef4ea;
  margin-bottom: 0.55rem;
  padding: 0;
}

.card.addon-product .card-media,
.card.delivery-option .card-media {
  object-fit: contain;
  background: #fff;
  padding: 0.24rem;
}

.card-head {
  margin: 0.4rem 0 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.card h4 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.price {
  margin: 0;
  font-weight: 800;
  color: var(--primary);
  font-size: 1.05rem;
  white-space: nowrap;
  text-align: right;
}

.select-wrap {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.select-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.select-btn {
  width: 100%;
  min-height: 44px;
  border: 1px solid #a8c2ae;
  border-radius: 10px;
  background: linear-gradient(180deg, #eff7ee, #e4f0e4);
  color: #1a4f33;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.card.selected .select-btn {
  border-color: #c89a3a;
  background: linear-gradient(180deg, #f7ecd5, #ecd9b5);
  color: #3f2f11;
}

.summary-card,
.tracking-card,
.lead-status-card {
  border: 1px solid #d4ded1;
  border-radius: 12px;
  padding: 0.95rem;
  background: #fcfefb;
  box-shadow: var(--shadow-md);
}

.lead-status-options {
  display: grid;
  gap: 0.55rem;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid #cfd9cb;
  border-radius: 10px;
  padding: 0.52rem 0.64rem;
  background: #f8fbf7;
  font-weight: 700;
  cursor: pointer;
}

.status-pill input[type="radio"] {
  accent-color: var(--primary);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.56rem;
  align-items: baseline;
}

/* Default = English (LTR) */
.summary-desc {
  flex: 1;
  text-align: left;
}

.summary-price {
  flex: 0 0 110px;
  text-align: right;
  font-weight: 800;
}

.summary-total {
  border-top: 1px dashed #cbd8c8;
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  align-items: baseline;
}

/* ---------- FINAL URDU SUMMARY LAYOUT ---------- */
body[dir="rtl"] .summary-row {
  flex-direction: row-reverse;
}

body[dir="rtl"] .summary-total {
  flex-direction: row-reverse;
}

body[dir="rtl"] .summary-desc {
  flex: 1;
  text-align: right;
}

body[dir="rtl"] .summary-price {
  flex: 0 0 110px;
  text-align: left;
  font-weight: 800;
}
/* -------------------------------------------- */
.form-grid { display: grid; gap: 0.75rem; }
label { font-weight: 700; font-size: 0.92rem; }

.field-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.field-head small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  margin-top: 0.34rem;
  border: 1px solid #c5d2bf;
  border-radius: 10px;
  padding: 0.65rem 0.74rem;
  font: inherit;
}

input:focus,
textarea:focus {
  outline: 2px solid #93bd9a;
  border-color: #93bd9a;
}

.btn-row {
  margin-top: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem;
}

.btn-row.between { justify-content: space-between; }

.btn {
  border: none;
  border-radius: 10px;
  padding: 0.68rem 1.02rem;
  min-height: 44px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.btn.primary { background: linear-gradient(180deg, #26663e, var(--primary)); color: #fff; }
.btn.secondary { background: linear-gradient(180deg, #3a7498, var(--secondary)); color: #fff; }
.btn.success { background: linear-gradient(180deg, #28915c, var(--success)); color: #fff; }
.btn.ghost { background: var(--soft); border: 1px solid #c9d7c8; color: #1f412e; }

.confirmation-text { color: #294637; font-weight: 600; }
.muted { color: var(--muted); }
.error { color: #ad3e00; font-weight: 700; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  background: #1d3d2a;
  color: #fff;
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
  font-weight: 650;
  z-index: 100;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

body[dir="rtl"] {
  font-family: "Noto Naskh Arabic", serif;
}

body[dir="rtl"] h1,
body[dir="rtl"] h2,
body[dir="rtl"] h3,
body[dir="rtl"] h4,
body[dir="rtl"] .btn,
body[dir="rtl"] input,
body[dir="rtl"] textarea,
body[dir="rtl"] .chip,
body[dir="rtl"] .step-pill small {
  font-family: "Noto Naskh Arabic", serif;
}
body[dir="rtl"] {
  line-height: 1.7;
}
body[dir="rtl"] .hero-controls {
  justify-content: flex-end;
}

body[dir="rtl"] .field-head {
  flex-direction: row;
}

body[dir="rtl"] .card h4 {
  line-height: 1.8;
}

body[dir="rtl"] .card-head {
  flex-direction: row-reverse;
}
body[dir="rtl"] .price {
  text-align: left;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(125deg, #ffffff, #f3f8ef);
  border: 1px solid #d6e5d4;
  border-radius: 18px;
  padding: 0.9rem 1rem;
  box-shadow: 0 14px 30px rgba(18, 45, 27, 0.08);
}
body[dir="rtl"] h2 {
  text-align: center;
}
body[dir="rtl"] .progress {
  direction: rtl;
}
body[dir="rtl"] .hero {
  flex-direction: row-reverse;
}
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .progress { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {

  .app-shell {
    width: 100%;
    margin: 0.6rem auto 1.2rem;
    padding: 0 0.6rem;
  }

  h1 {
    font-size: clamp(1.85rem, 9vw, 2.5rem);
  }

  .hero-controls {
    justify-content: flex-end;
  }

  .progress {
    display: flex;
    overflow-x: auto;
    gap: 0.45rem;
    padding-bottom: 0.2rem;
    -webkit-overflow-scrolling: touch;
  }

  body[dir="rtl"] .progress {
    flex-direction: row-reverse;
  }

  .step-pill {
    flex: 0 0 auto;
    min-width: 96px;
    padding: 0.34rem 0.5rem;
  }

  .step-pill small {
    font-size: 0.74rem;
  }

  .step {
    border-radius: 18px;
    padding: 0.82rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .card-media {
    min-height: 172px;
    max-height: 172px;
  }

  .btn-row {
    position: sticky;
    bottom: 0;
    z-index: 3;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 34%);
    padding-top: 0.48rem;
  }

  .btn {
    width: 100%;
  }
}