/* Subpages: catalog, products, analyzer hub */

body.cm-product-route {
  background-color: var(--cm-bg) !important;
  color: var(--cm-text-primary) !important;
  margin: 0 !important;
  padding: 0 !important;
  font-family: 'Manrope', sans-serif;
  overflow-x: hidden;
}

body.cm-product-route.cm-nav-open {
  overflow: hidden;
}

body.cm-product-route .wp-block-template-part,
body.cm-product-route header.wp-block-template-part,
body.cm-product-route footer.wp-block-template-part {
  display: none !important;
}

.cm-subpage-wrapper {
  min-height: 100vh;
}

.cm-subpage-main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.cm-subpage-hero {
  padding: 1.75rem 0 1.5rem;
}

.cm-subpage-hero--compact {
  padding-bottom: 0.5rem;
}

.cm-subpage-h1 {
  font-family: var(--cm-font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: normal;
  line-height: 1.1;
  margin: 0 0 0.75rem;
  color: var(--cm-heading-color);
  text-shadow: var(--cm-heading-glow);
}

.cm-subpage-lead {
  max-width: 720px;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.62;
  color: var(--cm-text-muted);
}

.cm-section-title--sm {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.75rem;
}

/* Brand lockup + Yandex Power */
.cm-brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex-shrink: 1;
}

.cm-brand-lockup--footer {
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.cm-yandex-power-badge {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 96px;
  height: 42px;
  line-height: 1;
}

.cm-yandex-power-badge__brand {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.3;
  z-index: 1;
  pointer-events: none;
}

.cm-yandex-power-badge__svg {
  display: block;
  width: 92px;
  height: auto;
}

.cm-yandex-power-badge__power {
  position: absolute;
  right: -2px;
  bottom: 0;
  z-index: 2;
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #14b8a6;
  text-shadow:
    0 0 12px rgba(20, 184, 166, 0.45),
    0 1px 2px rgba(13, 17, 23, 0.85);
}

.cm-yandex-power-badge--footer {
  width: 88px;
  height: 38px;
}

.cm-yandex-power-badge--footer .cm-yandex-power-badge__svg {
  width: 84px;
}

.cm-yandex-power-badge--footer .cm-yandex-power-badge__power {
  right: -1px;
  bottom: 0;
  font-size: 14px;
  letter-spacing: 0.1em;
}

/* Catalog grid */
.cm-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.cm-catalog-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.1rem;
  background: var(--cm-surface);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s;
  min-width: 0;
}

.cm-catalog-card:hover {
  border-color: rgba(20, 184, 166, 0.35);
  transform: translateY(-2px);
}

.cm-catalog-card-img {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.cm-catalog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

.cm-catalog-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.cm-catalog-card-summary {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--cm-text-muted);
  flex: 1;
}

.cm-catalog-card-price {
  font-weight: 700;
  color: var(--cm-accent);
}

.cm-catalog-card-power {
  font-size: 0.8rem;
  color: var(--cm-text-muted);
}

/* Product page extras */
.cm-product-page .cm-report--static {
  margin-top: 0;
}

.cm-scales--static {
  margin-top: 1rem;
}

.cm-product-desc-body {
  max-width: 800px;
  line-height: 1.65;
  color: var(--cm-text-muted);
}

.cm-product-desc-body p {
  margin: 0 0 0.75rem;
}

.cm-inci-block {
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  line-height: 1.6;
  word-break: break-word;
  color: var(--cm-text-muted);
}

.cm-inci-status {
  font-size: 0.85rem;
  color: var(--cm-text-muted);
  margin: 0 0 0.5rem;
}

.cm-product-compare-widget {
  padding: 1.25rem;
  max-width: 720px;
}

.cm-product-compare-widget .cm-btn-primary {
  margin-top: 0.75rem;
}

.cm-product-chat-section .cm-care-panel {
  max-width: 720px;
}

/* SEO bottom block */
.cm-seo-bottom {
  padding: 3rem 0 4rem;
  background: rgba(22, 27, 34, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.cm-seo-bottom-text {
  max-width: 800px;
  margin: 0 0 1rem;
  line-height: 1.68;
  color: var(--cm-text-muted);
}

.cm-seo-faq {
  margin-top: 1.5rem;
  max-width: 800px;
}

.cm-seo-faq-item {
  margin-bottom: 0.5rem;
  padding: 0.85rem 1rem;
  background: var(--cm-surface);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cm-seo-faq-item summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--cm-text-primary);
}

.cm-seo-faq-item p {
  margin: 0.75rem 0 0;
  line-height: 1.6;
  color: var(--cm-text-muted);
}

.cm-disclaimer--small {
  font-size: 0.75rem;
  opacity: 0.7;
}

.cm-premium-footer--subpage {
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

@media (max-width: 992px) {
  .cm-brand-lockup .cm-logo {
    font-size: 1rem;
  }

  .cm-yandex-power-badge {
    width: 84px;
    height: 38px;
  }

  .cm-yandex-power-badge__svg {
    width: 80px;
  }

  .cm-yandex-power-badge__power {
    right: -1px;
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .cm-catalog-grid {
    grid-template-columns: 1fr;
  }
}
