/* ==========================================================================
   Сторінки 404 і «Акції».
   Каркас — як у довідки/блогу; контент на всю ширину (без правої панелі).
   Картки товарів — .pcard з catalog.css, плитки категорій — .hcat з home.css
   ========================================================================== */

/* Права колонка — частина контенту */
.shell--wide .main {
  grid-column: 2 / -1;
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.nf {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-10) var(--s-6) var(--s-12);
  border-radius: var(--r-2xl);
  background: var(--c-surface);
  box-shadow: var(--sh-sm);
  text-align: center;
}

/* «404», де нуль — гальмівний диск */
.nf__code {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--c-primary);
  font-size: 128px;
  font-weight: var(--fw-bold);
  line-height: 1;
  letter-spacing: -0.04em;
  user-select: none;
}

.nf__code img {
  width: 128px;
  height: 128px;
  object-fit: contain;
  mix-blend-mode: multiply;
  animation: nf-spin 14s linear infinite;
}

@keyframes nf-spin {
  to {
    transform: rotate(360deg);
  }
}

.nf__title {
  margin-top: var(--s-2);
  font-size: var(--fs-26);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
}

.nf__text {
  max-width: 520px;
  color: var(--c-text-2);
  font-size: var(--fs-15);
  line-height: 1.6;
}

.nf__search {
  display: flex;
  gap: var(--s-2);
  width: 100%;
  max-width: 520px;
  margin-top: var(--s-2);
}

.nf__search .input-wrap {
  flex: 1;
}

.nf__search .input {
  height: var(--control-h-lg);
  padding-left: 40px;
  font-size: var(--fs-15);
}

.nf__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-2);
}

/* --------------------------------------------------------------------------
   Акції: «Показати ще» під сіткою
   -------------------------------------------------------------------------- */
#sale-more {
  display: flex;
  justify-content: center;
}

#sale-more[hidden] {
  display: none;
}

/* --------------------------------------------------------------------------
   Адаптивність
   -------------------------------------------------------------------------- */
@media (max-width: 1279px) {
  .shell--wide .main {
    grid-column: auto;
  }
}

@media (max-width: 767px) {
  .nf {
    gap: var(--s-3);
    padding: var(--s-8) var(--s-4);
  }

  .nf__code {
    font-size: 88px;
  }

  .nf__code img {
    width: 88px;
    height: 88px;
  }

  .nf__title {
    font-size: var(--fs-22);
  }

  .nf__search .btn {
    padding: 0 14px;
  }

  .nf__actions .btn {
    flex: 1;
  }

  /* Заголовок на телефоні візуально схований (назва — у крихтах, як у каталозі), тож його рядок не займає місця */
  .page-sale .page-head {
    display: contents;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nf__code img {
    animation: none;
  }
}
