/*
 * Страницы, которые собирает сервер: каталог отдела (/catalog/...) и страница товара (/product/...).
 * Подключается после styles.css и theme-notebook.css.
 */

/* ---------- шапка страницы и «хлебные крошки» ---------- */
.page-head { padding-top: clamp(20px, 3vw, 36px); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-3); margin-bottom: 14px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent-deep); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 700; }
.page-head__title { font-family: var(--display); font-weight: 900; font-size: clamp(30px, 1.2rem + 3vw, 56px); margin-bottom: 8px; }
.page-head .lead { margin-bottom: 16px; }

/* ---------- панель отделов, категорий и сортировки (ссылки вместо кнопок) ---------- */
.toolbar--static { position: static; }
a.tab, a.chip { text-decoration: none; color: inherit; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tab.is-current { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 3px 3px 0 var(--accent); }
.chip.is-current { background: var(--accent-soft); color: var(--accent-deep); font-weight: 800; }
a.nav__dept { text-decoration: none; }
.nav__dept.is-active { background: var(--surface); box-shadow: var(--sh-1); }
.catalog--page { padding-top: 24px; }

/* ---------- страницы ---------- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 36px; }
.pager__item {
  min-width: 44px; height: 44px; padding: 0 12px; display: inline-grid; place-items: center;
  border: 2px solid var(--line); border-radius: 999px; background: #fff; font-weight: 800; text-decoration: none; color: var(--ink);
}
a.pager__item:hover { border-color: var(--ink); }
.pager__item.is-current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager__item.is-disabled { opacity: 0.35; }

/* ---------- карточка, собранная сервером: ссылки вместо кнопок ---------- */
a.card__media { display: block; cursor: pointer; }
a.card__name { color: inherit; text-decoration: none; }

/* ---------- страница товара ---------- */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; padding-bottom: clamp(40px, 6vw, 80px); }
.pdp__media {
  position: relative; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden;
  background: var(--st-soft); border: 2px solid var(--ink); border-radius: var(--r-l); box-shadow: 6px 6px 0 var(--ink);
}
.pdp[data-dept="beauty"] .pdp__media { background: var(--bt-soft); }
.pdp[data-dept="clothes"] .pdp__media { background: var(--cl-soft); }
.pdp[data-dept="home"] .pdp__media { background: var(--hm-soft); }
.pdp__media img { width: 100%; height: 100%; object-fit: contain; padding: 24px; mix-blend-mode: multiply; }
.pdp__icon { font-size: 120px; }
.pdp__badge { position: absolute; top: 18px; left: 18px; }
.pdp__name { font-family: var(--display); font-weight: 900; font-size: clamp(26px, 1rem + 2vw, 42px); line-height: 1.1; margin: 4px 0 14px; }
.pdp__price { font-family: var(--display); font-weight: 900; font-size: clamp(26px, 1rem + 1.5vw, 36px); margin: 0 0 16px; }
.pdp__price small { font-family: var(--font); font-size: 15px; font-weight: 600; color: var(--ink-2); }
.pdp__desc { color: var(--ink-2); font-size: 1.05em; max-width: 52ch; }
.pdp__variant { display: grid; gap: 6px; max-width: 320px; margin: 18px 0 4px; font-weight: 700; }
.pdp__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; }
.pdp__actions .card__add { min-width: 200px; }
.pdp__actions .card__heart { display: inline-flex; gap: 8px; }
.pdp__actions .card__heart svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.pdp__actions .card__heart[aria-pressed="true"] svg { fill: var(--accent); stroke: var(--accent); }
.pdp__actions .card__heart-text { max-width: none; }
.pdp__facts { list-style: none; padding: 18px 20px; margin: 0; display: grid; gap: 10px; border: 2px dashed var(--line); border-radius: var(--r-m); background: rgba(255, 255, 255, 0.7); }
.pdp__facts li { position: relative; padding-left: 28px; color: var(--ink-2); }
.pdp__facts li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--note, #fff1a8); display: grid; place-items: center; font-size: 12px; font-weight: 900; color: var(--ink); }

@media (max-width: 800px) {
  .pdp { grid-template-columns: 1fr; }
  .pdp__media { max-width: 520px; }
  .pdp__actions .btn { flex: 1 1 100%; }
}
