/* Bar-El 27 Catalog Viewer - styles (no external dependencies)
 * Every rule is scoped under .be27cat and the interactive controls are hardened with !important,
 * so theme / Elementor global styles for button, input and a cannot bleed in. */
.be27cat{
  --be27-accent:#EB0A8C;      /* Bar-El pink */
  --be27-blue:#1A588E;        /* Bar-El blue (logo) */
  --be27-bg:#0E1F33;          /* deep navy */
  --be27-bg2:#17385C;
  --be27-bar:rgba(7,22,40,.72);
  --be27-fg:#f3f6fa;
  --be27-muted:#9fb3c8;
  --be27-radius:14px;
  --be27-h:82vh;
  position:relative!important;
  width:100%!important;max-width:1440px!important;
  height:var(--be27-h);
  min-height:420px;
  margin:0 auto!important;padding:0;
  background:radial-gradient(120% 90% at 50% 0%, var(--be27-bg2) 0%, var(--be27-bg) 72%)!important;
  color:var(--be27-fg)!important;
  border-radius:var(--be27-radius);
  overflow:hidden;
  box-sizing:border-box;
  direction:rtl;
  font-family:inherit;
  font-size:14px;line-height:1.3;
  user-select:none;-webkit-user-select:none;
  -webkit-tap-highlight-color:transparent;
  display:flex!important;flex-direction:column;
}
.be27cat *,.be27cat *::before,.be27cat *::after{box-sizing:border-box}

/* The Elementor widget that hosts the viewer must take the full column width. */
.elementor-widget-shortcode:has(> .elementor-widget-container > .elementor-shortcode > .be27cat),
.elementor-widget-shortcode:has(> .elementor-shortcode > .be27cat){width:100%!important;max-width:100%!important}

/* ---- full screen (native + fallback for iOS) - above every floating widget ---- */
.be27cat:fullscreen,.be27cat.is-fsfallback{
  position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;
  border-radius:0;z-index:2147483647!important;min-height:0;margin:0!important;max-width:none!important;
}
.be27cat:fullscreen{background:var(--be27-bg)!important}
body.be27cat-lock{overflow:hidden!important}

/* ---- toolbars ---- */
.be27cat .be27cat__bar{
  flex:0 0 auto;display:flex;align-items:center;gap:8px;
  padding:10px 14px;background:var(--be27-bar);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);z-index:3;
}
.be27cat .be27cat__bar--top{border-bottom:1px solid rgba(255,255,255,.08)}
.be27cat .be27cat__bar--bottom{border-top:1px solid rgba(255,255,255,.08);padding:8px 10px 10px}
.be27cat .be27cat__title{font-weight:600;font-size:15px;color:var(--be27-fg);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-inline-end:auto}
.be27cat .be27cat__group{display:flex;align-items:center;gap:4px}

/* buttons - hardened against theme button styles */
.be27cat .be27cat__btn,.be27cat a.be27cat__btn{
  appearance:none!important;-webkit-appearance:none!important;
  border:0!important;outline:0;background:transparent!important;color:var(--be27-fg)!important;
  width:40px!important;height:40px!important;min-width:0!important;min-height:0!important;
  margin:0!important;padding:0!important;border-radius:10px!important;box-shadow:none!important;
  display:inline-flex!important;align-items:center;justify-content:center;
  cursor:pointer;transition:background .15s,opacity .15s;flex:0 0 auto;
  font:inherit!important;line-height:1!important;text-decoration:none!important;
}
.be27cat .be27cat__btn svg{width:22px!important;height:22px!important;fill:none!important;stroke:currentColor!important;stroke-width:2!important;stroke-linecap:round;stroke-linejoin:round;display:block}
.be27cat .be27cat__btn:hover,.be27cat a.be27cat__btn:hover{background:rgba(255,255,255,.12)!important;color:#fff!important}
.be27cat .be27cat__btn:active{background:rgba(255,255,255,.18)!important}
.be27cat .be27cat__btn[disabled]{opacity:.3!important;cursor:default;background:transparent!important}
.be27cat .be27cat__btn:focus-visible{outline:2px solid var(--be27-accent)!important;outline-offset:1px}
.be27cat .be27cat__btn.is-active{color:var(--be27-accent)!important}
/* page arrows in the bottom bar - larger */
.be27cat .be27cat__btn--arrow{width:46px!important;height:46px!important;background:rgba(255,255,255,.08)!important}
.be27cat .be27cat__btn--arrow svg{width:28px!important;height:28px!important;stroke-width:2.4!important}
.be27cat .be27cat__btn--arrow:hover{background:var(--be27-accent)!important}

/* page counter + go-to */
.be27cat .be27cat__pager{display:flex;align-items:center;gap:6px;font-size:14px;color:var(--be27-muted);white-space:nowrap;flex:0 0 auto}
.be27cat .be27cat__input{
  appearance:none!important;-webkit-appearance:none!important;-moz-appearance:textfield!important;
  width:60px!important;height:36px!important;min-height:0!important;margin:0!important;padding:0 4px!important;
  border-radius:9px!important;border:1px solid rgba(255,255,255,.25)!important;box-shadow:none!important;
  background:#fff!important;color:#0E1F33!important;
  font:inherit!important;font-size:16px!important;font-weight:700!important;line-height:34px!important;
  text-align:center!important;direction:ltr;
}
.be27cat .be27cat__input::placeholder{color:#3b4a5c!important;opacity:1!important;font-size:13px!important;font-weight:600!important}
.be27cat .be27cat__input::-webkit-outer-spin-button,.be27cat .be27cat__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.be27cat .be27cat__input:focus{outline:none!important;border-color:var(--be27-accent)!important;box-shadow:0 0 0 3px rgba(235,10,140,.3)!important}
.be27cat .be27cat__zoomlvl{min-width:44px;text-align:center;font-size:13px;color:var(--be27-muted);font-variant-numeric:tabular-nums}

/* ---- stage ---- */
.be27cat .be27cat__stage{position:relative;flex:1 1 auto;min-height:0;overflow:hidden;touch-action:pan-y;cursor:grab}
.be27cat .be27cat__stage.is-panning{cursor:grabbing}
.be27cat .be27cat__viewport{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;transform-origin:0 0;will-change:transform}
.be27cat .be27cat__spread{position:absolute;inset:0;margin:auto;display:flex;flex-direction:row;direction:rtl;gap:0;filter:drop-shadow(0 18px 40px rgba(0,0,0,.6))}
.be27cat .be27cat__page{position:relative;background:#fff;overflow:hidden;flex:0 0 auto;margin:0;padding:0}
.be27cat .be27cat__page img{display:block!important;width:100%!important;height:100%!important;max-width:none!important;object-fit:contain;-webkit-user-drag:none;pointer-events:none;border:0!important;border-radius:0!important;box-shadow:none!important;margin:0!important;padding:0!important}
.be27cat .be27cat__page.is-loading::after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,#eceef1 30%,#f7f8fa 50%,#eceef1 70%);background-size:200% 100%;animation:be27shimmer 1.2s linear infinite}
@keyframes be27shimmer{from{background-position:200% 0}to{background-position:-200% 0}}
.be27cat .be27cat__page--right::before,.be27cat .be27cat__page--left::before{content:"";position:absolute;top:0;bottom:0;width:7%;z-index:1;pointer-events:none}
.be27cat .be27cat__page--right::before{left:0;background:linear-gradient(to right,rgba(0,0,0,.14),rgba(0,0,0,0))}
.be27cat .be27cat__page--left::before{right:0;background:linear-gradient(to left,rgba(0,0,0,.14),rgba(0,0,0,0))}

/* big side arrows on the stage (desktop) */
.be27cat .be27cat__nav{
  appearance:none!important;position:absolute!important;top:50%;transform:translateY(-50%);z-index:2;
  width:60px!important;height:92px!important;min-width:0!important;min-height:0!important;margin:0!important;padding:0!important;
  border:0!important;border-radius:14px!important;cursor:pointer;box-shadow:0 6px 20px rgba(0,0,0,.35)!important;
  background:rgba(14,31,51,.72)!important;color:#fff!important;display:flex!important;align-items:center;justify-content:center;
  opacity:.75;transition:opacity .2s,background .15s,transform .15s;
}
.be27cat .be27cat__nav svg{width:36px!important;height:36px!important;fill:none!important;stroke:currentColor!important;stroke-width:2.6!important;stroke-linecap:round;stroke-linejoin:round;display:block}
.be27cat .be27cat__nav--next{left:16px}
.be27cat .be27cat__nav--prev{right:16px}
.be27cat .be27cat__stage:hover .be27cat__nav{opacity:1}
.be27cat .be27cat__nav:hover{background:var(--be27-accent)!important}
.be27cat .be27cat__nav[disabled]{opacity:0!important;pointer-events:none}
@media (hover:none){.be27cat .be27cat__nav{display:none!important}}

/* ---- bottom: slider ---- */
.be27cat .be27cat__slider{flex:1 1 auto;display:flex;align-items:center;gap:10px;min-width:0;padding:0 6px}
.be27cat .be27cat__range{
  -webkit-appearance:none!important;appearance:none!important;width:100%!important;height:28px!important;
  background:transparent!important;border:0!important;box-shadow:none!important;margin:0!important;padding:0!important;direction:rtl;cursor:pointer;
}
.be27cat .be27cat__range::-webkit-slider-runnable-track{height:4px;border-radius:2px;background:rgba(255,255,255,.22)}
.be27cat .be27cat__range::-moz-range-track{height:4px;border-radius:2px;background:rgba(255,255,255,.22)}
.be27cat .be27cat__range::-webkit-slider-thumb{-webkit-appearance:none;width:20px;height:20px;border-radius:50%;margin-top:-8px;background:var(--be27-accent);border:3px solid #fff;box-shadow:0 2px 8px rgba(0,0,0,.4)}
.be27cat .be27cat__range::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:var(--be27-accent);border:3px solid #fff;box-shadow:0 2px 8px rgba(0,0,0,.4)}
.be27cat .be27cat__range:focus{outline:none!important}
.be27cat .be27cat__range:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 4px rgba(235,10,140,.35)}

/* ---- thumbnails strip ---- */
.be27cat .be27cat__thumbs{flex:0 0 auto;height:0;overflow:hidden;transition:height .25s ease;background:rgba(7,22,40,.6);border-top:1px solid rgba(255,255,255,.08)}
.be27cat .be27cat__thumbs.is-open{height:124px}
.be27cat .be27cat__thumbs-scroll{position:relative;display:flex;flex-direction:row;gap:10px;padding:12px 14px;height:124px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.3) transparent}
.be27cat .be27cat__thumb{flex:0 0 auto;height:100px;aspect-ratio:var(--be27-ratio,0.707);border-radius:4px;overflow:hidden;background:#1d3550;cursor:pointer;position:relative;border:2px solid transparent;transition:border-color .15s,transform .15s}
.be27cat .be27cat__thumb img{display:block!important;width:100%!important;height:100%!important;object-fit:cover;border:0!important;border-radius:0!important;margin:0!important;box-shadow:none!important}
.be27cat .be27cat__thumb span{position:absolute;bottom:4px;left:4px;font-size:11px;line-height:1;padding:3px 5px;border-radius:4px;background:rgba(0,0,0,.65);color:#fff;direction:ltr}
.be27cat .be27cat__thumb:hover{transform:translateY(-2px)}
.be27cat .be27cat__thumb.is-current{border-color:var(--be27-accent)}

/* ---- toast ---- */
.be27cat .be27cat__toast{position:absolute;left:50%;bottom:18px;transform:translate(-50%,8px);z-index:4;background:rgba(7,22,40,.85);color:#fff;padding:8px 16px;border-radius:999px;font-size:14px;font-weight:600;opacity:0;transition:opacity .2s,transform .2s;pointer-events:none;white-space:nowrap}
.be27cat .be27cat__toast.is-show{opacity:1;transform:translate(-50%,0)}

/* ---- responsive ---- */
@media (max-width:480px){.be27cat .be27cat__title{display:none}.be27cat .be27cat__bar--top{justify-content:space-between}}
@media (max-width:720px){
  .be27cat{--be27-h:78vh;min-height:360px;border-radius:10px}
  .be27cat .be27cat__bar{padding:8px 8px;gap:4px}
  .be27cat .be27cat__title{font-size:13px}
  .be27cat .be27cat__btn{width:38px!important;height:38px!important}
  .be27cat .be27cat__btn--arrow{width:44px!important;height:44px!important}
  .be27cat .be27cat__zoomlvl,.be27cat .be27cat__hide-sm{display:none}
  .be27cat .be27cat__input{width:54px!important;height:34px!important;font-size:15px!important;line-height:32px!important}
  .be27cat .be27cat__thumbs.is-open{height:104px}
  .be27cat .be27cat__thumbs-scroll{height:104px;padding:10px}
  .be27cat .be27cat__thumb{height:82px}
}
