:root {
  --gd: #1a4d2e;
  --gm: #1f6035;
  --ga: #2e7d4f;
  --gl: #a8d5b5;
  --gp: #cde8d4;
  --mint: #BDE3D9;
  --deep: #063e1e;
  --wh: #ffffff;
  --bg: #f3f8f5;
  --bdr: #dce9e1;
  --accent-red: #ff3b30;
  --accent-blue: #007bff;
}

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

body {
  font-family: "Nunito", sans-serif;
  background: var(--bg);
  color: #1a1a1a;
  overflow-x: hidden;
}

/* ══════════════════════════════════════
   MAIN CONTENT LAYOUT
══════════════════════════════════════ */
.info-main {
  padding: 15px 0 80px 0;
}

.page-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--gd);
  margin-bottom: 15px;
}

/* ── White card containers ── */
.info-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 12px 35px rgba(0, 40, 20, 0.06);
  border: 1px solid var(--bdr);
  margin-bottom: 20px;
}

.card-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--gd);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bg);
}

.card-hdr::before {
  content: "";
  width: 3px;
  height: 20px;
  background: var(--ga);
  border-radius: 10px;
}

/* ── Terms Content Box (from DB) ── */
.terms-content-box {
  background: var(--bg);
  border: 1px solid var(--bdr);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  color: #444;
  line-height: 1.7;
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 18px;
}

.terms-content-box::-webkit-scrollbar {
  width: 4px;
}
.terms-content-box::-webkit-scrollbar-track {
  background: var(--bdr);
  border-radius: 10px;
}
.terms-content-box::-webkit-scrollbar-thumb {
  background: var(--ga);
  border-radius: 10px;
}

/* ── Login prompt card ── */
.login-prompt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  margin-bottom: 25px;
}

.login-prompt-text h5 {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
}

.login-prompt-text p {
  font-size: 13.5px;
  color: #666;
  margin: 2px 0 0 0;
}

.btn-green {
  background: var(--ga);
  color: #fff;
  border: none;
  padding: 6px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-green:hover {
  background: var(--gm);
  color: #fff;
}

.btn-login-small {
  padding: 4px 12px;
  font-size: 12px;
  line-height: 1.2;
}

/* ── Form styling ── */
.form-group {
  margin-bottom: 18px;
}

.custom-check {
  accent-color: var(--ga);
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

.form-label {
  font-weight: 700;
  font-size: 13.5px;
  color: #444;
  margin-bottom: 5px;
  display: block;
}

.form-label .req {
  color: var(--accent-red);
  margin-left: 2px;
}

.form-control {
  height: 48px;
  background: var(--bg);
  border: 1px solid var(--bdr);
  border-radius: 8px;
  padding: 0 15px;
  font-size: 14.5px;
  transition: all 0.2s;
}

.form-control:focus {
  background: #fff;
  border-color: var(--ga);
  box-shadow: 0 0 0 3px rgba(46, 125, 79, 0.1);
}

.pass-wrap {
  position: relative;
}

.pass-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
}

.phone-field-wrap {
  position: relative;
}

.phone-field-wrap .form-control {
  padding-right: 92px;
}

.phone-verify-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--ga);
  font-weight: 700;
  font-size: 13px;
  padding: 0;
  transition: opacity 0.2s ease;
}

.phone-verify-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.phone-verify-btn:not(:disabled):hover {
  text-decoration: underline;
}

.phone-verified-tick {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ga);
  font-size: 16px;
  font-weight: 800;
}

.otp-section {
  margin-top: 10px;
}

.otp-label {
  margin-bottom: 8px;
}

.otp-row {
  display: flex;
  gap: 8px;
}

.otp-input {
  width: 46px;
  height: 46px;
  border: 1px solid var(--bdr);
  border-radius: 8px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  background: var(--bg);
}

.otp-input:focus {
  border-color: var(--ga);
  box-shadow: 0 0 0 3px rgba(46, 125, 79, 0.1);
  outline: none;
}

.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #777;
}

.field-error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #dc3545;
}

.input-error {
  border-color: #dc3545 !important;
}

.input-verified {
  border-color: var(--ga) !important;
  background: #e9f8ee !important;
}

/* ── Order Details (Zero-Bold Clean Design) ── */
.order-details-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--bdr);
  font-weight: 400 !important;
}

.order-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  padding: 18px 25px;
  color: var(--gd);
  border-bottom: 1px solid #f2f2f2;
  font-size: 18px;
  font-weight: 800 !important;
}

.order-hdr::before {
  content: "";
  width: 3px;
  height: 20px;
  background: var(--ga);
  border-radius: 10px;
}

.prod-list {
  padding: 20px 15px 10px 25px;
  max-height: 240px; /* Peek effect: 2.5 items */
  overflow-y: auto;
}

.prod-capsule {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #eeeeee;
  border-radius: 12px;
  margin-bottom: 12px;
  padding: 0 6px;
  height: 72px;
  background: #fff;
}

.capsule-left {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  min-width: 0;
}

.p-img-box {
  width: 50px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border-radius: 8px;
  padding: 5px;
  flex-shrink: 0;
}

.p-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.p-name-box {
  font-size: 13.5px;
  color: #333;
  font-weight: 400 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capsule-right {
  display: flex;
  align-items: center;
}

.tall-sep {
  width: 1px;
  height: 15px;
  background: #ddd;
  margin: 0 15px;
}

.col-price, .col-qty, .col-sub {
  font-size: 13.5px;
  color: #444;
  font-weight: 400 !important;
}

.col-price { width: 75px; text-align: center; }
.col-qty { width: 85px; text-align: center; }
.col-sub { width: 75px; text-align: right; }

/* ── Summary Table ── */
.summary-section {
  padding: 20px 35px 30px 25px;
}

.sum-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 12px;
  color: #444;
  font-weight: 400 !important;
}

.total-row {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1.5px solid #f0f0f0;
  font-size: 18px;
  color: #1a1a1a;
  font-weight: 400 !important;
}

@media (max-width: 768px) {
  .capsule-right .tall-sep:nth-child(1),
  .capsule-right .col-price {
    display: none;
  }
}

@media (max-width: 480px) {
  .capsule-right .tall-sep:nth-child(3),
  .capsule-right .col-qty {
    display: none;
  }
  .p-qty-label {
    width: 60px;
  }
  .p-subtotal {
    width: 60px;
  }
  .prod-info-wrap {
    padding-left: 8px;
  }
}

.btn-submit-order {
  width: 100%;
  height: 42px;
  background: #1a4d2e;
  color: #fff;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  margin-top: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-submit-order:hover {
  background: var(--gm);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-submit-order svg {
  width: 18px;
  height: 18px;
}

/* ── Mobile adaptations ── */
@media (max-width: 992px) {
  .top-bar-inner {
    position: static;
    padding: 0 20px;
  }

  .top-nav-logo {
    height: 38px;
    width: 38px;
    margin-right: auto;
  }

  .top-nav-logo img {
    height: 24px;
  }

  .steps {
    display: none;
  }

  .phone-lbl {
    display: none;
  }

  .top-right {
    gap: 12px;
  }

  .cart-link span {
    display: none;
  }

  .info-main {
    padding: 20px 0 60px 0;
  }

  .page-title {
    font-size: clamp(22px, 5vw, 28px);
    text-align: center;
    margin-bottom: 20px;
  }

  .info-card {
    padding: 20px 15px;
    border-radius: 16px;
    margin-bottom: 20px;
  }

  .card-hdr {
    font-size: 16px;
    margin-bottom: 18px;
  }

  .login-prompt {
    flex-direction: column;
    text-align: center;
    gap: 15px;
    padding: 20px 15px;
  }

  /* ── Product 'Capsule' Style (Mobile) ── */
  .prod-list {
    padding: 15px 12px;
    max-height: 180px;
    overflow-y: auto;
  }

  .prod-item {
    gap: 10px;
    margin-bottom: 15px;
  }

  .prod-img {
    width: 44px;
    height: 44px;
  }

  .prod-info {
    padding: 7px 10px;
    background: var(--mint);
    border: 1px solid var(--bdr);
    border-radius: 8px;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
  }

  .p-name {
    font-size: 11px;
    font-weight: 700;
  }

  .p-price,
  .p-qty {
    font-size: 11px;
    min-width: 35px;
  }

  .p-sub {
    font-size: 11.5px;
    min-width: 50px;
  }

  .p-val-sep {
    height: 14px;
    margin: 0 6px;
  }

  /* ── Sticky Removal ── */
  .order-details-card {
    position: static !important;
    margin-top: 20px;
  }

  .summary-section {
    padding: 15px 15px 25px 15px;
  }

  .sum-row {
    font-size: 13.5px;
  }

  .btn-submit-order {
    height: 40px;
    font-size: 14px;
    max-width: 160px !important;
  }

  /* Reduce gap above Review button on mobile */
  .info-main .mt-4 {
    margin-top: 15px !important;
  }
}

@media (max-width: 480px) {
  .info-main {
    padding-top: 15px;
  }

  .form-group {
    margin-bottom: 22px;
  }

  .form-control {
    height: 44px;
    font-size: 14px;
  }

  /* Stack Name/Password rows if they are small */
  .row>[class*="col-"] {
    margin-bottom: 0;
  }

  .prod-info {
    padding: 5px 8px;
  }

  .p-price,
  .p-qty {
    display: none;
    /* Hide middle info on very small screens to avoid overlap */
  }

  .p-val-sep:nth-child(2),
  .p-val-sep:nth-child(4) {
    display: none;
  }
}

/* ── Info Modal ── */
.info-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.info-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.info-modal-content {
  position: relative;
  background: #fff;
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.info-modal-header {
  padding: 18px 25px;
  border-bottom: 1px solid var(--bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-modal-header h4 {
  margin: 0;
  font-weight: 800;
  color: var(--gd);
}

.info-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  font-weight: 300;
  color: #999;
  cursor: pointer;
  padding: 0;
}

.info-modal-body {
  padding: 25px;
  overflow-y: auto;
  font-size: 14.5px;
  line-height: 1.7;
  color: #444;
}

.info-modal-footer {
  padding: 15px 25px;
  border-top: 1px solid var(--bg);
  display: flex;
  justify-content: flex-end;
}

.info-modal-footer .btn-green {
  padding: 8px 24px;
}