:root {
  --blue: #345d9d;
  --blue-dark: #27497d;
  --blue-deep: #17365f;
  --green: #47bfb0;
  --green-dark: #319f93;
  --text: #17263e;
  --muted: #6d7b8f;
  --line: #dbe5ec;
  --surface: #f4f8fa;
  --white: #ffffff;
  --success: #2ea36f;
  --danger: #d84a4a;
  --shadow: 0 18px 50px rgba(39, 73, 125, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: #eef3f6;
  font-family: Tahoma, Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font-family: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.page-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 18px auto 60px;
}

.top-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.brand-block,
.intro-card,
.download-card,
.registration-card,
.phone-column,
.social-card,
.tutorial-section {
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 10px 28px rgba(39, 73, 125, 0.06);
}

.brand-block {
  min-height: 150px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 22px;
}

.brand-logo-image {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.intro-card {
  min-height: 150px;
  padding: 32px 44px;
  color: var(--white);
  border: 0;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
}

.intro-card h1 {
  margin: 0 0 12px;
  font-size: 24px;
}

.intro-card p {
  max-width: 780px;
  margin: 0;
  font-size: 17px;
  line-height: 1.9;
}

.download-card {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 20px;
  padding: 22px 32px;
  border-radius: 20px;
}

.download-card > div:first-child > span,
.section-title > span,
.tutorial-heading > span {
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 900;
}

.download-card h2 {
  margin: 8px 0 0;
  color: var(--blue-dark);
  font-size: 25px;
}

.download-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  direction: ltr;
  flex-wrap: wrap;
}

.store-badge-link {
  width: 180px;
  height: 54px;
  display: inline-block;
  line-height: 0;
  direction: ltr;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.store-badge-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(23, 36, 58, 0.18);
}

.store-badge-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.social-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 28px;
  padding: 14px 20px;
  border-radius: 15px;
}

.social-title {
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 900;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.social-icon-link {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(52, 93, 157, 0.18);
  border-radius: 14px;
  background: var(--white);
  transition: 0.2s ease;
}

.social-icon-link svg {
  width: 38px;
  height: 38px;
  display: block;
}

.social-icon-link:hover {
  border-color: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(39, 73, 125, 0.12);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.05fr);
  gap: 24px;
  align-items: start;
}

.phone-column,
.registration-card {
  border-radius: 22px;
}

.phone-column {
  min-height: 570px;
}

.phone-column {
  display: grid;
  place-items: center;
  padding: 28px;
}

.phone {
  width: 290px;
  padding: 10px;
  border-radius: 42px;
  background: #17243a;
  box-shadow: 0 24px 50px rgba(23, 36, 58, 0.22);
}

.phone-speaker {
  width: 70px;
  height: 7px;
  margin: 3px auto 8px;
  border-radius: 20px;
  background: #40516d;
}

.phone-screen {
  min-height: 490px;
  padding: 24px 18px;
  border-radius: 33px;
  background: #f8fbfc;
}

.phone-logo {
  color: var(--blue);
  font-size: 23px;
  font-weight: 900;
}

.phone-logo span {
  color: var(--green);
}

.phone-welcome {
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
}

.points-card {
  margin-top: 18px;
  padding: 22px;
  color: var(--white);
  border-radius: 20px;
  background: linear-gradient(135deg, var(--blue), var(--green-dark));
}

.points-card span,
.points-card small {
  display: block;
  font-size: 11px;
}

.points-card strong {
  display: block;
  margin: 8px 0;
  font-size: 38px;
}

.phone-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.phone-actions div {
  padding: 13px 4px;
  color: var(--blue-dark);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}

.phone-placeholder {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--green-dark);
  border: 1px dashed var(--green);
  border-radius: 15px;
  background: rgba(71, 191, 176, 0.06);
  font-size: 11px;
}

.registration-card {
  min-height: auto;
  padding: 38px 34px;
}

.section-title h2 {
  margin: 8px 0 10px;
  color: var(--blue-dark);
  font-size: 26px;
}

.section-title p {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.registration-card label:not(.terms-row) {
  display: block;
  margin: 15px 0 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.registration-card input[type="text"],
.registration-card input[type="tel"],
.registration-card input[type="password"] {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #fbfcfd;
}

.registration-card input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(71, 191, 176, 0.1);
}

.password-hint {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.terms-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 11px;
}

.primary-button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--green-dark));
  font-weight: 900;
}

.text-button {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  color: var(--blue);
  border: 0;
  background: transparent;
  font-weight: 800;
}

.otp-input {
  text-align: center;
  font-size: 23px;
  letter-spacing: 8px;
}

.success-box {
  padding-top: 45px;
  text-align: center;
}

.success-icon {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  color: var(--white);
  border-radius: 50%;
  background: var(--success);
  font-size: 32px;
}

.success-box .download-buttons {
  justify-content: center;
  margin-top: 25px;
}

.form-message,
.tutorial-message {
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  color: var(--danger);
  background: rgba(216, 74, 74, 0.08);
  text-align: center;
  font-size: 12px;
}

/* قسم طريقة الاستخدام */
.tutorial-section {
  margin-top: 28px;
  padding: 38px;
  border-radius: 24px;
}

.tutorial-heading {
  text-align: center;
}

.tutorial-heading h2 {
  margin: 8px 0 10px;
  color: var(--blue-deep);
  font-size: 31px;
}

.tutorial-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.tutorial-select-wrap {
  max-width: 520px;
  margin: 26px auto 28px;
}

.tutorial-select-wrap label {
  display: block;
  margin-bottom: 8px;
  color: var(--blue-dark);
  text-align: right;
  font-size: 13px;
  font-weight: 900;
}

.tutorial-select {
  width: 100%;
  min-height: 48px;
  display: block;
  padding: 0 16px;
  color: var(--blue-dark);
  border: 1px solid rgba(52, 93, 157, 0.25);
  border-radius: 14px;
  outline: none;
  background: var(--white);
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
}

.tutorial-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(71, 191, 176, 0.12);
}

.tutorial-viewer {
  display: grid;
  grid-template-columns: 330px minmax(300px, 1fr);
  align-items: center;
  justify-content: center;
  gap: 22px;
  max-width: 920px;
  margin: 0 auto;
}

.tutorial-phone {
  width: 310px;
  padding: 11px;
  border-radius: 48px;
  background: #14223a;
  box-shadow: 0 28px 60px rgba(20, 34, 58, 0.24);
}

.tutorial-phone-speaker {
  width: 78px;
  height: 7px;
  margin: 3px auto 9px;
  border-radius: 20px;
  background: #465875;
}

.tutorial-phone-screen {
  position: relative;
  aspect-ratio: 9 / 18.5;
  overflow: hidden;
  border-radius: 37px;
  background: #f5f8fa;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.tutorial-phone-screen.is-swiping {
  cursor: grabbing;
}

.tutorial-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: var(--white);
  pointer-events: none;
  -webkit-user-drag: none;
}

.tutorial-image-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.tutorial-details {
  text-align: right;
}

.tutorial-step-badge {
  display: none;
}

.tutorial-details h3 {
  display: block;
  width: 100%;
  margin: 12px 0 14px;
  padding: 12px 18px;
  color: var(--white);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--green-dark));
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 900;
}

.tutorial-details p {
  min-height: 75px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
  font-weight: 700;
}

.tutorial-dots {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0;
}

.tutorial-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d5dfe6;
}

.tutorial-dot.active {
  width: 25px;
  border-radius: 999px;
  background: var(--green);
}

.tutorial-navigation {
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  align-items: center;
  gap: 14px;
}

.tutorial-nav-button {
  min-height: 45px;
  border-radius: 12px;
  font-weight: 900;
}

.tutorial-nav-button.primary {
  color: var(--white);
  border: 0;
  background: linear-gradient(135deg, var(--blue), var(--green-dark));
}

.tutorial-nav-button.secondary {
  color: var(--blue-dark);
  border: 1px solid rgba(52, 93, 157, 0.22);
  background: var(--white);
}

.tutorial-nav-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.tutorial-counter {
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 820px) {
  .top-card,
  .content-grid,
  .tutorial-viewer {
    grid-template-columns: 1fr;
  }

  .brand-block {
    min-height: 120px;
  }

  .intro-card {
    min-height: auto;
  }

  .download-card {
    flex-direction: column;
    text-align: center;
  }

  .tutorial-viewer {
    gap: 10px;
  }

  .tutorial-phone {
    margin: 0 auto;
  }

  .tutorial-details {
    text-align: center;
  }

  .tutorial-dots {
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    margin-top: 10px;
  }

  .intro-card,
  .registration-card,
  .tutorial-section {
    padding: 26px 19px;
  }

  .download-buttons {
    width: 100%;
    flex-direction: column;
  }

  .success-store-badge {
    width: min(100%, 220px);
  }

  .social-card {
    flex-direction: column;
    gap: 10px;
  }

  .social-icon-link {
    width: 54px;
    height: 54px;
  }

  .phone-column {
    padding-left: 12px;
    padding-right: 12px;
  }

  .phone {
    width: min(300px, 100%);
  }

  .tutorial-phone {
    width: min(285px, 100%);
  }

  .tutorial-select-wrap {
    margin: 22px auto 24px;
  }

  .tutorial-select {
    height: 56px;
    min-height: 56px;
    padding: 0 16px;
    font-size: 16px;
    line-height: normal;
    -webkit-appearance: menulist;
    appearance: auto;
  }
.tutorial-details h3 {
    margin-top: 10px;
    font-size: 13px;
  }

  .tutorial-details p {
    min-height: 62px;
    font-size: 18px;
  }

  .tutorial-navigation {
    grid-template-columns: 1fr 76px 1fr;
    gap: 8px;
  }
}


/* صور التطبيق الديناميكية */
.content-grid.app-images-hidden {
  grid-template-columns: minmax(360px, 760px);
  justify-content: center;
}

.content-grid.app-images-hidden .registration-card {
  width: 100%;
}

.app-images-viewer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-image-screen {
  position: relative;
  padding: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.app-image-screen.is-swiping {
  cursor: grabbing;
}

.app-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 33px;
  background: var(--white);
  pointer-events: none;
  -webkit-user-drag: none;
}

.app-image-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  background: #f8fbfc;
  text-align: center;
  font-size: 12px;
}

.app-image-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 22px 0 16px;
}

.app-image-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d5dfe6;
}

.app-image-dot.active {
  width: 25px;
  border-radius: 999px;
  background: var(--green);
}

.app-image-navigation {
  width: min(100%, 360px);
  display: grid;
  grid-template-columns: 110px 1fr 110px;
  align-items: center;
  gap: 12px;
}

.app-image-nav-button {
  min-height: 43px;
  border-radius: 12px;
  font-weight: 900;
}

.app-image-nav-button.primary {
  color: var(--white);
  border: 0;
  background: linear-gradient(135deg, var(--blue), var(--green-dark));
}

.app-image-nav-button.secondary {
  color: var(--blue-dark);
  border: 1px solid rgba(52, 93, 157, 0.22);
  background: var(--white);
}

.app-image-nav-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.app-image-counter {
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 520px) {
  .app-image-navigation {
    grid-template-columns: 1fr 76px 1fr;
    gap: 8px;
  }
}

/* ======================================================
   Customer registration + store join layout
   ====================================================== */

.forms-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.store-join-card {
  background: var(--white);
  border: 1px solid rgba(52, 93, 157, 0.16);
  border-radius: 22px;
  padding: 28px 34px;
  box-shadow: 0 18px 42px rgba(33, 62, 89, 0.08);
}

.store-section-title {
  margin-bottom: 20px;
}

.store-section-title h2 {
  margin-bottom: 6px;
}

.store-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.store-field {
  min-width: 0;
}

.store-join-card label {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.store-join-card input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--text);
  background: #fbfcfd;
  border: 1px solid #d7e1e8;
  border-radius: 13px;
  outline: none;
  font: inherit;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.store-join-card input:focus {
  background: var(--white);
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(44, 181, 169, 0.12);
}

.store-join-button {
  margin-top: 18px;
}

.terms-row a {
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 821px) {
  .content-grid {
    align-items: stretch;
    grid-template-columns: minmax(440px, 1fr) minmax(420px, 1fr);
  }

  .phone-column {
    height: 100%;
    display: flex;
    align-items: center;
  }

  .app-images-viewer {
    min-height: 100%;
    justify-content: center;
  }

  .registration-card {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .registration-card .section-title {
    margin-bottom: 20px;
  }

  .registration-card label:not(.terms-row) {
    margin-top: 14px;
  }

  .registration-card input[type="text"],
  .registration-card input[type="tel"],
  .registration-card input[type="password"] {
    min-height: 48px;
  }
}

@media (max-width: 820px) {
  .forms-column {
    order: 1;
  }

  .phone-column {
    order: 2;
  }

  .store-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .store-join-card {
    padding: 26px 19px;
  }

  .forms-column {
    gap: 14px;
  }
}



.success-box .download-buttons {
  gap: 14px;
  justify-content: center;
  margin-top: 25px;
}

.success-store-badge {
  box-shadow: 0 6px 16px rgba(23, 36, 58, 0.12);
}

.success-box p {
  margin-bottom: 0;
}

@media (max-width: 520px) {
  .success-store-badge {
    width: min(100%, 220px);
  }
}

/* إطار تحميل التطبيق في نهاية الصفحة */
.download-card.page-bottom-download {
  margin-top: 28px;
  margin-bottom: 0;
}

@media (max-width: 520px) {
  .download-card.page-bottom-download {
    margin-top: 20px;
  }
}

.page-footer {
  margin-top: 14px;
  padding: 12px 16px;
  color: #7b8798;
  border: 1px solid rgba(52, 93, 157, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
  direction: ltr;
  font-family: Arial, sans-serif;
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 520px) {
  .page-footer {
    padding: 10px 12px;
    font-size: 9px;
  }
}
