/* WordPress additions: hero slider, offer popup, admin bar, plain page content. */

/* Hero slider
   Photos fade inside the slanted .hero-photo frame; slide text fades in the same spot
   (all copies share one grid cell, so the hero never changes height between slides). */
.hero-photo img { transition: opacity 0.9s ease; }
.hero-photo img:not(.is-active) { opacity: 0; }

.hero-title {
  font-family: var(--display);
  font-weight: 800;
  text-wrap: balance;
  color: #fff;
}

.hero-copies { display: grid; }
.hero-copy { grid-area: 1 / 1; transition: opacity 0.6s ease, visibility 0.6s; }
.hero-copy:not(.is-active) { opacity: 0; visibility: hidden; }

.hero-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: clamp(1rem, 3vh, 1.75rem);
}
.hero-arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.hero-arrow:hover { background: #fff; border-color: #fff; color: var(--charcoal); }
.hero-arrow .icon { width: 20px; height: 20px; }
.hero-dots { display: flex; gap: 0.5rem; }
.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.3s, background-color 0.3s;
}
.hero-dots button[aria-current="true"] { width: 28px; background: var(--red); }
/* Bigger tap area without changing the look */
.hero-dots button { position: relative; }
.hero-dots button::after { content: ""; position: absolute; inset: -10px -4px; }

@media (max-width: 860px) and (orientation: portrait) {
  .hero-controls { margin-top: 0.75rem; }
  .hero-arrow { display: none; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .hero-arrow { width: 32px; height: 32px; }
  .hero-controls { margin-top: 0.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-photo img, .hero-copy { transition: none; }
}

/* Offer popup */
.nd-popup {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.nd-popup[hidden] { display: none; }
.nd-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 26, 27, 0.72);
}
.nd-popup-card {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 2rem);
  max-height: calc(100svh - 2rem);
  overflow: auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  border-top: 5px solid var(--red);
}
.nd-popup-imgonly { border-top: 0; background: transparent; box-shadow: none; overflow: visible; }
.nd-popup-img { display: block; }
.nd-popup-img img { width: 100%; height: auto; }
.nd-popup-imgonly .nd-popup-img img { border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); }
.nd-popup-body { padding: 1.4rem 1.5rem 1.6rem; }
.nd-popup-body h2 { font-size: var(--step-2); margin-bottom: 0.35em; }
.nd-popup-body p { color: var(--smoke); margin-bottom: 1.1rem; }
.nd-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(30, 26, 27, 0.75);
  color: #fff;
  cursor: pointer;
}
.nd-popup-close:hover { background: var(--red); }
.nd-popup-close .icon { width: 20px; height: 20px; }
.nd-popup-imgonly .nd-popup-close { top: -14px; right: -14px; background: #fff; color: var(--charcoal); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); }
@media (prefers-reduced-motion: no-preference) {
  .nd-popup.is-open .nd-popup-backdrop { animation: nd-fade 0.25s ease both; }
  .nd-popup.is-open .nd-popup-card { animation: nd-pop 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  @keyframes nd-fade { from { opacity: 0; } }
  @keyframes nd-pop { from { opacity: 0; transform: translateY(16px) scale(0.97); } }
}
body.nd-popup-open { overflow: hidden; }

/* Plans split by profile: two large switches (merchants / associates) above the price tabs */
.profile-switch {
  display: none;
  gap: 0.75rem;
  max-width: 980px;
  margin: 0 auto 1.75rem;
}
.profile-name { white-space: nowrap; }
.js .profile-switch { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.profile-switch [role="tab"] {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--charcoal);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.profile-switch [role="tab"]:hover { border-color: var(--charcoal); }
.profile-switch [role="tab"][aria-selected="true"] {
  border-color: var(--red);
  background: #FFF7F7;
  box-shadow: 0 10px 30px rgba(227, 30, 36, 0.12);
}
.profile-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #FBE9EA;
  color: var(--red);
}
.profile-switch [aria-selected="true"] .profile-icon { background: var(--red); color: #fff; }
.profile-text { display: grid; gap: 0.1rem; }
.profile-name { font: 700 var(--step-1)/1.15 var(--display); font-stretch: 110%; }
.profile-sub { font-size: var(--step--1); color: var(--smoke); }
.profile-points { max-width: 640px; margin: 2rem auto 1.5rem; }
/* "For users" steps: the home page "How it works" look, for any number of steps and on grey backgrounds */
.user-flow { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); margin: 0.5rem 0 2.25rem; }
.user-flow li::before { box-shadow: 0 10px 24px rgba(142, 33, 38, 0.3); }
.user-flow::before { display: none; }

/* Plans beside their benefits: plan on the left, benefits (and associate KYC) on the right.
   Used in the price tabs (home, packages) and on the three plan pages. Stacks on smaller screens. */
.plans-layout { display: grid; gap: 2rem; align-items: start; }
.plans-main { min-width: 0; }
@media (min-width: 1000px) {
  .plans-layout:has(> .plans-side) { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); }
  .plans-side { position: sticky; top: calc(var(--header-h) + 1.25rem); }
  .admin-bar .plans-side { top: calc(var(--header-h) + 32px + 1.25rem); }
}

/* Inside the left column the package cards become rows:
   [ big number / unit / PV · days ]   [ price ]   [ Enquire ] */
.plans-main .plans { grid-template-columns: 1fr; gap: 0.75rem; }
.plans-main .plans > :last-child:nth-child(odd) { grid-column: auto; }
.plans-main .plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  column-gap: 1.5rem;
  align-items: center;
  text-align: left;
  padding: 1.1rem 1.4rem;
  border-radius: 16px;
}
.plans-main .plan:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(142, 33, 38, 0.12); }
.plans-main .plan > .plan-qty,
.plans-main .plan > .plan-unit,
.plans-main .plan > .plan-meta { grid-column: 1; }
.plans-main .plan-qty { font-size: clamp(1.45rem, 1rem + 1vw, 1.9rem); }
.plans-main .plan-unit { margin-top: 0.15rem; }
.plans-main .plan-price {
  grid-column: 2;
  grid-row: 1 / span 3;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  text-align: right;
  white-space: nowrap;
}
.plans-main .plan-reach small { display: block; margin-top: 0.2rem; }
.plans-main .plan .btn { grid-column: 3; grid-row: 1 / span 3; margin: 0; }
.plans-main .plan-tag { left: 1.4rem; transform: translateY(-50%); }
.plans-main .plan-featured { box-shadow: 0 14px 34px rgba(142, 33, 38, 0.28); }

/* Tabs and notes line up with the left column instead of centring over the page */
.plans-main .ptabs .tablist { margin-left: 0; }
.plans-main .panel-note { text-align: left; margin: 0 0 1.25rem; }

@media (max-width: 520px) {
  .plans-main .plan { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.85rem; padding: 1rem 1.1rem; }
  .plans-main .plan .btn { grid-column: 1 / -1; grid-row: auto; justify-self: start; }
}

.plan-meta { margin-top: 0.35rem; font-size: 0.78rem; font-weight: 600; color: var(--smoke); font-variant-numeric: tabular-nums; }
.plan-featured .plan-meta { color: rgba(255, 255, 255, 0.85); }
.plans-subhead { margin: 2.25rem 0 1rem; font-size: var(--step-1); }

/* Associate services: a compact price list */
.service-list { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; }
.service-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1.25rem;
  padding: 0.8rem 1.25rem;
}
.service-list li + li { border-top: 1px solid var(--line); }
.service-list li:hover { background: #FBF7F7; }
.sl-name { font-weight: 600; line-height: 1.3; }
.sl-name small { display: block; margin-top: 0.1rem; color: var(--smoke); font-weight: 400; font-size: var(--step--1); }
.sl-price { font: 700 var(--step-1)/1 var(--display); color: var(--red); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sl-link { font-size: var(--step--1); }
@media (max-width: 520px) {
  .service-list li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.35rem; padding: 0.8rem 1rem; }
  .sl-link { grid-column: 1 / -1; }
}

.plans-side { display: grid; gap: 1rem; }
.side-box {
  padding: 1.4rem 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(42, 35, 36, 0.07);
}
.side-title { margin: 0 0 1rem; font-size: var(--step-1); }
.side-benefits { display: grid; gap: 0.95rem; }
.side-benefits li { display: flex; gap: 0.8rem; align-items: flex-start; }
.side-benefits strong { display: block; line-height: 1.3; }
.side-benefits li > span:last-child > span { display: block; margin-top: 0.15rem; color: var(--smoke); font-size: var(--step--1); line-height: 1.45; }
.side-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #FBE9EA;
  color: var(--red);
}
.side-icon .icon { width: 20px; height: 20px; }
.side-req { border-top-color: var(--charcoal); background: #FBFAFA; }
.side-req-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem 1rem; }
.side-req-list li { display: flex; gap: 0.45rem; align-items: flex-start; font-size: var(--step--1); font-weight: 600; }
.side-req-list .icon { width: 1.15em; height: 1.15em; margin-top: 0.1em; color: var(--red); }
.side-note { margin: 1rem 0 0; padding-top: 0.9rem; border-top: 1px dashed var(--line); color: var(--smoke); font-size: var(--step--1); }

/* Plan pages: links to the other two plan pages at the bottom */
.other-plans { padding-top: 0; }
.other-plans-label { text-align: center; color: var(--smoke); font-weight: 600; margin: 0 auto 1rem; }
.other-plans-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); margin-bottom: 0; }
.other-plans-row a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.other-plans-row a:hover { border-color: var(--red); box-shadow: 0 10px 30px rgba(227, 30, 36, 0.12); }

/* Header dropdown (a menu item with sub-items, e.g. Packages > Merchant / User / Associate plans) */
.nav-drop { position: relative; display: flex; align-items: center; gap: 0.15rem; }
.nav-drop-toggle {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: inherit;
  cursor: pointer;
}
.nav-drop-toggle .icon { width: 18px; height: 18px; transition: transform 0.2s; }
.nav-drop.open .nav-drop-toggle .icon { transform: rotate(180deg); }
.nav-sub { display: none; flex-direction: column; }
.nav-drop.open .nav-sub { display: flex; }
.site-nav .nav-sub a:not(.btn) { border-bottom: 0; }
.site-nav a.is-current-parent { border-color: var(--red); }

@media (min-width: 861px) {
  .nav-sub {
    position: absolute;
    top: calc(100% + 10px);
    left: -0.75rem;
    z-index: 60;
    min-width: 230px;
    padding: 0.5rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(42, 35, 36, 0.14);
  }
  /* Invisible bridge so the menu stays open while the pointer moves down to it */
  .nav-drop::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
  .site-nav .nav-sub a:not(.btn) { padding: 0.6rem 0.8rem; border-radius: 8px; white-space: nowrap; }
  .site-nav .nav-sub a:not(.btn):hover, .site-nav .nav-sub a[aria-current="page"] { background: var(--ash); }
  .site-nav .nav-sub a[aria-current="page"] { color: var(--red); }
}
@media (min-width: 861px) and (hover: hover) {
  .nav-drop:hover .nav-sub { display: flex; }
}
@media (max-width: 860px) {
  .nav-drop { flex-wrap: wrap; width: 100%; }
  .nav-drop-toggle { width: 40px; height: 40px; }
  .nav-sub { width: 100%; padding: 0 0 0.5rem 1rem; border-left: 2px solid var(--line); margin-left: 0.25rem; }
  .site-nav .nav-sub a:not(.btn) { font-size: var(--step-0); padding-block: 0.4rem; }
  .site-nav .nav-sub a[aria-current="page"] { color: var(--red); }
}

/* Contact Form 7 on the Contact page: same look as the theme's own form fields */
.cf7-form p { max-width: none; margin: 0 0 1.25rem; }
.cf7-form label { display: block; font-weight: 600; }
.cf7-form .wpcf7-form-control-wrap { display: block; margin-top: 0.35rem; }
.cf7-form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.cf7-form select,
.cf7-form textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1.5px solid #9C9495;
  border-radius: 6px;
  background: #fff;
  color: var(--charcoal);
  font: inherit;
}
.cf7-form textarea { height: auto; min-height: 7.5rem; }
.cf7-form input:focus-visible, .cf7-form select:focus-visible, .cf7-form textarea:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.cf7-form .wpcf7-submit {
  display: inline-block;
  padding: 0.85em 1.4em;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font: 600 var(--step-0)/1.2 var(--body);
  cursor: pointer;
  transition: background-color 0.15s;
}
.cf7-form .wpcf7-submit:hover { background: var(--oxblood); }
.cf7-form .wpcf7-not-valid { border-color: var(--red) !important; }
.cf7-form .wpcf7-not-valid-tip { margin-top: 0.35rem; color: #B3141A; font-size: var(--step--1); }
.cf7-form .wpcf7-spinner { vertical-align: middle; }
.cf7-form .wpcf7 form .wpcf7-response-output { margin: 1rem 0 0; padding: 0.75rem 1rem; border-radius: 6px; }

/* "Which WhatsApp?" chooser (uses the popup frame above) */
.wa-choose .nd-popup-card { width: min(420px, 100%); }
.wa-choose .nd-popup-body { padding-top: 1.6rem; }
.wa-choose h2 { padding-right: 2.5rem; }
.wa-opts { display: grid; gap: 0.75rem; margin-top: 1rem; }
.wa-opt {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border: 2px solid var(--line);
  border-radius: 14px;
  color: var(--charcoal);
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s;
}
.wa-opt:hover, .wa-opt:focus-visible { border-color: var(--red); background: #FFF7F7; }
.wa-opt-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
}
.wa-opt-text { display: grid; gap: 0.1rem; }
.wa-opt-name { font-weight: 700; }
.wa-opt-num { font-size: var(--step--1); color: var(--smoke); font-variant-numeric: tabular-nums; }

/* WordPress admin bar (only for logged-in users) */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

/* Plain pages and posts written in the editor */
.entry > * + * { margin-top: 1em; }
.entry h2, .entry h3 { margin-top: 1.6em; }
.entry ul { list-style: disc; padding-left: 1.4em; }
.entry ol { list-style: decimal; padding-left: 1.4em; }
.entry a { color: var(--red); }
.entry img { border-radius: 6px; }
.entry-item + .entry-item { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--line); }
