/* ============================================================
   GET FOX — дополнительные стили рабочего сайта.
   Только токены и приёмы из дизайн-системы прототипа.
   ============================================================ */

/* ---- Тост «добавлено в корзину» ---- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 8px);
  background: var(--ink); color: #fff;
  font-size: 13.5px; font-weight: 500;
  padding: 11px 18px; border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0; transition: opacity .18s, transform .18s;
  z-index: 100; pointer-events: none; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- Пустой результат / загрузка ---- */
.empty {
  grid-column: 1 / -1;
  background: var(--white); border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: 48px 24px; text-align: center; color: var(--muted); font-size: 14px;
}
.product-grid.loading { opacity: .45; pointer-events: none; transition: opacity .15s; }
.pager a.dots { border-color: transparent; background: none; pointer-events: none; }

/* ---- Вид «список» ---- */
.product-grid.list { grid-template-columns: 1fr !important; }
.product-grid.list .card { flex-direction: row; }
.product-grid.list .card-media {
  width: 220px; flex-shrink: 0; aspect-ratio: auto;
  border-bottom: none; border-right: 1px solid var(--line);
}
.product-grid.list .card-body { padding: 16px 20px; }
.product-grid.list .card-title { min-height: 0; }
.product-grid.list .card-foot { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.product-grid.list .card-price { margin-bottom: 0; }
.product-grid.list .card-tierhint { margin: 0; }
.product-grid.list .card-actions { margin-left: auto; }

/* ============================================================
   Страница товара
   ============================================================ */
.product-page { padding: 28px 0 60px; }
.product-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; }
.product-media {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; position: relative;
}
.product-media .ph { aspect-ratio: 4 / 3; font-size: 13px; }
.product-info .card-sku { font-size: 13px; }
.product-info h1 { margin: 4px 0 14px; font-size: 26px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.product-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.product-meta .badge, .product-meta .brand-chip { position: static; }

.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: 13.5px; }
.spec-table td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.spec-table td:first-child { color: var(--muted); width: 42%; }
.spec-table td:last-child { color: var(--ink); font-weight: 500; }

/* таблица оптовых уровней — как 4 столбца прайса */
.tier-table { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 24px; }
.tier {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 12px; text-align: center; transition: all .15s;
}
.tier small { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.tier b { font-family: 'IBM Plex Mono', monospace; font-size: 15px; font-weight: 600; }
.tier.on { border-color: var(--orange); background: var(--orange-tint); }
.tier.on b { color: var(--orange-dark); }

.buy-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.buy-row .qty { height: 46px; }
.buy-row .qty input { width: 56px; }
.buy-total { font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.buy-total b { font-family: 'IBM Plex Mono', monospace; color: var(--ink); font-size: 16px; }

/* конфигуратор готовых карнизов по размерам заказчика */
.cfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.cfg-field { display: flex; flex-direction: column; gap: 6px; }
.cfg-field.span2 { grid-column: 1 / -1; }
.cfg-field span { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cfg-field input, .cfg-field select, .cfg-field textarea {
  height: 42px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 0 12px; font-family: inherit; font-size: 14px; outline: none; background: var(--white);
}
.cfg-field textarea { height: auto; min-height: 70px; padding: 10px 12px; resize: vertical; }
.cfg-field select { cursor: pointer; }

@media (max-width: 880px) {
  .product-layout { grid-template-columns: 1fr; }
  .tier-table { grid-template-columns: repeat(2, 1fr); }
  .cfg-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Корзина
   ============================================================ */
.cart-page { padding: 28px 0 60px; }
.cart-page h1 { margin: 0 0 22px; font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }

.cart-list { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.cart-row {
  display: grid; grid-template-columns: 86px 1fr auto auto auto 36px;
  gap: 18px; align-items: center;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.cart-row:last-child { border-bottom: none; }
.cart-row .ph { width: 86px; height: 64px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 9.5px; }
.cart-row .ttl { font-size: 14px; font-weight: 500; line-height: 1.35; }
.cart-row .ttl:hover { color: var(--orange-dark); }
.cart-row .sku { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.cart-row .unitprice { font-size: 12.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.cart-row .unitprice b { font-family: 'IBM Plex Mono', monospace; color: var(--ink-2); font-weight: 600; }
.cart-row .line { font-family: 'IBM Plex Mono', monospace; font-size: 16px; font-weight: 600; white-space: nowrap; }
.cart-row .rm {
  border: none; background: none; color: var(--muted-2); font-size: 18px; line-height: 1;
  width: 32px; height: 32px; border-radius: var(--radius-sm); transition: all .15s;
}
.cart-row .rm:hover { color: var(--orange-dark); background: var(--orange-tint); }

.cart-summary {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; position: sticky; top: 148px;
}
.cart-summary h3 { margin: 0 0 16px; font-size: 16px; font-weight: 600; }
.sum-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-2); padding: 6px 0; }
.sum-row.total {
  border-top: 1px solid var(--line); margin-top: 10px; padding-top: 14px;
  font-size: 15px; font-weight: 600; color: var(--ink);
}
.sum-row.total b { font-family: 'IBM Plex Mono', monospace; font-size: 20px; }
.sum-note { font-size: 12px; color: var(--muted); margin: 8px 0 16px; }

.order-form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.order-form input, .order-form textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 10px 12px; font-family: inherit; font-size: 13.5px; outline: none; transition: border-color .15s;
}
.order-form input:focus, .order-form textarea:focus { border-color: var(--orange); }
.order-form textarea { resize: vertical; min-height: 64px; }
.form-error { font-size: 12.5px; color: #b3261e; }

.order-done {
  background: var(--green-tint); border: 1px solid var(--green); border-radius: var(--radius);
  padding: 28px 24px; text-align: center;
}
.order-done b { font-family: 'IBM Plex Mono', monospace; font-size: 20px; color: var(--green); display: block; margin-bottom: 8px; }
.order-done p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

.cart-empty {
  background: var(--white); border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: 56px 24px; text-align: center; color: var(--muted);
}

@media (max-width: 980px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .cart-row { grid-template-columns: 64px 1fr auto; }
  .cart-row .unitprice { display: none; }
}

/* ---- Технические фиксы для динамических элементов ---- */
#navLinks { display: contents; }   /* ссылки навигации — прямые flex-дети .nav .container */
.cart-count[hidden] { display: none; }

/* ---- Фото товара (если загружено в админке) ---- */
.card-img { width: 100%; height: 100%; object-fit: cover; }
.card-media { overflow: hidden; }
.product-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.cart-img { width: 86px; height: 64px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius-sm); }
@media (max-width: 980px) { .cart-img { width: 64px; height: 48px; } }

/* ============================================================
   Документы и реквизиты / страницы входа-регистрации-аккаунта
   ============================================================ */
.doc-page { padding: 28px 0 60px; }
.doc-page h1 { margin: 0 0 22px; font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
.doc-card {
  max-width: 640px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
}
.doc-card h2 { margin: 0 0 18px; font-size: 18px; font-weight: 700; }
.doc-card dl { margin: 0; display: grid; grid-template-columns: 200px 1fr; gap: 12px 16px; }
.doc-card dt { font-size: 12.5px; color: var(--muted); }
.doc-card dd { margin: 0; font-size: 14px; color: var(--ink-2); }
@media (max-width: 640px) {
  .doc-card dl { grid-template-columns: 1fr; gap: 4px 0; }
  .doc-card dt { margin-top: 10px; }
}

.auth-card {
  max-width: 420px; margin: 0 auto; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
}
.auth-card h1 { margin: 0 0 18px; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form input {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 10px 12px; font-family: inherit; font-size: 13.5px; outline: none; transition: border-color .15s;
}
.auth-form input:focus { border-color: var(--orange); }
.auth-hint { font-size: 12.5px; color: var(--muted); margin-top: 14px; text-align: center; }
.auth-hint a { color: var(--orange-dark); }
.auth-done {
  background: var(--green-tint); border: 1px solid var(--green); border-radius: var(--radius);
  padding: 24px; text-align: center; font-size: 13.5px; color: var(--ink-2);
}

.account-orders { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.account-order {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px;
}
.account-order-head {
  display: flex; align-items: center; justify-content: space-between; cursor: pointer; gap: 12px;
}
.account-order-head b { font-family: 'IBM Plex Mono', monospace; }
.account-order-meta { font-size: 12.5px; color: var(--muted); }
.account-order-items { display: none; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.account-order.open .account-order-items { display: block; }
.order-items { width: 100%; border-collapse: collapse; font-size: 13px; }
.order-items th { text-align: left; color: var(--muted); font-size: 11.5px; text-transform: uppercase; padding: 8px 0; border-bottom: 1px solid var(--line); }
.order-items td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.order-items .num { font-family: 'IBM Plex Mono', monospace; text-align: right; white-space: nowrap; }
