/* Карточка товара (single-shop.php). Подключается только на страницах товаров. */
.es-product { background: #f6f5f3; padding: 20px 0 64px; color: var(--es-ink); }
.es-product .container { max-width: 1272px; }
.es-product__crumbs { font-size: 14px; color: #6b7777; margin: 0 0 20px; }
.es-product__crumbs a { color: #6b7777; }

/* Первый экран */
.es-product__top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.es-product__photo { position: relative; background: #fff; border-radius: 20px; box-shadow: 0 4px 18px rgba(20,40,40,.07); overflow: hidden; }
.es-product__photo .swiper-slide a { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; padding: 6%; }
.es-product__photo .swiper-slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 0 !important; }
.es-product__badge { position: absolute; left: 18px; top: 18px; z-index: 2; padding: 7px 14px; border-radius: 999px; background: #e7f5f4; color: var(--es-teal); font-size: 13px; font-weight: 700; }
.es-product__sale { position: absolute; right: 18px; top: 18px; z-index: 2; padding: 6px 12px; border-radius: 999px; background: #e0442f; color: #fff; font-size: 14px; font-weight: 800; }
.swiper-thumbs-product { margin-top: 14px; }
.swiper-thumbs-product .swiper-slide { width: 88px !important; height: 88px; border-radius: 14px; background: #fff; border: 2px solid #ecebe8; overflow: hidden; cursor: pointer; opacity: 1 !important; transition: border-color .2s; }
.swiper-thumbs-product .swiper-slide img { width: 100%; height: 100%; object-fit: cover; }
.swiper-thumbs-product .swiper-slide-thumb-active { border-color: var(--es-teal); }

.es-product__cat { color: var(--es-teal) !important; font-weight: 700; font-size: 14px; text-decoration: none; }
.es-product__title { margin: 8px 0 0; font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 40px; line-height: 1.15; color: var(--es-ink); }
.es-product__lead { margin: 16px 0 0; font-size: 18px; line-height: 1.55; font-weight: 600; color: #2d3a3a; }
.es-product__short { margin-top: 14px; font-size: 17px; line-height: 1.6; color: #3e4b4b; }
.es-product__short p:last-child { margin-bottom: 0; }

.es-product__buy { margin-top: 24px; padding: 26px 28px; background: #fff; border-radius: 20px; box-shadow: 0 4px 18px rgba(20,40,40,.07); }
.es-product__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.es-product__price b { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 40px; line-height: 1.1; color: var(--es-ink); }
.es-product__price b.es-product__price--ask { font-size: 28px; }
.es-product__price del { font-size: 20px; color: #8a9595; }
.es-product__note { margin: 8px 0 0; font-size: 14px; color: #6b7777; }
.es-product__btns { display: flex; gap: 12px; margin-top: 20px; }
.es-product__btns .btn { flex: 1 1 0; height: 56px; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 800; border-radius: 14px; }
.es-product__msg { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid #ecebe8; font-size: 14px; color: #3e4b4b; }
.es-product__msg a { height: 34px; padding: 0 14px; border-radius: 999px; background: #e7f5f4; color: var(--es-teal) !important; font-weight: 700; display: inline-flex; align-items: center; text-decoration: none; }
.es-product__msg a:hover { background: #d4eeec; }
.es-product__call { margin: 12px 0 0; font-size: 14px; color: #3e4b4b; }
.es-product__call a { margin-left: 4px; font-size: 16px; font-weight: 800; color: var(--es-ink) !important; text-decoration: none; }

.es-specs { margin: 0; }
.es-specs > div { display: flex; justify-content: space-between; gap: 24px; padding: 13px 0; border-bottom: 1px solid #ecebe8; font-size: 15px; }
.es-specs > div:last-child { border-bottom: 0; }
.es-specs dt { font-weight: 400; color: #5f6b6b; }
.es-specs dd { margin: 0; font-weight: 700; text-align: right; }
.es-specs--short { margin-top: 20px; }
.es-product__more { display: inline-block; margin-top: 4px; color: var(--es-teal) !important; font-weight: 700; font-size: 15px; text-decoration: none; }

.es-product__course { margin-top: 22px; display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: 18px; background: var(--es-teal); color: #fff !important; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.es-product__course:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(8,127,123,.3); }
.es-product__course > span:nth-child(2) { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; }
.es-product__course b { font-size: 17px; font-weight: 800; }
.es-product__course small { font-size: 14px; opacity: .88; }
.es-product__course-ico { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; font-size: 22px; flex: 0 0 auto; }
.es-product__course > span:last-child { font-size: 20px; font-weight: 800; }

/* Доверие */
.es-trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 44px; }
.es-trust > div { background: #fff; border-radius: 20px; box-shadow: 0 4px 18px rgba(20,40,40,.07); padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; }
.es-trust b { font-size: 17px; font-weight: 800; }
.es-trust span { font-size: 14px; line-height: 1.5; color: #5f6b6b; }

/* Липкое меню разделов */
.es-pnav { position: sticky; top: calc(var(--es-top) + var(--es-h-scrolled, 72px) + 10px); z-index: 20; margin-top: 44px; display: flex; align-items: center; gap: 8px; padding: 8px; background: #fff; border-radius: 16px; box-shadow: 0 4px 18px rgba(20,40,40,.08); }
.es-pnav__links { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.es-pnav__links::-webkit-scrollbar { display: none; }
.es-pnav__links a { flex: 0 0 auto; height: 40px; padding: 0 18px; border-radius: 999px; display: inline-flex; align-items: center; font-weight: 700; font-size: 15px; color: #3e4b4b !important; text-decoration: none; white-space: nowrap; }
.es-pnav__links a:hover { background: #f1f5f4; }
.es-pnav__links a.is-active { background: var(--es-teal); color: #fff !important; }
.es-pnav__buy { margin-left: auto; display: flex; align-items: center; gap: 14px; padding-right: 4px; flex: 0 0 auto; }
.es-pnav__buy b { font-family: 'Montserrat', sans-serif; font-size: 18px; white-space: nowrap; }
.es-pnav__buy .btn { height: 40px; padding: 0 20px; border-radius: 999px; display: inline-flex; align-items: center; font-weight: 800; }

/* Разделы */
.es-psec { margin-top: 48px; scroll-margin-top: calc(var(--es-top) + 160px); }
.es-psec__title { margin: 0 0 22px; font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 32px; line-height: 1.2; color: var(--es-ink); }
.es-psec__title--sm { font-size: 24px; margin-bottom: 14px; }
.es-psec__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.es-psec__grid--specs { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.es-psec__grid--specs.is-single { grid-template-columns: minmax(0, 1fr); }
.es-psec__grid--specs > .es-psec { margin-top: 48px; }
.es-card { background: #fff; border-radius: 20px; box-shadow: 0 4px 18px rgba(20,40,40,.07); padding: 26px 28px; }
.es-specs.es-card { padding: 8px 28px; }

/* Текст из редактора: описание товара у каждого своё — оформляем «типографикой», без привязки к содержанию */
.es-prose { font-size: 16px; line-height: 1.7; color: #3e4b4b; }
#p-about .es-prose { background: #fff; border-radius: 20px; box-shadow: 0 4px 18px rgba(20,40,40,.07); padding: 32px 36px; }
.es-prose h2 { margin: 1.6em 0 .6em; font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 28px; line-height: 1.25; color: var(--es-ink); }
.es-prose h3 { margin: 1.4em 0 .5em; font-weight: 800; font-size: 20px; color: var(--es-ink); }
.es-prose h4 { margin: 1.2em 0 .4em; font-weight: 800; font-size: 17px; color: var(--es-ink); }
.es-prose > :first-child { margin-top: 0 !important; }
.es-prose > :last-child { margin-bottom: 0 !important; }
.es-prose p { margin: 0 0 1em; }
.es-prose ul, .es-prose ol { margin: 0 0 1em; padding-left: 0; list-style: none; }
.es-prose ul > li { position: relative; padding-left: 26px; margin: 0 0 .55em !important; }
.es-prose ul > li::before { content: "" !important; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--es-teal); }
.es-prose ol { counter-reset: esol; }
.es-prose ol > li { counter-increment: esol; position: relative; padding-left: 34px; margin: 0 0 .6em !important; }
.es-prose ol > li::before { content: counter(esol) !important; position: absolute; left: 0; top: .1em; width: 24px; height: 24px; border-radius: 50%; background: #e7f5f4; color: var(--es-teal); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.es-prose img { max-width: 100%; height: auto; border-radius: 14px; }
.es-prose table { width: 100%; border-collapse: collapse; margin: 0 0 1em; }
.es-prose td, .es-prose th { padding: 10px 12px; border-bottom: 1px solid #ecebe8; text-align: left; }
.es-prose a { color: var(--es-teal); }

/* Видео */
.es-pvideos { display: grid; gap: 16px; }
.es-pvideo { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #1f2a2a; }
.es-pvideo iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.es-psec__grid--specs.is-single .es-pvideos { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.es-pay__phones { margin-top: 10px; font-weight: 700; color: var(--es-ink); }
.es-pfaq { display: flex; flex-direction: column; gap: 12px; }

/* Рекомендованные */
.es-product #features .features-wrapper { position: relative; }

/* Полоса «Купить» внизу на телефоне */
.es-pbar { display: none; }

@media (max-width: 991.98px) {
	.es-product__top { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.es-product__title { font-size: 30px; }
	.es-trust { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 28px; }
	.es-psec__grid, .es-psec__grid--specs { grid-template-columns: minmax(0, 1fr); }
	.es-pnav { top: calc(var(--es-top) + 64px + 8px); margin-top: 28px; }
	.es-pnav__buy { display: none; }
	.es-psec { margin-top: 36px; }
	.es-psec__grid--specs > .es-psec { margin-top: 36px; }
}
@media (max-width: 575.98px) {
	.es-product { padding-top: 12px; padding-bottom: 96px; }
	.es-product__title { font-size: 26px; }
	.es-product__price b { font-size: 32px; }
	.es-product__buy { padding: 20px; border-radius: 18px; }
	.es-product__badge { top: auto; bottom: 36px; left: 12px; font-size: 12px; padding: 6px 11px; }
	.es-product__sale { top: 12px; right: 12px; }
	.es-product__btns .btn { height: 52px; font-size: 16px; }
	.es-psec__title { font-size: 24px; margin-bottom: 16px; }
	#p-about .es-prose, .es-card { padding: 20px; border-radius: 18px; }
	.es-specs.es-card { padding: 4px 18px; }
	.es-prose h2 { font-size: 22px; }
	.es-specs > div { font-size: 14px; gap: 16px; }
	.es-product__course { padding: 16px; }
	.es-pbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1020; display: flex; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -8px 24px rgba(0,0,0,.08); transform: translateY(110%); transition: transform .25s; }
	.es-pbar.is-visible { transform: none; }
	.es-pbar > div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
	.es-pbar small { font-size: 12px; color: #6b7777; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.es-pbar b { font-family: 'Montserrat', sans-serif; font-size: 18px; }
	.es-pbar .btn { height: 48px; padding: 0 26px; border-radius: 14px; display: inline-flex; align-items: center; font-weight: 800; }
}
