/* Special Pricing Widget – matches the original SpecialWEB / WPanel design */

.spw-pricing {
  --spw-font: "Assistant", system-ui, -apple-system, sans-serif;
  --spw-num: "Inter Tight", "Assistant", system-ui, sans-serif;
  --spw-bg-soft: #F6F8FC;
  --spw-ink: #0F1736;
  --spw-ink-2: #414E78;
  --spw-muted: #667293;
  --spw-line: #E4E8F2;
  --spw-pink: #F03A76;
  --spw-pink-text: #D1205E;
  --spw-ok: #138A57;
  --spw-grad: linear-gradient(100deg, #F03A76 0%, #C63B92 35%, #7B3FB0 65%, #3A4FB8 100%);
  --spw-shadow-xs: 0 1px 2px rgb(16 24 64 / .06), 0 0 0 1px rgb(16 24 64 / .05);
  --spw-shadow: 0 13px 27px -5px rgb(50 50 93 / .22), 0 8px 16px -8px rgb(0 0 0 / .22);
  --spw-r-lg: 18px;
  --spw-ease-out: cubic-bezier(.23, 1, .32, 1);
  --spw-wrap: 1240px;
  --spw-gutter: clamp(16px, 4vw, 32px);

  background: var(--spw-bg-soft);
  font-family: var(--spw-font);
  color: var(--spw-ink);
  padding: 80px 0;
  position: relative;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

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

.spw-wrap {
  width: 100%;
  max-width: var(--spw-wrap);
  margin-inline: auto;
  padding-inline: var(--spw-gutter);
}

/* ---------- Header row ---------- */
.spw-head-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px 40px;
  margin-bottom: 28px;
}

.spw-head {
  max-width: 520px;
}

.spw-kicker {
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--spw-pink-text);
  margin-bottom: 10px;
}

.spw-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--spw-ink);
}

.spw-title em {
  font-style: normal;
  color: var(--spw-pink-text);
}

.spw-desc {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--spw-ink-2);
}

/* ---------- Segmented control ---------- */
.spw-price-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.spw-seg {
  position: relative;
  display: inline-flex;
  padding: 5px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--spw-shadow-xs);
}

.spw-seg button {
  position: relative;
  z-index: 1;
  height: 42px;
  padding: 0 22px;
  white-space: nowrap;
  border: 0;
  border-radius: 999px;
  background: none;
  font: 700 16px var(--spw-font);
  color: var(--spw-ink-2);
  cursor: pointer;
  transition: color 0.25s var(--spw-ease-out);
}

.spw-seg button[aria-selected="true"] {
  color: #fff;
}

@media (hover: hover) and (pointer: fine) {
  .spw-seg button:not([aria-selected="true"]):hover {
    color: var(--spw-ink);
  }
}

.spw-seg-thumb {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: var(--spw-ink);
  box-shadow: 0 6px 14px -6px rgb(15 23 54 / 0.7);
  transition: transform 0.4s var(--spw-ease-out), width 0.4s var(--spw-ease-out);
  pointer-events: none;
}

.spw-price-note {
  margin: 0;
  color: var(--spw-muted);
  font-size: 16px;
}

/* ---------- Panels ---------- */
.spw-panel[hidden] {
  display: none !important;
}

.spw-tier {
  color: var(--spw-ink-2);
  margin: 0 0 16px;
  font-size: 17px;
}

.spw-tier b {
  color: var(--spw-ink);
}

/* ---------- Plans grid ---------- */
.spw-plans {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

/* ---------- Plan card ---------- */
.spw-plan {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--spw-r-lg);
  box-shadow: var(--spw-shadow-xs);
  transition: transform 0.35s var(--spw-ease-out), box-shadow 0.35s var(--spw-ease-out);
  overflow: hidden;
}

.spw-plan::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--spw-ease-out);
  background: radial-gradient(420px circle at 50% 0%, rgb(240 58 118 / 0.07), transparent 55%);
}

.spw-plan::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  pointer-events: none;
  background: var(--spw-grad);
  opacity: 0;
  transition: opacity 0.3s var(--spw-ease-out);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.spw-plan:hover {
  transform: translateY(-4px);
  box-shadow: var(--spw-shadow);
}

.spw-plan:hover::before,
.spw-plan:hover::after {
  opacity: 1;
}

.spw-plan.is-hot {
  box-shadow: 0 30px 60px -24px rgb(198 59 146 / 0.45), 0 0 0 1px rgb(240 58 118 / 0.1);
}

.spw-plan.is-hot::after {
  opacity: 1;
  padding: 2px;
}

.spw-plan-head {
  padding: 24px 22px 20px;
}

.spw-plan-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 26px;
}

.spw-plan-name {
  margin: 0;
  font: 700 20px var(--spw-num);
  color: var(--spw-ink);
  letter-spacing: -0.01em;
}

.spw-tag {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: var(--spw-grad);
  padding: 4px 11px;
  border-radius: 999px;
}

.spw-plan-sub {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--spw-muted);
}

.spw-price {
  margin: 14px 0 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  font: 700 46px/1 var(--spw-num);
  letter-spacing: -0.05em;
  color: var(--spw-ink);
}

.spw-price span {
  display: inline-flex;
  align-items: baseline;
}

.spw-price sup {
  font-size: 0.42em;
  vertical-align: 1.05em;
  margin-inline-end: 2px;
  color: var(--spw-ink-2);
  letter-spacing: 0;
}

.spw-price small {
  font: 600 14px var(--spw-font);
  color: var(--spw-muted);
  letter-spacing: 0;
}

/* Buttons */
.spw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  margin-top: 16px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  font: 700 15px var(--spw-font);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s var(--spw-ease-out), color 0.25s var(--spw-ease-out), box-shadow 0.25s var(--spw-ease-out);
}

.spw-btn-soft {
  background: var(--spw-bg-soft);
  color: var(--spw-ink);
  box-shadow: inset 0 0 0 1px var(--spw-line);
}

.spw-btn-pink {
  background: var(--spw-pink-text);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgb(209 32 94 / 0.7);
}

@media (hover: hover) and (pointer: fine) {
  .spw-btn-soft:hover {
    background: var(--spw-ink);
    color: #fff;
    box-shadow: none;
  }
  .spw-btn-pink:hover {
    background: #B81A51;
  }
}

/* Specs */
.spw-specs {
  margin: 0;
  padding: 4px 22px 8px;
  border-top: 1px solid var(--spw-line);
}

.spw-specs div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--spw-line);
}

.spw-specs div:last-child {
  border-bottom: 0;
}

.spw-specs dt {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--spw-ink-2);
  margin: 0;
}

.spw-specs dt .ph {
  font-size: 17px;
  color: var(--spw-muted);
}

.spw-specs dd {
  margin: 0;
  font: 700 15px var(--spw-num);
  color: var(--spw-ink);
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}

.spw-specs dd.txt {
  font-family: var(--spw-font);
  direction: rtl;
  white-space: normal;
  min-width: 0;
  text-align: end;
}

/* Includes */
.spw-incl {
  margin-top: auto;
  padding: 16px 22px 22px;
  background: var(--spw-bg-soft);
  border-top: 1px solid var(--spw-line);
  border-radius: 0 0 var(--spw-r-lg) var(--spw-r-lg);
}

.spw-plan.is-hot .spw-incl {
  background: #FFF6FA;
}

.spw-incl h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--spw-muted);
}

.spw-incl ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.spw-incl li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--spw-ink-2);
}

.spw-incl li .ph {
  flex: none;
  margin-top: 2px;
  font-size: 15px;
  color: var(--spw-ok);
}

/* Swipe hint (mobile) */
.spw-swipe-hint {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--spw-muted);
}

.spw-swipe-hint .ph {
  flex: none;
  font-size: 16px;
}

/* Footer bar */
.spw-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  margin-top: 22px;
  padding: 16px 22px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--spw-shadow-xs);
  color: var(--spw-ink-2);
  font-size: 16px;
}

.spw-footer-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.spw-footer-item .ph {
  color: var(--spw-ok);
  font-size: 19px;
}

.spw-footer-link {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--spw-pink-text);
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s;
}

.spw-footer-link:hover {
  opacity: 0.85;
}

.spw-chev {
  font-size: 1.1em;
  line-height: 1;
}

/* Animation on panel switch */
@media (prefers-reduced-motion: no-preference) {
  .spw-panel.is-entering .spw-plan {
    animation: spwPlanIn 0.55s var(--spw-ease-out) both;
    animation-delay: calc(var(--i) * 45ms);
  }
  @keyframes spwPlanIn {
    from {
      opacity: 0;
      transform: translateX(calc(var(--dir, 1) * 18px));
      filter: blur(4px);
    }
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .spw-plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .spw-head-row {
    flex-direction: column;
  }
  .spw-price-bar {
    align-items: flex-start;
    width: 100%;
  }
  .spw-seg {
    display: flex;
    width: 100%;
  }
  .spw-seg button {
    flex: 1;
    padding: 0 8px;
    font-size: 14.5px;
  }
  .spw-plans {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 84%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 44px;
    margin-bottom: -30px;
  }
  .spw-plans::-webkit-scrollbar {
    display: none;
  }
  .spw-plan {
    scroll-snap-align: start;
  }
  .spw-plan.is-hot {
    box-shadow: 0 18px 36px -18px rgb(198 59 146 / 0.5), 0 0 0 1px rgb(240 58 118 / 0.1);
  }
  .spw-swipe-hint {
    display: flex;
  }
  .spw-footer-link {
    margin-inline-start: 0;
  }
  .spw-price {
    font-size: 38px;
  }
}

@media (max-width: 380px) {
  .spw-seg button {
    font-size: 13.5px;
    padding: 0 4px;
  }
}
