/* ==========================================================
   FINAL HOMEPAGE PRODUCT SLIDER CENTERING
   Fixes shifted image/text while keeping arrows usable.
   Applies to TR / EN / RU / AR.
   ========================================================== */

/* Desktop/tablet horizontal layout */
@media (min-width: 981px) {
  body .products-section .slideshow-container.product-home-slider {
    position: relative !important;
    width: min(1180px, calc(100vw - 140px)) !important;
    max-width: min(1180px, calc(100vw - 140px)) !important;
    height: 430px !important;
    min-height: 430px !important;
    max-height: 430px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  body .products-section .slideshow-container.product-home-slider .slide {
    position: absolute !important;
    inset: 0 !important;

    display: grid !important;
    grid-template-columns: 560px 440px !important;
    column-gap: 58px !important;

    justify-content: center !important;
    align-items: center !important;

    width: 100% !important;
    height: 430px !important;
    min-height: 430px !important;
    max-height: 430px !important;

    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  body .products-section .slideshow-container.product-home-slider .slide.visible {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  body .products-section .slideshow-container.product-home-slider .product-slide-image-frame {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;

    width: 560px !important;
    height: 380px !important;
    min-width: 560px !important;
    min-height: 380px !important;
    max-width: 560px !important;
    max-height: 380px !important;

    margin: 0 !important;
  }

  body .products-section .slideshow-container.product-home-slider .slide .text {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;

    width: 440px !important;
    min-width: 440px !important;
    max-width: 440px !important;

    height: 380px !important;
    min-height: 380px !important;
    max-height: 380px !important;

    margin: 0 !important;
  }

  /* Arabic keeps image on the right and text on the left */
  html[lang="ar"] body .products-section .slideshow-container.product-home-slider .slide {
    direction: rtl !important;
  }

  html[lang="ar"] body .products-section .slideshow-container.product-home-slider .slide .text {
    direction: rtl !important;
    text-align: center !important;
  }
}

/* Mobile stacked layout */
@media (max-width: 980px) {
  body .products-section .slideshow-container.product-home-slider {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;

    height: auto !important;
    min-height: 720px !important;
    max-height: none !important;

    margin: 0 auto !important;
    padding: 0 46px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  body .products-section .slideshow-container.product-home-slider .slide {
    position: relative !important;
    inset: auto !important;

    display: none !important;

    width: 100% !important;
    max-width: 100% !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

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

    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    box-sizing: border-box !important;
  }

  body .products-section .slideshow-container.product-home-slider .slide.visible {
    display: block !important;
  }

  body .products-section .slideshow-container.product-home-slider .product-slide-image-frame,
  html[lang="ar"] body .products-section .slideshow-container.product-home-slider .product-slide-image-frame {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;

    width: 100% !important;
    max-width: 620px !important;

    height: 360px !important;
    min-height: 260px !important;
    max-height: 420px !important;

    margin: 0 auto 22px auto !important;
    box-sizing: border-box !important;
  }

  body .products-section .slideshow-container.product-home-slider .product-slide-image-frame img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
  }

  body .products-section .slideshow-container.product-home-slider .slide .text,
  html[lang="ar"] body .products-section .slideshow-container.product-home-slider .slide .text {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;

    width: 100% !important;
    max-width: 620px !important;
    min-width: 0 !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  html[lang="ar"] body .products-section .slideshow-container.product-home-slider .slide .text {
    direction: rtl !important;
    text-align: center !important;
  }

  body .products-section .slideshow-container.product-home-slider > .product-slider-arrow {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;

    position: absolute !important;
    top: 190px !important;
    transform: translateY(-50%) !important;
    z-index: 99999 !important;

    width: 38px !important;
    height: 56px !important;

    background: rgba(0,0,0,0.22) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 5px !important;

    font-size: 46px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  }

  body .products-section .slideshow-container.product-home-slider > .product-slider-arrow.prev {
    left: 4px !important;
    right: auto !important;
  }

  body .products-section .slideshow-container.product-home-slider > .product-slider-arrow.next {
    right: 4px !important;
    left: auto !important;
  }

  html[lang="ar"] body .products-section .slideshow-container.product-home-slider > .product-slider-arrow.prev {
    right: 4px !important;
    left: auto !important;
  }

  html[lang="ar"] body .products-section .slideshow-container.product-home-slider > .product-slider-arrow.next {
    left: 4px !important;
    right: auto !important;
  }
}

@media (max-width: 520px) {
  body .products-section .slideshow-container.product-home-slider {
    padding: 0 40px !important;
    min-height: 690px !important;
  }

  body .products-section .slideshow-container.product-home-slider .product-slide-image-frame,
  html[lang="ar"] body .products-section .slideshow-container.product-home-slider .product-slide-image-frame {
    height: 300px !important;
  }

  body .products-section .slideshow-container.product-home-slider > .product-slider-arrow {
    top: 160px !important;
  }
}
