/**
 * Widgety Elementor: Hero, Slider (Hello Ecomgo)
 * Używa zmiennych z style.css (--c-*, --radius-*, --shadow-*)
 */

/* ========== HERO ========== */
.fy-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
}

.fy-hero__media {
  position: absolute;
  inset: 0;
}

.fy-hero__media img,
.fy-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fy-hero__video-wrap {
  position: absolute;
  inset: 0;
}

.fy-hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fy-hero__video-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.fy-hero__video-wrap .fy-hero__video {
  position: relative;
  z-index: 1;
}

.fy-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.fy-hero__content {
  position: relative;
  z-index: 3;
  padding: 2rem var(--gutter, 16px);
  text-align: center;
  max-width: 800px;
}

.fy-hero__content--left {
  text-align: left;
  margin-right: auto;
}

.fy-hero__content--right {
  text-align: right;
  margin-left: auto;
}

.fy-hero__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-weight: var(--w-bold);
  line-height: var(--lh-h);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.fy-hero__subtitle {
  margin: 0 0 1.25rem;
  font-size: 1.125rem;
  line-height: 1.5;
  opacity: 0.95;
}

.fy-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85em 1.75em;
  font-weight: var(--w-semi);
  background: var(--c-primary, #950d11);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm, 12px);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
}

.fy-hero__btn:hover {
  background: var(--c-primary-hover, #c41116);
  color: #fff;
  transform: translateY(-1px);
}

/* ========== SLIDER ========== */
.fy-slider {
  position: relative;
  width: 100%;
  min-height: var(--fy-slider-height, 70vh);
  overflow: hidden;
}

.fy-slider__track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.fy-slider__slide {
  flex: 0 0 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--fy-slider-height, 70vh);
}

.fy-slider__slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.fy-slider__slide-bg .fy-slider__slide-link {
  position: absolute;
  inset: 0;
  display: block;
  text-decoration: none;
  color: inherit;
}

.fy-slider__slide-bg .fy-slider__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fy-slider__video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fy-slider__video-bg--mobile {
  display: none;
}

.fy-slider__video-inline--mobile {
  display: none;
}

@media (max-width: 767px) {
  .fy-slider__video-bg--desktop {
    display: none;
  }
  .fy-slider__video-bg--mobile {
    display: block;
  }
  .fy-slider__video-inline--desktop {
    display: none;
  }
  .fy-slider__video-inline--mobile {
    display: block;
  }
}

.fy-slider__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.fy-slider__img--mobile {
  display: none;
}

@media (max-width: 767px) {
  .fy-slider__slide--has-mobile .fy-slider__img--desktop {
    display: none;
  }
  .fy-slider__slide--has-mobile .fy-slider__img--mobile {
    display: block;
  }
}

.fy-slider__slide-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem var(--gutter, 16px);
  z-index: 2;
  pointer-events: none;
}

.fy-slider__slide-content .fy-slider__btn,
.fy-slider__slide-content .fy-slider__video-inline-wrap {
  pointer-events: auto;
}

.fy-slider__video-inline-wrap {
  max-width: 90%;
  max-height: 50vh;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.fy-slider__video-inline {
  display: block;
  width: 100%;
  height: auto;
  max-height: 50vh;
  object-fit: contain;
  background: #000;
}

.fy-slider__slide-title {
  margin: 0;
  padding: 0.5rem 1rem;
  font-weight: var(--w-semi);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.fy-slider__slide-text {
  margin: 0;
  max-width: 32em;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.5;
}

.fy-slider__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85em 1.75em;
  font-weight: var(--w-semi);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm, 12px);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.fy-slider__btn:hover {
  color: #fff;
  transform: translateY(-1px);
}

.fy-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 36px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: var(--radius-xs, 6px);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fy-slider__arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}

.fy-slider__arrow--prev {
  left: 0.75rem;
}

.fy-slider__arrow--next {
  right: 0.75rem;
}

.fy-slider__arrow-icon {
  width: 20px;
  height: 20px;
  display: block;
  color: var(--c-text, #1b1b1f);
}

.fy-slider__dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.fy-slider__dots .fy-slider__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.fy-slider__dots .fy-slider__dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.fy-slider__dots .fy-slider__dot.is-active {
  background: #fff;
  transform: scale(1.2);
}

/* ========== MENU (drawer mobile) ========== */
.fy-menu-widget {
  position: relative;
  display: inline-block;
}

.fy-menu-placeholder {
  margin: 0;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--c-muted, #5d6068);
}

.fy-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--c-border, #e9e9ee);
  border-radius: var(--radius-sm, 12px);
  background: var(--c-surface, #fff);
  color: var(--c-text, #1b1b1f);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  box-shadow: var(--shadow-xs, 0 1px 2px rgba(16,24,40,.06));
}

.fy-menu-trigger:hover {
  background: var(--c-soft, #faf7f6);
  border-color: color-mix(in srgb, var(--c-primary, #950d11) 30%, transparent);
  color: var(--c-primary, #950d11);
}

.fy-menu-trigger__icon {
  flex-shrink: 0;
}

.fy-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.fy-menu-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: min(320px, 85vw);
  max-width: 320px;
  z-index: 10002;
  background: var(--c-bg, #fff);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
  visibility: hidden;
}

.fy-menu-widget--left .fy-menu-drawer {
  left: 0;
  transform: translateX(-100%);
}

.fy-menu-widget--right .fy-menu-drawer {
  right: 0;
  transform: translateX(100%);
}

.fy-menu-drawer__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--c-text, #1b1b1f);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  z-index: 2;
}

.fy-menu-drawer__close:hover {
  background: var(--c-soft, #faf7f6);
  color: var(--c-primary, #950d11);
}

.fy-menu-drawer__inner {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 56px 20px 24px;
}

.fy-menu-drawer__nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fy-menu-drawer__nav li {
  margin: 0;
  border-bottom: 1px solid var(--c-border, #e9e9ee);
}

.fy-menu-drawer__nav li:last-child {
  border-bottom: 0;
}

.fy-menu-drawer__nav a {
  display: block;
  padding: 14px 0;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.fy-menu-drawer__nav a:hover {
  color: var(--c-primary, #950d11);
}

/* Element z podmenu — link i strzałka w jednym wierszu (flex), strzałka zawsze przy tekście */
.fy-menu-drawer__nav li.menu-item-has-children {
  position: relative;
}

.fy-menu-item__row {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.fy-menu-item__row > a {
  flex: 1;
  min-width: 0;
  padding-right: 8px;
}

.fy-menu-sub-toggle {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--c-text, #1b1b1f);
  cursor: pointer;
  font-size: 0.75rem;
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.fy-menu-sub-toggle:hover {
  background: var(--c-soft, #faf7f6);
  color: var(--c-primary, #950d11);
}

.fy-menu-drawer__nav li.fy-menu-item--open .fy-menu-sub-toggle {
  transform: rotate(180deg);
}

/* Podmenu zwinięte domyślnie */
.fy-menu-drawer__nav .fy-menu-sub {
  list-style: none;
  margin: 0;
  padding: 0 0 0 16px;
  border-bottom: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.fy-menu-drawer__nav li.fy-menu-item--open .fy-menu-sub {
  max-height: 500px;
}

.fy-menu-drawer__nav .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0 0 0 16px;
  border-bottom: 0;
}

.fy-menu-drawer__nav .fy-menu-sub a,
.fy-menu-drawer__nav .sub-menu a {
  padding: 10px 0;
  font-size: 0.9375rem;
}

/* Stan otwarty */
.fy-menu-widget.fy-menu-drawer-open .fy-menu-overlay {
  display: block;
  opacity: 1;
  visibility: visible;
}

.fy-menu-widget.fy-menu-drawer-open .fy-menu-drawer {
  visibility: visible;
  transform: translateX(0);
}

/* Poniżej 991px: pokazuj overlay i drawer (na desktop można ukryć trigger lub zostawić) */
@media (max-width: 991px) {
  .fy-menu-overlay {
    display: block;
  }
}

/* ========== BLOG (sidebar + pętla wpisów) ========== */
.fy-blog-sidebar-block {
  margin-bottom: 2rem;
}

.fy-blog-sidebar-block__title {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: var(--w-semi, 600);
  color: var(--c-text, #1b1b1f);
}

/* Kategorie wpisów */
.fy-blog-categories-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fy-blog-categories-list li {
  margin: 0;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--c-border, #e9e9ee);
}

.fy-blog-categories-list li:last-child {
  border-bottom: 0;
}

.fy-blog-categories-list a {
  color: var(--c-text, #1b1b1f);
  text-decoration: none;
  transition: color 0.2s ease;
}

.fy-blog-categories-list a:hover {
  color: var(--c-primary, #950d11);
}

.fy-blog-categories-list__count {
  color: var(--c-muted, #5d6068);
  font-size: 0.875rem;
}

/* Popularne produkty (sidebar) */
.fy-blog-popular-products-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fy-blog-popular-products-list__item {
  margin: 0 0 1rem;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--c-border, #e9e9ee);
}

.fy-blog-popular-products-list__item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.fy-blog-popular-products-list__link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.fy-blog-popular-products-list__link:hover {
  opacity: 0.85;
}

.fy-blog-popular-products-list__thumb {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border-radius: var(--radius, 6px);
  overflow: hidden;
  background: var(--c-soft, #faf7f6);
}

.fy-blog-popular-products-list__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fy-blog-popular-products-list__info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fy-blog-popular-products-list__title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--c-text, #1b1b1f);
  line-height: 1.3;
}

.fy-blog-popular-products-list__price {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-primary, #950d11);
}

.fy-blog-popular-products-list__price del {
  color: var(--c-muted, #5d6068);
  font-weight: 400;
}

/* Pętla wpisów (blog) */
.fy-posts-loop {
  display: grid;
  gap: 2rem;
}

.fy-posts-loop--cols-1 {
  grid-template-columns: 1fr;
}

.fy-posts-loop--cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.fy-posts-loop--cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Poniżej 992px: 2 lub 1 kolumna (ustawiane w widgecie) */
@media (max-width: 991px) {
  .fy-posts-loop-wrap.fy-posts-loop-cols-md-2 .fy-posts-loop {
    grid-template-columns: repeat(2, 1fr);
  }
  .fy-posts-loop-wrap.fy-posts-loop-cols-md-1 .fy-posts-loop {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .fy-posts-loop--cols-2,
  .fy-posts-loop--cols-3 {
    grid-template-columns: 1fr;
  }
}

.fy-posts-loop__item {
  display: flex;
  flex-direction: column;
  background: var(--c-bg, #fff);
  border-radius: var(--radius, 6px);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease;
}

.fy-posts-loop__item:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.fy-posts-loop__thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--c-soft, #faf7f6);
}

.fy-posts-loop__thumb-link {
  position: absolute;
  inset: 0;
  display: block;
}

.fy-posts-loop__thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Tytuł i data na obrazku (overlay u dołu) */
.fy-posts-loop__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.4) 60%, transparent);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.fy-posts-loop__overlay .fy-posts-loop__date {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.85);
}

.fy-posts-loop__overlay .fy-posts-loop__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: var(--w-semi, 600);
  line-height: 1.35;
}

.fy-posts-loop__overlay .fy-posts-loop__title a {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.fy-posts-loop__overlay .fy-posts-loop__title a:hover {
  opacity: 0.9;
}

.fy-posts-loop__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fy-posts-loop__body .fy-posts-loop__excerpt {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--c-muted, #5d6068);
  line-height: 1.5;
}

.fy-posts-loop-pagination {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.fy-posts-loop-pagination a,
.fy-posts-loop-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius, 6px);
  background: var(--c-soft, #faf7f6);
  color: var(--c-text, #1b1b1f);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.fy-posts-loop-pagination a:hover {
  background: var(--c-primary, #950d11);
  color: #fff;
}

.fy-posts-loop-pagination .current {
  background: var(--c-primary, #950d11);
  color: #fff;
}
