/* Orthexa standalone layout — must override owl + porto has-ccols */

/* ── Force carousels visible (owl default: display:none) ── */
.product-image-slider.owl-carousel,
.product-thumbs-slider.owl-carousel,
.vt-track.owl-carousel {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* ── MAIN GALLERY: one image, not vertical stack ── */
.product-layout-default .product-images,
.woocommerce-product-gallery .product-images {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
}

.orthexa-gallery-main {
  position: relative !important;
  width: 100% !important;
}

.product-image-slider,
div.product-image-slider.owl-carousel {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  overflow: hidden !important;
  flex-wrap: nowrap !important;
}

.product-image-slider .owl-nav {
  display: none !important;
}

/* Kill porto has-ccols flex-wrap stack */
.product-image-slider.has-ccols,
.product-image-slider.has-ccols:not(.owl-loaded),
.product-image-slider.owl-carousel.has-ccols {
  display: block !important;
  flex-wrap: nowrap !important;
  overflow: hidden !important;
}

.product-image-slider .owl-stage-outer {
  overflow: hidden !important;
  width: 100% !important;
}

.product-image-slider .owl-stage {
  display: flex !important;
  width: 100% !important;
  transform: none !important;
  transition: none !important;
}

.product-image-slider .owl-item {
  width: 100% !important;
  flex: 0 0 100% !important;
  float: none !important;
}

/* Hide all slides by default */
.product-image-slider > .img-thumbnail,
.product-image-slider > .vd-image,
.product-image-slider .owl-item,
.product-image-slider .owl-item > .img-thumbnail,
.product-image-slider .owl-item > .vd-image,
.product-image-slider .owl-item .img-thumbnail,
.product-image-slider .owl-item .vd-image {
  display: none !important;
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
  float: none !important;
}

/* No-JS fallback: first slide only before gallery JS runs */
.product-image-slider:not(.orthexa-gallery-ready) > .img-thumbnail:first-child,
.product-image-slider:not(.orthexa-gallery-ready) > .vd-image:first-child {
  display: block !important;
}

/* Gallery ready: only active slide visible (fixes stacked photos on arrow click) */
.product-image-slider.orthexa-gallery-ready > .img-thumbnail:not(.gallery-slide-active),
.product-image-slider.orthexa-gallery-ready > .vd-image:not(.gallery-slide-active) {
  display: none !important;
}

.product-image-slider.orthexa-gallery-ready > .gallery-slide-active,
.product-image-slider.orthexa-gallery-ready > .img-thumbnail.gallery-slide-active,
.product-image-slider.orthexa-gallery-ready > .vd-image.gallery-slide-active {
  display: block !important;
  position: relative !important;
  width: 100% !important;
}

/* JS / owl active slide (legacy) */
.product-image-slider > .gallery-slide-active,
.product-image-slider > .img-thumbnail.gallery-slide-active,
.product-image-slider > .vd-image.gallery-slide-active,
.product-image-slider .owl-item.gallery-slide-active,
.product-image-slider .owl-item.active,
.product-image-slider .owl-item.gallery-slide-active > *,
.product-image-slider .owl-item.active > * {
  display: block !important;
}

.product-image-slider img,
.product-image-slider video {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  border-radius: 8px;
}

/* ── THUMBNAILS: horizontal grid ── */
.product-thumbnails {
  width: 100% !important;
  margin-top: 12px !important;
}

.product-thumbs-slider,
.product-thumbs-slider.has-ccols,
.product-thumbs-slider.owl-carousel,
.product-thumbs-slider.has-ccols:not(.owl-loaded) {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 !important;
  overflow: visible !important;
}

.product-thumbs-slider .owl-stage-outer,
.product-thumbs-slider .owl-stage {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  width: 100% !important;
  transform: none !important;
}

.product-thumbs-slider .owl-item {
  width: auto !important;
  flex: none !important;
  float: none !important;
  display: block !important;
}

.product-thumbs-slider > .img-thumbnail,
.product-thumbs-slider .owl-item > .img-thumbnail,
.product-thumbs-slider .owl-item .img-thumbnail {
  display: block !important;
  flex: 0 0 calc(16.666% - 7px) !important;
  width: calc(16.666% - 7px) !important;
  max-width: calc(16.666% - 7px) !important;
  height: auto !important;
  aspect-ratio: 1;
  padding: 2px !important;
  margin: 0 !important;
  cursor: pointer;
  overflow: hidden;
  border: 2px solid #e5e5e5;
  border-radius: 6px;
  box-sizing: border-box;
}

.product-thumbs-slider > .img-thumbnail.gallery-thumb-active,
.product-thumbs-slider .owl-item > .img-thumbnail.gallery-thumb-active {
  border-color: #111 !important;
}

.product-thumbs-slider .img-thumbnail img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

@media (max-width: 767px) {
  .product-thumbs-slider > .img-thumbnail,
  .product-thumbs-slider .owl-item > .img-thumbnail {
    flex: 0 0 calc(25% - 6px) !important;
    width: calc(25% - 6px) !important;
    max-width: calc(25% - 6px) !important;
  }
}

/* Gallery arrows — centered on main image only (not thumbnails) */
.orthexa-gallery-main .gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 12;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: #333;
  margin: 0;
  padding: 0;
}

.orthexa-gallery-main .gallery-nav-btn.prev { left: 15px; }
.orthexa-gallery-main .gallery-nav-btn.next { right: 15px; }

/* ── Top product row: gallery 42% | info 58% ── */
.elementor-271 .elementor-element-5cdad68 > .elementor-container {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
}

@media (min-width: 768px) {
  .elementor-271 .elementor-element-50936f1 {
    flex: 0 0 41.666% !important;
    width: 41.666% !important;
    max-width: 41.666% !important;
  }

  .elementor-271 .elementor-element-0889898 {
    flex: 0 0 58.334% !important;
    width: 58.334% !important;
    max-width: 58.334% !important;
  }
}

/* ── Content blocks image+text ── */
.elementor-410 .e-con > .e-con-inner {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 24px;
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
}

.elementor-410 .elementor-element-8da95fc > .e-con-inner {
  flex-direction: row-reverse !important;
  margin-top: 30px;
}

.elementor-410 .elementor-element-f08d28f > .e-con-inner,
.elementor-410 .elementor-element-c2b7627 > .e-con-inner,
.elementor-410 .elementor-element-c1fd494 > .e-con-inner,
.elementor-410 .elementor-element-eb95ef0 > .e-con-inner {
  flex-direction: row !important;
  margin-top: 75px;
}

@media (min-width: 768px) {
  .elementor-410 .elementor-element-35e2c28,
  .elementor-410 .elementor-element-f420200,
  .elementor-410 .elementor-element-92394b9,
  .elementor-410 .elementor-element-bfb23f3,
  .elementor-410 .elementor-element-3f6279e {
    flex: 0 0 70% !important;
    max-width: 70% !important;
    width: 70% !important;
  }

  .elementor-410 .elementor-element-51590d2,
  .elementor-410 .elementor-element-a3b958b,
  .elementor-410 .elementor-element-34cb691,
  .elementor-410 .elementor-element-e95fedf,
  .elementor-410 .elementor-element-8aa607b {
    flex: 1 1 0 !important;
    max-width: none !important;
    width: auto !important;
    min-width: 0 !important;
  }
}

/* Match original full-bleed images in content blocks */
.elementor-410 .content-image-mobile-full > .elementor-widget-container {
  overflow: visible !important;
}

.elementor-410 .content-image-mobile-full img,
.elementor-410 .content-image-mobile-full video {
  width: calc(100% + 40px) !important;
  margin-left: -20px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  max-width: none !important;
  height: auto !important;
}

.elementor-410 .elementor-widget-image:not(.content-image-mobile-full) img {
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  width: 100%;
  height: auto;
}

@media (max-width: 767px) {
  .elementor-410 .elementor-element-8da95fc > .e-con-inner,
  .elementor-410 .elementor-element-f08d28f > .e-con-inner,
  .elementor-410 .elementor-element-c2b7627 > .e-con-inner {
    flex-direction: row !important;
    margin-top: 30px;
  }

  .elementor-410 .elementor-element-c1fd494 > .e-con-inner {
    flex-direction: column !important;
    margin-top: 30px;
  }

  .elementor-410 .elementor-element-eb95ef0 > .e-con-inner {
    flex-direction: column-reverse !important;
    margin-top: 30px;
  }

  .elementor-410 .e-con.e-child {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* ── Nasi klienci ── */
.slider-wrapper.is-loading,
.slider-wrapper {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.vt-slider {
  position: relative;
  padding: 0 30px;
}

.vt-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.vt-viewport::-webkit-scrollbar { display: none; }

.vt-track,
.vt-track.owl-carousel {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 15px !important;
  width: max-content !important;
}

.vt-track .owl-stage-outer,
.vt-track .owl-stage {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 15px !important;
  width: max-content !important;
  transform: none !important;
}

.vt-track .owl-item {
  width: auto !important;
  flex: none !important;
  display: block !important;
}

.vt-item {
  flex: 0 0 auto;
  width: 220px;
  scroll-snap-align: start;
}

@media (min-width: 768px) {
  .vt-item { width: 260px; }
}

.vt-media {
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.vt-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vt-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #eee;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.vt-prev { left: 0; }
.vt-next { right: 0; }

/* Accordion */
.e-n-accordion details summary {
  cursor: pointer;
  list-style: none;
}

.e-n-accordion details[open] .e-closed { display: none; }
.e-n-accordion details:not([open]) .e-opened { display: none; }

/* ── Reviews grid: show cards when colcade / fallback runs ── */
.cr-reviews-grid-inner.orthexa-reviews-ready,
.cr-reviews-grid-inner.cr-colcade-loaded {
  display: flex !important;
}

.cr-reviews-grid-inner.orthexa-reviews-ready .cr-review-card,
.cr-reviews-grid-inner.cr-colcade-loaded .cr-review-card {
  display: block !important;
  visibility: visible !important;
}
