/* Category Flyout Menu - morele.net style */
.cat-flyout-wrapper {
  position: relative;
  overflow: visible !important;
}
.cat-flyout-wrapper .card-header {
  background: #1e293b;
  border-bottom: 2px solid #ff4d6d;
  padding: 10px 14px;
}
.cat-flyout-wrapper .card-title {
  color: #f1f5f9;
  font-size: 0.95rem;
  font-weight: 700;
}

/* Menu kontener - pozycja referencyjna dla paneli flyout */
.cat-flyout-menu {
  position: relative;
}

/* Item NIE jest position:relative — panel pozycjonuje się względem .cat-flyout-menu */
.cat-flyout-item {
  position: static !important;
}

.cat-flyout-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  color: #334155;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s, color 0.15s;
}
.cat-flyout-link:hover,
.cat-flyout-item.has-children:hover > .cat-flyout-link {
  background: #ff4d6d;
  color: #fff;
  text-decoration: none;
}
.cat-flyout-item.has-children:hover > .cat-flyout-link .cat-flyout-arrow {
  color: #fff;
}
.cat-flyout-arrow {
  font-size: 18px;
  color: #94a3b8;
  transition: color 0.15s;
}
.cat-flyout-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-flyout-item:last-child .cat-flyout-link {
  border-bottom: none;
}

/* Mega panel - ZAWSZE od góry menu, stała pozycja, szerokość = prawa kolumna */
.cat-flyout-panel {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  width: 855px;
  height: 100%;
  z-index: 1050;
  padding-left: 0;
}
.cat-flyout-item.has-children:hover > .cat-flyout-panel {
  display: block;
}
.cat-flyout-panel-inner {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: none;
  border-radius: 0 8px 8px 0;
  box-shadow: 8px 4px 24px rgba(0,0,0,0.10);
  padding: 20px 24px;
  min-height: 100%;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px 32px;
  overflow-y: auto;
}

/* Kolumny podkategorii */
.flyout-section {
  flex: 0 0 auto;
  min-width: 170px;
  max-width: 220px;
  margin-bottom: 12px;
}
.flyout-section-title {
  display: block;
  padding: 4px 0 6px 0;
  color: #1e293b;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid #ff4d6d;
  margin-bottom: 6px;
}
.flyout-section-title:hover {
  color: #ff4d6d;
  text-decoration: none;
}
.flyout-sub {
  list-style: none;
  margin: 0;
  padding: 0;
}
.flyout-sub li {
  margin: 0;
}
.flyout-sub-link {
  display: block;
  padding: 3px 0;
  color: #64748b;
  text-decoration: none;
  font-size: 0.78rem;
  transition: color 0.12s;
}
.flyout-sub-link:hover {
  color: #ff4d6d;
  text-decoration: none;
}

/* Wyrównaj prawą kolumnę do sidebara — slider dopasowany */
@media (min-width: 992px) {
  .page-index .homeslider .swiper-slide img {
    height: 337px;
  }
}

/* Sticky header */
@media (min-width: 992px) {
  #header .js-header-top-wrapper {
    position: sticky;
    top: 0;
    z-index: 1060;
    background: #fff;
    box-shadow: none;
    transition: box-shadow 0.2s;
  }
  #header .js-header-top-wrapper.is-stuck {
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  }
}
