/* =========================================================
   PRODUCTS PAGE (uses the variables and base styles of style.css)
   ========================================================= */

/* ---------- Hero ---------- */
.pd-hero {
  position: relative;
  padding: 120px 0 70px;
  overflow: hidden;
  text-align: center;
}

.pd-hero__inner {
  max-width: 880px;
  position: relative;
  z-index: 1;
}

.pd-hero h1 {
  color: var(--text-dark);
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.pd-hero p {
  max-width: 640px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.pd-hero__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 26px;
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 600;
}

.pd-hero__chips span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pd-hero__chips i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-gradient);
}

.pd-jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.pd-jump a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pd-jump a:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.pd-jump img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

/* ---------- Product block ---------- */
.pd-product {
  padding: 90px 0;
  scroll-margin-top: 70px;
}

.pd-product--alt {
  background: linear-gradient(180deg, rgba(243, 233, 253, 0.55) 0%, rgba(235, 241, 253, 0.45) 100%);
}

.pd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 60px;
}

.pd-grid--reverse .pd-copy {
  order: 2;
}

.pd-name {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pd-name img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(139, 44, 240, 0.22);
}

.pd-name h2 {
  color: var(--text-dark);
  font-size: clamp(30px, 3.4vw, 42px);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.pd-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.pd-lead {
  margin-top: 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.pd-features {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.pd-features li {
  position: relative;
  padding-left: 32px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

.pd-features li b {
  color: var(--text-dark);
}

.pd-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-gradient);
  -webkit-mask: radial-gradient(circle, #000 99%, transparent 100%);
}

.pd-features li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 5px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.pd-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.pd-trial {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(24, 166, 106, 0.12);
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.pd-note {
  margin-top: 16px;
  color: var(--muted-light);
  font-size: 12.5px;
}

/* ---------- Visuals ---------- */
.pd-visual {
  position: relative;
}

.pd-visual::before {
  content: "";
  position: absolute;
  inset: 8% 4% 4%;
  background: var(--brand-gradient);
  filter: blur(70px);
  opacity: 0.22;
  border-radius: 40px;
  z-index: 0;
}

.pd-window {
  position: relative;
  z-index: 1;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.pd-window__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  background: #f1f2f7;
  border-bottom: 1px solid var(--border);
}

.pd-window__bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
}

.pd-window__bar i:nth-child(2) { background: #febc2e; }
.pd-window__bar i:nth-child(3) { background: #28c840; }

.pd-window__bar span {
  margin-left: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.pd-window img {
  width: 100%;
  height: auto;
}

.pd-window--float {
  position: absolute;
  z-index: 2;
  width: 52%;
  right: -6%;
  bottom: -14%;
  border-radius: 12px;
  transform: rotate(2deg);
}

.pd-visual--desktop {
  padding-bottom: 40px;
}

.pd-visual--phones {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 520px;
}

.pd-phone {
  position: relative;
  z-index: 2;
  width: 250px;
  border-radius: 34px;
  padding: 9px;
  background: #15132b;
  box-shadow: var(--shadow-lg);
}

.pd-phone img {
  width: 100%;
  height: auto;
  border-radius: 26px;
}

.pd-phone--back {
  z-index: 1;
  margin-right: -60px;
  margin-bottom: 50px;
  transform: rotate(-6deg) scale(0.9);
  opacity: 0.95;
}

/* ---------- Plans ---------- */
.pd-plans {
  margin-top: 90px;
  scroll-margin-top: 90px;
}

.pd-plans__head {
  text-align: center;
  margin-bottom: 30px;
}

.pd-plans__head h3 {
  color: var(--text-dark);
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.03em;
}

.pd-plans__head p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.pd-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.pd-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 30px 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.pd-plan:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(139, 44, 240, 0.35);
}

.pd-plan--best {
  border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--brand-gradient) border-box;
  box-shadow: 0 20px 50px rgba(139, 44, 240, 0.18);
}

.pd-plan__tag {
  position: absolute;
  top: -12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pd-plan__period {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pd-plan__price {
  color: var(--text-dark);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.pd-plan__per {
  color: var(--muted);
  font-size: 13px;
}

.pd-plan__save {
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(24, 166, 106, 0.12);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.pd-plan__save--none {
  background: var(--surface-soft);
  color: var(--muted);
}

.pd-plan__btn {
  width: 100%;
  margin-top: 16px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border-dark);
  background: #fff;
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.pd-plan__btn:hover,
.pd-plan--best .pd-plan__btn {
  border-color: transparent;
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 10px 24px rgba(139, 44, 240, 0.22);
}

.pd-secure {
  margin-top: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Steps ---------- */
.pd-step-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.pd-step {
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.pd-step span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.pd-step h3 {
  margin-top: 18px;
  color: var(--text-dark);
  font-size: 18px;
}

.pd-step p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

/* ---------- FAQ ---------- */
.pd-faq {
  padding-top: 0;
}

.pd-faq__list {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.pd-faq details {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 0 22px;
}

.pd-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 30px 20px 0;
  position: relative;
  color: var(--text-dark);
  font-size: 15px;
  font-weight: 700;
}

.pd-faq summary::-webkit-details-marker { display: none; }

.pd-faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: 22px;
  font-weight: 500;
}

.pd-faq details[open] summary::after { content: "–"; }

.pd-faq details p {
  padding: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.pd-faq details a {
  color: var(--primary);
  font-weight: 700;
}

/* ---------- Checkout modal ---------- */
.pd-modal[hidden] { display: none; }

.pd-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
}

.pd-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 32, 0.55);
  backdrop-filter: blur(4px);
}

.pd-modal__card {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 28px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: pdPop 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes pdPop {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.pd-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.pd-modal__close:hover { background: var(--surface-soft); color: var(--text-dark); }

.pd-modal__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.pd-modal__head img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.pd-modal__head h3 {
  color: var(--text-dark);
  font-size: 21px;
  letter-spacing: -0.02em;
}

.pd-modal__head p {
  margin-top: 2px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
}

#checkoutForm {
  display: grid;
  gap: 14px;
}

.pd-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

#checkoutForm label {
  display: grid;
  gap: 6px;
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 700;
}

#checkoutForm input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  background: #fff;
  color: var(--text-dark);
  font: 500 15px "Inter", sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#checkoutForm input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(139, 44, 240, 0.12);
}

.pd-form-hint {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.pd-form-hint a {
  color: var(--primary);
  font-weight: 700;
}

.pd-form-error {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fdecec;
  color: #b42318;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
}

.pd-form-error a {
  color: inherit;
  text-decoration: underline;
}

.pd-pay {
  width: 100%;
}

.pd-pay:disabled {
  opacity: 0.75;
  cursor: wait;
  transform: none;
}

.pd-secure--small {
  margin-top: 0;
  font-size: 12px;
}

.pd-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: pdSpin 0.8s linear infinite;
}

@keyframes pdSpin { to { transform: rotate(360deg); } }

/* ---------- Home page teaser (index.html) ---------- */
.saas-teaser-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.saas-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.saas-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 44, 240, 0.35);
  box-shadow: var(--shadow-md);
}

.saas-card img {
  width: 60px;
  height: 60px;
  border-radius: 16px;
}

.saas-card h3 {
  color: var(--text-dark);
  font-size: 22px;
  letter-spacing: -0.02em;
}

.saas-card .pd-badge {
  margin-top: 4px;
}

.saas-card p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.saas-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

.saas-card__price {
  color: var(--text-dark);
  font-size: 14px;
}

.saas-card__price b {
  font-size: 22px;
  letter-spacing: -0.03em;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .pd-plan-grid,
  .pd-step-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .pd-grid { grid-template-columns: 1fr; gap: 50px; }
  .pd-grid--reverse .pd-copy { order: 0; }
  .pd-window--float { right: 0; bottom: -10%; }
  .saas-teaser-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .pd-hero { padding: 90px 0 50px; }
  .pd-product { padding: 64px 0; }
  .pd-plans { margin-top: 64px; }
  .pd-plan-grid,
  .pd-step-grid,
  .pd-field-row { grid-template-columns: 1fr; }
  .pd-visual--phones { min-height: 0; }
  .pd-phone { width: 190px; }
  .pd-phone--back { margin-right: -70px; }
  .pd-modal__card { padding: 22px 18px; }
  .saas-card { grid-template-columns: 1fr; }
}
