/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #000;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== ШАПКА (общая) ========== */
.site-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 32px;
  display: flex;
  align-items: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 18px;
}
.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #000;
  object-fit: cover;
}
.brand-name { letter-spacing: 0.02em; }

/* ========== ГЛАВНАЯ ========== */
.home-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
.home-headline {
  border-top: 1px solid #1a1a1a;
  border-bottom: 1px solid #1a1a1a;
  padding: 56px 0;
  margin-bottom: 56px;
}
.home-headline h1 {
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  max-width: 1100px;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
  padding-bottom: 56px;
}
.product-card {
  border: 1px solid #1a1a1a;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  background: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.07);
}
.card-image {
  background: #fff;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #1a1a1a;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-body {
  padding: 22px 24px;
  flex: 1;
  border-bottom: 1px solid #1a1a1a;
}
.card-title {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.card-footer {
  padding: 18px 22px;
  display: flex;
  align-items: center;
}
.card-price {
  background: #23DD7A;
  color: #000;
  font-weight: 600;
  font-size: 14px;
  padding: 4px 18px 4px 12px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%);
}

/* ========== ФУТЕР ГЛАВНОЙ ========== */
.home-footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 32px 32px;
  border-top: 1px solid #1a1a1a;
}
.copyright {
  font-size: 13px;
  color: #888;
  text-align: center;
  letter-spacing: 0.01em;
}

/* ============================================== */
/* ========== СТРАНИЦА ПРОДУКТА ================== */
/* ============================================== */

.product-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 32px;
}

/* Единая рамка */
.product-frame {
  border: 1px solid #1a1a1a;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

/* Обложка-баннер */
.cover-banner {
  border-bottom: 1px solid #1a1a1a;
  background: #fff;
}
.cover-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* Тело: 2 колонки */
.product-body {
  display: grid;
  grid-template-columns: 1fr 360px;
  align-items: stretch;
}

/* ЛЕВАЯ КОЛОНКА */
.product-main {
  border-right: 1px solid #1a1a1a;
  min-width: 0;
}

/* Заголовок */
.product-title-block {
  padding: 36px 40px;
  border-bottom: 1px solid #1a1a1a;
}
.product-title {
  font-size: 46px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

/* Мета-блок (цена | автор) с жирной вертикальной линией */
.product-meta-block {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #1a1a1a;
}

.meta-price {
  display: flex;
  align-items: center;
  padding: 18px 32px;
  border-right: 2px solid #000;
}

.meta-author {
  display: flex;
  align-items: center;
  padding: 18px 32px;
}

.price-tag {
  display: inline-block;
  background: #23DD7A;
  color: #000;
  font-weight: 600;
  font-size: 16px;
  padding: 6px 22px 6px 12px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 50%, 100% 100%, 0 100%);
}

.author-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 16px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.author-link:hover { border-bottom-color: #000; }
.author-logo {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #000;
  object-fit: cover;
}

/* ПРАВАЯ КОЛОНКА (sidebar) */
.product-sidebar {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: start;
}

/* Кнопка покупки */
.buy-button {
  display: block;
  width: 100%;
  background: #23DD7A;
  color: #000;
  text-align: center;
  padding: 16px 24px;
  font-size: 17px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #1a1a1a;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.buy-button:hover { filter: brightness(0.95); }
.buy-button:active { transform: translateY(1px); }

/* Блок Size/Length — отдельная карточка */
.specs-block {
  border: 1px solid #1a1a1a;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  font-size: 15px;
}
.spec-row + .spec-row { border-top: 1px solid #1a1a1a; }
.spec-label { font-weight: 600; }
.spec-value { color: #444; }

/* ========== ОПИСАНИЕ ========== */
.product-description {
  padding: 36px 40px 48px;
  font-size: 17px;
  line-height: 1.65;
  color: #1a1a1a;
}
.product-description p { margin-bottom: 18px; }
.product-description .lead { font-size: 19px; }
.product-description strong { font-weight: 600; color: #000; }

.product-description h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 8px 0 22px;
  line-height: 1.2;
}
.product-description h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 14px;
  line-height: 1.3;
}
.product-description ul {
  list-style: disc;
  padding-left: 22px;
  margin-bottom: 22px;
}
.product-description ul li {
  margin-bottom: 10px;
  padding-left: 4px;
}
.product-description hr {
  border: none;
  border-top: 1px solid #1a1a1a;
  margin: 40px 0;
}
.product-description .checklist {
  list-style: none;
  padding-left: 0;
}
.product-description .checklist li {
  position: relative;
  padding-left: 30px;
  padding-bottom: 4px;
}
.product-description .checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #23DD7A;
  font-weight: 700;
  font-size: 18px;
}

/* Картинка книги — на всю ширину колонки */
.book-closeup {
  margin: 36px 0;
}
.book-closeup img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.cta-line {
  font-weight: 600;
  font-size: 18px;
  margin-top: 28px;
}

/* ========== ФУТЕР ПРОДУКТА ========== */
.site-footer {
  margin-top: 80px;
  padding: 28px 32px;
  border-top: 1px solid #1a1a1a;
  background: #fafafa;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
}
.disclaimer {
  font-size: 11px;
  line-height: 1.55;
  color: #9a9a9a;
  text-align: center;
  letter-spacing: 0.01em;
}
.disclaimer strong {
  font-weight: 600;
  color: #888;
}

/* ========== АДАПТИВ ========== */
@media (max-width: 960px) {
  .product-body {
    grid-template-columns: 1fr;
  }
  .product-main {
    border-right: none;
    border-bottom: 1px solid #1a1a1a;
  }
  .product-title { font-size: 36px; }
  .product-title-block { padding: 28px 24px; }
  .meta-price { padding: 16px 24px; }
  .meta-author { padding: 16px 24px; }
  .product-description { padding: 28px 24px 36px; }
  .home-headline h1 { font-size: 42px; }
  .home-headline { padding: 40px 0; }
}

@media (max-width: 600px) {
  .site-header { padding: 20px 16px; }
  .home-main,
  .product-container { padding: 16px; }
  .home-headline h1 { font-size: 30px; }
  .home-headline { padding: 32px 0; margin-bottom: 32px; }
  .product-title { font-size: 28px; }
  .product-title-block { padding: 22px 18px; }
  .meta-price { padding: 14px 18px; }
  .meta-author { padding: 14px 18px; }
  .product-description {
    padding: 22px 18px 32px;
    font-size: 16px;
  }
  .product-description h2 { font-size: 22px; }
  .product-description h3 { font-size: 17px; }
  .product-sidebar { padding: 18px; }
  .spec-row { padding: 14px 18px; }
  .home-footer { padding: 20px 16px; }
  .site-footer { padding: 20px 16px; }
}
/* ============================================== */
/* ========== STICKY BAR ========================= */
/* ============================================== */

.sticky-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #1a1a1a;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  will-change: transform;
}

.sticky-bar.is-visible {
  transform: translateY(0);
}

.sticky-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.sticky-bar-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.sticky-bar-button {
  flex-shrink: 0;
  display: inline-block;
  background: #23DD7A;
  color: #000;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 24px;
  border-radius: 6px;
  border: 1px solid #1a1a1a;
  transition: filter 0.15s ease, transform 0.1s ease;
  cursor: pointer;
}
.sticky-bar-button:hover { filter: brightness(0.95); }
.sticky-bar-button:active { transform: translateY(1px); }

/* Адаптив для sticky-bar */
@media (max-width: 600px) {
  .sticky-bar-inner {
    padding: 10px 16px;
    gap: 12px;
  }
  .sticky-bar-title {
    font-size: 13px;
  }
  .sticky-bar-button {
    padding: 8px 16px;
    font-size: 13px;
  }
}