/********************************************************
			Coderplace Custom Styles
********************************************************/
.tm-carousel {
  display: none;
  position: relative;
  float: left;
  width: 100%;
  margin: 0;
}
.cp-carousel {
  display: none;
  position: relative;
  float: left;
  width: 100%;
  margin: 0;
}
.owl-carousel .owl-wrapper {
  display: none;
  position: relative;
  -webkit-transform: translate3d(0px, 0px, 0px);
  -ms-transform: translate3d(0px, 0px, 0px);
  -o-transform: translate3d(0px, 0px, 0px);
  -moz-transform: translate3d(0px, 0px, 0px);
  display: flex!important;
  flex-wrap: wrap;
}
.owl-carousel .owl-wrapper:after {
  content: ".";
  display: block;
  clear: both;
  visibility: hidden;
  line-height: 0;
  height: 0;
}
.owl-carousel .owl-wrapper-outer {
  overflow-x: clip;
  position: relative;
  float: left;
  width: 100%;
  padding: 0;
}

.owl-carousel .owl-wrapper-outer.autoHeight {
  -webkit-transition: height 500ms ease-in-out;
  -moz-transition: height 500ms ease-in-out;
  -ms-transition: height 500ms ease-in-out;
  -o-transition: height 500ms ease-in-out;
  transition: height 500ms ease-in-out;
}
.owl-carousel .owl-item {  
  float: left;
  display: flex;
  height: auto;
}
.owl-carousel .owl-item .manu_image a {
  display: inline-block;
}
.owl-carousel .owl-item .manu_image a img {
  max-width: 100%;
}

.owl-carousel .owl-wrapper,
.owl-carousel .owl-item {
  /* fix */
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  -ms-backface-visibility: hidden;
  -webkit-transform: translate3d(0, 0, 0);
  -moz-transform: translate3d(0, 0, 0);
  -ms-transform: translate3d(0, 0, 0);
  text-align: center;
}

/* mouse grab icon */
.customNavigation {
	position: absolute;
	z-index: 9;
	width: 100%;
	top: 50%;
	direction: ltr !important;
	right: 0;
	left: auto;
  opacity: 0;
  -khtml-opacity: 0;
-webkit-opacity: 0;
-moz-opacity: 0;
}
.products .customNavigation {
	top: 48%;
}
.tmcategorylist .customNavigation{
	top: 54%;
}
.tmcategorylist:hover .customNavigation {
	opacity: 1;
	-khtml-opacity: 1;
	-webkit-opacity: 1;
	-moz-opacity: 1;
}
.testimonial-block-part .customNavigation{
  display: none;
}
.testimonial-block-part .owl-theme .owl-controls{
  display: block !important;
  width: 100%;
  float: left;
}
.customNavigation a.prev::before {
	content: "\E314";
	font-family: "Material Icons";
	position: absolute;
	font-size: 20px;
	right: 5px;
	top: -1px;
	color: #808080;
}
.customNavigation a.next::before {
	content: "\E315";
	font-family: "Material Icons";
	position: absolute;
	font-size: 20px;
	position: absolute;
	right: 3px;
	top: -1px;
	color: #808080;
}
#tmtestimonialcmsblock .customNavigation {
  top: -24px;
  z-index: 5;
  right: 15px;
}
.owl-theme .owl-controls .owl-page.active span{
  background-color: var(--primary-color);
}
.owl-theme .owl-controls .owl-page span{
  background-color: #cccccc;
}
#index #tmtestimonialcmsblock .customNavigation {
  top: -40px;
  right: 0;
}
.special-products .customNavigation {
	top: 52%;
}
.special-products:hover .customNavigation, 
.products:hover .customNavigation,
.testimonial-block-part:hover .customNavigation,
.tmblog-latest:hover .customNavigation, 
#tminstagramblock:hover .customNavigation,
.product-accessories:hover .customNavigation,
.productscategory-products:hover .customNavigation{
  opacity: 1;
  -khtml-opacity: 1;
  -webkit-opacity: 1;
  -moz-opacity: 1;
}
.lastest_block .customNavigation {
	top: 44%;
}
.customNavigation i {
	color: #222 !important;
	cursor: pointer;
	font-size: 0;
	font-weight: 500;
	height: 38px;
	line-height: 32px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	text-align: center;
	width: 38px;
	background: transparent;
	border-radius: 0;
	font-style: unset;
	box-shadow: 0px 0px 16px 0px rgba(0,0,0,0.11);
}

.customNavigation i.prev {
	background: transparent;
	right: auto;
	background: #fff;
	border-radius: 50%;
	left: -5px;
}
.customNavigation i.next {
	background: transparent;
	right: 0px;
	background: #fff;
	border-radius: 50%;
	right: -5px;
}
.tmcategorylist .customNavigation i.prev, 
.testimonial-block-part .customNavigation i.prev, 
#tminstagramblock .btn.prev.instagram_prev,
.special-products .customNavigation i.prev{
	left: -20px;
}
.tmcategorylist .customNavigation i.next, 
.testimonial-block-part .customNavigation i.next, 
#tminstagramblock .btn.next.instagram_next,
.special-products .customNavigation i.next  {
  right: -20px;
}
.customNavigation i.prev::before {
	content: '';
	-webkit-mask-image: url(../img/megnor/pro-left.svg);
	-webkit-mask-position: center;
	-webkit-mask-repeat: no-repeat;
	mask-image: url(../img/megnor/pro-left.svg);
	mask-position: center;
	mask-repeat: no-repeat;
	background-color: #000;
	mask-size: 14px;
	font-size: 14px;
	width: 38px;
	height: 38px;
	display: block;
  -webkit-mask-size: 14px;
}
#tmtestimonialcmsblock .customNavigation i.prev::before {
  right: 1px;
  font-weight: 500;
}
#tmtestimonialcmsblock .customNavigation i.next::before {
  right: 0;
  font-weight: 500;
}
.customNavigation i.next::before {
	content: '';
	-webkit-mask-image: url(../img/megnor/pro-right.svg);
	-webkit-mask-position: center;
	-webkit-mask-repeat: no-repeat;
	mask-image: url(../img/megnor/pro-right.svg);
	mask-position: center;
	mask-repeat: no-repeat;
	background-color: #000;
	mask-size: 14px;
	font-size: 14px;
	width: 38px;
	height: 38px;
	display: block;
  -webkit-mask-size: 14px;
}
.customNavigation i.next:hover::before,.customNavigation i.prev:hover::before  {
  color: #fff;
}
#cpleftbanner1 img,
#cpleftbanner2 img {
  max-width: 100%;
}
#cpleftbanner1 li,
#cpleftbanner2 li {
  overflow: hidden;
  position: relative;
  float: left;
  border-radius: 5px;
}
#cpleftbanner1 li a,
#cpleftbanner2 li a {
  display: inline-block;
  position: relative;
  overflow: hidden;
  vertical-align: top;
}
.footer-container .links.lastest_block .customNavigation i.prev:hover {
  color: #9bbab1 !important;
}
.footer-container .links.lastest_block .customNavigation i.next:hover {
  color: #9bbab1 !important;
}

@media (max-width: 1449px) {
  .tmcategorylist .customNavigation i.prev, 
  .testimonial-block-part .customNavigation i.prev, 
  #tminstagramblock .btn.prev.instagram_prev,
  .special-products .customNavigation i.prev{
    left: -15px;
  }
  .tmcategorylist .customNavigation i.next, 
  .testimonial-block-part .customNavigation i.next,
   #tminstagramblock .btn.next.instagram_next,
   .special-products .customNavigation i.next {
    right: -15px;
  }
  .customNavigation i.next {
    right: 0;
  }
  .customNavigation i.prev {
    left: 0;
  }
}
@media (max-width: 1199px) {
  #tmtestimonialcmsblock .customNavigation {
    top: -36px;
    z-index: 5;
    right: -18px;
  }
}

@media (max-width: 991px) {
  #cpleftbanner1 li img,
  #cpleftbanner2 li a {
    width: auto;
  }
  #tmtestimonialcmsblock .customNavigation {
    top: 0;
    right: 0;
  }
}
@media (max-width: 767px) {
  .customNavigation {
    opacity: 1;
    -khtml-opacity: 1;
    -webkit-opacity: 1;
    -moz-opacity: 1;
  }
  
  .tmcategorylist .customNavigation i.prev, 
  .testimonial-block-part .customNavigation i.prev, 
  #tminstagramblock .btn.prev.instagram_prev, 
  .special-products .customNavigation i.prev,
  .btn.prev.accessories_prev {
    left: 0;
  }
  .tmcategorylist .customNavigation i.next, 
  .testimonial-block-part .customNavigation i.next,
   #tminstagramblock .btn.next.instagram_next, 
   .special-products .customNavigation i.next,
   .btn.next.accessories_next {
    right: 0;
  }
  #main .images-container .js-qv-mask .customNavigation {
    top: 13px;
  }
  .quickview .mask.additional_slider .customNavigation i.prev {
    left: -10px !important;
  }
  .quickview .mask.additional_slider .customNavigation i.next {
    right: -10px !important;
  }
  .btn.next.brand_next {
    left: auto;
    right: 0;
    position: absolute;
  }
  .btn.prev.brand_prev {
    left: 0;
    right: auto;
  }
  .customNavigation i.next {
    left: auto;
    right: 0;
  }
}
@media (max-width: 480px) {
}
/* --- Cookie banner: prevent layout shift / keep logo controlled --- */
.hi-cookie-logo img{
  height: auto;
  max-width: 120px; /* adjust if you want bigger/smaller logo */
}

/* Keep cookie-type icons consistent */
.hi-cookie-item-icon img{
  width: 32px;
  height: 32px;
  object-fit: contain;
}
/* Reduce layout shift from the big CMS text block */
#custom-text { min-height: 711px; }           /* Lighthouse shows ~711px */
@media (max-width: 992px) { #custom-text { min-height: 520px; } }

/* Flexslider dots: make them tappable (>= 24x24) */
.flexslider .flex-control-nav li a {
  width: 24px;
  height: 24px;
  display: inline-block;
}

.flexslider .flex-control-nav li {
  margin: 0 6px;
}
button.bootstrap-touchspin-up,
button.bootstrap-touchspin-down {
  min-width: 24px;
  min-height: 24px;
}
nav.breadcrumb a span[itemprop="name"],
nav.breadcrumb a {
  color: #3b556a; /* darker than #6b8499 */
}
 
button.bootstrap-touchspin-up,
button.bootstrap-touchspin-down {
  min-width: 24px;
  min-height: 24px;
}
nav.breadcrumb a,
nav.breadcrumb a span[itemprop="name"] {
  color: #3b556a;
}

/* A11Y: make qty +/- tap targets at least 24x24 */
.bootstrap-touchspin-up,
.bootstrap-touchspin-down {
  min-width: 24px;
  min-height: 24px;
}
/* A11Y: make qty +/- tap targets at least 24x24 */
.product-quantity button,
.product-quantity a,
.product-quantity span {
  min-width: 24px;
  min-height: 24px;
}

/* A11Y: make qty +/- tap targets at least 24x24 */
.product-quantity button,
.product-quantity a,
.product-quantity span,
.input-group button,
.input-group a,
.input-group span {
  min-width: 24px;
  min-height: 24px;
}


/* A11Y: make qty +/- tap targets at least 24x24 */
.product-quantity button,
.product-quantity a,
.product-quantity span,
.input-group button,
.input-group a,
.input-group span {
  min-width: 24px;
  min-height: 24px;
}



/* A11Y: qty +/- buttons - ensure >=24x24 AND spacing (fix target-size) */
div.qty > div.input-group > span.input-group-btn-vertical{
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: visible !important; /* avoid 24x22 clipping */
}

div.qty > div.input-group > span.input-group-btn-vertical > button.btn{
  min-width: 28px; /* a bit larger to be safe */
  min-height: 28px;
  padding: 0;
  line-height: 28px;
}

/* A11Y: make qty +/- buttons >= 24x24 on mobile */
.qty .input-group-btn-vertical .btn,
.qty .bootstrap-touchspin .btn {
  min-width: 24px;
  min-height: 24px;
  padding: 6px;
}
/* A11Y: stronger link color for contrast */
#category-description a,
#category-description h2,
#category-description span[style*="#00a8ff"],
#category-description [style*="#2fb5d2"] {
  color: #0b5fa5 !important; /* darker, passes contrast */
}



/* Keep correct aspect ratio for category_default images (2:1) */
/* Category banner: keep it shorter */
.block-category .category-cover img{
  width: 25%;
  height: auto;
  aspect-ratio: 1 / 1;  /* was 2/1 */
  object-fit: cover;
}


/* Make qty +/- touch targets comfortably >= 24px with spacing */
.bootstrap-touchspin .input-group-btn-vertical .btn {
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  line-height: 28px;
}

.bootstrap-touchspin .input-group-btn-vertical .btn + .btn {
  margin-top: 2px; /* augmente l'espace entre + et - */
}
/* ===== FORCE MOBILE SEARCH ICON VISIBLE ===== */
@media (max-width: 767px) {
  #header #search_block_top .search_button,
  #search_block_top .search_button,
  span.search_button {
    display: inline-block !important;
    width: 40px !important;
    height: 25px !important;
    min-width: 40px !important;
    opacity: 1 !important;
    visibility: visible !important;
    cursor: pointer !important;
    font-size: 0 !important;
    line-height: 0 !important;
    background: url("/modules/cp_blocksearch/views/img/search.svg") no-repeat center center !important;
    background-size: 21px 21px !important;
    -webkit-mask: none !important;
    mask: none !important;
  }

  #header #search_block_top .search_button::before,
  #header #search_block_top .search_button:before,
  #search_block_top .search_button::before,
  #search_block_top .search_button:before,
  span.search_button::before,
  span.search_button:before {
    content: none !important;
    display: none !important;
  }
}
/* Accessibility contrast fixes */
.productpage-attributes-items .label,
.productpage-attributes-items .brand-infos a,
.productpage-attributes-items .product-reference span,
.product-tabcontent .tabs .nav-tabs .nav-link {
  color: #4f6477 !important;
}

/* Keep active tab clearly visible */
.product-tabcontent .tabs .nav-tabs .nav-link.active,
.product-tabcontent .tabs .nav-tabs .nav-link.js-product-nav-active {
  color: #2f4356 !important;
}

/* Optional: slightly stronger meta text */
.productpage-attributes-items,
.productpage-attributes-items span,
.productpage-attributes-items a {
  color: #4f6477;
}
/* Desktop: allow wrapping (stable layout, no DOM rewrite) */
@media (min-width: 992px) {
  #header .header-top-main #_top_main_menu ul#top-menu {
    display: flex;
    flex-wrap: wrap;          /* wraps to a 2nd line if needed */
    align-items: center;
  }

  #header .header-top-main #_top_main_menu ul#top-menu > li {
    float: none;              /* override old float-based layouts */
  }
}

/* Tablet/mobile: keep one line, allow horizontal scroll */
@media (max-width: 991px) {
  #header .header-top-main #_top_main_menu ul#top-menu {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #header .header-top-main #_top_main_menu ul#top-menu::-webkit-scrollbar {
    display: none;
  }
  #header .header-top-main #_top_main_menu ul#top-menu > li {
    flex: 0 0 auto;           /* keep items from shrinking weirdly */
    float: none;
  }
}



/* Reserve space so product availability doesn’t push content later */
#product-availability{
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Optional: reserve a bit of space in the whole actions block (tune value after measuring) */
.page-product .product-actions{
  min-height: 380px; /* adjust: inspect final height and set close to it */
}


@media (max-width: 991px){
  #columns_inner { flex-direction: column; }
  #left-column, #content-wrapper, #right-column {
    width: 100%;
    max-width: 100%;
  }
}

/* Prevent wrapper jump when header finishes rendering */
#header .header-top-main,
#header .header-top-main .container {
  min-height: 60px; /* adjust to your real final header height */
}
/* Keep thumb boxes stable even when selected/lazyloaded classes change */
div.thumb-container,
div.thumb-container > a,
div.thumb-container img.thumb {
  width: 65px;
  height: 65px;
}
div.thumb-container img.thumb { display: block; }
/* Disable HB animation that causes layout shift */
.hb-animate-element {
  animation: none !important;
  transition: none !important;
  transform: none !important;
}

/* =========================
   CLS stability pack
   ========================= */

/* 1) Stop left-column animation from shifting layout */
.hb-animate-element,
.hb-animate-element.top-to-bottom {
  animation: none !important;
  transition: none !important;
  transform: none !important;
}

/* 2) Make tablet/mobile behave like the old JS DOM move (stack columns) */
@media (max-width: 991px){
  #columns_inner { 
    display: flex; 
    flex-wrap: wrap; 
    flex-direction: column; 
  }
  #left-column, #content-wrapper, #right-column {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* 3) Reserve header height (prevents wrapper jump from tiny header changes) */
#header .header-top .container { min-height: 70px; }      /* tune if needed */
#header .header-top-main .container { min-height: 60px; } /* tune if needed */

/* 4) Product page: reserve space for availability + actions */
#product-availability{
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Adjust if too much/too little space */
.page-product .product-actions{
  min-height: 380px;
}

/* 5) Thumbnails: keep box stable (fix small img.thumb shifts) */
div.thumb-container,
div.thumb-container > a,
div.thumb-container img.thumb{
  width: 65px;
  height: 65px;
}
div.thumb-container img.thumb{ display:block; }

.hb-animate-element,
.hb-animate-element.top-to-bottom {
  animation: none !important;
  transition: none !important;
  transform: none !important;
}

/* Reserve header height so wrapper doesn’t jump */
#header .header-top,
#header .header-top-main {
  min-height: 60px; /* adjust to your real final height */
}



/* Cookie banner: force overlay (no layout shift) */
.hi-cookie-block,
.hi-cookie-block-tm-1 {
  position: fixed !important;
  left: 20px !important;
  bottom: 20px !important;
  z-index: 999999 !important;

  width: min(420px, calc(100vw - 40px)) !important;
  max-width: 420px !important;

  margin: 0 !important;
  clear: none !important;
  float: none !important;
}

/* If the module adds spacing to the page when showing the banner */
body { padding-bottom: 0 !important; }
/* =========================
   Fix CLS from HiPresta cookie banner
   ========================= */

/* The module hides the banner with display:none then shows it later => CLS.
   Keep it rendered but invisible until JS removes hi-module-hide. */
.hi-cookie-block.hi-module-hide {
  display: block !important;      /* override display:none */
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* When it becomes visible, only opacity changes (no layout shift) */
.hi-cookie-block {
  transition: opacity .15s ease;
}

/* Optional: make sure the cookie image never changes box size while loading */
.hi-cookie-predefined-icon img { width: 100px; height: auto; }
/* HOTFIX: restore left column (vertical menu) position on desktop */
@media (min-width: 992px){
  #columns_inner{
    display: block !important;
  }
  #columns_inner > #left-column,
  #columns_inner > #content-wrapper,
  #columns_inner > #right-column{
    float: left !important;
  }
}

/* FIX: keep left column on the LEFT on desktop (cancel flex reorder) */
@media (min-width: 992px){
  #columns_inner{
    display: block !important;
  }
  /* undo the rule "#columns_inner > div { float:none; }" */
  #columns_inner > div{
    float: left !important;
  }
}

/* ===== Checkout layout + clickability fix ===== */
body#checkout #columns_inner{
  display: block !important;
}
body#checkout #left-column{
  float: left !important;
  position: relative;
  z-index: 5; /* keep it clickable */
}
body#checkout #content-wrapper,
body#checkout #right-column{
  float: left !important;
}

/* If sticky header overlaps logo/menu on checkout, disable the "fixed" behavior there */
body#checkout #header .header-top { position: relative; z-index: 1002; }
body#checkout #header .header-top-main { position: relative; z-index: 1001; }
body#checkout #header .header-top-main.fixed{
  position: relative !important;
  top: auto !important;
}
/* =========================================================
   FIX CHECKOUT: keep left column (categories) on the LEFT
   Checkout uses <section id="content"> (not #content-wrapper)
   ========================================================= */
body#checkout #columns_inner{
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: flex-start;
}

/* left sidebar */
body#checkout #columns_inner > #left-column{
  order: 0 !important;
  flex: 0 0 25% !important;
  max-width: 25% !important;
  position: relative;
  z-index: 50; /* keep it clickable */
}

/* main checkout content */
body#checkout #columns_inner > #content{
  order: 1 !important;
  flex: 1 1 auto !important;
  max-width: 75% !important;
  position: relative;
  z-index: 1;
}

/* Mobile: stack columns */
@media (max-width: 991px){
  body#checkout #columns_inner{
    flex-direction: column !important;
  }
  body#checkout #columns_inner > #left-column,
  body#checkout #columns_inner > #content{
    flex: 0 0 auto !important;
    max-width: 100% !important;
  }
}


/* =========================================================
   CHECKOUT FIX: checkout.tpl uses <section id="content">
   inside #columns_inner, not #content-wrapper.
   Force left column first on desktop.
   ========================================================= */

/* Desktop: left column on left, checkout content on right */
@media (min-width: 992px){
  #columns_inner > #left-column{
    order: 1 !important;
    position: relative;
    z-index: 50; /* keep menu clickable */
  }
  #columns_inner > #content{
    order: 2 !important;
  }
}

/* Mobile/tablet: content first, left column after (optional) */
@media (max-width: 991px){
  #columns_inner > #content{
    order: 1 !important;
  }
  #columns_inner > #left-column{
    order: 2 !important;
  }
}


/* ===== Hide left column on checkout ===== */
body#checkout #left-column{
  display: none !important;
}

/* Make checkout content take full width */
body#checkout #columns_inner{
  display: block !important;   /* avoid flex reorder issues */
}

body#checkout #content{
  width: 100% !important;
  max-width: 100% !important;
}


/* Hide only cp_verticalmenu block on checkout */
body#checkout #cp_vertical_menu_top{
  display: none !important;
}


/* =========================================================
   FORCE: hide left column ONLY on checkout pages
   (covers body id: checkout/order + class: page-order)
   ========================================================= */
body#checkout #left-column,
body#order #left-column,
body.page-order #left-column,
body.order #left-column{
  display: none !important;
}

/* also hide the vertical menu block if it appears elsewhere */
body#checkout #cp_vertical_menu_top,
body#order #cp_vertical_menu_top,
body.page-order #cp_vertical_menu_top,
body.order #cp_vertical_menu_top{
  display: none !important;
}

/* make checkout content full width */
body#checkout #columns_inner,
body#order #columns_inner,
body.page-order #columns_inner,
body.order #columns_inner{
  display: block !important;
}

body#checkout #content,
body#order #content,
body.page-order #content,
body.order #content{
  width: 100% !important;
  max-width: 100% !important;
}


/* ===== overlay for side menu (prevents random click blocking) ===== */
.overlay{
  display:none;
}
.overlay.overlay_active{
  display:block;
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.35);
  z-index: 99980;
}

/* Menu must be above overlay */
#cp_sidevertical_menu_top{
  position: relative;
  z-index: 99990;
}
#cp_sidevertical_menu_top.slide{
  position: fixed !important;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 99990 !important;
}
