/* ========== 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;
}

html { scroll-behavior: smooth; }

/* ========== ШАПКА (общая) ========== */
.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;
}

/* ВИТРИНА — 3 карточки фиксированной ширины, центрированные */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 360px));
  gap: 28px;
  justify-content: center;
  padding-bottom: 56px;
}

/* Карточка продукта */
.product-card {
  border: 1px solid #1a1a1a;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  background: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  overflow: hidden;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

.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;
  display: flex;
  align-items: flex-start;
}
.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;
  min-height: 64px;
}

/* Стандартный зелёный ценник */
.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%);
  display: inline-block;
}

/* Ценник со скидкой (продукт 2) — две строки внутри */
.card-price--discount {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 6px 24px 6px 12px;
  line-height: 1.1;
  gap: 1px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 50%, 100% 100%, 0 100%);
}
.card-price--discount .price-main {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.card-price--discount .price-old {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.9;
}
.card-price--discount .price-old s {
  text-decoration: line-through;
}

/* ========== ФЛАГМАН (золотая рамка) ========== */
.product-card--flagship {
  border: 1px solid #C9A227;
}
.product-card--flagship .card-image,
.product-card--flagship .card-body {
  border-bottom-color: #C9A227;
}
/* На hover: ярче + визуально 2px рамка через box-shadow (без сдвига лэйаута) + золотистая тень */
.product-card--flagship:hover {
  border-color: #FFD700;
  box-shadow:
    inset 0 0 0 1px #FFD700,
    0 14px 32px rgba(255, 215, 0, 0.28),
    0 6px 18px rgba(201, 162, 39, 0.20);
  transform: translateY(-4px);
}
.product-card--flagship:hover .card-image,
.product-card--flagship:hover .card-body {
  border-bottom-color: #FFD700;
}

/* ============================================== */
/* ========== UNIFIED SITE FOOTER ================ */
/* ============================================== */
.site-footer {
  border-top: 1px solid #1a1a1a;
  background: #fff;
  padding: 40px 24px 48px;
  margin-top: 80px;
}
.site-footer-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.footer-copy {
  margin: 0;
  font-size: 14px;
  color: #6b6b6b;
  letter-spacing: 0.01em;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.footer-links a {
  color: #6b6b6b;
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-links a:hover {
  color: #23DD7A;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-sep {
  color: #c4c4c4;
  user-select: none;
}
.footer-contact {
  margin: 4px 0 0;
  font-size: 14px;
  color: #6b6b6b;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-email {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: #6b6b6b;
  cursor: pointer;
  transition: color 0.15s ease;
}
.footer-email:hover {
  color: #23DD7A;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-tooltip {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1a1a1a;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.footer-tooltip::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: #1a1a1a;
}
.footer-tooltip.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================== */
/* ========== LEGAL PAGES ======================== */
/* ============================================== */
.legal-page {
  background: #fff;
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  line-height: 1.6;
}
.legal-brand-bar {
  border-bottom: 1px solid #e6e6e6;
  padding: 18px 32px;
}
.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #000;
}
.legal-brand-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.legal-brand-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.legal-title-block {
  max-width: 900px;
  margin: 56px auto 48px;
  padding: 32px 24px;
  text-align: center;
  border-top: 1px solid #1a1a1a;
  border-bottom: 1px solid #1a1a1a;
}
.legal-title {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 14px;
  color: #000;
}
.legal-updated {
  font-size: 15px;
  color: #6b6b6b;
  margin: 0;
}
.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 80px;
  text-align: left;
}
.legal-section { margin-bottom: 36px; scroll-margin-top: 24px; }
.legal-section h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin: 0 0 14px;
  color: #000;
}
.legal-section p {
  font-size: 16px;
  color: #2a2a2a;
  margin: 0 0 14px;
  line-height: 1.7;
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-section strong {
  font-weight: 700;
  color: #000;
}

/* ========== АДАПТИВ ========== */
@media (max-width: 1180px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 360px));
  }
}
@media (max-width: 760px) {
  .products-grid {
    grid-template-columns: minmax(0, 360px);
  }
  .home-headline h1 { font-size: 42px; }
  .home-headline { padding: 40px 0; margin-bottom: 40px; }
}
@media (max-width: 600px) {
  .site-header { padding: 20px 16px; }
  .home-main { padding: 0 16px; }
  .home-headline h1 { font-size: 30px; }
  .home-headline { padding: 32px 0; margin-bottom: 32px; }
  .legal-brand-bar { padding: 14px 20px; }
  .legal-title-block {
    margin: 32px 16px;
    padding: 24px 16px;
  }
  .legal-content { padding: 0 20px 60px; }
  .legal-section h2 { font-size: 18px; }
  .legal-section p { font-size: 15px; }
  .footer-links { font-size: 13px; gap: 6px; }
  .footer-copy, .footer-contact { font-size: 13px; }
  .site-footer { padding: 32px 16px 40px; margin-top: 60px; }
}
/* ============================================
   PRODUCT PAGE
   ============================================ */

.product-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.product-frame {
  background: #fff;
  border: 1px solid #000;
  border-radius: 4px;
  overflow: hidden;
}

/* Cover banner */
.cover-banner {
  width: 100%;
  background: #f3f3f3;
  border-bottom: 1px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cover-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* Body — 2 columns */
.product-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
}

.product-main {
  padding: 36px 40px 40px;
  border-right: 1px solid #000;
  min-width: 0;
}

.product-sidebar {
  padding: 32px 28px;
  background: #fff;
}

/* Title — extends to vertical border */
.product-title-block {
  padding: 0 40px 24px 40px;
  margin: 0 -40px 0 -40px;
  border-bottom: 1px solid #000;
}
.product-title {
  font-size: 38px;
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  color: #000;
  letter-spacing: -0.5px;
}

/* Meta block — extends to vertical border */
.product-meta-block {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0 40px;
  margin: 0 -40px 28px -40px;
  border-bottom: 1px solid #000;
  min-height: 64px;
}

.meta-price {
  display: flex;
  align-items: center;
  padding: 14px 0;
}

/* Green price tag with INWARD V notch on right */
.price-tag {
  display: inline-block;
  background: #23c55e;
  color: #000;
  font-weight: 700;
  font-size: 16px;
  padding: 9px 24px 9px 16px;
  letter-spacing: 0.3px;
  clip-path: polygon(
    0 0,
    100% 0,
    calc(100% - 12px) 50%,
    100% 100%,
    0 100%
  );
}

/* Vertical divider — bold full-height */
.meta-author {
  display: flex;
  align-items: center;
  padding: 14px 0 14px 24px;
  margin-left: 24px;
  border-left: 1px solid #000;
}

/* Author link */
.author-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #000;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.author-link span { border-bottom: 1px solid transparent; transition: border-color 0.15s; }
.author-link:hover span { border-bottom-color: #000; }
.author-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #000;
}

/* Description typography */
.product-description {
  font-size: 16px;
  line-height: 1.65;
  color: #1a1a1a;
}
.product-description p { margin: 0 0 16px; }
.product-description .lead { font-size: 18px; line-height: 1.55; }
.product-description h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 14px;
  color: #000;
}
.product-description h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 10px;
  color: #000;
}
.product-description ul {
  margin: 0 0 18px;
  padding-left: 20px;
}
.product-description ul li { margin-bottom: 10px; }
.product-description strong { color: #000; font-weight: 700; }
.cta-line { font-size: 17px; }

/* Inline book image — NO frame, NO background */
.inline-book {
  margin: 28px 0 28px;
  padding: 0;
  display: block;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}
.inline-book img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Final CTA — plain bold text, left-aligned */
.final-cta {
  margin: 24px 0 8px;
  font-size: 18px;
  text-align: left;
}
.final-cta strong {
  font-weight: 700;
  color: #000;
}

/* ============================================
   BUY BUTTON (with shadow on hover)
   ============================================ */
.buy-button {
  display: block;
  width: 100%;
  background: #23c55e;
  color: #000;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
  padding: 16px 20px;
  border: 1px solid #000;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 0 0 #000;
}
.buy-button:hover {
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 #000;
}

/* Specs block — labels BOLD, values regular */
.specs-block {
  margin-top: 20px;
  border: 1px solid #000;
  border-radius: 2px;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #000;
  font-size: 15px;
}
.spec-row:last-child { border-bottom: none; }
.spec-label { color: #000; font-weight: 700; }
.spec-value { color: #000; font-weight: 400; }

/* ============================================
   STICKY BAR (slide down on scroll)
   ============================================ */
.sticky-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid #000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  z-index: 9999;
  pointer-events: none;
}
.sticky-bar.is-visible {
  transform: translateY(0);
  pointer-events: auto;
}
.sticky-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.sticky-bar-title {
  font-weight: 700;
  font-size: 19px;
  line-height: 1.25;
  color: #000;
  letter-spacing: -0.2px;
  flex: 1;
  min-width: 0;
  /* allows wrapping to 2 lines instead of being cut */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.sticky-bar-button {
  flex-shrink: 0;
  background: #23c55e;
  color: #000;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 11px 20px;
  border: 1px solid #000;
  border-radius: 2px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 0 0 #000;
  white-space: nowrap;
}
.sticky-bar-button:hover {
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 #000;
}

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 800px) {
  .product-container { padding: 12px 12px 40px; }

  .product-body {
    grid-template-columns: 1fr;
  }

  .product-main {
    padding: 24px 20px 28px;
    border-right: none;
    border-bottom: 1px solid #000;
  }

  .product-sidebar {
    padding: 24px 20px 28px;
  }

  .product-title { font-size: 28px; }

  .product-title-block {
    padding: 0 20px 20px 20px;
    margin: 0 -20px 0 -20px;
  }

  .product-meta-block {
    padding: 0 20px;
    margin: 0 -20px 24px -20px;
    min-height: 56px;
  }
  .meta-author {
    padding-left: 18px;
    margin-left: 18px;
  }

  .product-description { font-size: 15.5px; }
  .product-description h2 { font-size: 20px; }
  .product-description .lead { font-size: 17px; }

  .final-cta { font-size: 16px; }

  .sticky-bar-inner {
    padding: 11px 14px;
    gap: 12px;
  }
  .sticky-bar-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    -webkit-line-clamp: 2;
  }
  .sticky-bar-button {
    font-size: 14px;
    font-weight: 700;
    padding: 10px 14px;
  }
}

@media (max-width: 480px) {
  .product-title { font-size: 24px; }

  .sticky-bar-inner {
    padding: 10px 12px;
    gap: 10px;
  }
  .sticky-bar-title {
    font-size: 14px;
    -webkit-line-clamp: 2;
  }
  .sticky-bar-button {
    font-size: 13px;
    padding: 9px 12px;
  }
}