/* Itek Demo Viewport 2.2 — parent shell + topbar / product pills */

/* —— Parent shell only (never apply bare `html` — CSS also loads inside iframe shop) —— */
html.itek-demo-shell-html,
html.itek-demo-shell-html body.itek-demo-shell {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0f2a2c;
}

body.itek-demo-shell {
  --itek-demo-width: 390px;
  --itek-demo-duration: 450ms;
}

.itek-demo-frame {
  display: block;
  width: 100%;
  height: 100vh;
  margin: 0 auto;
  border: 0;
  background: #fff;
  transition: width var(--itek-demo-duration, 450ms) cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

body.itek-demo-shell.is-mobile .itek-demo-frame {
  width: var(--itek-demo-width, 390px);
}

/* —— Topbar pills (inside iframe shop) —— */
.itek-demo-viewport {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.itek-demo-viewport__btn svg {
  width: 12px;
  height: 11px;
}

.itkblock-container.topbar .top-middle {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.itek-demo-viewport__inner {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.itek-demo-viewport__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-family: inherit;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.itek-demo-viewport__btn:hover:not(:disabled) {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.itek-demo-viewport__btn.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.75);
}

.itek-demo-viewport__btn:disabled,
.itek-demo-viewport__btn.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.itek-demo-viewport__icon {
  flex-shrink: 0;
  display: block;
}

.itek-demo-viewport.is-hidden,
.itek-demo-viewport[hidden] {
  display: none !important;
}

/* —— Product fixed header pills (white bar) —— */
/* Theme hides ALL divs in .fiche-category-mobile__header — override with equal+ path + !important */
.fiche-category-mobile__header .itek-demo-viewport--product {
  display: none;
  flex: 0 1 auto;
  justify-content: center;
  align-items: center;
  min-width: 0;
  max-width: 55%;
}

.fiche-category-mobile__header .itek-demo-viewport--product .itek-demo-viewport__btn {
  padding: 4px 10px;
  border-color: rgba(12, 17, 21, 0.4);
  color: #0c1115;
  font-size: 9px;
  opacity: 1;
  cursor: pointer;
  pointer-events: auto;
}

.fiche-category-mobile__header .itek-demo-viewport--product .itek-demo-viewport__btn:hover:not(:disabled) {
  color: #0c1115;
  border-color: rgba(12, 17, 21, 0.75);
  background: rgba(12, 17, 21, 0.04);
}

.fiche-category-mobile__header .itek-demo-viewport--product .itek-demo-viewport__btn.is-active {
  background: rgba(12, 17, 21, 0.1);
  color: #0c1115;
  border-color: rgba(12, 17, 21, 0.8);
  font-weight: 700;
}

html.itek-demo-mobile body#product main #wrapper #content-wrapper .container.top-fiche-product .product-container .fiche-category-mobile__header .itek-demo-viewport--product {
  display: flex !important;
  pointer-events: auto;
  position: relative;
  z-index: 5;
}

html.itek-demo-mobile body#product main #wrapper #content-wrapper .container.top-fiche-product .product-container .fiche-category-mobile__header .itek-demo-viewport--product .itek-demo-viewport__inner {
  display: inline-flex !important;
  gap: 6px;
  align-items: center;
  pointer-events: auto;
}

/* Both Desktop + Mobile must look / act clickable in demo mobile product */
html.itek-demo-mobile body#product main #wrapper #content-wrapper .container.top-fiche-product .product-container .fiche-category-mobile__header .itek-demo-viewport--product .itek-demo-viewport__btn,
html.itek-demo-mobile body#product main #wrapper #content-wrapper .container.top-fiche-product .product-container .fiche-category-mobile__header .itek-demo-viewport--product .itek-demo-viewport__btn:disabled,
html.itek-demo-mobile body#product main #wrapper #content-wrapper .container.top-fiche-product .product-container .fiche-category-mobile__header .itek-demo-viewport--product .itek-demo-viewport__btn.is-disabled {
  pointer-events: auto !important;
  cursor: pointer !important;
  opacity: 1 !important;
  color: #0c1115 !important;
  border-color: rgba(12, 17, 21, 0.4) !important;
}

html.itek-demo-mobile body#product main #wrapper #content-wrapper .container.top-fiche-product .product-container .fiche-category-mobile__header .itek-demo-viewport--product .itek-demo-viewport__btn.is-active {
  background: rgba(12, 17, 21, 0.1) !important;
  border-color: rgba(12, 17, 21, 0.8) !important;
}

/* Real device / F12 (parent MQ): never show product demo switch — beats theme + narrow iframe MQ */
html.itek-demo-real-mobile .itek-demo-viewport--product,
html.itek-demo-real-mobile .itek-demo-viewport--product .itek-demo-viewport__inner,
html:not(.itek-demo-mobile) .fiche-category-mobile__header .itek-demo-viewport--product,
html:not(.itek-demo-mobile) .fiche-category-mobile__header .itek-demo-viewport--product .itek-demo-viewport__inner {
  display: none !important;
}

/* Hide topbar pills when product bar is present (demo mobile product only) */
html.itek-demo-mobile body#product:has(.itek-demo-viewport--product) .itek-demo-viewport--topbar {
  display: none !important;
}

/* Demo mobile: force lateral menu drawer (beats body #header .menu-container { position:relative }) */
html.itek-demo-mobile body #header .menu-container,
html.itek-demo-mobile .menu-container {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  overflow: visible !important;
  background-color: rgba(0, 0, 0, 0.4);
  display: block !important;
  transform: translateX(-100%);
  transition: transform ease-in-out 300ms;
}

html.itek-demo-mobile body #header .menu-container.open,
html.itek-demo-mobile .menu-container.open {
  transform: translateX(0) !important;
}

html.itek-demo-mobile .menu-container .container {
  overflow-x: visible;
  overflow-y: auto;
  margin: 0;
  width: 85%;
  max-width: 365px;
  height: 100%;
  background: #fff;
}

/* Iframe shop: demo Mobile button — same CSS as real max-width 900px, no Slick */
html.itek-demo-mobile #content-wrapper #itkblock-pub .container {
  max-width: 100%;
  padding: 0;
}

html.itek-demo-mobile #content-wrapper #itkblock-pub .itkblock-list {
  display: flex;
  gap: 11px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
}

html.itek-demo-mobile #content-wrapper #itkblock-pub .itkblock-list:active {
  cursor: grabbing;
}

html.itek-demo-mobile #content-wrapper #itkblock-pub .itkblock-list::-webkit-scrollbar {
  display: none;
}

html.itek-demo-mobile #content-wrapper #itkblock-pub .itkblock-list__item {
  flex: 0 0 95%;
  width: 95%;
  max-width: 95%;
  scroll-snap-align: start;
}
