/* SCAN Works Carousel FX — компактные стили (без дубликатов) */

/* === КАРУСЕЛЬ === */
.swcx-carousel { position: relative; }
.swcx-carousel .swiper { position: relative; overflow: hidden; width: 100%; }
.swcx-carousel .swiper-wrapper { display: flex; }
.swcx-carousel .swiper-slide { flex: 0 0 auto; }

/* Карточка */
.swcx-card { position: relative; margin: 0; transition: transform .16s ease, box-shadow .16s ease; will-change: transform; }
.swcx-card:hover { transform: translateY(-2px); }
.swcx-card__thumb { position: relative; overflow: hidden; border-radius: 12px; background: #f5f5f5; }
.swcx-card__img { display: block; width: 100%; height: auto; }

/* подпись — шрифт наследуем, без жёстких font/size/weight/color */
.swcx-card__caption { margin: 8px 2px 0; line-height: 1.34; }
/* SWCX: карточки — убрать подчёркивание и курсив в подписях */
.swcx-card figcaption,
.swcx-card__caption,
.swcx-card__caption * {
  font-style: normal !important;     /* гасим italics от reset.css/темы */
  text-decoration: none !important;  /* и подчёркивания */
}

/* ссылки в подписи — без подчёркивания, цвет наследуется от текста */
.swcx-card__caption a {
  color: inherit;
  text-decoration: none !important;
}
.swcx-card__caption a:hover {
  text-decoration: none !important;
  filter: brightness(.95);           /* лёгкий ховер вместо подчёркивания */
}

/* на всякий случай — если внутри заголовка попались <i>/<em> */
.swcx-card i,
.swcx-card em {
  font-style: normal !important;
}


/* ссылки в карточке — без подчёркиваний, цвет от темы */
.swcx-card a{
  text-decoration: none !important;
  color: inherit;              /* пусть берёт цвет текста карточки */
}
.swcx-card a:hover{
  text-decoration: none !important;
  filter: brightness(.95);     /* лёгкий эффект при наведении, вместо подчёркивания */
}

/* Пагинация */
.swcx-carousel .swiper-horizontal>.swiper-pagination-bullets,
.swcx-carousel .swiper-pagination-bullets.swiper-pagination-horizontal,
.swcx-carousel .swiper-pagination{
  position: relative; left: 0; right: 0; bottom: 0;
  transform: none; width: 100%;
  display: flex; justify-content: center; align-items: center; gap: 8px;
  margin-top: 16px;
}
.swcx-carousel .swiper-pagination-bullets .swiper-pagination-bullet{ width:7px; height:7px; border-radius:50%; background:#bbb; opacity:.55; transition: transform .2s, background-color .2s, opacity .2s; }
.swcx-carousel .swiper-pagination-bullets .swiper-pagination-bullet-active{ background: var(--e-global-color-primary, #c00); opacity:1; transform: scale(1.1); }

/* Стрелки */
.swcx-carousel .swcx-nav { display: none; }
@media (min-width: 1025px) {
  .swcx-carousel { padding: 0 32px; }
  .swcx-carousel .swcx-nav { display: block; }
  .swcx-carousel .swiper-button-prev,
  .swcx-carousel .swiper-button-next{
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(0,0,0,.2); backdrop-filter: blur(6px);
    box-shadow: 0 4px 14px rgba(0,0,0,.2);
  }
  .swcx-carousel .swiper-button-prev:after,
  .swcx-carousel .swiper-button-next:after{
    content:''; display:block; width:11px; height:11px; border:2px solid #fff; border-left:0; border-top:0;
  }
  .swcx-carousel .swiper-button-prev:after{ transform: rotate(135deg); margin-left: 3px; }
  .swcx-carousel .swiper-button-next:after{ transform: rotate(-45deg); margin-right: 3px; }

  .swcx-carousel { position: relative; overflow: visible; }
  .swcx-carousel .swiper { overflow: hidden; }
  .swcx-carousel .swcx-nav { position:absolute; inset:0; pointer-events:none; }
  .swcx-carousel .swcx-nav .swiper-button-prev,
  .swcx-carousel .swcx-nav .swiper-button-next{ position:absolute; top:50%; transform:translateY(-50%); z-index:10; width:36px; height:36px; pointer-events:auto; }
  .swcx-carousel .swcx-nav .swiper-button-prev{ left:-12px; }
  .swcx-carousel .swcx-nav .swiper-button-next{ right:-12px; }

  .swcx-carousel .swcx-nav .swiper-button-prev:hover,
  .swcx-carousel .swcx-nav .swiper-button-next:hover{
    background: rgba(0,0,0,.28); transform: translateY(-50%) scale(1.04); box-shadow: 0 6px 18px rgba(0,0,0,.28);
  }
}

/* Доступность */
.swcx-carousel .swiper-notification{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; opacity:0;
}

/* === ЛАЙТБОКС (без дублей) === */

/* блокировка прокрутки фона при открытии */
html.swcx-no-scroll, body.swcx-no-scroll { overflow: hidden; }

/* оверлей */
.swcx-lightbox{
  position: fixed; inset: 0; z-index: 10020;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,.44);
  -webkit-backdrop-filter: saturate(120%) blur(2px);
  backdrop-filter: saturate(120%) blur(2px);
  opacity: 0; transition: opacity .2s ease-out;
  overscroll-behavior: contain; box-sizing: border-box;
  height: 100vh; height: 100svh; height: 100dvh;
  padding:
    max(12px, env(safe-area-inset-top, 0px))
    max(12px, env(safe-area-inset-right, 0px))
    max(12px, env(safe-area-inset-bottom, 0px))
    max(12px, env(safe-area-inset-left, 0px));
}
.swcx-lightbox--open{ display: flex; opacity: 1; }

/* диалог */
.swcx-lightbox__dialog{
  position: relative;
  width: min(96vw, var(--swcx-lb-w, 860px));
  max-height: 100%;
  margin: 0;
  background: #fff; color: #202124;
  border-radius: 12px;
  box-shadow: 0 32px 80px rgba(0,0,0,.22);
  padding: 12px;
  display: flex; flex-direction: column; /* header + scroller */
  transform: translateY(6px) scale(.98);
  opacity: 0;
  transition: transform .2s cubic-bezier(.2,.7,.3,1), opacity .2s ease-out;
  contain: paint; will-change: transform, opacity;
}
.swcx-lightbox--open .swcx-lightbox__dialog{ transform: translateY(0) scale(1); opacity: 1; }

/* шапка */
.swcx-lightbox__header{
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 60px 10px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.swcx-lightbox__title{ margin: 0; font: 600 18px/1.3 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif; }

/* область прокрутки */
.swcx-lightbox__scroller{
  flex: 1 1 auto; min-height: 0;
  overflow: auto; padding: 12px 16px 16px;
  scrollbar-gutter: stable both-edges;
}

/* контент */
.swcx-lightbox__body{ max-width: 640px; margin: 0 auto; display: grid; gap: 16px; }
.swcx-lightbox__body img,
.swcx-lightbox__body video{
  display:block; width:auto; height:auto; max-width:100%;
  border-radius:10px; box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);
  background:#fafafa; object-fit:cover;
}

/* Кнопки: одинаковый базовый вид (40px, как стрелки на десктопе) */
.swcx-lightbox.swcx-lightbox--open .swcx-lightbox__dialog > .swcx-lightbox__close,
.swcx-lightbox .swcx-lightbox__back{
  position:absolute; top:12px; z-index:5;
  width:40px; height:40px; border-radius:50%; cursor:pointer;
  background: rgba(0,0,0,.20) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  backdrop-filter: blur(6px) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,.2) !important;
  border: none !important;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
  color:#fff !important;
}
.swcx-lightbox.swcx-lightbox--open .swcx-lightbox__dialog > .swcx-lightbox__close{ right:16px; }
.swcx-lightbox .swcx-lightbox__back{ left:16px; }
.swcx-lightbox .swcx-lightbox__back[hidden]{ display:none !important; }

.swcx-lightbox .swcx-lightbox__close:hover,
.swcx-lightbox .swcx-lightbox__back:hover{
  background: rgba(0,0,0,.28) !important;
  box-shadow: 0 6px 18px rgba(0,0,0,.28) !important;
  transform: scale(1.04);
}

/* === SWCX Back icon: bigger chevron === */
.swcx-lightbox .swcx-lightbox__back{
  font-size: 0;       /* скрыть символ ‹ */
  line-height: 0;
}

.swcx-lightbox .swcx-lightbox__back::after{
  content: '';
  display: block;
  width: 14px;        /* размер иконки */
  height: 14px;
  border: 3px solid currentColor;  /* толщина линии */
  border-left: 0;
  border-top: 0;
  transform: rotate(135deg);
  pointer-events: none;
}

.swcx-lightbox .swcx-lightbox__close::before{
  content:'✕'; font-size:18px; line-height:1; color:#fff !important;
}

/* уменьшение движения */
@media (prefers-reduced-motion:reduce){
  .swcx-lightbox, .swcx-lightbox__dialog{ transition: none !important; }
}

/* === SWCX POLISH EMBED CSS (карусельный полиш) === */
/* Desktop shelf/fade */
.swcx-carousel .swiper, .swc-carousel .swiper{
  --swcx-pad-x:6px; --swcx-pad-y:16px; --swcx-shelf:0px; --swcx-fade:56px;
  position:relative; padding:var(--swcx-pad-y) var(--swcx-pad-x) var(--swcx-pad-y));
}

/* 2) Если есть активная пагинация — вернуть полку и место снизу */
.swcx-carousel .swiper:has(.swiper-pagination:not(.swiper-pagination-lock)){
  --swcx-shelf:16px; /* было раньше */
  padding-bottom: calc(var(--swcx-shelf) + var(--swcx-pad-y));
}

/* Центрирование пагинации внутри «полки» */
.swcx-carousel .swiper:has(.swiper-pagination) .swiper-pagination {
  bottom: calc((var(--swcx-shelf) + var(--swcx-pad-y)) / 2 - 36px);
}


.swcx-carousel .swiper::before, .swc-carousel .swiper::before,
.swcx-carousel .swiper::after,  .swc-carousel .swiper::after{

  --swcx-fade-bleed: 18px;             /* запас по высоте, можно 6–12px */
/*  --swcx-fade-bg: #f5f5f7;            /* базовый цвет фона под карусель (подгони под свой) */

  content:""; 
  position:absolute; 
/*  top:var(--swcx-pad-y); */
/*  bottom:calc(var(--swcx-shelf) + var(--swcx-pad-y)); */
  top: max(0px, calc(var(--swcx-pad-y) - var(--swcx-fade-bleed)));
  bottom: calc(var(--swcx-shelf) + var(--swcx-pad-y) - var(--swcx-fade-bleed));

  width:var(--swcx-fade); 
  pointer-events:none; 
  z-index:2;
}
.swcx-carousel .swiper::before, .swc-carousel .swiper::before{
  left:var(--swcx-pad-x); transform:translateX(calc(-1 * var(--swcx-pad-x)));
  background:linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,0));
}
.swcx-carousel .swiper::after, .swc-carousel .swiper::after{
  right:var(--swcx-pad-x); transform:translateX(var(--swcx-pad-x));
  background:linear-gradient(270deg, rgba(255,255,255,1), rgba(255,255,255,0));
}

/* карточка (полир) */
.swiper .swcx-card{
  display:flex; flex-direction:column; height:auto;
  background:#fff; border:1px solid rgba(0,0,0,.08); border-radius:12px;
  box-shadow:0 6px 16px rgba(0,0,0,.06);
  transition:transform .15s cubic-bezier(.22,.61,.36,1), box-shadow .15s cubic-bezier(.22,.61,.36,1), border-color .15s;
  overflow:hidden;
}
.swiper .swcx-card:hover{ transform:translateY(-2px); box-shadow:0 12px 28px rgba(0,0,0,.12); }
.swiper-slide-active .swcx-card{ border-color: rgba(0,0,0,.08); }

/* медиа внутри карточки */
.swcx-card__media{
  aspect-ratio:1/1; position:relative; overflow:hidden; border-radius:10px; margin:8px 8px 0 8px; display:grid; place-items:center;
}
.swcx-card__media > img{
  position:static; width:auto !important; height:auto !important;
  max-width:100% !important; max-height:100% !important;
  margin:auto; object-fit:contain !important; display:block;
  transition:transform .12s ease; border-radius: inherit !important;
}
.swcx-card:hover .swcx-card__media > img{ transform:scale(1.02); }

/* подпись на 2 строки */
.swcx-card__caption{
  margin:10px 10px 12px;
  line-height:1.25;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  min-height:42px;
}
.swcx-card__caption a{ color:inherit; text-decoration:none; }
.swcx-card__caption a:hover{ text-decoration:none; filter:brightness(.95); }

/* стрелки поверх */
.swcx-carousel .swiper .swiper-button-prev, .swc-carousel .swiper .swiper-button-prev,
.swcx-carousel .swiper .swiper-button-next, .swc-carousel .swiper .swiper-button-next{
  top:50%; width:44px; height:44px; margin-top:-22px; z-index:5;
  background:rgba(32,33,36,.6); color:#fff; border-radius:50%;
  box-shadow:0 6px 16px rgba(0,0,0,.25); backdrop-filter:saturate(120%) blur(2px);
  opacity:0; transition:opacity .2s ease, transform .2s ease;
}
.swiper:hover .swiper-button-prev, .swiper:hover .swiper-button-next{ opacity:1; }
.swiper-button-prev:focus-visible, .swiper-button-next:focus-visible{ opacity:1; outline:2px solid var(--swcx-accent,#23a6d9); outline-offset:2px; }
.swiper-button-prev{ left:var(--swcx-pad-x); }
.swiper-button-next{ right:var(--swcx-pad-x); }
.swiper-button-prev::after, .swiper-button-next::after{ font-size:16px; }

/* плавающая пагинация — даём центрировать самому Swiper и делаем её видимой */
.swiper .swcx-pagelayer{
  position: absolute;
  left: 0; right: 0;          /* слой на всю ширину слайдера */
  bottom: 14px;               /* можно 8–16px по вкусу */
  z-index: 12;                /* выше карточек/теней и стрелок */
  pointer-events: none;       /* клики проходят внутрь на пагинацию */
}

/* Контейнер пагинации: возвращаем схему Swiper (abs + центрирование) */
.swiper .swcx-pagelayer .swiper-pagination{
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  display: block !important;
  white-space: nowrap;
  overflow: visible !important; /* не обрезаем масштабированные буллеты */
  pointer-events: auto;         /* кликабельно */
}

/* На всякий: в динамическом режиме не обрезаем края */
.swiper .swiper-pagination-bullets-dynamic{
  overflow: visible !important;
}

/* БАЗА для точек */
.swiper .swiper-pagination-bullet{
  width: 8px;
  height: 8px;
  background: rgba(0,0,0,.45);
  opacity: .6;
  border-radius: 50%;
  margin: 0 4px !important;
  transition: transform .2s ease, opacity .2s ease, background-color .2s ease;
}

/* АКТИВНАЯ — самая крупная и контрастная */
.swiper .swiper-pagination-bullet-active,
.swiper .swiper-pagination-bullet-active-main{
  transform: scale(1.25);
  opacity: 1;
  background: var(--e-global-color-primary, #23a6d9);
}

/* СОСЕДИ активной — средние */
.swiper .swiper-pagination-bullet-active-prev,
.swiper .swiper-pagination-bullet-active-next{
  transform: scale(1.05);
  opacity: .9;
}

/* ДАЛЬНИЕ соседи — чуть меньше/приглушённые */
.swiper .swiper-pagination-bullet-active-prev-prev,
.swiper .swiper-pagination-bullet-active-next-next{
  transform: scale(.85);
  opacity: .75;
}


/* easing карусели */
.swiper{ --swiper-wrapper-transition-timing-function: cubic-bezier(.22,.61,.36,1); }

/* Anti-Flash v2 */
.swcx-carousel .swiper:not(.swiper-initialized), .swc-carousel  .swiper:not(.swiper-initialized){height:236px;overflow:hidden}
.swcx-carousel .swiper:not(.swiper-initialized) .swiper-wrapper, .swc-carousel  .swiper:not(.swiper-initialized) .swiper-wrapper{height:236px}
.swcx-carousel .swiper:not(.swiper-initialized) .swiper-slide,  .swc-carousel  .swiper:not(.swiper-initialized) .swiper-slide{height:236px;display:flex;align-items:center;justify-content:center}
.swcx-carousel .swiper:not(.swiper-initialized) img,             .swc-carousel  .swiper:not(.swiper-initialized) img{width:160px !important;height:160px !important;object-fit:cover !important;max-width:none !important;max-height:none !important;opacity:0}
.swcx-carousel .swiper.swiper-initialized img,                    .swc-carousel  .swiper.swiper-initialized img{opacity:1;transition:opacity .2s ease}

/* iOS/Safari: убрать выделение/подсветку у буллетов пагинации */
.swiper .swiper-pagination,
.swiper .swiper-pagination-bullet,
.swiper .swcx-pagelayer,
.swiper .swcx-pagelayer .swiper-pagination{
  -webkit-user-select: none;
          user-select: none;          /* запрет выделения текста */
  -webkit-touch-callout: none;        /* запрет контекстного меню при долгом тапе */
  -webkit-tap-highlight-color: transparent; /* убрать серую подсветку тапа */
  touch-action: manipulation;         /* хинт для тач-обработки (iOS ok) */
  cursor: pointer;
}

/* Fallback для устройств без backdrop-filter (ускоряет рендер на слабых девайсах) */
@supports not ((-webkit-backdrop-filter: blur(6px)) or (backdrop-filter: blur(6px))) {
  /* Кнопки попапа */
  .swcx-lightbox .swcx-lightbox__close,
  .swcx-lightbox .swcx-lightbox__back {
    background: rgba(0,0,0,.35) !important; /* чуть плотнее, вместо blur */
  }

  /* Стрелки карусели (оба набора, чтобы точно покрыть) */
  .swcx-carousel .swiper-button-prev,
  .swcx-carousel .swiper-button-next,
  .swcx-carousel .swiper .swiper-button-prev,
  .swcx-carousel .swiper .swiper-button-next {
    background: rgba(0,0,0,.35) !important;
  }
}
