/* ============================================================================
   МАГАЗИН — шапка, объявления, разделы, карточки товаров, футер.
   Разметка и поведение как в оригинале, но в чёрной теме с красным акцентом.
   ==========================================================================*/

/* ============================== ШАПКА ==================================== */

.shop-hero {
  padding-top: 14px;
  text-align: center;
}

.shop-hero__logo-scene {
  position: relative;
  width: min(322px, calc(100vw - 32px));
  height: 204px;
  margin: -52px auto -26px;
}

/* Мягкое красное свечение за логотипом */
.shop-hero__logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-glow), rgba(255, 59, 48, 0.10) 52%, transparent 76%);
  filter: blur(10px);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: logo-glow-pulse 5.5s ease-in-out infinite;
}

@keyframes logo-glow-pulse {
  0%, 100% { opacity: 0.62; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 0.95; transform: translate(-50%, -50%) scale(1.06); }
}

.shop-hero__logo-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* 3D-логотип: canvas, который вращается перетаскиванием */
.shop-hero__logo {
  display: block;
  position: absolute;
  z-index: 1;
  top: 27px;
  left: 50%;
  width: 150px;
  height: 150px;
  margin: 0;
  background: transparent;
  cursor: grab;
  opacity: 0;
  outline: none;
  touch-action: none;
  transform: translateX(-50%);
  transition: opacity 220ms ease-out;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.shop-hero__logo.is-loaded {
  opacity: 1;
}

.shop-hero__logo:active {
  cursor: grabbing;
}

.shop-hero__logo:focus-visible {
  border-radius: 24px;
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

@media (min-width: 641px) {
  .shop-hero__logo-particles {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shop-hero__logo-glow {
    animation: none;
  }
}

.shop-hero h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.16;
}

.shop-hero__lead {
  max-width: 570px;
  margin: 12px auto 0;
  color: var(--text-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
}

/* ============================ ОБЪЯВЛЕНИЯ ================================= */

.announcements {
  position: relative;
  --announcement-fog-opacity: 0;
  display: none;
  margin-top: 32px;
  overflow: hidden;
  touch-action: pan-y;
  transition: height 360ms cubic-bezier(.22, 1, .36, 1);
}

.announcements::after {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  height: 46px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .62) 58%, #000 100%);
  content: "";
  opacity: var(--announcement-fog-opacity);
}

.announcements.is-visible {
  display: block;
}

.announcements__track {
  display: flex;
  align-items: flex-start;
  width: 100%;
  gap: 13px;
  will-change: transform;
}

@media (pointer: fine) {
  .announcements.is-visible {
    cursor: grab;
  }
}

.announcements.is-dragging {
  cursor: grabbing;
  user-select: none;
  transition: none;
}

.announcements-pagination:not([hidden]) + .shop-section-divider {
  margin-top: 22px;
}

.announcements-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  height: 18px;
  margin-top: 9px;
}

.announcements-pagination[hidden] {
  display: none;
}

.announcements-pagination__item {
  position: relative;
  width: 12px;
  height: 6px;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}

.announcements-pagination__item:has(~ .announcements-pagination__item.is-progressing) {
  transform: translateX(-6px);
}

.announcements-pagination__item.is-progressing ~ .announcements-pagination__item {
  transform: translateX(6px);
}

.announcements-pagination__track {
  position: absolute;
  top: 0;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.22);
  transform: translateX(-50%);
  transition: width .28s cubic-bezier(.2, .8, .2, 1);
}

.announcements-pagination__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--accent);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 5s linear;
}

.announcements-pagination__item.is-active .announcements-pagination__track {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(255, 59, 48, 0.55);
}

.announcements-pagination__item.is-progressing .announcements-pagination__track {
  width: 18px;
  background: rgba(255, 255, 255, 0.16);
}

.announcements-pagination__item.is-progressing .announcements-pagination__fill {
  opacity: 1;
}

.announcements-pagination__fill.is-resetting {
  transition: none;
}

/* ====================== БЛОК ОБЪЯВЛЕНИЯ / БЕСПЛАТНЫЙ ===================== */

.announcement-card.product-card {
  width: 100%;
  min-width: 100%;
  flex: 0 0 100%;
  padding: 12px 21px 13px;
}

.announcement-card.product-card:first-child {
  padding-bottom: 13px;
  background: var(--surface);
}

.announcement-card.product-card h2 {
  font-size: 19px;
}

.announcement-card__content {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  color: var(--text-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.announcement-card__content strong {
  font-weight: 800;
}

.announcement-card__content em {
  color: var(--text-secondary);
}

.announcement-card__content code,
.promo code {
  display: inline-block;
  position: relative;
  padding: 2px 32px 2px 8px;
  border-radius: 8px;
  color: var(--accent-bright);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 59, 48, 0.18);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  vertical-align: middle;
}

.promo code.is-pending {
  visibility: hidden;
}

.promo li.is-pending {
  display: none;
}

.announcement-card__content code:has(br),
.promo code:has(br) {
  padding: 6px 40px 6px 8px;
}

.copy-container {
  position: absolute;
  top: 50%;
  right: 8px;
  display: flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: translateY(-50%);
}

.announcement-card__content code:has(br) .copy-container,
.promo code:has(br) .copy-container {
  top: 8px;
  transform: translateY(0);
}

.copy-container img {
  position: absolute;
  width: 100%;
  height: 100%;
  transition: transform .3s ease, opacity .3s ease;
}

.copy-icon {
  opacity: 1;
  transform: scale(1);
}

.check-icon {
  opacity: 0;
  transform: scale(0);
}

.copy-container.active {
  pointer-events: none;
}

.copy-container.active .copy-icon {
  opacity: 0;
  transform: scale(0);
}

.copy-container.active .check-icon {
  opacity: 1;
  transform: scale(1);
}

.announcement-card__content a,
.promo a {
  position: relative;
  display: inline;
  margin-left: 4px;
  color: var(--accent-bright);
  background-image: linear-gradient(var(--accent-bright), var(--accent-bright));
  background-repeat: no-repeat;
  background-position: 50% 100%;
  background-size: 0 2px;
  font-weight: 700;
  text-decoration: none;
  vertical-align: baseline;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: opacity .3s ease, background-size .3s ease;
}

.announcement-card__content a::before,
.promo a::before {
  position: relative;
  top: -1px;
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 5px;
  background: var(--icon-link) no-repeat center / contain;
  content: "";
  vertical-align: middle;
}

.announcement-card__content a:hover,
.promo a:hover {
  background-size: 100% 2px;
}

.announcement-card__content a:active,
.promo a:active {
  opacity: .8;
}

.announcement-card__content a[icon-src]::before,
.promo a[icon-src]::before {
  width: 14px;
  height: 14px;
  margin-right: var(--icon-gap, 5px);
  background: var(--icon) no-repeat center / contain;
}

.link-trailing-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 4px;
  opacity: .8;
  vertical-align: middle;
  transform: translateY(-1px);
}

.announcement-card__list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.announcement-card__list li::marker {
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 640px) {
  .announcements {
    margin-top: 27px;
  }
}

/* ============================ КАРТОЧКА ТОВАРА =========================== */

.product-card {
  position: relative;
  overflow: hidden;
  padding: 15px 17px 20px 21px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 10px 26px rgba(0, 0, 0, 0.5);
}

/* Главный (первый) пакет чуть светлее остальных */
.product-card:first-child {
  padding-bottom: 21px;
  background: var(--surface-card-top);
}

/* Полоска-«корешок» слева у карточки */
.product-card::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 5px, rgba(255, 59, 48, 0.18) 5px 10px) left / 4px 100% no-repeat;
  content: "";
  pointer-events: none;
}

.product-card__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.product-card h2 {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.product-card__badge {
  padding: 4px 10px 3px;
  border-radius: 999px;
  color: var(--accent-bright);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 59, 48, 0.22);
  font-size: 11px;
  font-weight: 700;
}

.product-card__meta {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
}

.benefits {
  display: grid;
  gap: 7px;
  margin-top: 17px;
}

.benefits li {
  position: relative;
  padding-left: 21px;
  color: var(--text-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.benefits li::before {
  position: absolute;
  top: 2px;
  left: 0;
  width: 15px;
  height: 15px;
  background: var(--icon-check) center / contain no-repeat;
  content: "";
}

/* ============================== КНОПКИ =================================== */

.buy-button,
.promo__button {
  display: flex;
  width: 100%;
  min-height: 47px;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--accent);
  box-shadow: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  transition: color 200ms ease, transform 300ms ease;
}

.buy-button {
  margin-top: 15px;
  min-height: 52px;
  border-radius: 999px;
  background: var(--accent);
  font-size: 17px;
  font-weight: 700;
  box-shadow: none;
}

.buy-button:active {
  color: rgba(255, 255, 255, 0.82);
  background: color-mix(in srgb, var(--accent) 82%, #000);
  transform: scale(0.97);
}

.buy-button__price {
  margin-left: 4px;
  font-weight: 800;
}

/* ===================== ЦЕНЫ ПО СПОСОБАМ ОПЛАТЫ ========================== */

.product-card__prices {
  display: grid;
  gap: 6px;
  margin-top: 17px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.product-card__price-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  line-height: 1.35;
}

.product-card__price-method {
  color: var(--text-secondary);
  font-weight: 500;
}

.product-card__price-value {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ========================= БЕСПЛАТНЫЙ ПАКЕТ ============================== */

.promo {
  margin-top: 13px;
}

.promo__lead {
  margin-top: 11px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.promo > .announcement-card__list {
  margin-top: 17px;
  color: var(--text-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.promo__support-note {
  margin: 12px 4px 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
}

.promo__button:disabled {
  color: var(--text-muted);
  background: var(--surface-raised);
  box-shadow: none;
  cursor: not-allowed;
}

/* ============================ РАЗДЕЛИТЕЛЬ =============================== */

.shop-section-divider {
  height: 1px;
  margin-top: 32px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, .14),
    rgba(255, 255, 255, .26),
    rgba(255, 255, 255, .14),
    transparent
  );
}

/* ============================== ТОВАРЫ =================================== */

.products {
  margin-top: 24px;
  transition: height 190ms cubic-bezier(.22, 1, .36, 1);
}

.products__layer {
  display: grid;
  width: 100%;
  gap: 13px;
}

/* ======================= ПЕРЕКЛЮЧАТЕЛЬ РАЗДЕЛОВ ========================== */

.product-category-tabs {
  position: relative;
  display: flex;
  width: 100%;
  gap: 4px;
  box-sizing: border-box;
  margin: 18px auto 0;
  padding: 4px;
  justify-content: center;
  overflow: visible;
  border-radius: 999px;
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 1px var(--border);
  scrollbar-width: none;
}

.product-category-tabs::-webkit-scrollbar {
  display: none;
}

.product-category-tabs[hidden] {
  display: none;
}

.product-category-tabs__button {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  min-height: 34px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  color: #b4b8bc;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s ease, transform .3s ease;
}

.product-category-tabs__button.is-active {
  color: #fff;
  font-weight: 700;
}

.product-category-tabs__button:active {
  transform: scale(.97);
}

.product-category-tabs__button:disabled {
  cursor: default;
}

.product-category-tabs__indicator {
  position: absolute;
  z-index: 0;
  top: 4px;
  bottom: 4px;
  left: 0;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 4px 16px rgba(255, 59, 48, 0.34);
  transform-origin: center;
  will-change: transform, width;
  pointer-events: none;
}

/* =========================== БЛОК-ПРЕДУПРЕЖДЕНИЕ ========================= */

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 59, 48, 0.065);
}

.notice__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.notice p {
  color: #c3c7cb;
  font-size: 13px;
  line-height: 1.5;
}

/* ================================ ФУТЕР ================================== */

.shop-footer {
  margin-top: 30px;
  padding: 0 10px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.shop-footer > span {
  display: block;
}

.shop-footer > span + span {
  margin-top: 2px;
}

.shop-footer__guard {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 14px;
  color: rgba(255, 255, 255, .52);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.shop-footer__guard::before {
  display: block;
  width: 100%;
  max-width: 180px;
  height: 1px;
  margin: 0 auto 15px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0.26),
    rgba(255, 255, 255, 0.14),
    transparent
  );
  content: "";
}

.shop-footer .shop-footer__brand {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: fit-content;
  align-items: center;
  gap: 7px;
  margin: 0 auto;
  white-space: nowrap;
  --nixguard-shine-position: -110px;
  animation: nixguard-accent 7s cubic-bezier(.4, 0, .2, 1) infinite;
  cursor: help;
  -webkit-tap-highlight-color: transparent;
}

.shop-footer__brand > span + span {
  margin-top: 0;
}

/* Логотип NixGuard с бегущим красным бликом */
.shop-footer__brand-name,
.shop-footer__brand-icon {
  background-color: rgba(255, 255, 255, .52);
  background-image: linear-gradient(90deg, transparent 40%, var(--accent-deep) 46%, var(--accent-bright) 50%, var(--accent-deep) 54%, transparent 60%);
  background-position: var(--nixguard-shine-position) 50%;
  background-repeat: no-repeat;
  background-size: 110px 100%;
}

.shop-footer__brand-name {
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  background-position: calc(var(--nixguard-shine-position) - 27px) 50%;
}

.shop-footer__brand-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  background-color: currentColor;
  -webkit-mask: var(--icon-guard) center / contain no-repeat;
  mask: var(--icon-guard) center / contain no-repeat;
  pointer-events: none;
  user-drag: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.shop-footer__tooltip {
  --tooltip-radius: 11px;
  --tooltip-border: 1px;
  --tail-size: 8px;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  z-index: 12;
  width: max-content;
  max-width: min(244px, calc(100vw - 32px));
  padding: 8px 11px;
  border: var(--tooltip-border) solid rgba(255, 255, 255, 0.12);
  border-radius: var(--tooltip-radius);
  color: var(--text);
  background: #111111;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: translateX(-50%) translateY(4px);
  transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}

.shop-footer__tooltip::after {
  position: absolute;
  top: calc(100% - (var(--tooltip-border) / 2));
  left: 50%;
  width: var(--tail-size);
  height: var(--tail-size);
  border-right: var(--tooltip-border) solid rgba(255, 255, 255, 0.12);
  border-bottom: var(--tooltip-border) solid rgba(255, 255, 255, 0.12);
  border-top-right-radius: 1.6px;
  background: #111111;
  content: "";
  transform: translate(-50%, -50%) rotate(45deg);
}

.shop-footer__brand:focus-visible {
  outline: 1px solid color-mix(in srgb, var(--accent) 75%, transparent);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .shop-footer__brand:hover .shop-footer__tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    transition: opacity .22s ease, transform .22s ease, visibility 0s linear 0s;
  }
}

.shop-footer__brand:focus-visible .shop-footer__tooltip,
.shop-footer__brand.is-tooltip-open .shop-footer__tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  transition: opacity .22s ease, transform .22s ease, visibility 0s linear 0s;
}

@property --nixguard-shine-position {
  syntax: "<length>";
  inherits: true;
  initial-value: -110px;
}

@keyframes nixguard-accent {
  0%,
  15% {
    --nixguard-shine-position: -110px;
  }

  75%,
  100% {
    --nixguard-shine-position: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shop-footer .shop-footer__brand {
    animation: none;
  }
}
