/* 4444.MARKET — дополнения V3 для WordPress/WooCommerce (поверх tokens.css и storefront.css). */

/* ---- сброс влияния WordPress/Elementor/WooCommerce на каркас ---- */
body.o4 { margin: 0; background: var(--warm-bg); color: var(--black); font: 400 16px/1.55 var(--font-text); }
body.o4 .site-header, body.o4 .site-footer { float: none; }
body.o4 a { text-underline-offset: 2px; }
body.o4 img { max-width: 100%; height: auto; }
body.o4 .btn, body.o4 .btn:visited { text-decoration: none; }
body.o4 button { cursor: pointer; }
.admin-bar .fbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .fbar { top: 46px; } }

/* ---- шапка ---- */
.catalog-panel .cm-all { grid-column: 1 / -1; }
.catalog-panel .cm-list { columns: 3; column-gap: 20px; }
.catalog-panel .cm-list a { break-inside: avoid; }
@media (max-width: 1023px) { .catalog-panel .cm-list { columns: 2; } }
@media (max-width: 599px) { .catalog-panel .cm-list { columns: 1; } }
.header-actions .act-link { color: var(--gold-dark); }

/* ---- баннеры с фотографией (PNG/WebP на всю карточку, текст — HTML слева) ---- */
.bn--photo { position: relative; isolation: isolate; grid-template-columns: minmax(0, 1fr); }
.bn--photo .bn-media { position: absolute; inset: 0; z-index: 0; display: block; padding: 0; }
.bn--photo .bn-media picture, .bn--photo .bn-media img { display: block; width: 100%; height: 100%; }
.bn--photo .bn-media img { object-fit: cover; object-position: 78% 62%; mix-blend-mode: normal; }
.bn--photo .bn-copy { position: relative; z-index: 1; max-width: min(560px, 48%); }
.bn--hero.bn--photo { min-height: clamp(380px, 33vw, 470px); }
.bn--hero.bn--photo .bn-title { max-width: 14ch; }
@media (max-width: 767px) {
  .bn--hero.bn--photo { min-height: 0; }
  .bn--photo .bn-media { position: relative; inset: auto; order: -1; aspect-ratio: 16 / 11; padding: 0; max-height: none; }
  .bn--photo .bn-media img { object-position: 74% 55%; }
  .bn--photo .bn-copy { max-width: none; background: var(--warm-bg); padding: 20px 20px 76px; }
  .bn--hero.bn--photo .bn-title { max-width: none; }
}
.hero-slide:not(.is-active) { pointer-events: none; }
.o4-hero .hero-ctrl { z-index: 3; }
.o4-wide { margin: 4px 0 20px; }
.o4-wide .bn--wide { margin: 0; }

/* ---- фильтры ---- */
.fdrop summary.has-v { background: var(--gold-light); border-color: var(--gold); }
a.f-chip { text-decoration: none; }
a.f-reset { display: inline-flex; align-items: center; text-decoration: underline; }
.f-price { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 10px; }
.f-price label { display: grid; gap: 4px; font: 600 12px var(--font-text); color: var(--gray); }
.f-price input { width: 100px; min-height: 40px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 0 10px; font: 16px var(--font-text); background: #fff; }
.f-cur { align-self: center; padding-bottom: 0; color: var(--gray); font-size: 14px; }
.fpanel .f-price-apply { width: 100%; min-height: 40px; }
.toolbar form.sort { margin: 0; }
.toolbar .sort label { display: inline-flex; align-items: center; gap: 8px; }
.fdlg-wrap { margin: 0; }
.fdialog[open] { display: block; }
.f-empty a.btn { text-decoration: none; }
.o4-hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.o4-diag { margin: 12px 0; background: var(--white); border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: 10px 14px; font-size: 13px; }
.o4-diag summary { font-weight: 700; cursor: pointer; }
.o4-diag table { border-collapse: collapse; margin-top: 8px; width: 100%; }
.o4-diag th, .o4-diag td { text-align: left; border-top: 1px solid var(--line); padding: 4px 8px; }
.p-noprice { font: 600 15px var(--font-text); color: var(--gray); }
.p-price .woocommerce-Price-amount { font: inherit; }
.p-price .woocommerce-Price-currencySymbol { font: 500 12px var(--font-text); color: var(--gray); margin-left: 3px; }
.buy .price .woocommerce-Price-currencySymbol { font: 500 16px var(--font-text); color: var(--gray); margin-left: 4px; }

/* ---- пагинация ---- */
.navigation.pagination { margin: 32px 0 0; }
.navigation.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.navigation.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--white); text-decoration: none; font-weight: 600; }
.navigation.pagination .page-numbers.current { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.navigation.pagination a.page-numbers:hover { border-color: var(--black); }

/* ---- карточка товара ---- */
.g-main .g-img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.gallery.is-js .g-img { display: none; }
.gallery.is-js .g-img.is-on { display: block; }
.g-thumbs { grid-template-columns: repeat(auto-fill, 84px); }
.desc-short p + p { margin-top: 8px; }
.desc-full { margin-top: 36px; }
.desc-body { color: var(--dark); }
.desc-body p + p { margin-top: 10px; }
.chars-actions { margin-top: 10px; }
.buy .status { margin-top: -4px; }
.buy-wc form.cart { display: flex; gap: 10px; flex-wrap: wrap; }
.buy-wc .single_add_to_cart_button { background: var(--gold); color: var(--black); border: 0; border-radius: var(--r-md); min-height: 52px; padding: 0 28px; font: 700 15px var(--font-text); }
.mini[href] { color: inherit; }
div.mini { cursor: default; }
.mobile-buybar .woocommerce-Price-amount { font: 700 20px var(--font-display); }

/* ---- подбор кондиционера ---- */
.sel-row { display: flex; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.sel-row:first-child { border-top: 0; }
.sel-row dt { color: var(--gray); min-width: 200px; }
.sel-row dd { margin: 0; font-weight: 600; }
dl.sel-sum { margin: 0 0 18px; }

/* ---- окно обращения ---- */
.mgr-result.is-error { color: var(--danger); }
.modal-foot .btn:disabled { opacity: .5; }
dialog.modal { padding: 0; }
.modal-body .field input, .modal-body .field textarea { width: 100%; }

/* ---- обычные страницы, корзина, аккаунт ---- */
.o4-content { padding-bottom: 24px; }
.o4-content .entry-content { color: var(--dark); max-width: 80ch; }
.o4-content .entry-content > * + * { margin-top: 12px; }
.o4-content .entry-content h2, .o4-content .entry-content h3 { margin-top: 24px; }
.o4-content .entry-content a { color: var(--gold-dark); }
.o4-content .woocommerce { max-width: none; }
.o4-content .woocommerce-message, .o4-content .woocommerce-info, .o4-content .woocommerce-error { background: var(--white); border: 1px solid var(--warm-line); border-radius: var(--r-md); padding: 12px 16px; margin-bottom: 16px; list-style: none; }
.o4-content .woocommerce button.button, .o4-content .woocommerce a.button { background: var(--gold); color: var(--black); border-radius: var(--r-md); font-weight: 700; }
.o4-content .elementor-section-wrap, .o4-content .elementor { max-width: 100%; }

/* служебная полоса: на узких экранах тагline скрыт (специфичность выше, чем у .sb-info > span) */
@media (max-width: 1023px) { .service-bar .sb-info > .sb-tag { display: none; } }
.service-bar .sb-info { min-width: 0; }
.service-bar .sb-info > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .section-head { flex-wrap: wrap; align-items: flex-start; row-gap: 6px; } .section-head a { white-space: normal; } }

/* ---- мобильный hero: фото сверху, непрозрачная светлая панель с текстом ниже; слайды не накладываются ---- */
.hero-slide { background: var(--warm-bg); }
.hero-card { max-width: 100%; }
.hero-slides { min-width: 0; }
@media (max-width: 767px) {
  .hero-slide { transition: none; display: none; opacity: 1; visibility: visible; }
  .hero-slide.is-active { display: block; }
  .bn--hero.bn--photo { display: flex; flex-direction: column; min-height: 0; background: var(--warm-bg); }
  .bn--hero.bn--photo .bn-media { order: 0; position: relative; inset: auto; aspect-ratio: 16 / 11; width: 100%; flex: none; }
  .bn--hero.bn--photo .bn-copy { order: 1; position: static; max-width: none; width: 100%; background: var(--warm-bg); padding: 20px 20px 24px; gap: 12px; }
  .bn--hero.bn--photo .bn-title { font-size: clamp(28px, 8vw, 36px); max-width: none; }
  .bn--hero.bn--photo .bn-text { font-size: 16px; max-width: none; }
  .bn--hero.bn--photo .bn-cta .btn { flex: 1 1 100%; }
  .hero-ctrl { position: static; padding: 0 20px 18px; background: var(--warm-bg); justify-content: flex-start; }
  .hero-card { display: flex; flex-direction: column; }
}
html, body.o4 { overflow-x: clip; max-width: 100%; }
