/* --- OBECNÉ ROZVRŽENÍ A ÚPRAVY --- */

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.banner-container {
  position: relative;
  margin-bottom: 20px;
}
.banner-container::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 0;
  width: 100%;
  height: 1px;
  background-color: #ccc;
}

.customNavigation {
  text-align: center;
  margin-top: 10px;
}
.customNavigation .btn {
  display: inline-block;
  width: 30px;
  height: 30px;
  background-color: #eee;
  color: #333;
  text-align: center;
  line-height: 30px;
  margin: 0 5px;
  cursor: pointer;
  border-radius: 3px;
  transition: background-color 0.3s ease;
}
.customNavigation .btn:hover {
  background-color: #ddd;
}

.reassurance-item {
  text-align: center;
  font-size: 0.95em;
}
.reassurance-item .material-icons {
  font-size: 2em;
  color: #555;
}

#footer .block_newsletter form input[type="email"] {
  width: 100%;
  max-width: 350px;
  margin-bottom: 10px;
}
#footer .block_newsletter form .btn {
  background-color: #000;
  color: #fff;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
#footer .block_newsletter form .btn:hover {
  background-color: #333;
}

.homepage-products h2.h1 {
  font-size: 1.8em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 20px;
}

#footer .links li {
  margin-bottom: 6px;
}

#mobile_top_menu_wrapper {
  background-color: #f8f8f8;
}
#mobile_top_menu_wrapper .top-menu {
  padding: 10px;
}
#mobile_top_menu_wrapper .top-menu li a {
  padding: 10px 0;
  display: block;
  border-bottom: 1px solid #ddd;
}

.product-flags {
  margin-top: 10px;
}
.product-flag {
  font-size: 0.8em;
  padding: 4px 6px;
}


/* --- PRODUKTOVÉ OBRÁZKY – FADE IN + LUPA --- */

/* Fade + transform efekt */
.js-main-image {
  opacity: 0;
  transition: opacity 3.2s ease, transform 0.6s ease;
  width: 100%;
  display: block;
  object-fit: contain;
  max-width: 100%;
  will-change: transform, opacity;
}

.js-main-image.loaded {
  opacity: 1;
}

.js-main-image:hover {
  transform: scale(1.03);
}

/* Interaktivní lupa */
.image-zoom-container {
  position: relative;
  overflow: hidden;
}

.image-zoom-container .js-main-image {
  transform-origin: center center;
  transition: transform 0.3s ease-out;
}

.image-zoom-container:hover .js-main-image {
  transform: scale(2);
  cursor: zoom-in;
}

.image-zoom-container:active .js-main-image {
  cursor: zoom-out;
}

.vr-product {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 16px;
}

.vr-faq h4 {
  margin-top: 18px;
}

.vr-faq p {
  margin-bottom: 12px;
}


/* =========================================================
   PRODUCT PAGE – MOBILE LANDSCAPE (Artistic/PS8)
   - layout pod sebe
   - thumbnails vždy viditelné (horiz. scroll)
========================================================= */
@media (max-width: 991px) and (orientation: landscape) {

  /* 1) Layout pod sebe */
  #product #main .row,
  #product #main .product-container,
  #product #main .product-content {
    display: flex !important;
    flex-direction: column !important;
  }

  /* 2) Sloupce na 100% */
  #product #main #content-wrapper,
  #product #main .images-container,
  #product #main .product-information,
  #product #main .product-left,
  #product #main .product-right {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
  }

  /* 3) Zrušit sticky/fixed */
  #product #main .product-information,
  #product #main .product-actions,
  #product #main .product-prices {
    position: static !important;
    top: auto !important;
  }

  /* 4) Neořezávat galerii */
  #product #main .images-container,
  #product #main .product-cover,
  #product #main .product-cover-container {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
  }

  /* 5) Hlavní fotka – aby zbylo místo na náhledy */
  #product #main .product-cover img,
  #product #main .js-main-image {
    width: 100% !important;
    height: auto !important;
    max-height: 55vh !important;
    object-fit: contain !important;
  }

  /* 6) THUMBNAILS – pokrytí více variant tříd v Artisticu */
  #product #main .js-qv-mask,
  #product #main .product-images,
  #product #main .thumbnails,
  #product #main #thumb-gallery,
  #product #main .product-thumbs,
  #product #main .thumbs {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;

    margin-top: 10px !important;
    padding-bottom: 6px !important;
  }

  #product #main .product-images > li,
  #product #main .thumbnails > li,
  #product #main .thumb-container,
  #product #main #thumb-gallery a,
  #product #main .product-thumbs a,
  #product #main .thumbs a {
    display: inline-block !important;
    vertical-align: top !important;
    margin-left: 8px !important;
  }

  #product #main .product-images img,
  #product #main .thumbnails img,
  #product #main .thumb-container img,
  #product #main #thumb-gallery img,
  #product #main .product-thumbs img,
  #product #main .thumbs img {
    height: 58px !important;
    width: auto !important;
    max-width: none !important;
    object-fit: cover !important;
  }
}

/* =========================================================
   FIX: Product gallery + layout glitches on mobile/tablet
   - vypnout zoom/lupu na touch (řeší překryvy)
   - thumbnails vždy viditelné i v mezibodech
========================================================= */

/* 1) Na dotykových zařízeních vypni lupu/hover zoom (dělá překryvy) */
@media (hover: none), (pointer: coarse) {
  .image-zoom-container { overflow: visible !important; }
  .image-zoom-container:hover .js-main-image { transform: none !important; }
  .js-main-image:hover { transform: none !important; }
}

/* 2) Produkt: zabránit překryvům mezi sloupci v problematických šířkách */
@media (max-width: 991px) {
  #product #main .row,
  #product #main .product-container,
  #product #main .product-content {
    display: flex !important;
    flex-direction: column !important;
  }

  #product #main .images-container,
  #product #main .product-information,
  #product #main #content-wrapper,
  #product #main .product-left,
  #product #main .product-right {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    position: static !important;
  }

  /* Kdyby něco mělo z-index a lezlo přes galerii */
  #product #main .images-container { z-index: 1 !important; }
  #product #main .product-information { z-index: 2 !important; }
}

/* 3) Thumbnails: vynutit zobrazení napříč variantami wrapperů */
@media (max-width: 991px) {
  #product #main .js-qv-mask,
  #product #main .product-images,
  #product #main .thumbnails,
  #product #main #thumb-gallery,
  #product #main .product-thumbs,
  #product #main .thumbs {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;

    margin-top: 10px !important;
    padding-bottom: 6px !important;
  }

  #product #main .product-images > li,
  #product #main .thumbnails > li,
  #product #main .thumb-container,
  #product #main #thumb-gallery a,
  #product #main .product-thumbs a,
  #product #main .thumbs a {
    display: inline-block !important;
    vertical-align: top !important;
    margin-left: 8px !important;
  }

  #product #main .product-images img,
  #product #main .thumbnails img,
  #product #main .thumb-container img,
  #product #main #thumb-gallery img,
  #product #main .product-thumbs img,
  #product #main .thumbs img {
    height: 58px !important;
    width: auto !important;
    max-width: none !important;
    object-fit: cover !important;
  }
}

/* ===== Artistic: vynutit bílé pozadí u všech rozbalovaček ===== */

/* Bootstrap dropdown */
.dropdown-menu,
.dropdown-menu.show,
#header .dropdown-menu,
#header .dropdown-menu.show {
  background: #fff !important;
  background-color: #fff !important;
  background-image: none !important;
  opacity: 1 !important;
  border: 1px solid rgba(0,0,0,.12) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.15) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Artistic často používá popover */
.popover,
.popover-body,
.popover-content {
  background: #fff !important;
  background-color: #fff !important;
  background-image: none !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(0,0,0,.12) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.15) !important;
}

/* Když je "sklo" dělané přes pseudo-element */
.dropdown-menu::before,
.dropdown-menu::after,
.popover::before,
.popover::after {
  background: #fff !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Položky uvnitř (ať nejsou průhledné) */
.dropdown-menu a,
.dropdown-menu .dropdown-item,
.popover a,
.popover .dropdown-item {
  background-color: #fff !important;
  color: #111 !important;
}

.dropdown-menu a:hover,
.dropdown-menu .dropdown-item:hover,
.popover a:hover,
.popover .dropdown-item:hover {
  background-color: #f2f2f2 !important;
}

/* ===== FINAL MOBILE CENTER FIX: qty + Add To Cart ===== */
@media (max-width: 768px) {
  #product #add-to-cart-or-refresh .product-add-to-cart {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }

  #product #add-to-cart-or-refresh .product-quantity {
    display: grid !important;
    grid-template-columns: 84px minmax(220px, 320px) !important;
    column-gap: 10px !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    max-width: calc(100vw - 32px) !important;
    margin: 0 auto !important;
  }

  #product #add-to-cart-or-refresh .product-quantity .qty,
  #product #add-to-cart-or-refresh .product-quantity .add {
    margin: 0 !important;
    float: none !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  #product #add-to-cart-or-refresh .product-quantity .add button.add-to-cart {
    width: 100% !important;
    height: 52px !important;
    line-height: 52px !important;
    margin-top: 0 !important;
    display: block !important;
  }

  #product #add-to-cart-or-refresh .bootstrap-touchspin {
    margin-bottom: 0 !important;
  }
}

/* CMS mobil: zrušit levý sloupec + přidat okraje */
@media (max-width: 768px) {
  body.page-cms.layout-left-column #left-column {
    display: none !important;
  }

  body.page-cms.layout-left-column #columns_inner {
    display: block !important;
  }

  body.page-cms.layout-left-column #content-wrapper {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding-right: 16px !important;
    padding-left: 16px !important;
    margin: 0 !important;
  }

  body.page-cms #main #content.page-content,
  body.page-cms #main .page-header,
  body.page-cms #main .breadcrumb {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  body.page-cms #main #content.page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
}

/* Fix: order return reason textarea hidden on order detail page */
.page-order-detail #order-return-form textarea[name="returnText"],
.page-order-detail .js-order-return-form textarea.form-control {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 120px !important;
  width: 100% !important;
  max-width: 100% !important;
  border: 1px solid #cfcfcf !important;
  background: #fff !important;
  padding: 10px 12px !important;
  resize: vertical !important;
}

.page-order-detail #order-return-form .form-footer,
.page-order-detail #order-return-form button[name="submitReturnMerchandise"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Fix: guest order tracking inputs hidden on the guest tracking page */
#guestOrderTrackingForm input[name="order_reference"],
#guestOrderTrackingForm input[name="email"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: 44px !important;
  min-height: 44px !important;
  width: 100% !important;
  max-width: 100% !important;
  border: 1px solid #cfcfcf !important;
  background: #fff !important;
  color: #333 !important;
  padding: 8px 12px !important;
}
