/* ============================================================
   product-new.css
   Стили продуктовой страницы feat/new-design.
   Скопированы из inline <style> в series.html
   + selectors prototype-styles.css.
   Зависит от tokens-new.css.
   ============================================================ */

/* ============ Product-style серия (Variable product layout) ============ */
.product-page {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-8);
  margin-bottom: var(--s-12);
}
@media (min-width: 980px) {
  .product-page { grid-template-columns: minmax(360px, 520px) 1fr; gap: var(--s-10); }
}

.product-gallery {
  position: relative;
}
.product-gallery .placeholder-img {
  aspect-ratio: 1;
  height: auto;
  font-size: 80px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--bg-soft) 0%, #e2e6eb 100%);
}
.product-gallery .badge {
  position: absolute; top: var(--s-4); left: var(--s-4);
  font-size: var(--fs-xs); font-weight: 700;
  background: var(--warning); color: #fff;
  padding: 4px 10px; border-radius: 4px;
  letter-spacing: 0.04em;
}
.product-gallery .real-photo {
  width: 100%; aspect-ratio: 1;
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  object-fit: contain;
  padding: var(--s-6);
}

.gallery-thumbs {
  display: flex; gap: var(--s-2);
  margin-top: var(--s-3);
}
.gallery-thumb {
  width: 64px; height: 64px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-soft);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-mute);
  cursor: pointer;
  transition: border-color var(--t);
  overflow: hidden;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-thumb.is-drawing {
  background: #f0f6fb;
  border-color: #b8d4e8;
}
.gallery-thumb.is-drawing img {
  object-fit: contain;
  padding: 3px;
}
.gallery-thumb.is-drawing.is-active,
.gallery-thumb.is-drawing:hover {
  border-color: #4a90c2;
}
.gallery-thumb:hover, .gallery-thumb.is-active {
  border-color: var(--accent);
}

.product-summary h1 {
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 var(--s-3);
  line-height: 1.2;
}
.product-lead {
  font-size: var(--fs-md);
  color: var(--text-dim);
  margin: 0 0 var(--s-4);
  line-height: 1.55;
}
.product-skus-line {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  padding: var(--s-3) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-5);
}
.product-skus-line strong { color: var(--text); }
.product-skus-line .sku-list {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: -0.01em;
  color: var(--text);
}

/* Specs table */
.specs {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: var(--s-4) var(--s-5);
  margin-bottom: var(--s-5);
}
.specs-title {
  font-size: var(--fs-md);
  font-weight: 700;
  margin: 0 0 var(--s-3);
  display: flex; align-items: center; gap: 8px;
}
.specs-title::before { content: '⚙'; opacity: 0.6; }
.specs-table {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
  font-size: var(--fs-sm);
}
.specs-row {
  display: contents;
}
.specs-row > .specs-label {
  padding: 8px 0;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.specs-row > .specs-value {
  padding: 8px 0;
  text-align: right;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.specs-row:last-child > * { border-bottom: none; }
.specs-table .specs-label .hint {
  font-size: 11px;
  color: var(--text-mute);
  font-weight: 400;
}
.specs-toggle {
  margin-top: var(--s-3);
  font-size: var(--fs-sm);
  color: var(--link);
  font-weight: 600;
  cursor: pointer;
}

/* Variation selector — самый важный блок */
.variation-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  margin-bottom: var(--s-5);
}

.price-current {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.price-current .price-value {
  font-size: var(--fs-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
.price-current .price-currency {
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--text-dim);
}
.price-current .stock-badge {
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.price-current .stock-badge.onbackorder {
  background: rgba(234, 88, 12, 0.12);
  color: var(--warning);
}

.variation-row {
  margin-bottom: var(--s-4);
}
.variation-row:last-of-type { margin-bottom: 0; }
.variation-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: var(--s-2);
}
.variation-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.variation-option {
  min-width: 80px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all var(--t);
  position: relative;
  line-height: 1.2;
}
.variation-option:hover { border-color: var(--accent); }
.variation-option .opt-price {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-mute);
  font-family: var(--font-mono);
  margin-top: 3px;
}
.variation-option.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.variation-option.is-active .opt-price { color: rgba(255,255,255,0.7); }
.variation-option.is-unavailable {
  opacity: 0.4;
  text-decoration: line-through;
  cursor: not-allowed;
}

.current-sku-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1px solid var(--border);
}
.current-sku {
  font-size: var(--fs-sm);
  color: var(--text-dim);
}
.current-sku .sku-code {
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.cta-row {
  display: flex;
  gap: var(--s-2);
  margin-top: var(--s-4);
}
.cta-primary {
  flex: 1;
  padding: 14px 24px;
  background: var(--link);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--fs-md);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t);
}
.cta-primary:hover { background: var(--link-hover); }
.cta-secondary {
  padding: 14px 18px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t);
}
.cta-secondary:hover { border-color: var(--text); background: var(--bg-soft); }

/* TRUST BLOCK (под variation-block) — таблица label/value */
.trust-block {
  border-left: 3px solid var(--success);
  background: #f7fcf9;
  border-radius: var(--radius-sm);
  padding: var(--s-3) var(--s-4);
  margin-top: var(--s-3);
  display: grid;
  grid-template-columns: auto 90px 1fr;
  column-gap: 10px;
  row-gap: 6px;
  font-size: var(--fs-sm);
  line-height: 1.35;
  align-items: baseline;
}
.trust-block .tb-icon {
  color: var(--success);
  font-weight: 800;
  font-size: 13px;
  text-align: center;
}
.trust-block .tb-label {
  color: var(--text-dim);
  font-weight: 600;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.trust-block .tb-value {
  color: var(--text);
}
.trust-block .tb-value strong { font-weight: 700; }
.trust-block .tb-value .mute {
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}

/* Tabs after product */
.product-tabs {
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: var(--s-5);
  margin: var(--s-8) 0 var(--s-5);
  overflow-x: auto;
  scrollbar-width: thin;
  white-space: nowrap;
}
.product-tabs::-webkit-scrollbar { height: 4px; }
.product-tabs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.product-tab {
  padding: 12px 0;
  font-size: var(--fs-sm);
  flex-shrink: 0;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--t);
}
.product-tab.is-active { color: var(--text); border-bottom-color: var(--link); }
.product-tab:hover { color: var(--text); }

.tab-content { font-size: var(--fs-md); line-height: 1.65; color: var(--text); }
.tab-content h3 { font-size: var(--fs-lg); font-weight: 700; margin: var(--s-5) 0 var(--s-3); }
.tab-content p { margin: 0 0 var(--s-3); }
.tab-content ul { padding-left: 20px; margin: 0 0 var(--s-3); }
.tab-content ul li { margin-bottom: 6px; }
.tab-content table { width: 100%; border-collapse: collapse; margin: var(--s-3) 0; font-size: var(--fs-sm); }
.tab-content table th { background: var(--bg-soft); padding: 10px 12px; text-align: left; font-weight: 700; border-bottom: 2px solid var(--border); }
.tab-content table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.tab-content table tr:hover td { background: var(--bg-soft); }

.tldr-voice {
  background: #f0f9ff; border-left: 4px solid #0284c7;
  padding: 14px 18px; margin: 0 0 var(--s-4); border-radius: 6px;
  font-size: var(--fs-sm); line-height: 1.55;
}
.tldr-voice strong.tldr-label {
  color: #0c4a6e; display: block; margin-bottom: 6px;
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em;
}

.tools-callout {
  background: var(--bg-soft); border-radius: var(--radius);
  padding: var(--s-4) var(--s-5); margin: var(--s-4) 0;
  font-size: var(--fs-sm);
}
.tools-callout-title { font-weight: 700; margin-bottom: var(--s-2); }
.tools-callout a { color: var(--link); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; margin-right: var(--s-3); display: inline-block; }

/* Categories line at bottom */
.categories-line {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--border);
  margin-top: var(--s-4);
}
.categories-line a { color: var(--link); margin-right: var(--s-2); }
.categories-line a::after { content: ' ·'; color: var(--text-mute); }
.categories-line a:last-child::after { content: ''; }

/* ============================================================
 * SHOP LAYOUT (sidebar + main) — из прототипа
 * ============================================================ */
.cv2-shop-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
  padding-bottom: var(--s-16);
}
@media (min-width: 980px)  { .cv2-shop-layout { grid-template-columns: 260px 1fr; } }
@media (min-width: 1100px) { .cv2-shop-layout { grid-template-columns: 280px 1fr; } }
@media (min-width: 1300px) { .cv2-shop-layout { grid-template-columns: 300px 1fr; } }

.cv2-shop-main { min-width: 0; overflow-x: hidden; }
.cv2-shop-sidebar { font-size: var(--fs-sm); }
.cv2-sidebar-title {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-dim); margin: 0 0 var(--s-3);
}
.cv2-cat-tree { list-style: none; margin: 0; padding: 0; }
.cv2-cat-item { margin: 0; }
.cv2-cat-item a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 8px; border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none;
  transition: background var(--t), color var(--t);
}
.cv2-cat-item a:hover { background: rgba(0,0,0,0.04); color: var(--link); }
.cv2-cat-item.is-current a {
  background: var(--accent, #111); color: #fff; font-weight: 600;
}
.cv2-cat-count {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-mute);
  background: rgba(0,0,0,0.04);
  padding: 1px 7px;
  border-radius: 99px;
  font-weight: 500;
  margin-left: 8px;
}
.cv2-cat-item.is-current a .cv2-cat-count {
  background: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.92);
}

/* Overflow защита — на product-page и для всего main */
.cv2-shop-main img, .cv2-shop-main video, .cv2-shop-main iframe { max-width: 100%; height: auto; }
.product-page { max-width: 100%; }
@media (max-width: 768px) {
  .product-page { grid-template-columns: 1fr !important; }
}

/* Убрать дубль WC h2 «Описание» в новом дизайне */
.cv2-new-design .woocommerce-Tabs-panel--description > h2:first-child { display: none; }
.cv2-new-design .tab-content h2:first-child:not([class]) { display: none; }
