/* Final defensive overrides for unstable header/product UI collisions. */

/* Bootstrap focus ring on mouse click (thin dotted / black outline) — off; keyboard :focus-visible kept */
body.theme-prostore-like :focus:not(:focus-visible),
body.theme-prostore-like .btn.focus:not(:focus-visible) {
  outline: none !important;
  outline-offset: 0 !important;
}

/* Global subtle background pattern (console icons). */
body.theme-prostore-like {
  -webkit-tap-highlight-color: transparent;
  /* Technology from mock: light base + repeating subtle pattern */
  background-color: #f6f6f6 !important;
  background-image: url("/image/catalog/bg/gs-bg-real-controllers-120.svg?v=20260430real4") !important;
  background-repeat: repeat !important;
  background-size: 120px 120px !important;
}

/* User request: content surface must be transparent to show icons. */
body.theme-prostore-like .container.ps-main-inner,
body.theme-prostore-like .container.ps-info-page,
body.theme-prostore-like .ps-catalog-mvp-main {
  background: transparent !important;
  border-radius: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Subscriptions page: frosted panel — readable text, pattern still visible at edges. */
body.theme-prostore-like .ps-subscriptions-page .ps-subscriptions-body {
  margin-top: 0 !important;
  background: rgba(255, 255, 255, 0.94) !important;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 18px 52px rgba(15, 23, 42, 0.1);
  padding: 28px 18px 8px;
  overflow: hidden;
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  body.theme-prostore-like .ps-subscriptions-page .ps-subscriptions-body {
    background: rgba(255, 255, 255, 0.88) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}
body.theme-prostore-like .ps-subscriptions-page .ps-main-inner {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
body.theme-prostore-like .ps-subscriptions-page {
  background: transparent !important;
}

/* Home bands: keep WHITE under products/content, pattern only on edges. */
body.theme-prostore-like .ps-home-new-band,
body.theme-prostore-like .ps-home-console-stripes-wrap {
  background: transparent !important;
}
body.theme-prostore-like .ps-home-new-band .ps-wrap,
body.theme-prostore-like .ps-home-console-stripes-wrap .ps-home-console-band > .container {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Product page: subtle photo-bg under tabs (keeps readability). */
body.theme-prostore-like .ps-product-page .ps-product-tabs {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 18px 52px rgba(15, 23, 42, 0.1);
}
body.theme-prostore-like .ps-product-page .ps-product-tabs::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.06)),
    url("/image/catalog/bg/gs-photo-bg.svg") center/cover no-repeat;
  opacity: 1;
  pointer-events: none;
}
body.theme-prostore-like .ps-product-page .ps-product-tabs > * {
  position: relative;
  z-index: 1;
}
body.theme-prostore-like .ps-product-page .ps-pd-tabs-nav {
  background: rgba(255, 255, 255, 0.88);
  margin: 0;
  padding: 10px 10px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
body.theme-prostore-like .ps-product-page .ps-product-tab-content {
  background: rgba(255, 255, 255, 0.92);
  padding: 14px 16px 18px;
}

/* Product cards (sitewide): let background show under cards. */
body.theme-prostore-like .ps-pcard {
  background: rgba(255, 255, 255, 0.86) !important;
  position: relative;
}
body.theme-prostore-like .ps-pcard::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.20);
  pointer-events: none;
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  body.theme-prostore-like .ps-pcard::before {
    background: rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}
body.theme-prostore-like .ps-pcard > * {
  position: relative;
  z-index: 1;
}
@media (max-width: 767px) {
  body.theme-prostore-like {
    background-attachment: scroll;
  }
  body.theme-prostore-like .container.ps-main-inner,
  body.theme-prostore-like .container.ps-info-page,
  body.theme-prostore-like .ps-catalog-mvp-main {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  body.theme-prostore-like .ps-subscriptions-page .ps-subscriptions-body {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding-left: 10px;
    padding-right: 10px;
  }
  body.theme-prostore-like .ps-home-new-band .ps-wrap,
  body.theme-prostore-like .ps-home-console-stripes-wrap .ps-home-console-band > .container {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
}

/* Footer readability hard-fix: links were too pale on desktop/mobile. */
body.theme-prostore-like .ps-footer.ps-footer--market .ps-footer-mcard__list a,
body.theme-prostore-like .ps-footer.ps-footer--market .ps-footer-market__copy a,
body.theme-prostore-like .ps-footer.ps-footer--market .ps-footer-market__legal a,
body.theme-prostore-like .ps-footer.ps-footer--market .ps-footer-mcard__phone {
  color: #334155 !important;
}
body.theme-prostore-like .ps-footer.ps-footer--market .ps-footer-mcard__list a:hover,
body.theme-prostore-like .ps-footer.ps-footer--market .ps-footer-mcard__list a:focus,
body.theme-prostore-like .ps-footer.ps-footer--market .ps-footer-market__copy a:hover,
body.theme-prostore-like .ps-footer.ps-footer--market .ps-footer-market__copy a:focus,
body.theme-prostore-like .ps-footer.ps-footer--market .ps-footer-market__legal a:hover,
body.theme-prostore-like .ps-footer.ps-footer--market .ps-footer-market__legal a:focus,
body.theme-prostore-like .ps-footer.ps-footer--market .ps-footer-mcard__phone:hover,
body.theme-prostore-like .ps-footer.ps-footer--market .ps-footer-mcard__phone:focus {
  color: var(--good-accent-hover) !important;
}

/* Compact desktop service links strip under header. */
@media (min-width: 992px) {
  body.theme-prostore-like .ps-navstrip.ps-nav-wrap {
    border-top: 1px solid #eef2f7 !important;
    border-bottom: 1px solid #eef2f7 !important;
    background: #fff !important;
  }
  body.theme-prostore-like .ps-navstrip .container {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }
  body.theme-prostore-like .ps-nav-one .ps-navbar-unified .ps-navstrip__inner {
    flex-wrap: nowrap !important;
    align-items: center !important;
    overflow: visible !important;
  }
  body.theme-prostore-like .ps-navbar-unified .ps-navstrip__inner {
    min-height: 0 !important;
    padding: 0 !important;
  }
  body.theme-prostore-like .ps-nav-one .ps-navbar-unified .ps-nav-single.ps-nav-links {
    float: none !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 2px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    overflow: visible !important;
  }
  body.theme-prostore-like .ps-nav-one .ps-navbar-unified .ps-nav-single.ps-nav-links > li {
    float: none !important;
    margin: 0 !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: 12.5% !important;
  }
  body.theme-prostore-like .ps-nav-single > li > a.ps-nav-link-with-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    gap: 4px !important;
    padding: 4px 2px !important;
    white-space: nowrap !important;
    border-radius: 999px !important;
    font-size: clamp(10px, 0.72vw, 12px) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: #334155 !important;
    background: transparent !important;
    border: 1px solid transparent !important;
  }
  body.theme-prostore-like .ps-nav-single > li > a.ps-nav-link-with-icon:hover,
  body.theme-prostore-like .ps-nav-single > li > a.ps-nav-link-with-icon:focus {
    color: var(--good-accent-hover) !important;
    background: rgba(var(--good-accent-rgb, 199, 62, 62), 0.06) !important;
    border-color: rgba(var(--good-accent-rgb, 199, 62, 62), 0.28) !important;
    text-decoration: none !important;
  }
  body.theme-prostore-like .ps-nav-one .ps-nav-link-icon {
    width: 15px !important;
    height: 15px !important;
    flex-shrink: 0 !important;
    opacity: 0.9 !important;
  }
}

/* Reviews platforms: readable non-white text + stable contrast */
body.theme-prostore-like .ps-footer.ps-footer--market .ps-footer-reviews-band__pf {
  color: #0f172a !important;
}
body.theme-prostore-like .ps-footer.ps-footer--market .ps-footer-reviews-band__pf:hover,
body.theme-prostore-like .ps-footer.ps-footer--market .ps-footer-reviews-band__pf:focus {
  color: #0f172a !important;
}
body.theme-prostore-like .ps-footer.ps-footer--market .ps-footer-reviews-band__pf-mark {
  background: rgba(255, 255, 255, 0.28) !important;
  color: #0f172a !important;
}
body.theme-prostore-like .ps-footer.ps-footer--market .ps-footer-reviews-band__pf-name,
body.theme-prostore-like .ps-footer.ps-footer--market .ps-footer-reviews-band__pf-go {
  color: #0f172a !important;
}
body.theme-prostore-like .ps-footer-reviews-band__pf--2gis {
  background: linear-gradient(145deg, #10b981 0%, #059669 100%) !important;
}
body.theme-prostore-like .ps-footer-reviews-band__pf--yandex {
  background: linear-gradient(145deg, #f97316 0%, #ea580c 100%) !important;
}
body.theme-prostore-like .ps-footer-reviews-band__pf--flamp {
  background: linear-gradient(145deg, #fb923c 0%, #f97316 100%) !important;
}
body.theme-prostore-like .ps-footer-reviews-band__pf--avito {
  background: linear-gradient(145deg, #84cc16 0%, #65a30d 100%) !important;
}
body.theme-prostore-like .ps-footer-reviews-band__pf--zoon {
  background: linear-gradient(145deg, #8b5cf6 0%, #7c3aed 100%) !important;
}

/* Footer reviews aggregator: restore vivid brand accents. */
body.theme-prostore-like .ps-fr-agg {
  --ps-fr-star: #f59e0b;
  --ps-fr-accent: #2563eb;
}
body.theme-prostore-like .ps-fr-agg__card {
  border-color: #dbe7ff !important;
  background: linear-gradient(160deg, #ffffff 0%, #f8fbff 100%) !important;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.12) !important;
}
body.theme-prostore-like .ps-fr-agg__card-head {
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
  padding-bottom: 8px;
}
body.theme-prostore-like .ps-fr-agg__deal {
  background: linear-gradient(145deg, #eff6ff 0%, #f8fafc 100%) !important;
  border-color: rgba(37, 99, 235, 0.2) !important;
  color: #1e3a8a !important;
}
body.theme-prostore-like .ps-fr-agg__source-link {
  color: #1d4ed8 !important;
}
body.theme-prostore-like .ps-fr-agg__source-link:hover {
  color: #1e40af !important;
}
body.theme-prostore-like .ps-fr-agg__readmore {
  color: #2563eb !important;
}
body.theme-prostore-like .ps-fr-agg__readmore:hover {
  color: #1e40af !important;
}
body.theme-prostore-like .ps-fr-agg__nav {
  background: rgba(37, 99, 235, 0.16) !important;
  color: #1e3a8a !important;
}
body.theme-prostore-like .ps-fr-agg__nav:hover {
  background: rgba(37, 99, 235, 0.26) !important;
}
body.theme-prostore-like .ps-fr-agg__avatar {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(37, 99, 235, 0.18);
}

/* Unified fixed AJAX notice style (wishlist/compare/cart) in final cascade layer. */
body.theme-prostore-like .alert.ps-ajax-flash-fixed {
  top: max(14px, env(safe-area-inset-top, 0px)) !important;
  z-index: 10060 !important;
  width: fit-content !important;
  min-width: min(320px, calc(100vw - 24px)) !important;
  max-width: min(520px, calc(100vw - 24px)) !important;
  margin: 0 !important;
  padding: 11px 42px 11px 14px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  background: #fff !important;
  box-shadow:
    0 10px 30px rgba(15, 23, 42, 0.14),
    0 2px 8px rgba(15, 23, 42, 0.08) !important;
  line-height: 1.35 !important;
}
body.theme-prostore-like .alert.ps-ajax-flash-fixed.alert-success {
  background: linear-gradient(145deg, #ffffff 0%, #fff8f8 100%) !important;
  border: 1px solid rgba(var(--good-accent-rgb, 199, 62, 62), 0.22) !important;
  border-left: 4px solid var(--good-accent) !important;
  color: var(--good-text) !important;
}
body.theme-prostore-like .alert.ps-ajax-flash-fixed.alert-warning {
  background: linear-gradient(145deg, #ffffff 0%, #fffaf2 100%) !important;
  border: 1px solid rgba(180, 130, 50, 0.28) !important;
  border-left: 4px solid #c98a2e !important;
  color: var(--good-text) !important;
}
body.theme-prostore-like .alert.ps-ajax-flash-fixed .close {
  opacity: 0.9 !important;
  text-shadow: none !important;
  position: absolute !important;
  top: 50% !important;
  right: 10px !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
  line-height: 1 !important;
}
body.theme-prostore-like .alert.ps-ajax-flash-fixed a {
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  text-decoration-thickness: 1px !important;
}
@media (max-width: 575px) {
  body.theme-prostore-like .alert.ps-ajax-flash-fixed {
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100vw - 16px) !important;
    left: 8px !important;
    right: 8px !important;
    transform: none !important;
    padding-right: 38px !important;
  }
}

/* Mini-cart visual cleanup: crisp thumbs, stable text wrapping, cleaner cards. */
body.theme-prostore-like #cart.ps-oc-cart > ul.dropdown-menu.gs-cart-dropdown {
  border-radius: 14px !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.16) !important;
  overflow: hidden !important;
}
body.theme-prostore-like #cart.ps-oc-cart .gs-cart-dropdown__items {
  padding: 10px 10px 2px !important;
}
body.theme-prostore-like #cart.ps-oc-cart .gs-cart-line {
  grid-template-columns: 72px minmax(0, 1fr) 34px !important;
  gap: 10px 12px !important;
  align-items: start !important;
  margin: 0 0 8px !important;
  padding: 10px !important;
  border: 1px solid #e9eef5 !important;
  border-radius: 12px !important;
  background: #fff !important;
}
body.theme-prostore-like #cart.ps-oc-cart .gs-cart-line:last-child {
  margin-bottom: 0 !important;
}
body.theme-prostore-like #cart.ps-oc-cart .gs-cart-line__thumb {
  width: 72px !important;
  height: 72px !important;
  min-width: 72px !important;
  min-height: 72px !important;
  border-radius: 10px !important;
}
body.theme-prostore-like #cart.ps-oc-cart .gs-cart-line__img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  image-rendering: auto !important;
  transform: translateZ(0);
  background: #fff !important;
}
body.theme-prostore-like #cart.ps-oc-cart .gs-cart-line__body {
  min-width: 0 !important;
  max-width: 100% !important;
  gap: 4px !important;
}
body.theme-prostore-like #cart.ps-oc-cart .gs-cart-line__name {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  line-height: 1.35 !important;
  margin: 0 !important;
}
body.theme-prostore-like #cart.ps-oc-cart .gs-cart-line__row {
  margin-top: 6px !important;
  gap: 8px 12px !important;
}
body.theme-prostore-like #cart.ps-oc-cart .gs-cart-line__price {
  white-space: nowrap !important;
}
body.theme-prostore-like #cart.ps-oc-cart .gs-cart-dropdown__li--summary {
  padding: 10px 10px 12px !important;
  box-sizing: border-box !important;




}
body.theme-prostore-like #cart.ps-oc-cart .gs-cart-dropdown__summary {
  padding: 10px 12px !important;
  border-top: 1px solid #e9eef5 !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
}
body.theme-prostore-like #cart.ps-oc-cart .gs-cart-dropdown__actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 10px !important;
  padding: 10px 0 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
body.theme-prostore-like #cart.ps-oc-cart .gs-cart-dropdown__btn {
  width: 100% !important;
  min-width: 0 !important;
  padding: 11px 10px !important;
}

/* Float dock safety: keep "up" and contact button above footer layers. */
body.theme-prostore-like .ps-float-dock {
  z-index: 12040 !important;
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)) !important;
}
body.theme-prostore-like .ps-float-dock > * {
  pointer-events: auto !important;
}
body.theme-prostore-like .ps-float-btn--top {
  position: absolute !important;
  z-index: 2 !important;
  left: max(16px, env(safe-area-inset-left, 0px)) !important;
  bottom: 16px !important;
}
body.theme-prostore-like .ps-float-btn--contact {
  position: relative !important;
  z-index: 2 !important;
}
body.theme-prostore-like .ps-float-contact__panel {
  z-index: 3 !important;
}
@media (max-width: 991px) {
  /* Keep floating envelope + "up" above mobile dock buttons. */
  body.theme-prostore-like .ps-float-dock {
    padding-bottom: calc(var(--ps-mob-dock-h, 54px) + 14px + env(safe-area-inset-bottom, 0px)) !important;
  }
  body.theme-prostore-like .ps-float-btn--top {
    bottom: calc(var(--ps-mob-dock-h, 54px) + 14px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Jivo widget: lift button above mobile bottom dock. */
  body.theme-prostore-like #jivo-iframe-container,
  body.theme-prostore-like .jivo-iframe-container,
  body.theme-prostore-like #jivo_container,
  body.theme-prostore-like .jivo_container,
  body.theme-prostore-like .jivo_widget,
  body.theme-prostore-like .jivo__widget,
  body.theme-prostore-like .jivo-btn,
  body.theme-prostore-like .jivo-btn-container {
    bottom: calc(var(--ps-mob-dock-h, 54px) + 14px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Jivo often renders as custom <jdiv> elements with fixed positioning. */
  body.theme-prostore-like jdiv[id*="jivo"],
  body.theme-prostore-like jdiv[id^="jv"],
  body.theme-prostore-like jdiv[class*="jivo"],
  body.theme-prostore-like jdiv[class*="jv"] {
    bottom: calc(var(--ps-mob-dock-h, 54px) + 14px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (min-width: 992px) {
  /* Stable desktop header grid: logo | catalog | search | actions (no overlap). */
  body.theme-prostore-like .ps-header__inner,
  body.theme-prostore-like .ps-header__inner--has-catalog {
    display: grid !important;
    grid-template-columns: auto max-content minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;
    overflow: visible !important;
  }

  body.theme-prostore-like .ps-header__inner #logo {
    grid-column: 1 !important;
    min-width: 0 !important;
  }

  body.theme-prostore-like .ps-header__inner--has-catalog {
    grid-template-columns: auto max-content minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;
  }

  body.theme-prostore-like .ps-header__catalog {
    display: inline-flex !important;
    grid-column: 2 !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 46px !important;
    align-self: center !important;
    margin: 0 14px 0 0 !important;
    position: relative !important;
    z-index: 2 !important;
    top: auto !important;
    transform: none !important;
    float: none !important;
    line-height: 1 !important;
  }

  body.theme-prostore-like .ps-header__catalog > .ps-btn-catalog.dropdown-toggle {
    height: 46px !important;
    min-height: 46px !important;
    box-sizing: border-box !important;
    padding: 0 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    margin: 0 !important;
    vertical-align: middle !important;
    top: auto !important;
    transform: none !important;
    float: none !important;
  }

  body.theme-prostore-like .ps-header__search-wrap {
    grid-column: 3 !important;
    justify-self: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    align-self: center !important;
    max-width: none !important;
    margin: 0 !important;
    position: relative !important;
    z-index: 2 !important;
    overflow: visible !important;
  }

  body.theme-prostore-like .ps-header__actions {
    grid-column: 4 !important;
    justify-self: end !important;
    margin-left: 14px !important;
    min-width: 0 !important;
    position: relative !important;
    z-index: 5 !important;
    white-space: nowrap !important;
  }

  body.theme-prostore-like .ps-header__row {
    display: flex !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    min-height: 40px !important;
  }

  body.theme-prostore-like .ps-header__actions .ps-icon-link,
  body.theme-prostore-like #cart.ps-oc-cart > button.dropdown-toggle {
    height: 40px !important;
    min-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  body.theme-prostore-like .ps-header__row > * {
    align-self: stretch !important;
  }

  body.theme-prostore-like .ps-header__actions .ps-icon-svg,
  body.theme-prostore-like .ps-header__actions .ps-icon-link .ps-icon-svg {
    vertical-align: middle !important;
    position: relative !important;
    top: 0 !important;
  }

  body.theme-prostore-like .ps-header__search-wrap .ps-search.ps-search--oc {
    height: 46px !important;
    min-height: 46px !important;
    display: flex !important;
    align-items: stretch !important;
    overflow: hidden !important;
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }

  /* Search suggestions must overlay nav strip; do not clip by header grid containers. */
  body.theme-prostore-like .ps-search-smart-wrap {
    z-index: 12000 !important;
  }
  body.theme-prostore-like .ps-search-ac {
    z-index: 12010 !important;
  }

  @media (min-width: 992px) and (max-width: 1240px) {
    body.theme-prostore-like .ps-header__inner,
    body.theme-prostore-like .ps-header__inner--has-catalog {
      grid-template-columns: auto max-content minmax(0, 1fr) auto !important;
      gap: 8px !important;
    }
    body.theme-prostore-like .ps-header__catalog {
      margin-right: 8px !important;
    }
    body.theme-prostore-like .ps-header__actions {
      margin-left: 8px !important;
    }
    body.theme-prostore-like .ps-header__row {
      gap: 6px 8px !important;
    }
    body.theme-prostore-like .ps-header__actions .ps-icon-link {
      height: 34px !important;
      min-height: 34px !important;
      padding: 0 6px !important;
      font-size: 12px !important;
      gap: 4px !important;
    }
    body.theme-prostore-like #cart.ps-oc-cart > button.dropdown-toggle {
      height: 34px !important;
      min-height: 34px !important;
      padding: 0 10px !important;
      font-size: 12px !important;
      gap: 6px !important;
    }
  }

  body.theme-prostore-like .ps-header__search-wrap .ps-search.ps-search--oc .form-control {
    height: 46px !important;
    min-height: 46px !important;
    line-height: 46px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  body.theme-prostore-like .ps-header__search-wrap .ps-search.ps-search--oc .input-group-btn {
    height: 46px !important;
    display: flex !important;
    align-items: stretch !important;
  }

  body.theme-prostore-like .ps-header__search-wrap .ps-search.ps-search--oc .input-group-btn .btn,
  body.theme-prostore-like .ps-header__search-wrap .ps-search.ps-search--oc .ps-oc-search-btn {
    height: 46px !important;
    min-height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    margin: 0 !important;
  }

  body.theme-prostore-like .ps-cart-flash-links {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  body.theme-prostore-like .ps-checkout-bar {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 14px;
    z-index: 11050;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
  }

  body.theme-prostore-like .ps-checkout-bar__text {
    flex: 1 1 auto;
    min-width: 0;
    color: #0f172a;
    font-size: 13px;
    line-height: 1.3;
  }

  body.theme-prostore-like .ps-checkout-bar__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  body.theme-prostore-like .ps-checkout-bar__close {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 22px;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
  }

  @media (max-width: 767px) {
    body.theme-prostore-like .ps-checkout-bar {
      left: 8px;
      right: 8px;
      bottom: 8px;
      padding: 10px;
      align-items: flex-start;
      flex-direction: column;
    }
    body.theme-prostore-like .ps-checkout-bar__actions {
      width: 100%;
    }
    body.theme-prostore-like .ps-checkout-bar__actions .btn {
      flex: 1 1 0;
      text-align: center;
    }
    body.theme-prostore-like .ps-checkout-bar__close {
      position: absolute;
      top: 6px;
      right: 8px;
    }
  }

  body.theme-prostore-like .ps-product-gallery .ps-product-gallery__thumbs-strip > li.image-additional a {
    width: 84px !important;
    height: 84px !important;
    padding: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.theme-prostore-like .ps-product-gallery .ps-product-gallery__thumbs-strip > li.image-additional a img.ps-product-gallery__img--thumb {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block !important;
  }
}

/* Hide noisy SEO tags from top buy card meta area. */
body.theme-prostore-like .ps-product-page .ps-product-meta-compact .ps-product-tags-line {
  display: none !important;
}

body.theme-prostore-like .ps-product-page ul.ps-product-breadcrumb.breadcrumb {
  margin-bottom: 12px;
}

/* Product page: no sticky buy column — avoids empty band + stray scrollbar under links. */
@media (min-width: 992px) {
  body.theme-prostore-like .ps-product-page .ps-product-main.row {
    align-items: start !important;
  }
  body.theme-prostore-like .ps-product-page .ps-product-summary,
  body.theme-prostore-like.product-product .ps-product-page .ps-product-summary {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    align-self: start !important;
    overflow: visible !important;
    overflow-y: visible !important;
    overflow-x: visible !important;
    max-height: none !important;
    height: auto !important;
    min-height: 0 !important;
  }
  body.theme-prostore-like .ps-product-page .ps-product-summary::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
  }
  body.theme-prostore-like .ps-product-page .ps-product-buy-card,
  body.theme-prostore-like .ps-product-page .ps-product-form,
  body.theme-prostore-like .ps-product-page #product,
  body.theme-prostore-like .ps-product-page .ps-pd-actions,
  body.theme-prostore-like .ps-product-page .ps-pd-links,
  body.theme-prostore-like .ps-product-page .ps-product-share {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
  }
  body.theme-prostore-like .ps-product-gallery .thumbnails:has(> li.ps-product-gallery__thumbs-scroller) > li.ps-product-gallery__thumbs-scroller {
    max-height: none;
    overflow-y: visible;
  }
}
body.theme-prostore-like .ps-product-page .present:empty,
body.theme-prostore-like .ps-product-page .present:not(:has(img)),
body.theme-prostore-like .ps-product-page .benefits:not(:has(li)) {
  display: none !important;
}

/* Quick order moved under gallery (red square on screenshot). */
body.theme-prostore-like .ps-product-page .ps-product-gallery .ps-quick-order-wrap--gallery {
  margin-top: 14px;
}

@media (min-width: 768px) {
  body.theme-prostore-like .ps-product-page .ps-product-gallery .ps-quick-order-form {
    display: grid !important;
    max-width: 740px;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "title  title  title"
      "product product product"
      "name   phone   email"
      "comment comment comment"
      "captcha captcha submit"
      "alert  alert  alert";
    gap: 8px 10px !important;
    align-items: start;
    margin-top: 12px; /* keep base spacing but not huge */
  }

  body.theme-prostore-like .ps-product-page .ps-product-gallery .ps-quick-order__title {
    grid-area: title;
    margin: 0 !important;
    align-self: center;
    justify-self: center;
    text-align: center;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.1;
  }
  body.theme-prostore-like .ps-product-page .ps-product-gallery .ps-quick-order__product-block {
    grid-area: product;
    margin: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    border-bottom: 0 !important;
    justify-self: stretch;
    text-align: center;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
  }
  body.theme-prostore-like .ps-product-page .ps-product-gallery .ps-quick-order__product-label {
    display: none !important;
  }
  body.theme-prostore-like .ps-product-page .ps-product-gallery .ps-quick-order__product-name {
    display: -webkit-box !important;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100%;
  }
  body.theme-prostore-like .ps-product-page .ps-product-gallery .ps-quick-order__qty-line {
    white-space: nowrap;
  }
  body.theme-prostore-like .ps-product-page .ps-product-gallery .ps-quick-order__field:nth-of-type(1) { grid-area: name; }
  body.theme-prostore-like .ps-product-page .ps-product-gallery .ps-quick-order__field:nth-of-type(2) { grid-area: phone; }
  body.theme-prostore-like .ps-product-page .ps-product-gallery .ps-quick-order__field:nth-of-type(3) { grid-area: email; }
  body.theme-prostore-like .ps-product-page .ps-product-gallery .ps-quick-order__field:nth-of-type(4) { grid-area: comment; }
  body.theme-prostore-like .ps-product-page .ps-product-gallery .ps-quick-order__captcha { grid-area: captcha; }
  body.theme-prostore-like .ps-product-page .ps-product-gallery .ps-quick-order-submit {
    grid-area: submit;
    width: 100% !important;
    white-space: nowrap;
  }
  body.theme-prostore-like .ps-product-page .ps-product-gallery .gs-callback-alert { grid-area: alert; }

  body.theme-prostore-like .ps-product-page .ps-product-gallery .ps-quick-order__captcha fieldset {
    margin: 0 !important;
  }
  body.theme-prostore-like .ps-product-page .ps-product-gallery .ps-quick-order__captcha legend {
    display: none !important;
  }
  body.theme-prostore-like .ps-product-page .ps-product-gallery .ps-quick-order__captcha .form-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: 8px;
    align-items: center;
    margin: 0 !important;
  }
  body.theme-prostore-like .ps-product-page .ps-product-gallery .ps-quick-order__captcha img {
    width: 120px;
    height: 30px;
    object-fit: cover;
  }

  body.theme-prostore-like .ps-product-page .ps-product-gallery .ps-quick-order__field textarea.form-control {
    min-height: 42px;
    height: 42px;
    resize: vertical;
  }
}

/* Desktop/tablet: make quick order horizontal/compact to reduce page height. */
@media (min-width: 768px) {
  /* Horizontal, compact and aligned (as requested). */
  body.theme-prostore-like .ps-product-page .ps-quick-order-form {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "title  product product"
      "name   phone   email"
      "comment comment comment"
      "captcha captcha submit"
      "alert  alert  alert";
    gap: 10px 12px !important;
    align-items: start;
  }

  body.theme-prostore-like .ps-product-page .ps-quick-order__title {
    grid-area: title;
    margin: 0 !important;
    align-self: center;
  }

  body.theme-prostore-like .ps-product-page .ps-quick-order__product-block {
    grid-area: product;
    margin: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    border-bottom: 0 !important;
    justify-self: end;
  }

  body.theme-prostore-like .ps-product-page .ps-quick-order__field {
    margin: 0 !important;
  }
  body.theme-prostore-like .ps-product-page .ps-quick-order__field:nth-of-type(1) { grid-area: name; }
  body.theme-prostore-like .ps-product-page .ps-quick-order__field:nth-of-type(2) { grid-area: phone; }
  body.theme-prostore-like .ps-product-page .ps-quick-order__field:nth-of-type(3) { grid-area: email; }
  body.theme-prostore-like .ps-product-page .ps-quick-order__field:nth-of-type(4) { grid-area: comment; }

  body.theme-prostore-like .ps-product-page .ps-quick-order__captcha { grid-area: captcha; }
  body.theme-prostore-like .ps-product-page .ps-quick-order-submit { grid-area: submit; }
  body.theme-prostore-like .ps-product-page .ps-quick-order-form .gs-callback-alert { grid-area: alert; }

  body.theme-prostore-like .ps-product-page .ps-quick-order__captcha fieldset {
    margin: 0 !important;
  }
  body.theme-prostore-like .ps-product-page .ps-quick-order__captcha legend {
    display: none !important;
  }
  body.theme-prostore-like .ps-product-page .ps-quick-order__captcha .form-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: 8px;
    align-items: center;
    margin: 0 !important;
  }
  body.theme-prostore-like .ps-product-page .ps-quick-order__captcha img {
    width: 120px;
    height: 30px;
    object-fit: cover;
  }

  body.theme-prostore-like .ps-product-page .ps-quick-order-submit {
    width: 100% !important;
    margin: 0 !important;
    min-height: 42px;
    align-self: end;
    white-space: nowrap;
  }

  /* Compactness: keep comment from blowing up height */
  body.theme-prostore-like .ps-product-page .ps-quick-order__field textarea.form-control {
    min-height: 42px;
    height: 42px;
    resize: vertical;
  }
}

/* Narrow right column (>=480px): still horizontal but 2 columns (fits sidebar). */
@media (min-width: 480px) and (max-width: 767px) {
  body.theme-prostore-like .ps-product-page .ps-quick-order-form {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "title  product"
      "name   phone"
      "email  email"
      "comment comment"
      "captcha submit"
      "alert  alert";
    gap: 10px 10px !important;
    align-items: start;
  }

  body.theme-prostore-like .ps-product-page .ps-quick-order__title {
    grid-area: title;
    margin: 0 !important;
    align-self: center;
  }

  body.theme-prostore-like .ps-product-page .ps-quick-order__product-block {
    grid-area: product;
    margin: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    border-bottom: 0 !important;
    justify-self: end;
  }

  body.theme-prostore-like .ps-product-page .ps-quick-order__field {
    margin: 0 !important;
  }
  body.theme-prostore-like .ps-product-page .ps-quick-order__field:nth-of-type(1) { grid-area: name; }
  body.theme-prostore-like .ps-product-page .ps-quick-order__field:nth-of-type(2) { grid-area: phone; }
  body.theme-prostore-like .ps-product-page .ps-quick-order__field:nth-of-type(3) { grid-area: email; }
  body.theme-prostore-like .ps-product-page .ps-quick-order__field:nth-of-type(4) { grid-area: comment; }

  body.theme-prostore-like .ps-product-page .ps-quick-order__captcha { grid-area: captcha; }
  body.theme-prostore-like .ps-product-page .ps-quick-order-submit {
    grid-area: submit;
    width: 100% !important;
    margin: 0 !important;
    min-height: 40px;
    align-self: end;
    white-space: nowrap;
  }
  body.theme-prostore-like .ps-product-page .ps-quick-order-form .gs-callback-alert { grid-area: alert; }

  body.theme-prostore-like .ps-product-page .ps-quick-order__captcha fieldset {
    margin: 0 !important;
  }
  body.theme-prostore-like .ps-product-page .ps-quick-order__captcha .form-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px;
    gap: 8px;
    align-items: center;
    margin: 0 !important;
  }
  body.theme-prostore-like .ps-product-page .ps-quick-order__captcha legend {
    display: none !important;
  }
  body.theme-prostore-like .ps-product-page .ps-quick-order__captcha img {
    width: 110px;
    height: 30px;
    object-fit: cover;
  }

  /* Button in narrow column: don't cut text */
  body.theme-prostore-like .ps-product-page .ps-quick-order-submit {
    font-size: 12px !important;
    padding: 8px 8px !important;
    min-height: 34px !important;
    line-height: 1.1 !important;
    white-space: normal !important;
  }

  /* Compactness: comment should not eat space by default */
  body.theme-prostore-like .ps-product-page .ps-quick-order__field textarea.form-control {
    min-height: 40px;
    height: 40px;
    resize: vertical;
  }
}

/* «Купить на Авито» — внешний CTA на странице товара под основной кнопкой «Купить». */
.ps-product-avito-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #20a953;
  color: #fff !important;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  border: 0;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}
.ps-product-avito-btn:hover,
.ps-product-avito-btn:focus {
  background: #178a42;
  color: #fff !important;
  text-decoration: none;
  transform: translateY(-1px);
}
.ps-product-avito-btn:active {
  transform: translateY(0);
}

/* Карточки каталога / главная: та же кнопка Авито, компактнее под двумя CTA */
.ps-pcard .ps-pcard__avito-btn {
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 10px;
}

/* Account wishlist: full-width rows, readable thumbs (overrides legacy 47px + narrow grid) */
body.theme-prostore-like .ps-wishlist-page #content {
  min-width: 0;
}
body.theme-prostore-like .ps-wishlist-cards {
  width: 100%;
  max-width: 100%;
}
body.theme-prostore-like .ps-wishlist-card {
  width: 100%;
  max-width: none;
  grid-template-columns: 120px minmax(0, 1fr) minmax(110px, auto) minmax(180px, auto);
}
body.theme-prostore-like .ps-wishlist-card__thumb {
  width: 120px;
  height: 120px;
}
body.theme-prostore-like .ps-wishlist-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
body.theme-prostore-like .ps-wishlist-page #content > .product-layout,
body.theme-prostore-like .ps-wishlist-page #content > .row > .product-layout {
  width: 100% !important;
  max-width: none !important;
  flex: 0 0 100% !important;
}
@media (max-width: 991px) {
  body.theme-prostore-like .ps-wishlist-card {
    grid-template-columns: 100px 1fr;
  }
  body.theme-prostore-like .ps-wishlist-card__thumb {
    width: 100px;
    height: 100px;
  }
}

/* Mobile header: always-visible search, no squeezed catalog/search button */
@media (max-width: 991px) {
  body.theme-prostore-like .ps-header__catalog,
  body.theme-prostore-like .ps-header__catalog.dropdown {
    display: none !important;
  }

  body.theme-prostore-like .ps-mob-search-toggle {
    display: none !important;
  }

  body.theme-prostore-like .ps-header__inner,
  body.theme-prostore-like .ps-header__inner--has-catalog {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) 44px !important;
    grid-template-rows: auto auto !important;
    gap: 8px 10px !important;
    align-items: center !important;
  }

  body.theme-prostore-like .ps-header__actions {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body.theme-prostore-like #logo {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  body.theme-prostore-like .ps-mob-header-wish {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }

  body.theme-prostore-like .ps-header__search-wrap {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible !important;
    pointer-events: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.theme-prostore-like .ps-header__search-wrap .ps-search.ps-search--oc {
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
  }

  body.theme-prostore-like .ps-header__search-wrap .ps-search.ps-search--oc .form-control {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 1% !important;
  }

  body.theme-prostore-like .ps-header__search-wrap .ps-search.ps-search--oc .input-group-btn {
    flex: 0 0 auto !important;
    width: auto !important;
  }

  body.theme-prostore-like .ps-header__search-wrap .ps-oc-search-btn {
    white-space: nowrap !important;
    min-width: 72px !important;
  }
}

/* Фикс скролла корзины: items area scrolls, summary с кнопками всегда виден */
body.theme-prostore-like #cart.ps-oc-cart .gs-cart-dropdown.ps-cart-dropdown-fixed .gs-cart-dropdown__items {
  max-height: min(50vh, 360px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
body.theme-prostore-like .ps-product-share__chip .ps-share-icon {
  color: var(--good-accent-hover) !important;
}


/* Product page quick order button — matches card style, sized for product page */
body.theme-prostore-like .ps-product-quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 200px;
  min-height: 48px;
  margin: 0;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  border: 2px solid var(--ps-accent);
  background: transparent;
  color: var(--ps-accent);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
body.theme-prostore-like .ps-product-quick-btn:hover,
body.theme-prostore-like .ps-product-quick-btn:focus {
  background: var(--ps-accent-soft);
  color: var(--ps-accent-hover);
  border-color: var(--ps-accent-hover);
  transform: translateY(-1px);
}

body.theme-prostore-like .ps-pcard__quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--ps-accent);
  background: transparent;
  color: var(--ps-accent);
  cursor: pointer;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  padding: 10px 16px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  min-height: 40px;
}
body.theme-prostore-like .ps-pcard__quick-btn:hover,
body.theme-prostore-like .ps-pcard__quick-btn:focus {
  background: var(--ps-accent-soft);
  color: var(--ps-accent-hover);
  border-color: var(--ps-accent-hover);
  transform: translateY(-1px);
}
