/* ==========================================
   MAIN SLIDER
========================================== */

.iws3d26 {
  --navy: #011240;
  --orange: #FF6400;
  --card-w: 330px;
  --card-h: 450px;

  position: relative;
  width: 100%;
  max-width: none;
  overflow: hidden;

  padding: 16px 0 26px;

  background: linear-gradient(
    180deg,
    #f3f4f9 0%,
    #eceef4 73%,
    #ffffff 100%
  );

  font-family: Arial, sans-serif;
  isolation: isolate;
  box-sizing: border-box;
}

.iws3d26,
.iws3d26 *,
.iws3d26 *::before,
.iws3d26 *::after,
.iws3d-modal,
.iws3d-modal *,
.iws3d-modal *::before,
.iws3d-modal *::after {
  box-sizing: border-box;
}

/* ==========================================
   3D STAGE
========================================== */

.iws3d26 .iws3d-stage {
  position: relative;

  width: 100%;
  max-width: 1580px;
  height: 615px;

  margin: auto;

  perspective: 1800px;
  perspective-origin: center 48%;
  transform-style: preserve-3d;
  isolation: isolate;

  touch-action: pan-y;
}

.iws3d26 .iws3d-stage::before {
  content: "";
  position: absolute;

  left: 9%;
  bottom: 54px;

  width: 82%;
  height: 38px;

  background: rgba(1, 18, 64, .16);
  filter: blur(32px);

  border-radius: 50%;
  pointer-events: none;
}

/* ==========================================
   3D CARDS
========================================== */

.iws3d26 .iws3d-card {
  --x: 0px;
  --z: 0px;
  --angle: 0deg;
  --scale: 1;

  position: absolute;
  left: 50%;
  top: 50%;

  width: var(--card-w);
  height: var(--card-h);

  transform:
    translate(-50%, -50%)
    translate3d(var(--x), 0, var(--z))
    rotateY(var(--angle))
    scale(var(--scale));

  transform-origin: center center;
  backface-visibility: hidden;

  transition:
    transform .75s cubic-bezier(.2, .7, .28, 1),
    opacity .6s ease,
    border-color .25s ease;

  border: 1px solid #ffffff !important;
  border-radius: 5px;

  background: #ffffff;
  overflow: hidden;

  box-shadow:
    0 19px 38px rgba(0, 0, 0, .15),
    0 40px 64px rgba(0, 0, 0, .08);

  cursor: pointer;
  outline: none;
}

.iws3d26 .iws3d-card:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* Screenshot viewport inside the optional device frame. */
.iws3d26 .iws3d-device,
.iws3d26 .iws3d-device-screen {
  position: relative;
  width: 100%;
  height: 100%;
}
.iws3d26 .iws3d-device-screen {
  overflow: hidden;
  background: #fff;
}
.iws3d26 .iws3d-device-island,
.iws3d26 .iws3d-device-side,
body > .iws3d-modal .iws3d-modal-island,
body > .iws3d-modal .iws3d-modal-side {
  display: none;
}

/* ==========================================
   IMAGE QUALITY
========================================== */

.iws3d26 .iws3d-card img {
  display: block !important;

  width: 100% !important;
  height: auto !important;

  max-width: none !important;
  max-height: none !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  border-radius: 0 !important;

  object-fit: contain !important;
  object-position: top center;

  image-rendering: auto;

  filter: none !important;
  opacity: 1 !important;

  transform: none !important;

  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* ==========================================
   iPHONE-STYLE MOBILE PREVIEW — 3D CARDS
   Entirely CSS: no external mockup images.
========================================== */

.iws3d26.is-mobile-mode {
  --card-w: 232px;
  --card-h: 455px;
}

/* Remove the old rectangular picture-frame appearance. */
.iws3d26.is-mobile-mode .iws3d-card,
.iws3d26.is-mobile-mode .iws3d-card.is-selected,
.iws3d26.is-mobile-mode .iws3d-card.is-hovered {
  overflow: visible;
  border: 0 !important;
  border-radius: 42px;
  background: transparent;
  box-shadow: none;
}

.iws3d26.is-mobile-mode .iws3d-device {
  padding: 9px 7px;
  border: 4px solid #171c26;
  border-radius: 43px;
  background: linear-gradient(145deg, #747d8d 0%, #252c37 13%, #080b12 46%, #131923 85%, #5f6877 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.30),
    inset 0 0 0 1px rgba(227,233,243,.30),
    0 18px 42px rgba(1,18,64,.29);
}

.iws3d26.is-mobile-mode .iws3d-device-screen {
  width: 100%;
  height: 100%;
  border: 1px solid #080c15;
  border-radius: 33px;
  overflow: hidden;
  background: #fff;
}

.iws3d26.is-mobile-mode .iws3d-device-screen img {
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: top center;
  border-radius: 0 !important;
}

/* Dynamic Island and a small camera lens. */
.iws3d26.is-mobile-mode .iws3d-device-island {
  display: block;
  position: absolute;
  z-index: 3;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 36%;
  max-width: 84px;
  height: 20px;
  border-radius: 14px;
  background: #05070b;
  border: 1px solid #171b25;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.iws3d26.is-mobile-mode .iws3d-device-island::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #162f4c;
  box-shadow: inset 0 0 0 1px #04070c;
}

/* Slim volume/power buttons on the device sides. */
.iws3d26.is-mobile-mode .iws3d-device-side {
  display: block;
  position: absolute;
  z-index: 2;
  width: 4px;
  border-radius: 3px;
  background: linear-gradient(#697382, #202733);
  pointer-events: none;
}
.iws3d26.is-mobile-mode .iws3d-device-side--left {
  left: -7px;
  top: 84px;
  height: 51px;
}
.iws3d26.is-mobile-mode .iws3d-device-side--right {
  right: -7px;
  top: 114px;
  height: 58px;
}
.iws3d26.is-mobile-mode .iws3d-card:is(.is-hovered,.is-selected) .iws3d-device {
  box-shadow:
    0 0 0 2px rgba(255,100,0,.85),
    inset 0 0 0 1px rgba(227,233,243,.30),
    0 24px 56px rgba(1,18,64,.35);
}

/* ==========================================
   HOVER EFFECT
========================================== */

.iws3d26 .iws3d-card.is-hovered {
  transform:
    translate(-50%, -50%)
    translate3d(var(--x), -10px, 315px)
    rotateY(0deg)
    scale(1.05) !important;

  z-index: 200 !important;
  opacity: 1 !important;

  border: 1px solid var(--orange) !important;

  box-shadow: 0 25px 60px rgba(1,18,64,.27);
}

/* ==========================================
   SELECTED CARD
========================================== */

.iws3d26 .iws3d-card.is-selected {
  transform:
    translate(-50%, -50%)
    translate3d(0, 0, 320px)
    rotateY(0deg)
    scale(1.03) !important;

  z-index: 210 !important;
  opacity: 1 !important;

  border: 1px solid var(--orange) !important;
}


/* ==========================================
   SLIDER BUTTONS
========================================== */

.iws3d26 .iws3d-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;

  gap: 12px;

  position: relative;
  z-index: 300;

  margin: -12px auto 0;
  padding: 8px 12px 20px;
}

.iws3d26 .iws3d-actions[hidden] {
  display: none !important;
}

.iws3d26 .iws3d-actions button {
  appearance: none;

  border: 1px solid var(--navy);
  border-radius: 40px;

  padding: 12px 22px;
  min-width: 130px;

  background: var(--navy);
  color: #ffffff;

  font: 700 14px Arial, sans-serif;

  cursor: pointer;

  transition:
    transform .25s ease,
    box-shadow .25s ease;
}

.iws3d26 .iws3d-actions .iws3d-mobile {
  background: var(--orange);
  border-color: var(--orange);
}

.iws3d26 .iws3d-actions .iws3d-reset {
  background: #ffffff;
  color: var(--navy);
}

.iws3d26 .iws3d-actions button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(1,18,64,.18);
}

/* ==========================================
   FULL SCREEN OVERLAY
========================================== */

body > .iws3d-modal[hidden] {
  display: none !important;
}

body > .iws3d-modal {
  position: fixed !important;
  inset: 0 !important;

  width: 100vw;
  height: 100vh;
  height: 100dvh;

  z-index: 2147483647 !important;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 22px;

  isolation: isolate;
  font-family: Arial, sans-serif;
}

body > .iws3d-modal .iws3d-backdrop {
  position: absolute;
  inset: 0;

  background: rgba(1,10,32,.95);
  backdrop-filter: blur(5px);
}

/* ==========================================
   FULL SCREEN PANEL
========================================== */

body > .iws3d-modal .iws3d-modal-panel {
  position: relative;
  z-index: 2;

  width: min(100%, 1200px);
  height: min(100%, 900px);

  display: flex;
  flex-direction: column;

  min-width: 0;
  min-height: 0;

  background: #ffffff;

  border-radius: 12px;
  overflow: hidden;

  box-shadow: 0 20px 70px rgba(0,0,0,.45);
}

/* ==========================================
   TOOLBAR — ONLY CLOSE BUTTON
========================================== */

body > .iws3d-modal .iws3d-preview-toolbar {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;

  flex: 0 0 auto;

  padding: 10px 15px !important;
  background: #011240 !important;
}

body > .iws3d-modal .iws3d-modal-close {
  appearance: none;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: #FF6400 !important;
  color: #ffffff !important;

  border: 1px solid #FF6400 !important;
  border-radius: 6px !important;

  padding: 10px 22px !important;

  font: 700 14px Arial, sans-serif !important;
  line-height: 1.3 !important;

  cursor: pointer;

  transition:
    background .2s ease,
    transform .2s ease;
}

body > .iws3d-modal .iws3d-modal-close:hover {
  background: #e65a00 !important;
  transform: translateY(-1px);
}

body > .iws3d-modal .iws3d-modal-close:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* Shared full-screen screenshot wrapper (desktop view). */
body > .iws3d-modal .iws3d-preview-device {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  background: #fff;
  overflow: hidden;
}

/* ==========================================
   FULL SCREEN IMAGE — SCROLLABLE
========================================== */

body > .iws3d-modal .iws3d-preview-scroll {
  display: block;

  width: 100%;
  flex: 1 1 auto;

  min-height: 0;

  overflow-x: auto !important;
  overflow-y: auto !important;

  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;

  background: #ffffff;
}

body > .iws3d-modal .iws3d-preview-scroll img {
  display: block !important;

  width: 100% !important;
  height: auto !important;

  max-width: none !important;
  max-height: none !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  border-radius: 0 !important;

  object-fit: contain !important;
  object-position: top center;

  image-rendering: auto;

  transform: none !important;
  filter: none !important;
}

/* ==========================================
   iPHONE-STYLE FULL-SCREEN PREVIEW
========================================== */

body > .iws3d-modal.is-phone .iws3d-modal-panel {
  width: min(450px, calc(100vw - 28px));
  height: min(900px, calc(100dvh - 30px));
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

/* Keep the only preview action outside the handset screen. */
body > .iws3d-modal.is-phone .iws3d-preview-toolbar {
  flex: 0 0 auto;
  padding: 0 12px 10px !important;
  background: transparent !important;
}

body > .iws3d-modal.is-phone .iws3d-preview-device {
  width: min(402px, 100%);
  margin: 0 auto;
  padding: 13px 9px 9px;
  min-height: 0;
  border: 4px solid #151a23;
  border-radius: 52px;
  background: linear-gradient(140deg, #747d8b 0%, #29313c 10%, #070a10 45%, #141a23 84%, #505966 100%);
  overflow: visible;
  box-shadow:
    inset 0 0 0 1px rgba(233,238,247,.37),
    0 25px 65px rgba(0,0,0,.55);
}

body > .iws3d-modal.is-phone .iws3d-modal-island {
  display: block;
  position: absolute;
  left: 50%;
  top: 17px;
  transform: translateX(-50%);
  z-index: 5;
  width: min(33%, 120px);
  height: 27px;
  border-radius: 16px;
  background: #05070b;
  border: 1px solid #1a1f28;
  pointer-events: none;
  box-shadow: 0 2px 5px rgba(0,0,0,.32);
}
body > .iws3d-modal.is-phone .iws3d-modal-island::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #152f4c;
}
body > .iws3d-modal.is-phone .iws3d-modal-side {
  position: absolute;
  display: block;
  z-index: 2;
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(#77818e,#262e3b);
  pointer-events: none;
}
body > .iws3d-modal.is-phone .iws3d-modal-side--left {
  left: -8px;
  top: 112px;
  height: 73px;
}
body > .iws3d-modal.is-phone .iws3d-modal-side--right {
  right: -8px;
  top: 152px;
  height: 78px;
}

body > .iws3d-modal.is-phone .iws3d-preview-scroll {
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 40px;
  border: 1px solid #090e17;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: none;
}
body > .iws3d-modal.is-phone .iws3d-preview-scroll::-webkit-scrollbar {
  display: none;
}
body > .iws3d-modal.is-phone .iws3d-preview-scroll img {
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
}

/* ==========================================
   TABLET
========================================== */

@media (max-width: 1024px) {

  .iws3d26 {
    --card-w: 260px;
    --card-h: 370px;
  }

  .iws3d26 .iws3d-stage {
    height: 510px;
    perspective: 1500px;
  }

  .iws3d26.is-mobile-mode {
    --card-w: 205px;
    --card-h: 398px;
  }

}

/* ==========================================
   MOBILE RESPONSIVE
========================================== */

@media (max-width: 767px) {

  .iws3d26 {
    --card-w: 200px;
    --card-h: 290px;

    padding: 15px 0 24px;
  }

  .iws3d26 .iws3d-stage {
    height: 395px;
    perspective: 1100px;
  }

  .iws3d26.is-mobile-mode {
    --card-w: 175px;
    --card-h: 350px;
  }

  .iws3d26.is-mobile-mode .iws3d-stage {
    height: 450px;
  }

  .iws3d26.is-mobile-mode .iws3d-card {
    border-radius: 19px;
  }

  .iws3d26 .iws3d-card.is-hovered {
    transform:
      translate(-50%, -50%)
      translate3d(var(--x), -7px, 120px)
      rotateY(0deg)
      scale(1.02) !important;
  }

  .iws3d26 .iws3d-card.is-selected {
    transform:
      translate(-50%, -50%)
      translate3d(0, 0, 155px)
      rotateY(0deg)
      scale(1.02) !important;
  }

  .iws3d26 .iws3d-actions {
    gap: 8px;
    margin-top: 0;
  }

  .iws3d26 .iws3d-actions button {
    min-width: 0;
    padding: 10px 12px;
    font-size: 12px;
  }

  body > .iws3d-modal {
    padding: 12px;
  }

  body > .iws3d-modal .iws3d-modal-panel {
    width: 100%;
    height: 100%;
  }

  body > .iws3d-modal .iws3d-preview-toolbar {
    padding: 9px 12px !important;
  }

  body > .iws3d-modal .iws3d-modal-close {
    padding: 9px 16px !important;
    font-size: 12px !important;
  }

  body > .iws3d-modal.is-phone .iws3d-modal-panel {
    width: min(420px, calc(100vw - 24px));
    height: calc(100dvh - 24px);
  }
  body > .iws3d-modal.is-phone .iws3d-preview-device {
    border-radius: 44px;
  }
  body > .iws3d-modal.is-phone .iws3d-preview-scroll {
    border-radius: 33px;
  }

}

@media (prefers-reduced-motion: reduce) {

  .iws3d26 .iws3d-card {
    transition: none;
  }

}