/* ============================================================
   PRODUCT / КАРТОЧКА ТОВАРА — molecmag
   ============================================================ */
.product { padding: 24px 0 72px; }

.product__breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 16px; padding: 0; font-size: 13px; color: var(--text-tertiary); }
.product__breadcrumb li:not(:last-child)::after { content: '/'; margin-left: 6px; color: var(--text-tertiary); }
.product__breadcrumb a { color: var(--text-secondary); transition: color .15s; }
.product__breadcrumb a:hover { color: var(--teal); }
.product__breadcrumb li:last-child a { color: var(--text-primary); pointer-events: none; }

.product__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 0 0 24px; }
.product__title { margin: 0; font: 600 clamp(22px, 2.2vw, 30px)/1.15 'Rubik', sans-serif; color: var(--text-primary); }
.product__head-actions { display: flex; gap: 12px; flex-shrink: 0; padding-top: 6px; }
.product__action { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--border-primary); border-radius: var(--radius-pill); background: var(--bg-tertiary); cursor: pointer; font: 400 14px 'Geologica', sans-serif; color: var(--text-secondary); white-space: nowrap; transition: color .15s, border-color .15s; }
.product__action svg { color: var(--text-tertiary); transition: color .15s; }
.product__action:hover { color: var(--teal); border-color: var(--teal); }
.product__action:hover svg { color: var(--teal); }

/* раскладка верхнего блока: галерея | инфо | покупка */
.product__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px) 380px; gap: 24px; align-items: start; margin: 0 0 56px; }

/* ── галерея ── */
.product__gallery { background: var(--bg-tertiary); border-radius: var(--radius-24); padding: 20px; box-shadow: var(--shadow-s); }
.product__main { position: relative; display: block; aspect-ratio: 1; border-radius: var(--radius-16); overflow: hidden; background: #fff; }
.product__main img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.product__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-primary); background: rgba(255,255,255,.92); box-shadow: 0 2px 10px rgba(0,0,0,.08); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--text-primary); z-index: 2; transition: background .15s, color .15s; }
.product__nav:hover { background: #fff; color: var(--teal); }
.product__nav--prev { left: 12px; } .product__nav--next { right: 12px; }
.product__thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.product__thumb { width: 68px; height: 68px; border-radius: var(--radius-12); overflow: hidden; background: #fff; border: 1px solid var(--border-tertiary); cursor: pointer; padding: 0; transition: border-color .15s; }
.product__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.product__thumb:hover { border-color: rgba(24,162,176,.4); }
.product__thumb.is-active { border-color: var(--teal); }

/* ── инфо-колонка ── */
.product__info { display: flex; flex-direction: column; gap: 20px; }
.product__article { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--text-primary); }
.product__article-label { color: var(--text-secondary); }
.product__article-val { color: var(--teal); font-weight: 500; }
.product__copy { border: none; background: none; cursor: pointer; color: var(--text-tertiary); display: inline-flex; padding: 2px; }
.product__copy:hover { color: var(--teal); }
.product__about-title { margin: 0 0 8px; font: 600 18px 'Geologica', sans-serif; color: var(--text-primary); }
.product__about-text { margin: 0 0 8px; font-size: 14px; line-height: 1.6; color: var(--text-secondary); }
.product__spec-link { display: inline-block; font-size: 14px; color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.product__spec-link:hover { color: var(--teal); }
.product__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.product__chip { display: inline-flex; flex-direction: column; gap: 4px; padding: 10px 14px; background: var(--bg-primary-bg); border-radius: var(--radius-12); font-size: 12px; min-width: 110px; }
.product__chip-name { color: var(--text-secondary); }
.product__chip b { color: var(--text-primary); font-weight: 500; font-size: 13px; }

/* ── панель покупки ── */
.product__buy { display: flex; flex-direction: column; gap: 16px; }
.product__price-card { background: var(--bg-tertiary); border-radius: var(--radius-24); padding: 24px; box-shadow: var(--shadow-s); }
.product__price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.product__price-now { font: 600 32px/1 'Rubik', sans-serif; color: var(--text-primary); letter-spacing: -.6px; }
.product__price-old { font-size: 15px; color: var(--text-tertiary); text-decoration: line-through; }
.product__price-badge { background: var(--teal); color: #fff; font-size: 12px; border-radius: 12px 4px 12px 4px; padding: 3px 9px; }
.product__stock { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-secondary); margin: 10px 0 18px; }
.product__stock-dot { width: 8px; height: 8px; border-radius: 50%; background: #cfd6db; flex: 0 0 auto; }
.product__stock--in { color: #137a68; }
.product__stock--in .product__stock-dot { background: #1fae8e; box-shadow: 0 0 0 3px rgba(31,174,142,.18); }
.product__stock--out { color: #c0392b; }

.product__options { display: flex; flex-direction: column; gap: 12px; margin: 0 0 16px; }
.product__option-label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.product__option-control select, .product__option-control input[type=text], .product__option-control textarea {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--border-primary); border-radius: var(--radius-12);
  background: #fff; font: 400 14px 'Geologica', sans-serif; color: var(--text-primary);
}
.product__option-control textarea { height: auto; padding: 10px 14px; }
.product__option-radios { display: flex; flex-direction: column; gap: 6px; }
.product__option-radios label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }

.product__qtyrow { display: flex; gap: 14px; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.product__qty-label { font-size: 14px; color: var(--text-secondary); }
.product__qty { display: inline-flex; align-items: center; gap: 14px; background: var(--bg-primary-bg); border-radius: var(--radius-12); padding: 11px 16px; }
.product__qty-btn { border: none; background: none; cursor: pointer; font-size: 18px; line-height: 1; color: var(--text-primary); width: 18px; height: 18px; padding: 0; }
.product__qty-btn:hover { color: var(--teal); }
.product__qty-input { width: 32px; text-align: center; border: none; background: none; font: 400 16px 'Geologica', sans-serif; color: var(--text-primary); -moz-appearance: textfield; }
.product__qty-input::-webkit-outer-spin-button, .product__qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* кнопки покупки: одинаковые по высоте/ширине, primary бирюзовая, secondary outline */
.product__btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; border: 1.5px solid transparent; border-radius: var(--radius-pill); cursor: pointer; font: 500 16px 'Geologica', sans-serif; transition: background .15s, color .15s, border-color .15s, transform .12s; }
.product__btn--cart { background: var(--teal); color: #fff; }
.product__btn--cart:hover { background: #1591a0; }
.product__btn--cart:active { transform: translateY(1px); }
.product__btn--oneclick { background: #fff; color: var(--text-primary); border-color: var(--border-primary); margin-top: 10px; }
.product__btn--oneclick:hover { border-color: var(--teal); color: var(--teal); }

.product__divider { border: none; border-top: 1px solid var(--border-primary); margin: 20px 0; }
.product__delivery-title { margin: 0 0 14px; font: 600 17px 'Geologica', sans-serif; color: var(--text-primary); letter-spacing: -.18px; }
.product__delivery-row { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.product__delivery-row:last-child { margin-bottom: 0; }
.product__delivery-ico { flex: 0 0 40px; width: 40px; height: 40px; border-radius: var(--radius-12); display: grid; place-items: center; background: rgba(24,162,176,.1); color: var(--teal); }
.product__delivery-ico svg { width: 22px; height: 22px; }
.product__delivery-row p { margin: 0; font-size: 13.5px; line-height: 1.35; color: var(--text-secondary); }
.product__delivery-row p b { color: var(--text-primary); font-weight: 500; }

/* блок «Нужна помощь с выбором?» — форма как на главной (стили из home2.css) */
.product__help { padding: 24px; }
.product__help .mm-qa__title { font-size: 19px; }
.product__help .mm-qa__sub { margin-bottom: 16px; }

/* ── вкладки ── */
.ptabs { margin: 0 0 56px; }
.ptabs__nav { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg-primary-bg); border-radius: var(--radius-pill); margin: 0 0 24px; }
.ptabs__navwrap { display: flex; justify-content: flex-start; }
.ptabs__tab { border: none; background: none; cursor: pointer; padding: 9px 22px; border-radius: var(--radius-pill); font: 400 15px 'Geologica', sans-serif; color: var(--text-secondary); white-space: nowrap; transition: color .15s; }
.ptabs__tab:hover { color: var(--text-primary); }
.ptabs__tab.is-active { background: #fff; color: var(--text-primary); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.ptabs__panel { display: none; }
.ptabs__panel.is-active { display: block; }

/* контент-карточка вкладки: комфортная ширина, без узкой колонки + пустоты */
.pcontent { background: var(--bg-tertiary); border-radius: var(--radius-24); box-shadow: var(--shadow-s); padding: clamp(22px, 3vw, 40px); max-width: none; margin: 0; font-size: 15px; line-height: 1.7; color: var(--text-secondary); }
.pcontent__desc { max-width: 900px; }
.pcontent__desc :first-child { margin-top: 0; }
.pcontent__desc img { max-width: 100%; height: auto; border-radius: var(--radius-12); }
.pcontent__desc h2, .pcontent__desc h3 { color: var(--text-primary); font-family: 'Geologica', sans-serif; }
.pcontent__subtitle { margin: 0 0 14px; font: 600 18px 'Geologica', sans-serif; color: var(--text-primary); }
.pcontent__spec { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--border-primary); }

/* характеристики */
.pspec { width: 100%; border-collapse: collapse; max-width: 760px; }
.pspec + .pspec { margin-top: 8px; }
.pspec caption { text-align: left; font: 600 16px 'Geologica', sans-serif; color: var(--text-primary); padding: 12px 0 6px; }
.pspec td { padding: 12px 16px; border-bottom: 1px solid var(--border-primary); font-size: 14px; }
.pspec tr:first-child td { border-top: 1px solid var(--border-primary); }
.pspec td:first-child { color: var(--text-secondary); width: 45%; }
.pspec td:last-child { color: var(--text-primary); }

/* доставка-вкладка */
.pdelivery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.pdelivery__card { background: var(--bg-primary-bg); border-radius: var(--radius-16); padding: 20px; }
.pdelivery__card h4 { margin: 0 0 10px; font: 600 16px 'Geologica', sans-serif; color: var(--text-primary); }
.pdelivery__card p { margin: 0; font-size: 14px; color: var(--text-secondary); line-height: 1.5; }

/* отзывы */
.preview__form { max-width: 640px; margin-top: 8px; }
.preview__field { margin-bottom: 16px; }
.preview__field label { display: block; font-size: 14px; color: var(--text-secondary); margin-bottom: 6px; }
.preview__field input[type=text], .preview__field textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border-primary); border-radius: var(--radius-12); font: 400 14px 'Geologica', sans-serif; }
.preview__rating { display: inline-flex; gap: 6px; align-items: center; }

/* похожие товары */
.product__related { margin-top: 56px; }
.product__related-title { margin: 0 0 24px; font: 500 28px 'Geologica', sans-serif; color: var(--text-primary); }
.product__related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* адаптив */
@media (max-width: 1100px) {
  .product__top { grid-template-columns: 1fr 1fr; }
  .product__buy { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: start; }
  .product__price-card, .product__help { flex: 1 1 320px; }
  .product__related-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .product__head { flex-direction: column-reverse; align-items: flex-start; gap: 12px; }
  .product__top { grid-template-columns: 1fr; display: flex; flex-direction: column; }
  /* порядок на mobile: галерея → цена/кнопки → описание */
  .product__gallery { order: 1; }
  .product__buy { order: 2; flex-direction: column; align-items: stretch; }
  .product__info { order: 3; }
  .product__price-card, .product__help { flex: 1 1 auto; width: 100%; }
  .product__related-grid { grid-template-columns: repeat(2, 1fr); }
  .ptabs__navwrap { justify-content: flex-start; }
  .ptabs__nav { width: 100%; overflow-x: auto; }
}
@media (max-width: 460px) {
  .product__related-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* ============================================================
   МОДАЛКА «Купить в 1 клик» — molecmag (без bootstrap)
   ============================================================ */
.boc-modal { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; }
.boc-modal.is-open { display: flex; }
.boc-modal__overlay { position: absolute; inset: 0; background: rgba(20, 26, 33, .55); backdrop-filter: blur(2px); animation: mmFade .2s ease; }
.boc-modal__dialog { position: relative; width: 100%; max-width: 440px; background: #fff; border-radius: var(--radius-24); box-shadow: 0 24px 70px rgba(20,26,33,.28); padding: 28px clamp(20px, 4vw, 32px) 30px; max-height: calc(100vh - 40px); overflow-y: auto; animation: mmPop .22s cubic-bezier(.2,.7,.3,1); }
@keyframes mmFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mmPop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.boc-modal__close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: none; border-radius: 50%; background: var(--bg-primary-bg); color: var(--text-secondary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background .15s, color .15s; }
.boc-modal__close:hover { background: var(--bg-secondary); color: var(--text-primary); }
.boc-modal__title { margin: 0 0 6px; font: 600 22px 'Rubik', sans-serif; color: var(--text-primary); padding-right: 30px; }
.boc-modal__sub { margin: 0 0 18px; font-size: 14px; line-height: 1.55; color: var(--text-secondary); }
.boc-modal__summary:empty { display: none; }
.boc-modal__product { display: flex; align-items: center; gap: 14px; padding: 12px; margin: 0 0 16px; background: var(--bg-primary-bg); border-radius: var(--radius-16); }
.boc-modal__product-img { flex: 0 0 56px; width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: var(--radius-12); padding: 4px; }
.boc-modal__product-info { min-width: 0; }
.boc-modal__product-name { font: 500 14px 'Geologica', sans-serif; color: var(--text-primary); line-height: 1.3; }
.boc-modal__product-opts { margin-top: 3px; font-size: 12px; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.boc-modal__product-meta { margin-top: 5px; font-size: 13px; color: var(--text-secondary); }
.boc-modal__product-meta b { color: var(--text-primary); }
.boc-modal__form { display: flex; flex-direction: column; gap: 12px; }
.boc-modal__field { display: flex; flex-direction: column; gap: 6px; }
.boc-modal__field > span { font-size: 13px; color: var(--text-secondary); }
.boc-modal__field input, .boc-modal__field textarea { width: 100%; padding: 0 14px; height: 46px; border: 1px solid var(--border-primary); border-radius: var(--radius-12); background: #fff; font: 400 15px 'Geologica', sans-serif; color: var(--text-primary); transition: border-color .15s; }
.boc-modal__field textarea { height: auto; padding: 11px 14px; resize: vertical; }
.boc-modal__field input:focus, .boc-modal__field textarea:focus { outline: none; border-color: var(--teal); }
.boc-modal__consent { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.45; color: var(--text-secondary); cursor: pointer; margin-top: 2px; }
.boc-modal__consent input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--teal); cursor: pointer; }
.boc-modal__consent a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
.boc-modal__submit { margin-top: 6px; width: 100%; height: 52px; border: none; border-radius: var(--radius-pill); background: var(--teal); color: #fff; font: 500 16px 'Geologica', sans-serif; cursor: pointer; transition: background .15s, transform .12s; }
.boc-modal__submit:hover { background: #1591a0; }
.boc-modal__submit:active { transform: translateY(1px); }
.boc-modal__submit:disabled { opacity: .6; cursor: default; }
.boc-modal__msg { font-size: 14px; line-height: 1.5; }
.boc-modal__msg:empty { display: none; }
.boc-modal__msg.is-error { color: #c0392b; }
.boc-modal__msg.is-ok { color: #137a68; padding: 8px 0; }

/* ============================================================
   ИЗБРАННОЕ (wishlist) — molecmag
   ============================================================ */
.wishlist { padding: 24px 0 72px; }
.wishlist__head { display: flex; align-items: center; gap: 12px; margin: 6px 0 24px; }
.wishlist__title { margin: 0; font: 600 clamp(24px, 2.4vw, 32px)/1.1 'Rubik', sans-serif; color: var(--text-primary); }
.wishlist__count { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 9px; border-radius: var(--radius-pill); background: var(--bg-accent-subdued); color: var(--teal); font: 500 14px 'Geologica', sans-serif; }
.wishlist__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.wishlist__card { position: relative; }
.wishlist__remove { position: absolute; top: 12px; right: 12px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 2px 10px rgba(0,0,0,.08); color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; transition: background .15s, color .15s; }
.wishlist__remove:hover { background: #fff; color: #c0392b; }
.wishlist__stock { font-size: 13px; color: #137a68; margin: 0 0 6px; }
.wishlist__cart { width: 100%; }
.wishlist__foot { margin-top: 32px; display: flex; justify-content: flex-end; }
.wishlist__continue { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 28px; border-radius: var(--radius-pill); background: var(--teal); color: #fff; font: 500 15px 'Geologica', sans-serif; transition: background .15s; }
.wishlist__continue:hover { background: #1591a0; color: #fff; }
.wishlist__continue--ghost { background: #fff; color: var(--text-primary); border: 1px solid var(--border-primary); }
.wishlist__continue--ghost:hover { background: #fff; color: var(--teal); border-color: var(--teal); }
.wishlist__empty { text-align: center; padding: 64px 20px; background: var(--bg-tertiary); border-radius: var(--radius-24); box-shadow: var(--shadow-s); color: var(--text-secondary); }
.wishlist__empty svg { color: var(--border-primary); margin-bottom: 14px; }
.wishlist__empty p { margin: 0 0 22px; font-size: 16px; }

@media (max-width: 1100px) { .wishlist__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .wishlist__grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (max-width: 460px)  { .wishlist__grid { grid-template-columns: 1fr 1fr; gap: 12px; } }
