/* Enhanced Modern Registration Styles - Dawry Abtal */
:root {
  --bg-main: #14103A;
  --bg-surface: #1e1754;
  --bg-card: #251d69;
  --bg-card-hover: #2e2480;
  --accent-coral: #FF6F4D;
  --accent-gold: #FFC83D;
  --accent-mint: #3FE0B5;
  --accent-blue: #6C93FF;
  --text-main: #F6F3FF;
  --text-muted: #B7B0E8;
  --text-dim: #8b82c7;
  --border-subtle: rgba(255, 255, 255, 0.12);
  --border-active: rgba(255, 111, 77, 0.6);
  --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 8px 30px rgba(255, 111, 77, 0.25);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: 'Readex Pro', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Background ambient glows */
.page-bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.glow-top-right {
  top: -150px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: rgba(255, 111, 77, 0.18);
}
.glow-bottom-left {
  bottom: -150px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: rgba(108, 147, 255, 0.15);
}

/* Nav */
.reg-top-nav {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-coral));
  display: grid;
  place-items: center;
  color: #14103A;
  box-shadow: 0 4px 14px rgba(255, 111, 77, 0.35);
}
.brand-text {
  font-family: 'Lalezar', sans-serif;
  font-size: 28px;
  line-height: 1;
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s;
}
.btn-back-home:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateX(2px);
}

/* Main Container & Layout */
.reg-wrapper {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px 80px;
}

/* Stepper Progress Bar */
.stepper-header {
  background: rgba(30, 23, 84, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 16px 24px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  backdrop-filter: blur(10px);
}
.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
}
.step-item.active {
  color: #fff;
  font-weight: 700;
}
.step-item.active .step-num {
  background: var(--accent-coral);
  color: #14103A;
  box-shadow: 0 0 16px rgba(255, 111, 77, 0.6);
}
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}
.step-divider {
  width: 40px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
}

/* Two Column Layout */
.reg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr);
  gap: 28px;
  align-items: flex-start;
}

/* Products Column */
.products-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-head-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.section-heading {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.selection-helpers {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
}
.btn-helper {
  background: none;
  border: none;
  color: var(--accent-mint);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.2s;
}
.btn-helper:hover {
  background: rgba(63, 224, 181, 0.1);
}

/* Product Selection Cards */
.product-card-wrap {
  display: block;
  cursor: pointer;
  position: relative;
}
.product-card-wrap input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ui-product-card {
  background: linear-gradient(145deg, #251d69 0%, #1a144d 100%);
  border: 1.5px solid var(--border-subtle);
  border-radius: 22px;
  padding: 22px 24px;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.product-card-wrap:hover .ui-product-card {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.product-card-wrap input[type="checkbox"]:checked + .ui-product-card {
  border-color: var(--accent-coral);
  background: linear-gradient(145deg, #2e227a 0%, #201757 100%);
  box-shadow: var(--shadow-glow);
}

.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #14103A;
}

.check-indicator {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: grid;
  place-items: center;
  transition: all 0.2s;
}
.check-indicator svg {
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s;
}
.product-card-wrap input[type="checkbox"]:checked + .ui-product-card .check-indicator {
  background: var(--accent-coral);
  border-color: var(--accent-coral);
}
.product-card-wrap input[type="checkbox"]:checked + .ui-product-card .check-indicator svg {
  opacity: 1;
  transform: scale(1);
}

.card-body-content h3 {
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  line-height: 1.35;
}
.card-body-content p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

.card-takeaway {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 13.5px;
  color: #d6d0ff;
}

.card-footer-price {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 12px;
}
.price-currency {
  font-size: 13px;
  color: var(--text-muted);
}
.price-num {
  font-family: 'Lalezar', sans-serif;
  font-size: 28px;
  color: var(--accent-gold);
  line-height: 1;
}

/* Coupon Card */
.coupon-card {
  background: linear-gradient(145deg, #1f1854 0%, #171142 100%);
  border: 1.5px dashed rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 22px;
  margin-top: 10px;
}
.coupon-title {
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.coupon-row {
  display: flex;
  gap: 10px;
}
.coupon-input-field {
  flex: 1;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 15px;
  color: #fff;
  text-transform: uppercase;
  transition: all 0.2s;
}
.coupon-input-field:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.1);
}
.btn-apply {
  background: var(--accent-gold);
  color: #14103A;
  border: none;
  border-radius: 12px;
  padding: 0 22px;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-apply:hover {
  background: #ffcf59;
  transform: translateY(-2px);
}
.coupon-msg {
  margin-top: 10px;
  font-size: 13.5px;
  display: none;
}
.coupon-msg.success { color: var(--accent-mint); display: block; font-weight: 600; }
.coupon-msg.error { color: #ff6f6f; display: block; }

/* Sticky Summary Card (Sidebar) */
.summary-sticky-card {
  position: sticky;
  top: 24px;
  background: linear-gradient(165deg, #241C6B 0%, #161145 100%);
  border: 1.5px solid var(--border-subtle);
  border-radius: 26px;
  padding: 28px 26px;
  box-shadow: var(--shadow-card);
}
.summary-heading {
  font-family: 'Lalezar', sans-serif;
  font-size: 26px;
  color: #fff;
  margin: 0 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
}

.sum-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 15px;
  color: var(--text-muted);
}
.sum-line.total-line {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed rgba(255, 255, 255, 0.18);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.total-display-price {
  font-family: 'Lalezar', sans-serif;
  font-size: 38px;
  color: var(--accent-coral);
  line-height: 1;
}

.btn-start-checkout {
  width: 100%;
  margin-top: 24px;
  padding: 16px 24px;
  border-radius: 999px;
  background: linear-gradient(110deg, var(--accent-gold), var(--accent-coral));
  color: #14103A;
  font-size: 17px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(255, 111, 77, 0.35);
  transition: all 0.25s ease;
}
.btn-start-checkout:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(255, 111, 77, 0.5);
}
.btn-start-checkout:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.perks-list {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.perk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #c4bbf5;
}
.perk-item svg {
  color: var(--accent-mint);
  flex-shrink: 0;
}

/* ================= MODALS & POPUPS ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 30, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: linear-gradient(165deg, #261D6F 0%, #161047 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  padding: 34px 30px;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.modal-overlay.active .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 20px;
  transition: background 0.2s;
}
.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-header-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-coral));
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  box-shadow: 0 10px 24px rgba(255, 111, 77, 0.3);
  color: #14103A;
}

.modal-title {
  font-family: 'Lalezar', sans-serif;
  font-size: 28px;
  text-align: center;
  color: #fff;
  margin: 0;
  line-height: 1.25;
}
.modal-desc {
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin: 8px 0 20px;
}

/* Instapay Highlight Card */
.instapay-highlight-card {
  background: rgba(20, 16, 58, 0.85);
  border: 1.5px solid rgba(255, 200, 61, 0.35);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.instapay-row-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px 14px;
  border-radius: 12px;
  margin-top: 8px;
}

.instapay-value-text {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  direction: ltr;
}

.btn-mini-copy {
  background: var(--accent-coral);
  color: #14103A;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}
.btn-mini-copy:hover {
  background: #ff856b;
}

/* Form Styles */
.form-field {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 15px;
  color: #fff;
  transition: border-color 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent-coral);
  background: rgba(255, 255, 255, 0.12);
}

/* Upload Dropzone */
.dropzone-box {
  border: 2px dashed rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  background: rgba(20, 16, 58, 0.45);
  position: relative;
  transition: all 0.2s;
}
.dropzone-box:hover, .dropzone-box.dragover {
  border-color: var(--accent-mint);
  background: rgba(63, 224, 181, 0.08);
}
.dropzone-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.dropzone-preview {
  margin-top: 14px;
  display: none;
  position: relative;
  text-align: center;
}
.dropzone-preview img {
  max-width: 100%;
  max-height: 180px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(20, 16, 58, 0.3);
  border-top-color: #14103A;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Mobile Adaptations */
@media (max-width: 900px) {
  .reg-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .summary-sticky-card {
    position: static;
    margin-top: 10px;
  }
}

@media (max-width: 600px) {
  .reg-wrapper {
    padding: 10px 14px 60px;
  }
  .stepper-header {
    padding: 12px 14px;
    font-size: 12px;
  }
  .step-divider {
    width: 20px;
  }
  .ui-product-card {
    padding: 18px 16px;
  }
  .modal-dialog {
    padding: 26px 18px;
    border-radius: 22px;
  }
}
