/**
 * Helix custom.css – felülírások a textarea UTÁN (index.php → add_css).
 * Lista alján: custom-css-late (default.php), J2Store menü CSS után.
 * Textarea tisztított tartalom: css/helix-admin-custom-css.css
 */

@import url('https://cdn.jsdelivr.net/npm/@xz/fonts@1/serve/metropolis.min.css');

/* ===== Fejléc – Termékcsoportok legördülő menü ===== */
#sp-menu-left {
  --md-nav-font: 'Metropolis', system-ui, sans-serif;
  --md-nav-accent: #4a6d92;
  --md-nav-accent-soft: #e8f0f7;
  --md-nav-text: #7a8796;
  --md-nav-text-strong: #3d4654;
  --md-nav-radius: 8px;
  --md-nav-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

#sp-menu-left .sp-column .sp-module:before,
#sp-menu-left .sp-column .sp-module:after {
  border-color: var(--md-nav-accent) !important;
}

#sp-menu-left .sp-column .sp-module-title {
  font-family: var(--md-nav-font) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--md-nav-text-strong) !important;
  padding-left: 32px !important;
  transition: color 0.25s var(--md-nav-ease);
}

#sp-menu-left .sp-column .sp-module-title:hover {
  color: var(--md-nav-accent) !important;
}

#sp-menu-left .sp-column .sp-module-title:after {
  font-size: 11px !important;
  color: var(--md-nav-accent) !important;
  margin-left: 10px !important;
  opacity: 0.75;
  transition: transform 0.25s var(--md-nav-ease), opacity 0.25s var(--md-nav-ease);
}

#sp-menu-left .sp-column .sp-module:has(.sp-module-content.categories-toggle) .sp-module-title:after,
#sp-menu-left .sp-column .sp-module.md-nav-open .sp-module-title:after {
  transform: rotate(180deg);
  opacity: 1;
}

/* Háttér – blur a tartalom felett; fejléc + menü panel felette marad élesen */
.md-nav-backdrop {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  z-index: 1040;
  background: transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.28s var(--md-nav-ease),
    visibility 0.28s var(--md-nav-ease);
}

.md-nav-backdrop.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Fejléc + menü: backdrop felett, ne homályosodjanak */
body.md-nav-open #sp-header,
body.md-nav-open #sp-menu-left {
  position: relative;
  z-index: 1060 !important;
  overflow: visible !important;
}

body.md-nav-open #sp-menu-left .sp-column,
body.md-nav-open #sp-menu-left .sp-module {
  overflow: visible !important;
}

#sp-menu-left .sp-column .sp-module {
  position: relative !important;
}

#sp-menu-left .sp-column .sp-module-content {
  margin-top: 0;
  padding: 36px 14px 14px !important;
  background: #ffffff !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  border: 1px solid rgba(74, 109, 146, 0.14) !important;
  border-radius: var(--md-nav-radius) !important;
  box-shadow:
    0 20px 48px rgba(44, 62, 80, 0.12),
    0 6px 18px rgba(74, 109, 146, 0.08) !important;
  transform: translateY(10px) !important;
  transition:
    opacity 0.28s var(--md-nav-ease),
    visibility 0.28s var(--md-nav-ease),
    transform 0.28s var(--md-nav-ease) !important;
  z-index: 1065 !important;
  isolation: isolate;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  -webkit-font-smoothing: antialiased;
  max-height: calc(100vh - 88px);
  height: auto !important;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(74, 109, 146, 0.28) transparent;
}

#sp-menu-left .sp-column .sp-module-content .md-nav-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(74, 109, 146, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--md-nav-accent);
  font-family: var(--md-nav-font);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 0.2s var(--md-nav-ease),
    border-color 0.2s var(--md-nav-ease),
    transform 0.2s var(--md-nav-ease);
}

#sp-menu-left .sp-column .sp-module-content .md-nav-close:hover,
#sp-menu-left .sp-column .sp-module-content .md-nav-close:focus {
  background: var(--md-nav-accent-soft);
  border-color: rgba(74, 109, 146, 0.35);
  transform: scale(1.04);
  outline: none;
}

#sp-menu-left .sp-column .sp-module-content .md-nav-close span {
  display: block;
  margin-top: -1px;
}

#sp-menu-left .sp-column .sp-module-content::-webkit-scrollbar {
  width: 5px;
}

#sp-menu-left .sp-column .sp-module-content::-webkit-scrollbar-track {
  background: transparent;
}

#sp-menu-left .sp-column .sp-module-content::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(74, 109, 146, 0.22);
}

#sp-menu-left .sp-column .sp-module-content::-webkit-scrollbar-thumb:hover {
  background: rgba(74, 109, 146, 0.38);
}

/* Textarea mobil fix ne tegyen második scrollt a belső listára */
#sp-menu-left .sp-column .sp-module-content.categories-toggle .custom-menu,
#sp-menu-left .sp-column .sp-module-content .custom-menu {
  max-height: none !important;
  overflow: visible !important;
}

#sp-menu-left .sp-column .sp-module-content.categories-toggle,
body > .sp-module-content.categories-toggle {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
  z-index: 1065 !important;
  background: #ffffff !important;
  display: block !important;
}

#sp-menu-left .sp-column .sp-module-content .custom-menu-title {
  display: none !important;
}

#sp-menu-left .sp-column .sp-module-content .custom-menu {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

#sp-menu-left .sp-column .sp-module-content .custom-menu > li {
  margin: 0 0 3px !important;
  padding: 0 !important;
  background: transparent !important;
}

#sp-menu-left .sp-column .sp-module-content .custom-menu > li > a {
  display: block;
  padding: 9px 12px 9px 14px !important;
  border-radius: 6px;
  border: 1px solid transparent;
  font-family: var(--md-nav-font) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  color: var(--md-nav-text) !important;
  transition:
    color 0.22s var(--md-nav-ease),
    background-color 0.22s var(--md-nav-ease),
    border-color 0.22s var(--md-nav-ease);
}

#sp-menu-left .sp-column .sp-module-content .custom-menu > li > a:hover,
#sp-menu-left .sp-column .sp-module-content .custom-menu > li > a:focus {
  color: var(--md-nav-accent) !important;
  background: rgba(74, 109, 146, 0.07) !important;
  border-color: rgba(74, 109, 146, 0.12) !important;
}

#sp-menu-left .sp-column .sp-module-content .custom-menu > li.current > a,
#sp-menu-left .sp-column .sp-module-content .custom-menu > li.active > a,
#sp-menu-left .sp-column .sp-module-content .custom-menu > li.alias-parent-active > a {
  color: var(--md-nav-text-strong) !important;
  background: var(--md-nav-accent-soft) !important;
  border-color: rgba(74, 109, 146, 0.2) !important;
  box-shadow: inset 3px 0 0 var(--md-nav-accent);
  font-weight: 600 !important;
}

#sp-menu-left .sp-column .sp-module-content ul li a {
  font-size: 11px !important;
}

/* Desktop – széles mega-panel, 3 hasáb, magasság = tartalom */
@media (min-width: 992px) {
  #sp-menu-left .sp-column .sp-module-content {
    width: min(780px, calc(100vw - 32px)) !important;
    padding: 40px 18px 16px !important;
  }

  #sp-menu-left .sp-column .sp-module-content .custom-menu {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 12px;
    align-content: start;
  }

  #sp-menu-left .sp-column .sp-module-content .custom-menu > li > a {
    min-height: 36px;
    display: flex;
    align-items: center;
    padding: 8px 12px !important;
    line-height: 1.35 !important;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  #sp-menu-left .sp-column .sp-module-content {
    width: min(640px, calc(100vw - 32px)) !important;
    padding: 42px 16px 16px !important;
  }

  #sp-menu-left .sp-column .sp-module-content .custom-menu {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
  }
}

@media (max-width: 767px) {
  #sp-menu-left .sp-column .sp-module-content {
    width: min(320px, calc(100vw - 24px)) !important;
    max-height: calc(100vh - 120px);
    aspect-ratio: auto;
  }
}

/* ===== Terméknév színek – textarea .product-title { color:#333 } felülírása ===== */

/* Lista */
.j2store-product-list .md-pl-title-block h2.product-title,
.j2store-product-list .md-pl-title-block h2.product-title a,
.j2store-product-list .md-pl-title-block .product-title a .md-pl-sr-line,
.j2store-product-list .md-pl-title-block .product-title a .md-pl-sr-line-inner,
#sp-main-body .j2store-product-list.bs4 .md-pl-title-block h2.product-title,
#sp-main-body .j2store-product-list.bs4 .md-pl-title-block h2.product-title a {
  color: #6b7585 !important;
}

@media (min-width: 992px) {
  #sp-main-body .j2store-product-list.bs4 .md-pl-title-block h2.product-title,
  #sp-main-body .j2store-product-list.bs4 .md-pl-title-block h2.product-title a {
    color: #3d4654 !important;
  }
}

/* Termékoldal */
body.j2store-single-product-view .j2store-single-product.detail h2.product-title,
body.j2store-single-product-view .j2store-single-product.detail .product-title,
body.j2store-single-product-view #sp-main-body .j2store-single-product.detail h2.product-title,
#sp-main-body .j2store-single-product.detail h2.product-title,
#sp-main-body .j2store-single-product.detail .product-title {
  color: #3d4654 !important;
}
