/* =========================================================================
   Фабрика KS — карточка товара (вместо шаблона Elementor 1359).
   Подключается после inner.css. Стили плагинов (WooCommerce, qty-pricing, gss-catalog,
   ks-article-variants, ks-wishlist) — в assets/vendor/, они грузятся раньше, как на сайте.

   Здесь слои в порядке каскада сайта:
   1) база темы UiCore — вынесена в entry.css (грузится раньше этого файла);
   2) правила темы и Elementor для WooCommerce;
   3) «Дополнительные стили» сайта (Customizer), которые правят карточку.
   Правила ограничены областью товара .ks-pp (плюс попап «Заказ в 1 клик» и PhotoSwipe — плагины выводят их
   в подвале страницы, вне карточки) — остальные страницы от них не зависят.
   Где у оригинала селектор без класса-предка, область обёрнута в :where(), чтобы
   не поднимать специфичность (иначе стили темы перебили бы стили плагинов).
   ========================================================================= */

/* ---------- Плашка заголовка: на карточке крошки и H1 темы скрыты, остаётся тёмная полоса ---------- */
.ks-ptitle--bare { max-height: 85px; }

/* ---------- Каркас ---------- */
/* Основной текст темы: интерлиньяж множителем 1.5 (наследуется плагинами), а не 30px, как в main.css */
/* интерлиньяж 1.5 и шрифт основного текста — в entry.css */
/* Внешний контейнер: сверху 40 (правило сайта .single-product .e-con-inner), снизу 140/100/70 */
.ks-pp__sec { --px: 0px; --pt: 40px; --pb: 140px; --gap: 0px; }
@media (max-width: 1024px) { .ks-pp__sec { --px: 20px; --pb: 100px; } }
@media (max-width: 767px) { .ks-pp__sec { --pb: 70px; } }

/* Ряд «галерея | покупка»: две колонки поровну с зазором 50, на мобильном — друг под другом */
.ks-pp__row { display: flex; flex-direction: row; gap: 50px; margin-top: 10px; }
.ks-pp__media, .ks-pp__sum { display: flex; flex-direction: column; gap: 20px; flex: 0 1 auto; width: 100%; }
.ks-pp__media > *, .ks-pp__sum > *, .ks-pp__more > * { min-width: 0; max-width: 100%; }
.ks-pp__sum { background: #fff; border-radius: 30px; }
@media (max-width: 767px) {
  .ks-pp__row { flex-wrap: wrap; gap: 20px; margin-top: 0; }
}
/* Вкладки и «Похожие товары» */
.ks-pp__more { display: flex; flex-direction: column; gap: 20px; }
.ks-pp__tabs { position: relative; padding-top: 30px; }
.ks-pp__related { position: relative; }
@media (max-width: 767px) { .ks-pp__tabs { padding-top: 0; } }

/* Галерея: скругления (настройки виджета «Изображения товара» в шаблоне).
   Липкость при ширине от 1000 — в разделе 3 (правило сайта div#images). */
#images .flex-viewport { border-radius: 30px; }
#images .flex-control-thumbs img { border-radius: 20px; }

/* =========================================================================
   1) База темы UiCore — в entry.css (общая для карточки и страниц плагинов, подключается везде)
   ========================================================================= */

/* =========================================================================
   2) Тема UiCore и Elementor — правила для WooCommerce
   Общие селекторы (.woocommerce img, .woocommerce-page input) ограничены карточкой через :where(.ks-pp, .qpt-oneclick-overlay, .pswp),
   иначе они задевали бы шапку и подвал (у их картинок и полей свои размеры).
   ========================================================================= */
.woocommerce div.product div.images, .woocommerce-page div.product div.images { width: 100%; }
body.woocommerce div.product .ks-pp__images div.images { float: none; padding: 0; width: 100%; }
.woocommerce div.product div.images .flex-control-thumbs { overflow: visible; }
.woocommerce div.product .flex-control-thumbs { display: flex; flex-flow: wrap; gap: 15px; }
.woocommerce div.product div.images .flex-control-thumbs li { margin-top: 15px; width: calc(25% - 11.25px); }
.woocommerce :where(.ks-pp, .qpt-oneclick-overlay, .pswp) img, .woocommerce-page :where(.ks-pp, .qpt-oneclick-overlay, .pswp) img { height: auto; max-width: 100%; }

.woocommerce div.product .product_title { margin-bottom: .4em; }
.single-product .product_title {
  font-family: var(--ks-font); font-weight: 400; font-size: 32px; line-height: 1.44em;
  text-transform: none; letter-spacing: 0; color: #070707; font-style: normal;
}
.single-product .summary .price {
  font-family: var(--ks-font); font-weight: 400; line-height: 1.44em; text-transform: none; letter-spacing: 0; font-style: normal;
  font-size: 24px !important; color: #070707 !important;
}
@media (max-width: 1024px) {
  .single-product .product_title { font-size: 28px; }
  .single-product .summary .price { font-size: 22px !important; }
}
@media (max-width: 767px) {
  .single-product .product_title { font-size: 24px; }
  .single-product .summary .price { font-size: 20px !important; }
}

.woocommerce div.product form.cart .variations label { color: #070707 !important; }
.woocommerce div.product form.cart .variations select { color: #6E7A84 !important; }
.woocommerce div.product form.cart { margin-top: 1.5rem; }
.woocommerce.single-product form.cart .variations { margin-bottom: 1rem; }
.woocommerce.single-product form.cart .variations tr { align-items: flex-start; display: flex; flex-direction: column; }
.woocommerce.single-product form.cart .variations tr .value { width: 100%; }
.woocommerce.single-product form.cart .variations tr .value select { margin: 0; max-width: 75%; }
.woocommerce.single-product form.cart .variations td.value { display: block; padding: 0; }
.woocommerce.single-product form.cart .variations label { font-size: 12px; font-weight: 500; letter-spacing: .025em; line-height: inherit; text-transform: uppercase; }
.woocommerce.single-product form.cart .variations select { height: 44px; margin: 5px 0 0; }
.woocommerce .reset_variations { display: none !important; }
.single_variation_wrap { margin-top: 3em; }
.woocommerce-variation-price { font-size: 20px; margin: 1em 0; }
.woocommerce div.product .stock.in-stock { color: #16be0c; }

.woocommerce .quantity { display: inline-block; position: relative; margin: 0 !important; }
.woocommerce .quantity .qty { font-size: inherit; line-height: 30px; margin-top: 0; padding-left: 38px; padding-right: 38px; width: 114px; }
.woocommerce .quantity .qty::-webkit-inner-spin-button, .woocommerce .quantity .qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.woocommerce .quantity .qty[type="number"] { -moz-appearance: textfield; }
.variations select, .woocommerce input.input-text, .woocommerce input.qty, .woocommerce-page :where(.ks-pp, .qpt-oneclick-overlay, .pswp) input { font-size: 15px; padding: 6px 15px 6px 20px; }
.variations select, .variations select *, .woocommerce-page :where(.ks-pp, .qpt-oneclick-overlay, .pswp) input { background-color: #fff; border: 1px solid #ebebeb; border-radius: 12.5px; color: #6E7A84; line-height: 30px; }

.single-product.woocommerce .cart button.single_add_to_cart_button, .single-product.woocommerce .quantity .qty { height: 44px; }
.single-product.woocommerce .cart button.single_add_to_cart_button { width: 100%; }
.cart .woocommerce-variation-add-to-cart { display: flex; gap: 14px; }
.cart .woocommerce-variation-add-to-cart::after, .cart .woocommerce-variation-add-to-cart::before { display: none !important; }
.woocommerce button.button:disabled { padding: 7px 35px; }
/* У темы в форме две кнопки «В корзину»: стандартная WooCommerce скрыта, работает её собственная */
.single_add_to_cart_button:not(.uicore-main-add-to-cart) { display: none !important; }
/* Блик на кнопке при загрузке */
@keyframes ks-woo-add-to-cart { 0% { background-position-x: 0; } to { background-position-x: 250vh; } }
.single_add_to_cart_button { position: relative; }
.single_add_to_cart_button::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(60deg, #000, #000 50%, #fff 70%, #000 90%); border-radius: inherit;
  color: transparent !important; mix-blend-mode: overlay; opacity: 0; transition: all .2s ease-in;
  animation: ks-woo-add-to-cart 8s linear infinite;
}
.single_add_to_cart_button.loading { opacity: 1 !important; padding: initial; }
.single_add_to_cart_button.loading::before { opacity: 1; }
.single_add_to_cart_button.loading::after { margin-left: .53em; position: relative !important; right: 0 !important; top: 0 !important; }

/* =========================================================================
   3) «Дополнительные стили» сайта (Внешний вид → Настроить), относящиеся к карточке.
   Перенесены как есть и в том же порядке — порядок важен (часть правил перекрывает друг друга).
   Не вошли: плашка заголовка темы (см. .ks-ptitle--bare), отступ контейнера (см. .ks-pp__sec),
   мини-корзина qpt-cw (она общая для всех страниц), фильтры каталога.
   ========================================================================= */
:where(.ks-pp, .qpt-oneclick-overlay, .pswp) input { padding: 10px 20px !important; border-radius: 15px !important; }
:where(.ks-pp, .qpt-oneclick-overlay, .pswp) nav a { font-family: 'Onest' !important; }
.qpt-card .quantity input.qty { color: black; }
span.woocommerce-Price-amount.amount { color: black; }
.qpt-card__price-wrap { display: flex; flex-direction: column-reverse; }
.qpt-card.summary.entry-summary { width: 100% !important; }
#sum .qpt-card.summary.entry-summary table.variations * { color: black !important; }
#sum table.variations tr { display: flex; flex-direction: row !important; gap: 20px; }
.pswp__caption { display: none !important; }
@media screen and (min-width:1000px) { div#images { position: sticky; top: 100px; } }
.woocommerce-product-gallery.woocommerce-product-gallery--with-images.woocommerce-product-gallery--columns-4.images { margin-bottom: 0px !important; }
#sum .qpt-card.summary.entry-summary table.variations tr { flex-direction: column !important; display: flex !important; gap: 0px !important; }
#sum .qpt-card.summary.entry-summary table.variations tbody { display: flex !important; flex-direction: row !important; gap: 20px !important; }
#sum a.reset_variations { display: none !important; }
#sum .qpt-card.summary.entry-summary table.variations tr { flex-direction: column !important; display: flex !important; gap: 0px !important; width: 100%; margin-bottom: 30px; }
#sum .qpt-card.summary.entry-summary table.variations tr select { width: 100% !important; max-width: unset; }
#sum .qpt-card.summary.entry-summary table.variations th.label { height: fit-content !important; max-height: fit-content !important; min-height: unset !important; line-height: 15px; }
.woocommerce-variation-availability { display: none; }
.qpt-card__attr-row:nth-child(1), .qpt-card__attr-row:nth-child(2), .qpt-card__attr-row:nth-child(5), .qpt-card__attr-row:nth-child(7) { display: none; }
.qpt-live-price { width: 100%; }
.qpt-live-price__row.qpt-live-price__row--save { width: 100%; }
.qpt-live-price__row { margin-right: 20px; }
strong.qpt-live-price__unit, strong.qpt-live-price__total { font-size: 18px !important; line-height: 18px; }
#sum table.variations { margin-bottom: -30px !important; }
.qpt-live-price { display: flex; flex-direction: row; flex-wrap: wrap; }
.qpt-card__stock.qpt-card__stock--var.qpt-card__stock--in { width: 25% !important; }
.cart .woocommerce-variation-add-to-cart, .cart:not(.variations_form) { display: flex; gap: 15px; flex-wrap: wrap; }
.qpt-card__stock.qpt-card__stock--var.qpt-card__stock--in { display: flex; flex-direction: column; }
span.qpt-card__stock-dot.qpt-card__stock-dot--green { display: none; }
.woocommerce-variation-add-to-cart .quantity { flex: 0 0 calc(35% - 15px) !important; max-width: calc(35% - 15px) !important; width: auto !important; }
.woocommerce-variation-add-to-cart .ajax_add_to_cart { flex: 0 0 calc(65% - 15px) !important; max-width: calc(65% - 15px) !important; width: auto !important; box-sizing: border-box !important; }
#sum .quantity input { width: 100% !important; }
.woocommerce-variation-add-to-cart.variations_button.woocommerce-variation-add-to-cart-enabled { align-items: flex-start; }
.qpt-card__stock.qpt-card__stock--var.qpt-card__stock--low { display: flex; flex-direction: column; gap: 0px; align-items: baseline; }
span.qpt-card__stock-dot.qpt-card__stock-dot--orange { display: none; }
.qpt-card__stock.qpt-card__stock--var.qpt-card__stock--out { display: flex; flex-direction: column; gap: 0px; align-items: baseline; }
form.variations_form.cart { margin-top: 0px !important; }
h1.qpt-card__title.product_title { font-size: 20px !important; line-height: 28px; }
.woocommerce div.product form.cart table td { padding-left: 20px; }
a.qpt-card__more-btn { margin-bottom: 0px !important; }
.qpt-price-table.qpt-variable { margin-bottom: 0px !important; }
form.variations_form.cart { margin-bottom: 20px !important; }
.qpt-backorder-notice { margin-top: 0px !important; }
form.variations_form.cart { margin-bottom: 10px !important; }
#sum table.variations select { background-color: white !important; }
table.qpt-specs-table { max-width: unset !important; }
.qpt-tabs__panel h4 { font-weight: 600; }
.qpt-tabs__panel h4:nth-child(1) { margin-top:0px; }
.qpt-card__stock-total strong { font-size: 14px; font-weight: 700 !important; }
.qpt-card__stock-total { font-size: 14px !important; font-weight: 600; }
.qpt-card__stock-header { display: none; }
.qpt-live-price { margin-bottom: 0px; }
@media screen and (max-width:640px) { .qpt-table th { padding: 5px 6px; font-size: 10px !important; text-align: left; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: #666; border-bottom: 2px solid #ddd; } }
@media screen and (max-width:640px) { .woocommerce div.product form.cart table td { padding: 5px 6px; font-size: 10px !important; } }
@media screen and (max-width:640px) { .qpt-card__stock { margin-bottom: 12px; padding: 7px 9px; border-radius: 6px; background: #f5f5f5; font-size: 11px !important; color: #444; } }
@media screen and (max-width:640px) { .woocommerce-variation-add-to-cart.variations_button.woocommerce-variation-add-to-cart-enabled { margin-top: 15px; } }
@media screen and (max-width:640px) { .qpt-live-price { display: flex; flex-direction: column; gap: 4px; padding: 8px 9px; margin: 0 0 18px; background: #f0fdfc; border-left: 4px solid #20B8AD; border-radius: 0 6px 6px 0; } }
@media screen and (max-width:640px) { .qpt-live-price__label { font-size: 10px; color: #777; white-space: nowrap; } }
@media screen and (max-width:640px) { strong.qpt-live-price__unit, strong.qpt-live-price__total { font-size: 14px !important; line-height: 14px; } }
@media screen and (max-width:640px) { #sum select { padding: 10px !important; height: fit-content !important; min-height: unset !important; font-size: 14px !important; line-height: 14px !important; } }
a.woocommerce-product-gallery__trigger { display: none !important; }
img.zoomImg { display: none !important; }
span.qpt-preorder-badge { border: 1px solid #f9a825; background: #ffe082; padding: 3px 6px; font-size: 10px; color: black; border-radius: 10px; }
@media screen and (max-width:640px) { span.qpt-preorder-badge { margin-left: 0px !important; margin-bottom: 5px !important; } }
@media screen and (max-width:640px) { .woocommerce-variation-add-to-cart .quantity { flex: 0 0 calc(50% - 15px) !important; max-width: calc(50% - 15px) !important; width: auto !important; } }
@media screen and (max-width:640px) { button.single_add_to_cart_button.button.alt.ajax_add_to_cart.add_to_cart_button.uicore-main-add-to-cart { flex: 0 0 calc(50% - 15px) !important; max-width: calc(50% - 15px) !important; width: auto !important; } }
@media screen and (max-width:640px) { #sum .qpt-card.summary.entry-summary table.variations tr { margin-bottom: 15px; } }
.qpt-tabs__text { max-width: unset; }
.gss-product-labels { margin-bottom: 10px; }
.ks-wl-single-wrap { margin-top: 20px; }
span.gss-catalog__card-label.gss-catalog__card-label--rasprodazha, span.gss-product-label.gss-product-label--rasprodazha, span.gss-catalog__card-label.gss-catalog__card-label--rasrodazha, span.gss-product-label.gss-product-label--rasrodazha { background: #e66a53; }
span.gss-catalog__card-label.gss-catalog__card-label--khit, span.gss-product-label.gss-product-label--khit { background: #eab940; }
@media screen and (max-width:640px) { .qpt-card__col.qpt-card__col--price { -webkit-flex: 1 1 calc(45% - 8px); flex: 1 1 calc(45% - 8px) !important; min-width: 0; max-width: 45% !important; } }
@media screen and (max-width:640px) { .qpt-card__col.qpt-card__col--price thead th { font-size: 9px !important; } }
@media screen and (max-width:640px) { .qpt-card__col.qpt-card__col--stock { width: 55% !important; -webkit-flex: 1 1 calc(55% - 8px); flex: 1 1 calc(55% - 8px); min-width: 0; } }
@media screen and (max-width:640px) { strong.qpt-live-price__unit, strong.qpt-live-price__total { font-size: 13px !important; line-height: 13px; } }
#sum .qpt-card.summary.entry-summary table.variations button.qpt-var-btn.qpt-var-btn--active { color: white !important; font-size: 14px; font-weight: 400; }
button.single_add_to_cart_button.button.alt.ajax_add_to_cart.add_to_cart_button.uicore-main-add-to-cart.qpt-btn-checkout.added { background: #333 !important; }
.qpt-live-price__row.qpt-live-price__row--save { display: flex; flex-direction: column; gap: 0px; }
@media screen and (max-width:640px) { .qpt-live-price__row.qpt-live-price__row--save { display: flex; flex-direction: column; gap: 0px; } }
button#custom { max-width: 300px; margin-top: 0px; }
.ks-wl-single-wrap { display: flex; gap: 30px; }
.qpt-live-price__row { display: flex; flex-wrap: wrap; }
.qpt-live-price { margin-bottom: 0px; gap: 10px; }
button#custom { display: none; }
button.single_add_to_cart_button.button.alt.uicore-main-add-to-cart.qpt-btn-checkout.added { max-width: 190px; padding-left: 25px !important; text-align: center !important; }
button.single_add_to_cart_button.button.alt.ajax_add_to_cart.add_to_cart_button.uicore-main-add-to-cart.qpt-btn-added-done.added { display: none; }
a.qpt-go-checkout.button.alt { border-radius: 10px !important; padding: 0px !important; height: 48px; line-height: 48px !important; width: 65%; text-align: center; }
@media screen and (max-width:640px) { a.qpt-go-checkout.button.alt { width: 50%; } }
.qpt-card__composition { margin-bottom: 0px; }
a#special { font-size: 15px; }
a#special:hover { color:#20B8AD !important; }
a#special:hover { color: white !important; }
@media screen and (max-width:1100px) and (min-width:700px) { .qpt-card__mid-row { flex-direction: column; } }
@media screen and (max-width:1100px) and (min-width:700px) { a#special { font-size: 12px; } }
@media screen and (max-width:640px) { .ks-wl-single-wrap { display: flex; gap: 20px; } }
@media screen and (min-width:1000px) { button#oneclick { max-width: 98%; } }
@media screen and (min-width:1000px) { .ks-wl-single-wrap { max-width: 98%; } }
@media screen and (min-width:1000px) { .ks-wl-single-wrap .qpt-share { justify-content: center; } }
