/* =========================================================================
   Карточка товара.
   ========================================================================= */

/* ── Первый экран ── */
.phero { position: relative; background: var(--c-deep); color: #fff; padding: 24px 0 clamp(40px, 5vw, 64px); }
.phero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(32px, 5vw, 72px); align-items: start; }

/* Фото стоит на светлой сцене: фото клиента на белом фоне и вырезанные PNG выглядят одинаково аккуратно */
.gallery { display: grid; gap: 12px; }
.gallery__stage { --pad: clamp(18px, 3vw, 36px); position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: var(--r-big); background: #fff; cursor: zoom-in; overflow: hidden; }
.gallery__img { position: absolute; inset: var(--pad); width: calc(100% - 2 * var(--pad)); height: calc(100% - 2 * var(--pad)); object-fit: contain; transition: opacity .2s; }
.gallery__img.is-swapping { opacity: 0; }
.gallery__thumbs { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.gallery__thumb { flex: 0 0 76px; height: 76px; padding: 6px; border: 2px solid transparent; border-radius: 14px; background: #fff; cursor: pointer; opacity: .7; transition: opacity .15s, border-color .15s; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery__thumb:hover { opacity: 1; }
.gallery__thumb.is-active { opacity: 1; border-color: var(--c-green-lite); }

.phero__info { display: grid; gap: 22px; padding-top: 4px; }
.phero__title { font-size: clamp(28px, 3vw, 44px); line-height: 1.1; color: #fff; overflow-wrap: anywhere; }
.phero__lead { margin: -6px 0 0; font-size: 17px; color: var(--c-muted-dk); }
.phero__specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--c-line-dk); }
.phero__specs > div { display: grid; gap: 3px; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--c-line-dk); }
.phero__specs > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--c-line-dk); }
.phero__specs dt { font-size: 12.5px; color: var(--c-muted-dk); }
.phero__specs dd { font-size: 15px; font-weight: 500; color: #fff; }

.buybox { display: grid; gap: 16px; padding: 22px; border: 1px solid var(--c-line-dk); border-radius: var(--r-card); background: var(--c-deep-2); }
.buybox__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.buybox__amount { font: 600 clamp(26px, 2.6vw, 34px)/1.1 var(--font-head); color: #fff; }
.buybox__amount del { font-size: .6em; color: var(--c-muted-dk); }
.buybox__amount ins { text-decoration: none; }
.buybox__amount--ask { font-size: 24px; }
.buybox__hint { width: 100%; font-size: 14px; color: var(--c-muted-dk); }
.buybox .stock--in { color: var(--c-green-lite); }
.buybox .stock--order { color: #f0c36a; }
.buybox__actions .btn { width: 100%; }
.buy-form { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.buy-form .qty { height: 54px; }
.buy-form .single_add_to_cart_button { width: 100%; }
.buybox__more { display: flex; flex-wrap: wrap; gap: 10px; }
.buybox__more .btn { flex: 1 1 200px; min-height: 46px; font-size: 14px; }
.phero__trust { display: grid; gap: 10px; font-size: 14px; color: var(--c-muted-dk); }
.phero__trust li { display: flex; align-items: center; gap: 12px; }
.phero__trust .ico { width: 17px; height: 17px; color: var(--c-green-lite); }

/* ── Меню разделов: прилипает прямо под шапкой, подсвечивает текущий раздел ── */
.pnav { position: sticky; top: var(--hdr-h); z-index: 50; background: #fff; border-bottom: 1px solid var(--c-line); }
.pnav.is-stuck { box-shadow: 0 10px 24px -18px rgba(13, 31, 45, .45); }
.pnav__inner { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.pnav__links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-width: 0; }
.pnav__links::-webkit-scrollbar { display: none; }
.pnav__link { position: relative; flex: 0 0 auto; padding: 19px 14px; font-weight: 600; font-size: 15px; color: var(--c-muted); white-space: nowrap; transition: color .15s; }
.pnav__link::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--c-green); transform: scaleX(0); transition: transform .2s var(--ease); }
.pnav__link:hover { color: var(--c-ink); }
.pnav__link.is-active { color: var(--c-ink); }
.pnav__link.is-active::after { transform: scaleX(1); }
.pnav__buy { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .2s, transform .2s var(--ease), visibility 0s .2s; }
.pnav.is-stuck .pnav__buy { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s var(--ease); }
.pnav__name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; color: var(--c-ink); }
.pnav__price { font: 600 17px/1 var(--font-head); color: var(--c-ink); white-space: nowrap; }
.pnav__price del { display: none; }
.pnav__price ins { text-decoration: none; }

/* ── Разделы карточки ── */
.psec { padding-block: clamp(48px, 6vw, 84px); scroll-margin-top: calc(var(--hdr-h) + 60px); }
.psec--grey { background: var(--c-bg-alt); }
.psec__title { margin-bottom: 28px; font-size: clamp(24px, 2.4vw, 36px); color: var(--c-ink); }
.prose--card { font-size: 17px; }
.prose--card > h3 { margin: 1.4em 0 .4em; font-size: 18px; color: var(--c-ink); }
#advantages .prose--card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
#advantages .prose--card > * { grid-column: 1 / -1; }
#advantages .prose--card > h3 { grid-column: auto; }
.spec-table { width: 100%; font-size: 16px; border-top: 1px solid var(--c-line); font-variant-numeric: tabular-nums; }
.spec-table th, .spec-table td { padding: 15px 0; border-bottom: 1px solid var(--c-line); text-align: left; vertical-align: top; }
.spec-table th { width: 38%; padding-right: 32px; font-weight: 500; color: var(--c-muted); }
.spec-table td { color: var(--c-ink); font-weight: 500; }

/* ── Отзывы (комментарии WooCommerce) ── */
.reviews { display: grid; gap: 24px; }
.reviews .woocommerce-Reviews-title { display: none; }
.reviews .woocommerce-noreviews { margin: 0; color: var(--c-muted); }
.reviews .commentlist { display: grid; gap: 16px; }
.reviews .comment_container { display: grid; gap: 6px; padding: 20px; border: 1px solid var(--c-line); border-radius: var(--r-card); }
.reviews .avatar { display: none; }
.reviews .star-rating { color: #e0a100; }
#review_form_wrapper { max-width: 760px; }
#review_form .comment-reply-title { display: block; margin-bottom: 8px; font: 600 20px/1.3 var(--font-head); color: var(--c-ink); }
#review_form .comment-form { display: grid; gap: 14px; }
#review_form .comment-form p { margin: 0; }
#review_form label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
#review_form .comment-notes { font-size: 14px; color: var(--c-muted); }
#review_form .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 10px; }
#review_form .comment-form-cookies-consent label { margin: 0; font-weight: 400; color: var(--c-muted); }
#review_form .form-submit input[type="submit"] { min-height: 50px; padding: 0 26px; border: 0; border-radius: var(--r-ctrl); background: var(--c-green); color: #fff; font: 600 15px/1 var(--font-body); cursor: pointer; }
#review_form .form-submit input[type="submit"]:hover { background: var(--c-green-hover); }
.comment-form-rating .stars { display: none; }
.comment-form-rating select { max-width: 280px; }

/* ── Готовы заказать: фото (настройка темы) или фото товара на сцене ── */
.pcta { position: relative; overflow: hidden; background: var(--c-deep); color: #fff; }
.pcta__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pcta--photo::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(10, 26, 39, .94) 0%, rgba(10, 26, 39, .86) 45%, rgba(10, 26, 39, .45) 100%); }
.pcta__inner { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 56px; align-items: center; padding-block: clamp(56px, 7vw, 96px); }
.pcta__title { font-size: clamp(26px, 2.8vw, 42px); max-width: 22ch; overflow-wrap: anywhere; }
.pcta__lead { margin: 16px 0 0; max-width: 40em; font-size: 17px; color: #c9d6e0; }
.pcta__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.pcta__product { position: relative; width: clamp(200px, 22vw, 300px); aspect-ratio: 1; border-radius: var(--r-big); background: #fff; }
.pcta__product img { position: absolute; inset: 22px; width: calc(100% - 44px); height: calc(100% - 44px); object-fit: contain; }

.psec--related { background: var(--c-bg-alt); }

/* ── Просмотр фото ── */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(6, 16, 24, .92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox__img { max-width: min(92vw, 1100px); max-height: 86dvh; width: auto; height: auto; object-fit: contain; border-radius: 16px; background: #fff; }
.lightbox__close, .lightbox__nav { position: fixed; display: grid; place-items: center; width: 52px; height: 52px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, .22); }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__nav--prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 18px; top: 50%; transform: translateY(-50%); }
.lightbox .ico { width: 20px; height: 20px; }

/* ── Адаптив ── */
@media (max-width: 1100px) {
	.pnav__name { display: none; }
}
@media (max-width: 900px) {
	.phero__grid { grid-template-columns: 1fr; }
	.gallery__stage { aspect-ratio: 4 / 3.4; }
	.pcta__inner { grid-template-columns: 1fr; }
	.pcta__product { display: none; }
	#advantages .prose--card { display: block; }
	.pnav__buy { display: none; }
}
@media (max-width: 560px) {
	.phero { padding-top: 16px; }
	.phero__specs { grid-template-columns: 1fr; }
	.phero__specs > div:nth-child(even) { padding-left: 0; border-left: 0; }
	.buybox { padding: 16px; }
	.buybox__more .btn { flex-basis: 100%; }
	.pnav__inner { min-height: 52px; }
	.pnav__link { padding: 15px 10px; font-size: 14px; }
	.pnav__link::after { left: 10px; right: 10px; }
	.spec-table th { width: 46%; padding-right: 16px; font-size: 14px; }
	.spec-table td { font-size: 15px; }
	.prose--card { font-size: 16px; }
	.pcta__actions .btn { width: 100%; }
	.lightbox__nav { display: none; }
}
