/* Страница товара — CYBER SPACE (надстройка к pulsar.css) */

.buy-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: calc(1rem + var(--safe-top)) max(clamp(1rem, 4vw, 3rem), var(--safe-right)) 1rem max(clamp(1rem, 4vw, 3rem), var(--safe-left));
  box-sizing: border-box;
  background: linear-gradient(to bottom, var(--glass-bg), rgba(10, 22, 40, 0.78) 85%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: none;
  box-shadow: none;
  transition: background 0.3s;
}

.buy-header.is-scrolled {
  background: var(--glass-bg);
}

.buy-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.buy-brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.buy-brand .nav-brand-logo {
  height: clamp(54px, 11vw, 84px);
  max-width: min(320px, 52vw);
}

.buy-tagline {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
  background: linear-gradient(90deg, var(--text-muted) 0%, var(--purple-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

@media (max-width: 600px) {
  .buy-tagline {
    width: 100%;
    order: 3;
    font-size: 0.8rem;
  }
}

.buy-wrap {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-total) + 2rem) max(clamp(1rem, 4vw, 3rem), var(--safe-right)) max(2.5rem, var(--safe-bottom)) max(clamp(1rem, 4vw, 3rem), var(--safe-left));
}

.product-detail {
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: flex;
  flex-wrap: wrap;
  background: linear-gradient(
    165deg,
    #1c3454 0%,
    var(--surface) 45%,
    #0f1f38 100%
  );
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: var(--card-glow);
  margin-bottom: 2rem;
  transition: border-color 0.35s, box-shadow 0.35s, transform 0.35s;
}

.product-detail::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--purple-bright) 40%,
    #93c5fd 50%,
    var(--purple-bright) 60%,
    transparent
  );
  z-index: 3;
  pointer-events: none;
}

.product-detail:hover {
  border-color: var(--card-border-hover);
  box-shadow: var(--card-glow-hover);
}

.product-image {
  position: relative;
  z-index: 2;
  flex: 1.35 1 380px;
  min-width: min(100%, 380px);
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
}

.product-image img {
  width: 100%;
  max-width: 100%;
  max-height: 680px;
  min-height: 320px;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 12px 36px rgba(24, 24, 27, 0.1), 0 0 28px rgba(30, 64, 175, 0.08);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-image img:hover {
  transform: scale(1.03);
}

.product-info {
  position: relative;
  z-index: 2;
  flex: 1 1 320px;
  min-width: min(100%, 320px);
  padding: 2.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--surface);
}

.product-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  padding-bottom: 0.85rem;
  position: relative;
  background: var(--title-gradient);
  background-size: 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.product-title::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--border);
}

.product-price {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.65rem, 3.5vw, 2.35rem);
  margin: 0.5rem 0 1.25rem;
  background: var(--price-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.old-price {
  font-size: 1.05rem;
  color: var(--muted);
  text-decoration: line-through;
  margin-right: 0.6rem;
  font-weight: 600;
}

.product-specs {
  margin: 1rem 0;
}

.product-specs h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  background: var(--title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.specs-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.specs-list li {
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

.specs-list li:last-child {
  border-bottom: none;
}

.spec-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-width: 180px;
  background: var(--title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.spec-value {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.product-description {
  color: var(--muted-light);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border-left: 3px solid var(--purple);
}

.order-section {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.order-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
  max-width: 100%;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(0.7rem, 2vw, 0.78rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: #ffffff;
  color: #0a1628 !important;
  border: 1px solid rgba(255, 255, 255, 0.9);
  padding: 1.05rem 1.85rem;
  min-height: 3.25rem;
  border-radius: 999px;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.2),
    0 12px 32px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.order-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(96, 165, 250, 0.12) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 0;
}

.order-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    ellipse 80% 120% at 50% -20%,
    rgba(255, 255, 255, 0.95) 0%,
    transparent 55%
  );
  pointer-events: none;
  z-index: 0;
}

.order-btn:hover {
  transform: translateY(-3px);
  background: #f8fafc;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.22),
    0 18px 44px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.order-btn:hover::before {
  transform: translateX(120%);
}

.order-btn:active {
  transform: translateY(-1px);
  background: #f1f5f9;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.order-btn:focus-visible {
  outline: 2px solid var(--purple-bright);
  outline-offset: 3px;
}

.order-btn .btn-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(10, 22, 40, 0.06);
  border: 1px solid rgba(10, 22, 40, 0.1);
  box-shadow: none;
}

.order-btn .btn-icon img {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
  object-fit: contain;
  filter: brightness(1.08) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.order-btn > :not(.btn-icon) {
  position: relative;
  z-index: 1;
}

.back-btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--surface);
  color: var(--purple-bright) !important;
  padding: 0.85rem 1.35rem;
  min-height: var(--touch-min);
  border-radius: 999px;
  box-sizing: border-box;
  text-decoration: none;
  margin-top: 0.5rem;
  border: 1px solid var(--border);
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}

.back-btn:hover {
  background: rgba(30, 64, 175, 0.08);
  border-color: var(--purple-bright);
  color: var(--text) !important;
}

.buy-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2.5rem max(clamp(1rem, 4vw, 3rem), var(--safe-left)) max(2.5rem, var(--safe-bottom)) max(clamp(1rem, 4vw, 3rem), var(--safe-right));
  margin-top: 3rem;
  background: var(--footer-bg);
}

.buy-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.buy-footer-inner p {
  margin: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--muted-light);
}

.buy-footer-inner a {
  color: var(--purple-bright);
}

.buy-footer-inner a:hover {
  text-decoration: underline;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  min-width: min(100%, 440px);
}

.footer-nav-btn {
  flex: 1 1 120px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.35rem;
  min-height: var(--touch-min);
  box-sizing: border-box;
  border-radius: 999px;
  text-decoration: none;
  text-align: center;
  border: 1px solid var(--card-border);
  background: linear-gradient(145deg, var(--surface), var(--bg-elevated));
  color: var(--text) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s,
    box-shadow 0.3s,
    color 0.3s;
}

.footer-nav-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.14), transparent 58%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: -1;
}

.footer-nav-btn:hover {
  transform: translateY(-3px);
  border-color: var(--card-border-hover);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.16);
  text-decoration: none;
}

.footer-nav-btn:hover::before {
  opacity: 1;
}

.footer-nav-btn--primary {
  border-color: rgba(96, 165, 250, 0.45);
  background: linear-gradient(135deg, var(--purple-bright), var(--purple));
  color: var(--text-on-accent) !important;
  box-shadow: 0 8px 28px var(--purple-glow);
}

.footer-nav-btn--primary::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 55%);
}

.footer-nav-btn--primary:hover {
  border-color: var(--purple-bright);
  box-shadow: 0 14px 40px var(--purple-glow);
}

@media (prefers-reduced-motion: reduce) {
  .order-btn::before {
    display: none;
  }

  .order-btn,
  .order-btn:hover,
  .order-btn:active {
    transition-duration: 0.01ms;
  }
}

@media (max-width: 768px) {
  .order-btn {
    width: 100%;
  }

  .product-detail {
    flex-direction: column;
  }

  .product-image {
    padding: 1.25rem 1.5rem 0.75rem;
  }

  .product-image img {
    min-height: 260px;
    max-height: min(72vh, 560px);
  }

  .product-info {
    padding: 1.5rem;
  }

  .spec-label {
    min-width: 140px;
  }

  .buy-footer-inner {
    flex-direction: column;
  }

  .footer-actions {
    width: 100%;
  }

  .footer-nav-btn {
    flex: 1 1 calc(50% - 0.35rem);
  }

  .footer-nav-btn--primary {
    flex: 1 1 100%;
  }
}
