.reg-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  justify-content: center; align-items: center;
  padding: 20px;
  background: rgba(0,0,0,.6);
}
.reg-overlay.is-open { display: flex; }

.reg-modal {
  position: relative;
  width: 100%; max-width: 470px; max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  padding: 30px 26px 0;
  box-shadow: 0 24px 50px rgba(0,0,0,.25);
}
.reg-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border: none; border-radius: 50%;
  background: rgba(0,0,0,.06); font-size: 18px; cursor: pointer;
}
.reg-close:hover { background: #b20000; color: #fff; }

.reg-view h3 { font-family: "Calibri", "Carlito", sans-serif; font-size: 20px; margin: 0 0 16px; padding-right: 20px; }

/* ---------- Cart list ---------- */
.cart-items-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border: 1px solid rgba(0,0,0,.1); border-radius: 12px;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info strong { display: block; font-size: 13.5px; }
.cart-item-info span { font-size: 12.5px; color: rgba(0,0,0,.55); }
.cart-item-remove { border: none; background: none; color: #b20000; font-weight: 700; font-size: 13px; cursor: pointer; }
.cart-empty-note { color: rgba(0,0,0,.5); font-size: 13.5px; text-align: center; padding: 20px 0; }
.cart-total-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-top: 1px dashed rgba(0,0,0,.15); font-size: 15px; font-weight: 700; margin-bottom: 4px; }

/* ---------- Form fields ---------- */
.reg-field { margin-bottom: 14px; }
.reg-field label { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: rgba(0,0,0,.6); }
.reg-field input {
  width: 100%; padding: 11px 12px; border: 1.5px solid rgba(0,0,0,.1);
  border-radius: 8px; font: inherit; font-size: 14px;
}
.reg-field input:focus { outline: none; border-color: #b20000; }

.reg-error { margin: 8px 0 14px; font-size: 12.5px; font-weight: 600; color: #b20000; }

/* ---------- Date picker per class ---------- */
.date-field-group { margin-bottom: 16px; padding-top: 10px; border-top: 1px solid rgba(0,0,0,.06); }
.date-field-group label.date-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.date-input {
  width: 100%; padding: 11px 12px; border: 1.5px solid rgba(0,0,0,.1);
  border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; background: #fafafa;
}
.calendar-wrapper { display: none; margin-top: 8px; border: 1px solid rgba(0,0,0,.1); border-radius: 10px; padding: 12px; }
.calendar-wrapper.open { display: block; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 700; font-size: 13.5px; }
.calendar-header button { width: 28px; height: 28px; border: none; border-radius: 6px; background: #000; color: #fff; cursor: pointer; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 3px; text-align: center; }
.calendar-weekdays span { font-size: 11px; font-weight: 700; color: rgba(0,0,0,.4); padding-bottom: 4px; }
.calendar-day { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; border-radius: 6px; font-size: 12.5px; }
.calendar-day.empty { visibility: hidden; }
.calendar-day.disabled { color: #ddd; }
.calendar-day.available { cursor: pointer; font-weight: 700; }
.calendar-day.available:hover { background: #ff95b6; }
.calendar-day.selected { background: #000; color: #fff; }

/* ---------- Payment view ---------- */
.reg-qr { display: block; width: 220px; max-width: 100%; margin: 0 auto 16px; border-radius: 10px; border: 1px solid rgba(0,0,0,.1); }
.reg-total-due { text-align: center; font-size: 15px; margin-bottom: 10px; }
.reg-note { font-size: 13px; color: rgba(0,0,0,.6); text-align: center; margin-bottom: 4px; }

/* ---------- Buttons ---------- */
.reg-actions { display: flex; gap: 10px; margin: 18px -26px 0; padding: 14px 26px 22px; position: sticky; bottom: 0; z-index: 3; background: #fff; border-top: 1px solid rgba(0,0,0,.07); }
.reg-btn { flex: 1; height: 44px; border: none; border-radius: 8px; font-weight: 700; font-size: 14px; cursor: pointer; }
.reg-btn-primary { background: #000; color: #fff; }
.reg-btn-primary:hover:not(:disabled) { background: #b20000; }
.reg-btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.reg-btn-ghost { background: #fff; border: 1.5px solid rgba(0,0,0,.15); color: #000; }

.date-hint { display: block; margin-top: 5px; font-size: 11.5px; color: rgba(0,0,0,.5); }
.reg-savings { text-align: center; font-size: 12.5px; font-weight: 700; color: #1f7a52; margin: -4px 0 10px; }

/* An element's own display rule would otherwise override the hidden attribute */
.reg-overlay [hidden] { display: none !important; }

/* ---------- Logos in the cart ---------- */
.mini-logo { flex: none; width: 46px; height: 46px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: #fff; border: 1px solid rgba(0,0,0,.1); }
.mini-logo img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.mini-logo .logo-ph { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, #ff95b6, #b20000); color: #fff; font-weight: 700; font-size: 18px; }
.mini-plus { font-weight: 800; color: #ff95b6; font-size: 15px; line-height: 1; }

/* ---------- A bundle replaces its single classes with one block ---------- */
.cart-bundle { border: 1.5px solid #1f7a52; border-radius: 12px; background: rgba(31,122,82,.05); padding: 10px 12px 10px; }
.cart-bundle-head { display: flex; align-items: center; gap: 10px; }
.cart-bundle-logos { display: flex; align-items: center; gap: 4px; flex: none; }
.cart-bundle-logos .mini-logo { width: 40px; height: 40px; }
.cart-bundle-info { flex: 1; min-width: 0; }
.cart-bundle-info strong { display: block; font-size: 13.5px; }
.cart-bundle-info span { font-size: 12.5px; color: rgba(0,0,0,.55); }
.cart-bundle-info s { margin-right: 6px; color: rgba(0,0,0,.4); }
.cart-bundle-info b { color: #1f7a52; }
.cart-bundle-members { margin: 8px 0 0; padding: 8px 0 0 18px; border-top: 1px dashed rgba(31,122,82,.35); font-size: 12px; color: rgba(0,0,0,.6); line-height: 1.6; }

/* ---------- Always-on bundle suggestions ---------- */
.cart-upsell { margin: 14px 0 12px; padding: 12px; border-radius: 12px; background: #fff4f7; border: 1px dashed #ff95b6; }
.cart-upsell-title { margin-bottom: 8px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #b20000; }
.upsell-card { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.upsell-card + .upsell-card { border-top: 1px solid rgba(255,149,182,.5); }
.upsell-logos { display: flex; align-items: center; gap: 3px; flex: none; }
.upsell-logos .mini-logo { width: 34px; height: 34px; border-radius: 9px; }
.upsell-logos .mini-logo .logo-ph { font-size: 14px; }
.upsell-info { flex: 1; min-width: 0; font-size: 12px; line-height: 1.4; color: rgba(0,0,0,.6); }
.upsell-info strong { display: block; font-size: 12.5px; color: #000; }
.upsell-info b { color: #1f7a52; }
.upsell-card button { flex: none; padding: 8px 14px; border: 0; border-radius: 8px; background: #000; color: #fff; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.upsell-card button:hover { background: #b20000; }

@media (max-width: 480px) {
  .reg-modal { padding: 26px 16px 0; border-radius: 16px; }
  .reg-actions { margin: 18px -16px 0; padding: 12px 16px 18px; }
  .cart-bundle-logos .mini-logo { width: 34px; height: 34px; }
  .upsell-logos .mini-logo { width: 30px; height: 30px; }
}

/* ---------- Cart totals ---------- */
.cart-summary { border-top: 1px dashed rgba(0,0,0,.15); padding-top: 10px; margin-bottom: 4px; }
.cart-sum-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13.5px; color: rgba(0,0,0,.6); }
.cart-sum-saving { color: #1f7a52; font-weight: 700; }
.cart-summary .cart-total-row { border-top: 0; padding-top: 8px; }
