/*
 * Autor: Sergio Martinez de Unlockers Cloud
 * URL: https://1lockers.net
 *
 * EasyMac — Header stacking, heights, breadcrumbs, sidebar archive, mobile layers, cart.
 * Carga después del child style; implementación estricta.
 */

/* ============================================
   HEADER STACKING + HEIGHTS — EasyMac
============================================ */

body {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.whb-header .container {
  margin-top: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.whb-top-bar {
  position: relative;
  z-index: 100;
  height: 50px;
  min-height: 50px;
  display: flex;
  align-items: center;
}

.whb-header-main {
  position: relative;
  z-index: 200;
  height: 100px;
  min-height: 100px;
  display: flex;
  align-items: center;
}

.whb-header-bottom {
  position: relative;
  z-index: 300;
  height: 50px;
  min-height: 50px;
  display: flex;
  align-items: center;
}

.whb-header-bottom .wd-dropdown {
  position: absolute;
  z-index: 9999 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.whb-sticky-header.whb-sticky-real {
  z-index: 9990 !important;
}

.rev_slider_wrapper,
.wpb_revslider_element {
  position: relative;
  z-index: 1 !important;
}

@media (max-width: 768px) {
  .whb-header-bottom {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
  }
}

/* Header sticky solo al hacer scroll */
.whb-header.whb-header_583492{
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #fff; /* opcional, evita transparencia al pegarse */
}

/* Evita doble header sticky de Woodmart (clonado) */
.whb-sticky-header{
  display: none !important;
}

/* Ajuste cuando estás logueado en WP (barra admin) */
.admin-bar .whb-header.whb-header_583492{
  top: 32px;
}
@media (max-width: 782px){
  .admin-bar .whb-header.whb-header_583492{
    top: 46px;
  }
}

/***
 *
 */

/* 1) Solo breadcrumb de categorías */
.woocommerce.archive.tax-product_cat nav.wd-breadcrumbs.woocommerce-breadcrumb{
	--crumb-x: clamp(0rem, 0.5vw, 1rem);   /* movimiento horizontal */
  --crumb-y: clamp(0rem, 2vw, 3rem); /* movimiento vertical */
  transform: translate(var(--crumb-x), var(--crumb-y));
  margin: 10px 0px 10px 0px!important;
}

.woocommerce.archive.tax-product_cat nav.wd-breadcrumbs.woocommerce-breadcrumb,
.woocommerce.archive.tax-product_cat nav.wd-breadcrumbs.woocommerce-breadcrumb a,
.woocommerce.archive.tax-product_cat nav.wd-breadcrumbs.woocommerce-breadcrumb span,
.woocommerce.archive.tax-product_cat nav.wd-breadcrumbs.woocommerce-breadcrumb .wd-delimiter{
  font-size: 14px !important;
  line-height: 1.4;
  color: rgba(33, 36, 39, 0.6) !important;
	/* opacidad */
}

/* Solo bajar barra izquierda de filtros */
/* Desktop: conservar tu ajuste */
@media (min-width: 1025px){
  body.archive.tax-product_cat aside.wd-sidebar.sidebar-container.sidebar-left{
    position: relative;
    top: clamp(2rem, 3vw, 3rem);
  }
}

/* Mobile/tablet: fix recorte off-canvas */
@media (max-width: 1024px){
  body.archive.tax-product_cat aside.wd-sidebar.sidebar-container.sidebar-left{
    top: 0 !important;              /* clave: quitar desplazamiento */
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow-y: auto !important;
  }

  body.archive.tax-product_cat aside.wd-sidebar.sidebar-container.sidebar-left .widget-area{
    overflow-y: auto !important;
    max-height: calc(100dvh - 70px) !important; /* espacio para botón cerrar */
  }
}

/* Sidebar filtros sin uppercase */
body.archive.tax-product_cat aside.wd-sidebar .widget-title,
body.archive.tax-product_cat aside.wd-sidebar .woocommerce-widget-layered-nav-list__item a,
body.archive.tax-product_cat aside.wd-sidebar .price_label,
body.archive.tax-product_cat aside.wd-sidebar button{
  text-transform: none !important;
}

/* Parche para mobile menu */

/* Capas off-canvas mobile (menu + filtros) */
@media (max-width: 1024px){
  .whb-header,
  .whb-sticky-header{
    z-index: 9990 !important;
  }

  /* Overlay oscuro compartido */
 .wd-close-side{
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 10000 !important;
  }

  /* Menú hamburguesa principal */
  .mobile-nav.wd-side-hidden-nav{
    position: fixed !important;
    z-index: 10020 !important;
  }

  /* Sidebar de filtros de tienda */
  body.woocommerce .sidebar-container{
    z-index: 10030 !important;
  }
}

/* Home: botones de las 4 cards (Mac nuevos / Deals / Accesorios / JBL) */
.elementor-element-8d1260f .wd-button-wrapper .btn,
.elementor-element-8d1260f .wd-button-wrapper .wd-btn-text{
  text-transform: inherit !important;
  letter-spacing: inherit !important;
}

/* Íconos del bloque de 3 beneficios: forzarlos a blanco */
.elementor-element-1dd008c .info-box-icon img{
  filter: brightness(0) invert(1) !important;
  opacity: 1 !important;
}


/* Parche mobile carrito */
/* Capas off-canvas mobile: menú, filtros y carrito */
@media (max-width: 1024px){
  /* Header debajo de paneles */
  .whb-header{
    z-index: 9990 !important;
  }

  /* Overlay oscuro */
  .wd-close-side{
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 10000 !important;
  }

  /* Menú hamburguesa */
  .mobile-nav.wd-side-hidden-nav{
    position: fixed !important;
    z-index: 10020 !important;
  }

  /* Filtros tienda */
  body.woocommerce .sidebar-container{
    z-index: 10030 !important;
  }

  /* Carrito lateral */
  .cart-widget-side{
    position: fixed !important;
    z-index: 10040 !important;
    background: #fff !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}
