/* Fougest Pricing & Checkout Stylesheet */
*, *::before, *::after {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

input, textarea, [contenteditable="true"] {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

.pricing-page {
  position: relative;
  z-index: 5;
  max-width: 1120px;
  margin: 0 auto;
  padding: 120px 20px 80px;
  box-sizing: border-box;
}

.page-header {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 44px;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 0 40px rgba(77, 141, 255, 0.35);
}

.page-header p {
  margin: 16px auto 0;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.6;
  color: rgba(206, 220, 250, 0.78);
}

/* Сетка товаров */
.products-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 70px;
}

.pcard {
  flex: 0 0 calc((100% - 32px) / 3);
  box-sizing: border-box;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--line);
  --mx: 50%;
  --my: 0%;
  --glow: 0;
  background: var(--card-bg);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition: border-color 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pcard::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: var(--glow);
  transition: opacity 0.35s;
  background: radial-gradient(380px circle at var(--mx) var(--my), rgba(90, 150, 255, 0.26), transparent 65%);
}

.pcard::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  opacity: var(--glow);
  transition: opacity 0.35s;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(170, 210, 255, 0.95), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.products-grid:hover .pcard {
  --glow: 1;
}

.pcard:hover {
  transform: translateY(-3px);
}

.pcover {
  container-type: inline-size;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  display: block;
  box-sizing: border-box;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(140, 190, 255, 0.07);
}

.pcover.img-262,
.pcover.img-263 {
  background-image: url("../img/client-262.jpg");
}

.pcover.img-hwid {
  background-image: url("../img/hwid.jpg");
}

.pname {
  margin: 18px 2px 0;
  font-size: 18px;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

.pdur {
  position: relative;
  display: flex;
  margin: 14px 0 0;
  padding: 4px;
  border-radius: 12px;
  background: rgba(77, 141, 255, 0.07);
  border: 1px solid var(--line);
}

.pthumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 9px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(95, 150, 255, 0.38), rgba(60, 110, 235, 0.26));
  box-shadow: inset 0 0 0 1px rgba(140, 196, 255, 0.45), 0 0 18px rgba(77, 141, 255, 0.25);
  opacity: 0;
  will-change: transform, width;
}

.pdur.ready .pthumb {
  opacity: 1;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.pill {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  padding: 8px 6px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.3s;
}

.pill:hover {
  color: #fff;
}

.pill.active {
  color: #fff;
}

span.pill {
  cursor: default;
}

.pill:focus-visible {
  outline: 2px solid var(--blue-hi);
  outline-offset: 1px;
}

.pprice {
  margin: 12px 4px 0;
  font-size: 16px;
  color: var(--muted);
}

.pprice b {
  color: #fff;
  font-weight: 700;
}

.pbuy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  margin-top: 16px;
  padding: 14px 18px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, #4d6dff, #17bfff);
  box-shadow: 0 8px 26px rgba(40, 120, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.pbuy:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(40, 120, 255, 0.55);
}

.pbuy svg {
  width: 18px;
  height: 18px;
}

/* Модальное окно чекаута */
dialog.checkout-modal {
  width: min(500px, calc(100% - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

dialog.checkout-modal::backdrop {
  background: rgba(0, 4, 16, 0.65);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.checkout-panel {
  position: relative;
  padding: 36px 28px 28px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(5, 11, 28, 0.92);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: 0 30px 90px rgba(8, 30, 120, 0.5);
}

.checkout-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.checkout-head p {
  margin: 6px 0 20px;
  font-size: 14px;
  color: rgba(206, 220, 250, 0.7);
}

.summary-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(77, 141, 255, 0.08);
  border: 1px solid var(--line);
  margin-bottom: 20px;
}

.summary-name {
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}

.summary-period {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.summary-price {
  font-size: 26px;
  font-weight: 800;
  color: #8cc4ff;
}

.form-group {
  margin-bottom: 18px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #cfe3ff;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(4, 9, 24, 0.8);
  border: 1px solid var(--line);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--blue-hi);
  box-shadow: 0 0 12px rgba(77, 141, 255, 0.25);
}

/* Промокоды */
.promo-group {
  margin-bottom: 20px;
}
.promo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.promo-head .form-label {
  margin-bottom: 0;
}
.promo-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(143, 227, 181, 0.15);
  color: #8fe3b5;
  border: 1px solid rgba(143, 227, 181, 0.3);
}
.promo-badge[hidden] {
  display: none;
}
.promo-box {
  display: flex;
  gap: 8px;
  align-items: center;
}
.promo-box .form-input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.promo-btn {
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(120, 170, 255, 0.3);
  background: rgba(77, 141, 255, 0.15);
  color: #8cc4ff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.promo-btn:hover {
  background: rgba(77, 141, 255, 0.28);
  border-color: #8cc4ff;
  color: #fff;
}
.promo-status {
  min-height: 18px;
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.4;
  color: #ff9fae;
  transition: color 0.2s;
}
.promo-status.ok {
  color: #8fe3b5;
}
.price-old {
  text-decoration: line-through;
  opacity: 0.55;
  font-size: 0.72em;
  margin-right: 6px;
  font-weight: 500;
}

.pay-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.pay-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: #cfe0ff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.pay-btn svg {
  width: 16px;
  height: 16px;
}

.pay-btn:hover {
  background: rgba(77, 141, 255, 0.15);
  border-color: rgba(140, 196, 255, 0.35);
}

.pay-btn.selected {
  background: rgba(77, 141, 255, 0.28);
  border-color: var(--blue-hi);
  color: #fff;
  box-shadow: 0 0 16px rgba(77, 141, 255, 0.3);
}

.pay-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #4d8dff, #2a5ee8);
  box-shadow: 0 8px 30px rgba(61, 125, 255, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}

.pay-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 38px rgba(61, 125, 255, 0.6);
}

@media (max-width: 820px) {
  .pcard { flex-basis: calc((100% - 16px) / 2); }
}
@media (max-width: 560px) {
  .pcard { flex-basis: 100%; max-width: 380px; }
}

/* Юридическая сноска под карточками */
.legal-note {
  text-align: center;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(157, 182, 230, 0.85);
  margin: 0 0 60px;
}

.legal-note a {
  color: var(--blue-hi);
  text-decoration: none;
  border-bottom: 1px solid rgba(140, 196, 255, 0.35);
  transition: color 0.2s, border-color 0.2s;
}

.legal-note a:hover {
  color: #fff;
  border-color: rgba(140, 196, 255, 0.7);
}
