/* Regal purchase UI — Figma: ريقال فقط مشاري */
.regal-purchase-ui {
  --rp-ink: var(--primary-color, #3c454e);
  --rp-gold: #f6ad1a;
  --rp-gold-soft: #f6ad1a22;
  --rp-gold-border: #e0b84a;
  --rp-bg: #f9f8f4;
  --rp-card: #fff;
  --rp-muted: #6b7280;
  --rp-line: #e8e5dc;
  --rp-sale: #c45c5c;
  width: 100%;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
body.regal-purchase-active #product-variants-options {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
}
.rp-panel {
  background: var(--rp-card);
  border: 1.5px solid var(--rp-line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rp-panel.is-active {
  border-color: var(--rp-gold-border);
  box-shadow: 0 0 0 1px var(--rp-gold-border);
}
.rp-head {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: start;
  color: inherit;
}
.rp-head-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.rp-radio {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid #cfcbc0;
  background: #fff;
  box-sizing: border-box;
  position: relative;
}
.rp-panel.is-active .rp-radio {
  border-color: var(--rp-ink);
  background: var(--rp-ink);
  box-shadow: inset 0 0 0 3px #fff;
}
.rp-head-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.rp-head-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.rp-head-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--rp-ink);
  line-height: 1.3;
}
.rp-badge {
  background: #f3e2b8;
  color: #8a6a16;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.rp-head-meta {
  font-size: 12px;
  color: var(--rp-muted);
  line-height: 1.4;
}
.rp-head-price {
  flex: 0 0 auto;
  text-align: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.rp-price-now {
  font-size: 15px;
  font-weight: 800;
  color: var(--rp-sale);
  line-height: 1.2;
}
.rp-price-old {
  font-size: 12px;
  color: var(--rp-muted);
  text-decoration: line-through;
}
.rp-save {
  font-size: 11px;
  font-weight: 700;
  color: #8a6a16;
}
.rp-body {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--rp-line);
}
.rp-panel.is-active .rp-body {
  display: block;
}
.rp-section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--rp-ink);
  margin: 14px 0 10px;
}
.rp-packaging {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.rp-pack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 64px;
  padding: 12px 10px;
  border: 1.5px solid var(--rp-line);
  border-radius: 12px;
  background: #f7f6f2;
  cursor: pointer;
  text-align: center;
  color: inherit;
}
.rp-pack.is-active {
  background: #fff;
  border-color: var(--rp-gold-border);
  box-shadow: 0 0 0 1px var(--rp-gold-border);
}
.rp-pack-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--rp-ink);
}
.rp-pack-sub {
  font-size: 12px;
  color: var(--rp-muted);
}
.rp-qty-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.rp-qty {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1.5px solid var(--rp-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: start;
  color: inherit;
}
.rp-qty.is-active {
  border-color: var(--rp-gold-border);
  background: #fffdf7;
  box-shadow: 0 0 0 1px var(--rp-gold-border);
}
.rp-qty-badge {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  background: var(--rp-gold);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  z-index: 1;
}
.rp-qty-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  background: var(--rp-bg);
}
.rp-qty-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--rp-ink);
  line-height: 1.3;
}
.rp-qty-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--rp-ink);
}
.rp-qty-price.has-sale {
  color: var(--rp-sale);
}
.rp-qty-old {
  margin-inline-start: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--rp-muted);
  text-decoration: line-through;
}
.rp-benefits {
  margin: 14px 0 0;
  padding: 14px;
  background: var(--rp-bg);
  border-radius: 12px;
  border: 1px solid var(--rp-line);
}
.rp-benefits-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--rp-ink);
  margin: 0 0 10px;
}
.rp-benefits-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rp-benefits-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--rp-ink);
  font-weight: 600;
}
.rp-benefit-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--rp-gold-soft);
  color: #8a6a16;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}
.rp-how {
  display: inline-flex;
  margin: 12px 0 0;
  color: var(--rp-ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.rp-cta {
  display: block;
  width: 100%;
  margin-top: 14px;
  border: 0;
  border-radius: 10px;
  background: var(--rp-ink);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  padding: 14px 16px;
  cursor: pointer;
  text-align: center;
}
.rp-cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.rp-footnote {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--rp-muted);
  text-align: center;
}
body.regal-mode-monthly .main-add-block,
body.regal-mode-monthly .applepay-widget,
body.regal-mode-monthly #sticky-container {
  display: none !important;
}

/* How it works modal */
.rp-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9998;
  display: none;
}
.rp-modal-backdrop.is-open {
  display: block;
}
.rp-modal {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(520px, 100%);
  max-height: 85vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px 18px 0 0;
  z-index: 9999;
  padding: 20px 18px 24px;
  display: none;
}
.rp-modal.is-open {
  display: block;
}
.rp-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--rp-ink);
  margin: 0 0 14px;
  text-align: center;
}
.rp-modal-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rp-modal-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--rp-ink);
  line-height: 1.5;
}
.rp-modal-close {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: var(--rp-ink);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  padding: 13px;
  cursor: pointer;
}
@media screen and (max-width: 480px) {
  .rp-head {
    padding: 12px;
  }
  .rp-body {
    padding: 0 12px 12px;
  }
  .rp-head-title {
    font-size: 14px;
  }
  .rp-price-now {
    font-size: 14px;
  }
}
