/* Страница товара — стили из design/product.html (дизайн-токены). */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --bg: #f5f5f5;
    --surface: #ffffff;
    --fg: #111111;
    --muted: #6b6b6b;
    --border: #e0e0e0;
    --accent: #0058a3;
    --accent-hover: #004080;
    --accent-light: #e6f0fa;
    --warning: #f5a623;
    --success: #00843d;
    --radius: 8px;
    --radius-sm: 4px;
    --font: -apple-system, BlinkMacSystemFont, 'Noto Sans', 'Segoe UI', system-ui, sans-serif;
  }

  html { font-size: 16px; scroll-behavior: smooth; }
  body { font-family: var(--font); background: var(--bg); color: var(--fg); line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }

  a { color: inherit; text-decoration: none; }
  button { cursor: pointer; border: none; background: none; font: inherit; }
  input, textarea, select { font: inherit; }
  img { display: block; max-width: 100%; }
  ul { list-style: none; }

  /* ─── HEADER ───────────────────────────────────── */
  .header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
  .header-top { max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 20px; }

  .logo { display: flex; flex-direction: column; line-height: 1; flex-shrink: 0; }
  .logo-name { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; color: var(--accent); line-height: 1.1; }

  .header-search { flex: 1; max-width: 560px; position: relative; }
  .header-search input { width: 100%; height: 40px; border: 1.5px solid var(--border); border-radius: 20px; padding: 0 44px 0 16px; font-size: 14px; background: var(--bg); color: var(--fg); outline: none; transition: border-color .2s; }
  .header-search input:focus { border-color: var(--accent); background: var(--surface); }
  .header-search input::placeholder { color: var(--muted); }
  .header-search-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; align-items: center; background: none; border: none; cursor: pointer; padding: 0; }
  .header-search-btn:hover { color: var(--accent); }

  .header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
  .header-icon-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--muted); transition: color .2s, background .2s; position: relative; font-size: 10px; cursor: pointer; }
  .header-icon-btn:hover { color: var(--accent); background: var(--accent-light); }
  .header-icon-btn svg { flex-shrink: 0; }
  .cart-badge { position: absolute; top: 2px; right: 6px; background: var(--accent); color: #fff; font-size: 9px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 3px; }

  .hamburger { display: none; padding: 8px; border-radius: var(--radius-sm); cursor: pointer; }
  .hamburger:hover { background: var(--bg); }

  /* ─── CATEGORY NAV ─────────────────────────────── */
  .cat-nav { border-top: 1px solid var(--border); overflow: hidden; }
  .cat-nav-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; }
  .cat-nav-inner::-webkit-scrollbar { display: none; }
  .cat-nav-inner a { white-space: nowrap; padding: 10px 16px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; display: block; }
  .cat-nav-inner a:hover { color: var(--fg); }
  .cat-nav-inner a.active { color: var(--accent); border-bottom-color: var(--accent); }

  /* .main и .breadcrumbs — единый источник в app.css (дубли из дизайна удалены). */

  /* ─── PRODUCT HERO ─────────────────────────────── */
  .product-hero { display: grid; grid-template-columns: 60% 40%; gap: 40px; margin-bottom: 48px; }

  /* Gallery */
  .gallery { display: flex; flex-direction: column; gap: 12px; }
  .gallery-main { position: relative; background: #f0f0f0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; }
  .gallery-main svg { width: 70%; height: 70%; opacity: 0.18; }
  .gallery-main-label { position: absolute; bottom: 12px; right: 12px; background: rgba(0,0,0,.45); color: #fff; font-size: 11px; border-radius: var(--radius-sm); padding: 3px 8px; }

  .gallery-thumbs { display: flex; gap: 10px; }
  .thumb { width: 80px; height: 60px; border-radius: var(--radius-sm); border: 2px solid var(--border); overflow: hidden; cursor: pointer; background: #e8e8e8; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: border-color .2s; }
  .thumb:hover { border-color: var(--muted); }
  .thumb.active { border-color: var(--accent); }
  .thumb svg { width: 80%; height: 80%; opacity: 0.25; }

  /* Mobile carousel */
  .gallery-carousel { display: none; overflow: hidden; border-radius: var(--radius); position: relative; }
  .gallery-carousel-track { display: flex; transition: transform .35s cubic-bezier(.4,0,.2,1); }
  .gallery-carousel-slide { min-width: 100%; aspect-ratio: 4/3; background: #f0f0f0; display: flex; align-items: center; justify-content: center; }
  .gallery-carousel-slide svg { width: 65%; height: 65%; opacity: 0.2; }
  .carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
  .carousel-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); cursor: pointer; transition: background .2s; }
  .carousel-dot.active { background: var(--accent); }

  /* Product info */
  .product-info { display: flex; flex-direction: column; gap: 18px; }
  .product-name-block { }
  .product-brand { font-size: 28px; font-weight: 800; letter-spacing: -.5px; color: var(--fg); line-height: 1.1; }
  .product-subtitle { font-size: 16px; color: var(--muted); margin-top: 4px; }

  .rating-row { display: flex; align-items: center; gap: 10px; }
  .stars { display: flex; gap: 2px; }
  .star { width: 18px; height: 18px; }
  .rating-num { font-size: 15px; font-weight: 600; color: var(--fg); }
  .rating-count { font-size: 14px; color: var(--accent); cursor: pointer; }
  .rating-count:hover { text-decoration: underline; }

  .article { font-size: 12px; color: var(--muted); font-family: 'Courier New', monospace; background: var(--bg); border-radius: var(--radius-sm); padding: 4px 8px; display: inline-block; }

  .price-block { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  .price-current { font-size: 32px; font-weight: 800; color: var(--fg); }
  .price-old { font-size: 18px; color: var(--muted); text-decoration: line-through; }
  .price-badge { background: #e53935; color: #fff; font-size: 13px; font-weight: 700; border-radius: var(--radius-sm); padding: 3px 8px; }

  .color-section label { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: 8px; }
  .color-name-display { font-size: 14px; font-weight: 600; color: var(--fg); margin-left: 4px; }
  .color-circles { display: flex; gap: 10px; flex-wrap: wrap; }
  .color-circle { width: 36px; height: 36px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .2s, border-color .2s; }
  .color-circle:hover { border-color: rgba(0,0,0,.15); }
  .color-circle.active { outline-color: var(--accent); border-color: var(--surface); }

  .qty-section { display: flex; flex-direction: column; gap: 8px; }
  .qty-section label { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
  .qty-control { display: flex; align-items: center; gap: 0; border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; width: fit-content; }
  .qty-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--fg); background: var(--bg); transition: background .2s; user-select: none; }
  .qty-btn:hover { background: var(--accent-light); color: var(--accent); }
  .qty-btn:disabled { color: var(--border); cursor: not-allowed; }
  .qty-input { width: 48px; height: 40px; border: none; border-left: 1.5px solid var(--border); border-right: 1.5px solid var(--border); text-align: center; font-size: 16px; font-weight: 600; color: var(--fg); background: var(--surface); outline: none; -moz-appearance: textfield; }
  .qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

  .add-to-cart-btn { height: 52px; border-radius: var(--radius); background: var(--accent); color: #fff; font-size: 16px; font-weight: 700; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .2s, transform .1s; }
  .add-to-cart-btn:hover { background: var(--accent-hover); }
  .add-to-cart-btn:active { transform: scale(.98); }
  .add-to-cart-btn.added { background: var(--success); }
  .add-to-cart-btn.added:hover { background: #006630; }

  .favorite-link { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; color: var(--muted); width: 100%; padding: 8px; border-radius: var(--radius); transition: color .2s, background .2s; cursor: pointer; }
  .favorite-link:hover { color: #e53935; background: #fef2f2; }
  .favorite-link.active { color: #e53935; }
  .favorite-link svg { transition: fill .2s; }
  .favorite-link.active svg { fill: #e53935; }

  .delivery-info { background: var(--bg); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
  .delivery-row { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
  .delivery-icon { color: var(--muted); flex-shrink: 0; margin-top: 1px; }
  .delivery-label { font-weight: 600; color: var(--fg); }
  .delivery-value { color: var(--muted); }

  /* ─── TABS ─────────────────────────────────────── */
  .product-tabs { background: var(--surface); border-radius: var(--radius); overflow: hidden; margin-bottom: 48px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
  .tab-nav { display: flex; border-bottom: 1px solid var(--border); }
  .tab-btn { padding: 16px 24px; font-size: 15px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; transition: color .2s, border-color .2s; cursor: pointer; white-space: nowrap; }
  .tab-btn:hover { color: var(--fg); }
  .tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

  .tab-panel { display: none; padding: 32px; }
  .tab-panel.active { display: block; }

  /* Description tab */
  .tab-desc p { font-size: 15px; color: var(--fg); line-height: 1.7; margin-bottom: 16px; }
  .feature-list { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
  .feature-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--fg); }
  .feature-list li::before { content: ''; flex-shrink: 0; width: 20px; height: 20px; background: var(--accent-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-top: 1px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%230058a3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; }

  /* Specs tab */
  .specs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
  .specs-table tr:nth-child(even) td { background: var(--bg); }
  .specs-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .specs-table td:first-child { color: var(--muted); width: 50%; font-weight: 500; }
  .specs-table td:last-child { font-weight: 600; color: var(--fg); }

  /* Reviews tab */
  .reviews-summary { display: grid; grid-template-columns: auto 1fr; gap: 32px; margin-bottom: 32px; align-items: start; }
  .reviews-score { text-align: center; }
  .score-big { font-size: 56px; font-weight: 900; color: var(--fg); line-height: 1; }
  .score-stars { display: flex; gap: 3px; justify-content: center; margin: 6px 0; }
  .score-count { font-size: 13px; color: var(--muted); }

  .rating-bars { display: flex; flex-direction: column; gap: 8px; }
  .rating-bar-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
  .rating-bar-label { width: 24px; text-align: right; color: var(--muted); font-weight: 600; flex-shrink: 0; }
  .rating-bar-track { flex: 1; height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; cursor: pointer; }
  .rating-bar-fill { height: 100%; background: var(--warning); border-radius: 4px; transition: width .5s; }
  .rating-bar-count { width: 28px; color: var(--muted); flex-shrink: 0; }

  .write-review-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 24px; border-radius: var(--radius); border: 1.5px solid var(--accent); color: var(--accent); font-size: 14px; font-weight: 600; transition: background .2s, color .2s; margin-bottom: 28px; cursor: pointer; }
  .write-review-btn:hover { background: var(--accent-light); }

  .reviews-list { display: flex; flex-direction: column; gap: 24px; }
  .review-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
  .review-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; gap: 12px; }
  .review-author { font-weight: 700; font-size: 15px; }
  .review-date { font-size: 12px; color: var(--muted); }
  .review-stars { display: flex; gap: 2px; margin-bottom: 10px; }
  .review-text { font-size: 14px; line-height: 1.65; color: var(--fg); margin-bottom: 12px; }
  .review-pros-cons { display: flex; flex-direction: column; gap: 4px; }
  .review-pro, .review-con { font-size: 13px; }
  .review-pro span:first-child { color: var(--success); font-weight: 600; }
  .review-con span:first-child { color: #e53935; font-weight: 600; }

  .show-all-btn { display: flex; align-items: center; justify-content: center; height: 44px; padding: 0 24px; border-radius: var(--radius); border: 1.5px solid var(--border); color: var(--muted); font-size: 14px; font-weight: 600; transition: border-color .2s, color .2s; margin-top: 24px; cursor: pointer; width: 100%; }
  .show-all-btn:hover { border-color: var(--accent); color: var(--accent); }

  /* ─── RELATED PRODUCTS ─────────────────────────── */
  .section-title { font-size: 22px; font-weight: 800; color: var(--fg); margin-bottom: 20px; }
  .related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

  .product-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); transition: box-shadow .2s, transform .2s; cursor: pointer; }
  .product-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1); transform: translateY(-2px); }
  .card-img { background: #f0f0f0; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
  .card-img svg { width: 60%; height: 60%; opacity: 0.2; }
  .card-body { padding: 14px; }
  .card-brand { font-size: 15px; font-weight: 800; color: var(--fg); }
  .card-desc { font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
  .card-stars { display: flex; gap: 2px; margin-bottom: 8px; }
  .card-price { font-size: 17px; font-weight: 800; color: var(--fg); }
  .card-action { margin-top: 10px; width: 100%; height: 38px; border-radius: var(--radius-sm); background: var(--accent-light); color: var(--accent); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; transition: background .2s; }
  .card-action:hover { background: var(--accent); color: #fff; }

  /* ─── FOOTER ───────────────────────────────────── */
  .footer { background: var(--fg); color: #ccc; padding: 48px 24px 24px; margin-top: auto; }
  .footer-inner { max-width: 1280px; margin: 0 auto; }
  .footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
  .footer-logo { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -0.3px; margin-bottom: 8px; line-height: 1.2; }
  .footer-tagline { font-size: 13px; color: #999; line-height: 1.6; max-width: 240px; }
  .footer-col h4 { font-size: 13px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
  .footer-col ul { display: flex; flex-direction: column; gap: 8px; }
  .footer-col ul a { font-size: 13px; color: #999; transition: color .2s; }
  .footer-col ul a:hover { color: #fff; }
  .footer-bottom { border-top: 1px solid #333; padding-top: 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: gap; gap: 12px; }
  .footer-copy { font-size: 12px; color: #666; }
  .footer-payment { display: flex; gap: 8px; }
  .payment-badge { background: #222; border-radius: 4px; padding: 4px 8px; font-size: 11px; font-weight: 700; color: #ccc; }

  /* ─── MODAL ────────────────────────────────────── */
  .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; }
  .modal-overlay.open { display: flex; }
  .modal { background: var(--surface); border-radius: var(--radius); max-width: 480px; width: 100%; padding: 32px; position: relative; max-height: 90vh; overflow-y: auto; }
  .modal-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--muted); background: var(--bg); cursor: pointer; transition: background .2s; }
  .modal-close:hover { background: var(--border); }
  .modal h3 { font-size: 20px; font-weight: 800; margin-bottom: 20px; }
  .modal-stars { display: flex; gap: 6px; margin-bottom: 16px; }
  .modal-star { width: 36px; height: 36px; cursor: pointer; color: var(--border); transition: color .2s; }
  .modal-star.filled { color: var(--warning); }
  .modal label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
  .modal textarea { width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; resize: vertical; min-height: 100px; outline: none; transition: border-color .2s; }
  .modal textarea:focus { border-color: var(--accent); }
  .modal-name-input { width: 100%; height: 40px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px; font-size: 14px; outline: none; transition: border-color .2s; margin-bottom: 16px; }
  .modal-name-input:focus { border-color: var(--accent); }
  .modal-submit { margin-top: 16px; width: 100%; height: 48px; background: var(--accent); color: #fff; border-radius: var(--radius); font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; transition: background .2s; cursor: pointer; border: none; }
  .modal-submit:hover { background: var(--accent-hover); }

  /* Tooltip for rating bars */
  .rating-bar-row { position: relative; }
  .rating-bar-tooltip { position: absolute; left: 50%; top: -32px; transform: translateX(-50%); background: var(--fg); color: #fff; font-size: 12px; padding: 4px 8px; border-radius: var(--radius-sm); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 10; }
  .rating-bar-row:hover .rating-bar-tooltip { opacity: 1; }

  /* ─── RESPONSIVE ───────────────────────────────── */
  @media (max-width: 1023px) {
    .product-hero { grid-template-columns: 55% 45%; gap: 24px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
    .reviews-summary { grid-template-columns: 1fr; }
  }

  @media (max-width: 767px) {
    .footer-top { grid-template-columns: 1fr; }
    .tab-btn { padding: 12px 16px; font-size: 13px; }
    .tab-panel { padding: 20px 16px; }
    .specs-table td { padding: 10px 12px; }
    .reviews-summary { gap: 20px; }
    .related-grid { overflow-x: auto; display: flex; gap: 12px; padding-bottom: 8px; scrollbar-width: none; }
    .related-grid::-webkit-scrollbar { display: none; }
    .related-grid .product-card { min-width: 200px; }
    .header-top { padding: 0 16px; }
  }

  @media (max-width: 599px) {
    .header-search { display: none; }
    .hamburger { display: flex; align-items: center; justify-content: center; }
    .product-hero { grid-template-columns: 1fr; }
    .gallery { display: none; }
    .gallery-carousel { display: block; }
    .product-brand { font-size: 22px; }
    .price-current { font-size: 26px; }
    .cat-nav { display: none; }
    .footer-top { grid-template-columns: 1fr 1fr; }
    .score-big { font-size: 44px; }
    .reviews-summary { display: flex; flex-direction: column; }
    .header-icon-btn span { display: none; }
  }

/* ── Адаптация под реальные фото и наши хуки ── */
.gallery-main { cursor: zoom-in; }
.gallery-main img { width:100%; height:100%; object-fit:cover; display:block; }
.gallery-main.is-empty { display:flex; align-items:center; justify-content:center; }
.gallery-thumbs .thumb { padding:0; background:none; }
.gallery-thumbs .thumb img { width:100%; height:100%; object-fit:cover; display:block; }
/* стрелки галереи */
.gallery-nav { position:absolute; top:50%; transform:translateY(-50%); width:40px; height:40px; border-radius:50%; background:var(--surface); box-shadow:0 2px 10px rgba(0,0,0,.15); display:flex; align-items:center; justify-content:center; color:var(--fg); z-index:5; }
.gallery-nav:hover { color:var(--accent); }
.gallery-nav.prev { left:10px; } .gallery-nav.next { right:10px; }

/* Ряд покупки: кнопка + степпер */
.buy-row { display:flex; gap:10px; align-items:flex-start; margin-bottom:12px; }
.buy-row > .add-to-cart-btn, .buy-row > .qty-control, .buy-row > .restock { flex:1; margin:0; }
/* Степпер в ряду: на всю ширину, иконки по краям */
#qty-stepper.qty-control { width:auto; height:52px; justify-content:space-between; }
#qty-stepper .qty-btn { width:54px; height:100%; display:flex; align-items:center; justify-content:center; }
#qty-stepper #prod-qty { flex:1; width:auto; height:100%; border:none; }
/* Квадратная кнопка «В избранное» рядом с кнопкой покупки */
.fav-square { flex:0 0 52px; width:52px; height:52px; display:flex; align-items:center; justify-content:center; background:#fef2f2; border-radius:var(--radius); color:#e53935; transition:background .15s; }
.fav-square:hover { background:#fcdada; }
.fav-square svg { width:24px; height:24px; }

/* Варианты расцветок — фотографиями */
.variant-axis { margin-bottom:18px; }
.variant-axis-label { font-size:13px; color:var(--muted); margin-bottom:8px; }
.variant-axis-label b { color:var(--fg); font-weight:600; }
.variant-photos { display:flex; flex-wrap:wrap; gap:8px; }
.variant-photo { width:64px; height:85px; border-radius:var(--radius-sm); overflow:hidden; border:2px solid transparent; box-shadow:0 0 0 1px var(--border); flex-shrink:0; }
.variant-photo img { width:100%; height:100%; object-fit:cover; display:block; }
.variant-photo.active { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent); }
.variant-photo.unavailable { opacity:.45; }
.variant-chip { display:inline-flex; padding:9px 14px; border-radius:var(--radius); border:1.5px solid var(--border); font-size:14px; color:var(--fg); }
.variant-chip.active { border-color:var(--accent); color:var(--accent); font-weight:600; }
.variant-chip.unavailable { color:var(--muted); opacity:.6; }

/* Отзывы — наш список */
.review-card { border:1px solid var(--border); border-radius:var(--radius); padding:16px; margin-bottom:14px; }
.review-head { display:flex; align-items:center; gap:10px; margin-bottom:8px; flex-wrap:wrap; }
.review-author { font-size:13px; font-weight:600; }
.review-date { font-size:12px; color:var(--muted); }
.review-pros { font-size:14px; margin-bottom:4px; } .review-pros .pm { color:var(--success); font-weight:600; }
.review-cons { font-size:14px; margin-bottom:4px; } .review-cons .pm { color:#c0392b; font-weight:600; }
.review-text { font-size:14px; color:#333; margin-top:4px; }
.review-photos { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.review-photo { width:64px; height:64px; border-radius:var(--radius-sm); overflow:hidden; border:1px solid var(--border); cursor:zoom-in; }
.review-photo img { width:100%; height:100%; object-fit:cover; display:block; }
.reviews-agg { display:flex; align-items:center; gap:10px; margin-bottom:18px; }
.reviews-agg-num { font-size:28px; font-weight:800; }
.reviews-agg-stars svg { width:18px; height:18px; }
.reviews-agg-count { color:var(--muted); font-size:14px; }
.in-stock { color:var(--success); font-size:13px; margin:-4px 0 14px; }
.out-stock { color:#c0392b; font-size:13px; margin:-4px 0 14px; }

/* ── Галерея: превью-слайдер слева + главное фото 3:4, вписано в экран ── */
.gallery { display:flex; flex-direction:row; gap:12px; align-items:flex-start; }
.gallery-main { order:1; flex:0 0 auto; position:relative; border-radius:var(--radius); overflow:hidden; background:var(--surface); border:1px solid var(--border); aspect-ratio:3/4; }
.gallery-main img { width:100%; height:100%; object-fit:cover; display:block; }

.gallery-thumbs-wrap { order:0; width:74px; flex-shrink:0; display:flex; flex-direction:column; gap:6px; }
.thumbs-nav { height:26px; flex-shrink:0; border:1px solid var(--border); border-radius:var(--radius-sm); display:flex; align-items:center; justify-content:center; color:var(--muted); background:var(--surface); cursor:pointer; }
.thumbs-nav:hover:not(:disabled) { color:var(--accent); border-color:var(--accent); }
.thumbs-nav:disabled { opacity:.3; cursor:default; }
.thumbs-nav.idle { display:none; }
.gallery-thumbs { flex:1 1 auto; min-height:0; display:flex; flex-direction:column; gap:8px; overflow:hidden; }
.gallery-thumbs .thumb { width:100%; height:auto; aspect-ratio:3/4; flex-shrink:0; border-radius:var(--radius-sm); overflow:hidden; border:2px solid transparent; box-shadow:0 0 0 1px var(--border); cursor:pointer; padding:0; background:none; display:block; }
.gallery-thumbs .thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.gallery-thumbs .thumb.active { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent); }
.gallery-main-label { position:absolute; right:10px; bottom:10px; background:rgba(0,0,0,.55); color:#fff; font-size:12px; padding:2px 8px; border-radius:10px; }

@media (max-width:860px){
  .gallery-thumbs-wrap { display:none; }
  .gallery-main { aspect-ratio:3/4; width:100% !important; height:auto !important; touch-action:pan-y; }
}

/* Стрелки главного фото — задизейблены на краях (без зацикливания) */
.gallery-nav:disabled { opacity:.3; cursor:default; pointer-events:none; }

/* ── Лайтбокс (галерея + фото отзывов) ── */
.lightbox { position:fixed; inset:0; z-index:100; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.9); user-select:none; }
.lightbox.review-lb { z-index:110; }
.lightbox img { max-height:92vh; max-width:92vw; object-fit:contain; }
.lb-btn { position:absolute; display:flex; align-items:center; justify-content:center; border-radius:50%; background:rgba(255,255,255,.12); color:#fff; transition:background .15s; }
.lb-btn:hover { background:rgba(255,255,255,.24); }
.lb-close { top:16px; right:16px; width:40px; height:40px; }
.lb-prev, .lb-next { top:50%; transform:translateY(-50%); width:44px; height:44px; }
.lb-prev { left:16px; }
.lb-next { right:16px; }
.lb-counter { position:absolute; bottom:20px; left:50%; transform:translateX(-50%); color:rgba(255,255,255,.7); font-size:14px; }

/* ── Секции «Похожие товары» / «Вы смотрели» ── */
.product-section { margin-top:48px; }
.product-section-title { font-size:22px; font-weight:800; letter-spacing:-.4px; margin-bottom:18px; }
.rv-strip { display:flex; gap:14px; overflow-x:auto; padding-bottom:6px; scroll-snap-type:x proximity; -webkit-overflow-scrolling:touch; }
.rv-strip::-webkit-scrollbar { height:6px; }
.rv-strip::-webkit-scrollbar-thumb { background:var(--border); border-radius:3px; }
.rv-card { flex:0 0 150px; scroll-snap-align:start; display:block; }
.rv-card-img { aspect-ratio:3/4; background:var(--bg); border-radius:var(--radius-sm); overflow:hidden; display:flex; align-items:center; justify-content:center; margin-bottom:8px; }
.rv-card-img img { width:100%; height:100%; object-fit:cover; }
.rv-card-name { font-size:13px; line-height:1.35; color:var(--fg); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.rv-card-price { font-size:14px; font-weight:700; margin-top:4px; }
.rv-card:hover .rv-card-name { color:var(--accent); }
@media (max-width:640px) { .rv-card { flex-basis:130px; } .product-section-title { font-size:19px; } }

/* ── Подписка на поступление (OOS) ── */
.restock-form { display:flex; gap:8px; margin-top:10px; }
.restock-input { flex:1; min-width:0; border:1.5px solid var(--border); border-radius:var(--radius-sm); padding:10px 12px; font-size:14px; outline:none; transition:border-color .15s; }
.restock-input:focus { border-color:var(--accent); }
.restock-submit { flex:0 0 auto; background:var(--accent); color:#fff; font-size:14px; font-weight:600; padding:0 18px; border-radius:var(--radius-sm); transition:background .15s; }
.restock-submit:hover { background:var(--accent-hover); }
.restock-submit:disabled { opacity:.6; cursor:default; }
.restock-error { color:#c0392b; font-size:13px; margin-top:8px; }
.restock-done { color:var(--success); font-size:14px; font-weight:500; margin-top:10px; }

/* ── Форма отзыва покупателя ── */
.reviews-empty { color:var(--muted); font-size:15px; padding:8px 0 4px; }
.review-form-wrap { margin-top:28px; padding-top:24px; border-top:1px solid var(--border); max-width:560px; }
.review-form-title { font-size:17px; font-weight:700; margin-bottom:14px; }
.review-stars-input { display:flex; gap:4px; margin-bottom:12px; }
.rsi-star { padding:2px; line-height:0; }
.rsi-star svg { width:28px; height:28px; }
.rsi-star svg path { fill:#e0e0e0; transition:fill .12s; }
.rsi-star.on svg path { fill:#f5a623; }
.review-input { display:block; width:100%; border:1.5px solid var(--border); border-radius:var(--radius-sm); padding:10px 12px; font-size:14px; outline:none; margin-bottom:12px; transition:border-color .15s; font-family:inherit; }
.review-input:focus { border-color:var(--accent); }
.review-submit { background:var(--accent); color:#fff; font-size:14px; font-weight:600; padding:11px 22px; border-radius:var(--radius-sm); transition:background .15s; }
.review-submit:hover { background:var(--accent-hover); }
.review-submit:disabled { opacity:.6; cursor:default; }
.review-form-error { color:#c0392b; font-size:13px; margin-bottom:10px; }
.review-form-done { color:var(--success); font-size:15px; font-weight:500; }

/* ── Слайдер главного фото (трек с анимацией; работает на десктопе и мобайле) ── */
.gallery-main { display:block; overflow:hidden; }
.gallery-track { display:flex; height:100%; width:100%; transition:transform .35s ease; will-change:transform; }
.gallery-slide { flex:0 0 100%; width:100%; height:100%; }
.gallery-slide img { width:100%; height:100%; object-fit:cover; display:block; }
.gallery-track.dragging { transition:none; }

/* OOS-виджет подписки занимает всю ширину */
.restock { width:100%; }
