/* =========================================================================
   MARTEJIDO · "MJ · Woo Grid"  v9  — ARCHIVO COMPLETO Y CONSOLIDADO
   Vikingos Media

   === ESTE ARCHIVO REEMPLAZA POR COMPLETO EL SNIPPET "MJ · Woo Grid" ===
   Selecciona todo lo que haya hoy en el snippet, borralo, y pega esto entero.
   No hay que pegar parches aparte: aqui esta TODO.

   FluentSnippets · Tipo: CSS · Posicion: footer · Priority: 30 · Everywhere

   Bloques:
     0) Limpieza global de tarjetas
     A) GRID del catalogo        (.mj-woo-grid)
     -) Espaciado vertical
     B) FILTRO rail inteligente  (.mj-filtros)   incluye la PESTANA OSCURA
     C) CARRUSEL infinito        (.mj-woo-slider)
     D) Precio oculto en carrusel y grid

   NOTA DE ESPECIFICIDAD: el bloque C repite la clase (ul.products.products,
   li.product.product) para ganarle al bloque A. NO simplificar esos
   selectores o el carrusel se apila como grid.
   ========================================================================= */


/* =========================================================================
   BLOQUE 0 · LIMPIEZA GLOBAL DE TARJETAS
   ========================================================================= */

.mj-woo-grid li.product,
.mj-woo-slider li.product,
.mj-woo-grid li.product > *,
.mj-woo-slider li.product > * {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
}

.mj-woo-grid li.product .wl-product-inner,
.mj-woo-grid li.product .product-inner,
.mj-woo-grid li.product .wl-product-wrapper,
.mj-woo-slider li.product .wl-product-inner,
.mj-woo-slider li.product .product-inner {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}


/* =========================================================================
   BLOQUE A · GRID DEL CATALOGO   (.mj-woo-grid)
   Widget "Shortcode":  [products limit="-1" columns="3"]  + clase mj-woo-grid
   ========================================================================= */

.mj-woo-grid ul.products,
body.tax-product_cat ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px 30px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto !important;
  padding: 0 48px !important;
  box-sizing: border-box;
  list-style: none;
  float: none !important;
}

.mj-woo-grid ul.products::before,
.mj-woo-grid ul.products::after,
body.tax-product_cat ul.products::before,
body.tax-product_cat ul.products::after {
  display: none !important;
}

.mj-woo-grid ul.products li.product,
body.tax-product_cat ul.products li.product {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  text-align: left;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.mj-woo-grid ul.products li.product.mj-hide {
  display: none !important;
}

.mj-woo-grid li.product a,
body.tax-product_cat li.product a {
  text-decoration: none;
  color: inherit;
}

.mj-woo-grid li.product img,
body.tax-product_cat li.product img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 3.2;
  object-fit: cover;
  display: block;
  margin: 0 !important;
  border-radius: 0 !important;
  background: var(--paper, #FAF7F1);
  transition: transform 1.2s cubic-bezier(.22, 1, .36, 1);
}

.mj-woo-grid li.product:hover img,
body.tax-product_cat li.product:hover img {
  transform: scale(1.05);
}

.mj-woo-grid li.product .woocommerce-loop-product__title,
.mj-woo-grid li.product h2,
.mj-woo-grid li.product h3,
body.tax-product_cat li.product .woocommerce-loop-product__title {
  margin: 18px 0 6px !important;
  padding: 0;
  font-family: var(--sans, 'Jost', sans-serif) !important;
  font-weight: 400 !important;
  font-size: 12.5px !important;
  letter-spacing: .16em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--ink, #2B241B);
}

.mj-woo-grid li.product .price,
.mj-woo-grid li.product .price bdi,
.mj-woo-grid li.product .price .amount,
body.tax-product_cat li.product .price,
body.tax-product_cat li.product .price bdi {
  font-family: var(--serif, 'Fraunces', Georgia, serif) !important;
  font-size: 18px !important;
  font-weight: 500;
  color: var(--sand-deep, #8F7142) !important;
}

.mj-woo-grid li.product .price del {
  margin-right: 8px;
  font-size: 14px !important;
  opacity: .5;
}

.mj-woo-grid li.product .price ins {
  text-decoration: none;
}

.mj-woo-grid li.product .button,
.mj-woo-grid li.product .added_to_cart,
body.tax-product_cat li.product .button {
  display: inline-flex !important;
  align-items: center;
  gap: 9px;
  margin-top: 14px !important;
  padding: 13px 24px !important;
  border: 1px solid var(--espresso, #1C1711) !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--espresso, #1C1711) !important;
  font-family: var(--sans, 'Jost', sans-serif) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  position: relative;
  overflow: hidden;
  z-index: 0;
  transition: color .45s cubic-bezier(.22, 1, .36, 1);
}

.mj-woo-grid li.product .button::after,
body.tax-product_cat li.product .button::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--espresso, #1C1711);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}

.mj-woo-grid li.product .button:hover,
body.tax-product_cat li.product .button:hover {
  color: var(--ivory, #F4EFE6) !important;
}

.mj-woo-grid li.product .button:hover::after,
body.tax-product_cat li.product .button:hover::after {
  transform: scaleX(1);
}

.mj-woo-grid li.product .star-rating,
body.tax-product_cat li.product .star-rating {
  display: none !important;
}

.mj-woo-empty {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 48px;
  font-family: var(--serif, 'Fraunces', Georgia, serif);
  font-size: 22px;
  color: var(--muted, #6E6353);
  text-align: center;
}

.mj-woo-empty.on {
  display: block;
}

@media (max-width: 1080px) {
  .mj-woo-grid ul.products,
  body.tax-product_cat ul.products {
    grid-template-columns: repeat(2, 1fr);
    gap: 34px 22px;
    padding: 0 32px !important;
  }
}

@media (max-width: 640px) {
  .mj-woo-grid ul.products,
  body.tax-product_cat ul.products {
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 0 22px !important;
  }
}


/* =========================================================================
   ESPACIADO VERTICAL DE LAS SECCIONES
   ========================================================================= */

.mj-woo-slider {
  padding-bottom: 96px;
}

.mj-woo-grid {
  padding-top: 8px;
  padding-bottom: 120px;
}

@media (max-width: 640px) {
  .mj-woo-slider {
    padding-bottom: 64px;
  }
  .mj-woo-grid {
    padding-bottom: 80px;
  }
}


/* =========================================================================
   BLOQUE B · FILTRO — RAIL FLOTANTE INTELIGENTE   (.mj-filtros)

   TRES ESTADOS:
   1) >= 1716px   ->  RAIL COMPLETO en el margen izquierdo.
   2) 1181-1715px ->  PESTANA OSCURA colapsada; se despliega con mouse o clic.
   3) hasta 1180px->  Fila horizontal encima del grid.
   ========================================================================= */

.mj-filtros {
  position: fixed;
  top: 50%;
  left: max(26px, calc(50vw - 640px - 218px));
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  width: 190px;
  padding: 20px 18px;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid var(--line, rgba(28, 23, 17, .14));
  background: rgba(250, 247, 241, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 50px rgba(28, 23, 17, .08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(-16px);
  transition: opacity .55s cubic-bezier(.22, 1, .36, 1),
              transform .55s cubic-bezier(.22, 1, .36, 1),
              width .5s cubic-bezier(.22, 1, .36, 1),
              padding .5s cubic-bezier(.22, 1, .36, 1);
}

.mj-filtros.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.mj-filtros-title {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 0 0 12px;
  border: none;
  border-bottom: 1px solid var(--line, rgba(28, 23, 17, .14));
  background: transparent;
  font-family: var(--sans, 'Jost', sans-serif);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  text-align: left;
  color: var(--sand-deep, #8F7142);
  white-space: nowrap;
  cursor: default;
}

.mj-fchip {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  font-family: var(--sans, 'Jost', sans-serif);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  color: var(--muted, #6E6353);
  cursor: pointer;
  transition: all .35s cubic-bezier(.22, 1, .36, 1);
}

.mj-fchip:hover {
  border-color: var(--line, rgba(28, 23, 17, .14));
  color: var(--espresso, #1C1711);
}

.mj-fchip.on {
  border-color: var(--espresso, #1C1711);
  background: var(--espresso, #1C1711);
  color: var(--ivory, #F4EFE6);
}


/* -------------------------------------------------------------------------
   ESTADO 2 · PESTANA OSCURA COLAPSADA  (1181px - 1715px)
   En reposo: fondo espresso, texto marfil grande, barrita dorada.
   Al abrir (hover o clic): vuelve al fondo claro con los chips normales.
   ---------------------------------------------------------------------- */

@media (min-width: 1181px) and (max-width: 1715px) {

  /* Pestana en reposo: OSCURA y mas ancha */
  .mj-filtros {
    left: 0;
    width: 60px;
    padding: 26px 0;
    align-items: center;
    background: var(--espresso, #1C1711);
    border: 1px solid var(--espresso, #1C1711);
    border-left: none;
    box-shadow: 0 20px 55px rgba(28, 23, 17, .28);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: hidden;
  }

  /* Texto FILTRAR: vertical, mas grande, en marfil */
  .mj-filtros-title {
    margin: 0;
    padding: 0;
    border-bottom: none;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .42em;
    color: var(--ivory, #F4EFE6);
    cursor: pointer;
    transition: color .3s;
  }

  .mj-filtros-title:hover {
    color: var(--sand-light, #D8C7A6);
  }

  /* Barrita dorada que invita a abrir */
  .mj-filtros-title::after {
    content: "";
    display: block;
    width: 20px;
    height: 2px;
    margin: 14px auto 0;
    background: var(--sand, #AE8C58);
  }

  /* Chips ocultos mientras esta colapsada */
  .mj-filtros .mj-fchip {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
    transition: opacity .3s, max-height .4s, padding .4s;
  }

  /* Desplegada: fondo claro de la casa */
  .mj-filtros:hover,
  .mj-filtros.is-open {
    width: 216px;
    padding: 22px 18px;
    align-items: stretch;
    background: rgba(250, 247, 241, .96);
    border: 1px solid var(--line, rgba(28, 23, 17, .14));
    box-shadow: 0 18px 50px rgba(28, 23, 17, .1);
  }

  .mj-filtros:hover .mj-filtros-title,
  .mj-filtros.is-open .mj-filtros-title {
    writing-mode: horizontal-tb;
    transform: none;
    margin-bottom: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line, rgba(28, 23, 17, .14));
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .3em;
    color: var(--sand-deep, #8F7142);
  }

  /* Al abrir, la barrita dorada se oculta */
  .mj-filtros:hover .mj-filtros-title::after,
  .mj-filtros.is-open .mj-filtros-title::after {
    display: none;
  }

  .mj-filtros:hover .mj-fchip,
  .mj-filtros.is-open .mj-fchip {
    opacity: 1;
    max-height: 60px;
    padding-top: 11px;
    padding-bottom: 11px;
    pointer-events: auto;
  }
}


/* -------------------------------------------------------------------------
   ESTADO 3 · MOVIL / TABLET  (hasta 1180px)  ->  fila horizontal
   ---------------------------------------------------------------------- */

@media (max-width: 1180px) {

  .mj-filtros {
    position: static;
    z-index: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto 34px;
    padding: 24px 32px;
    border-left: none;
    border-right: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    overflow: visible;
  }

  .mj-filtros.is-visible,
  .mj-filtros.is-open {
    transform: none;
    width: 100%;
  }

  .mj-filtros-title {
    width: 100%;
    margin-bottom: 4px;
    padding-bottom: 0;
    border-bottom: none;
    writing-mode: horizontal-tb;
    transform: none;
  }

  .mj-fchip {
    display: inline-block;
    width: auto;
    max-height: none;
    opacity: 1;
    padding: 10px 18px;
    border-color: var(--line, rgba(28, 23, 17, .14));
    pointer-events: auto;
    font-size: 10px;
    letter-spacing: .16em;
  }
}

@media (max-width: 640px) {
  .mj-filtros {
    padding: 20px 22px;
    margin-bottom: 26px;
  }
}


/* =========================================================================
   BLOQUE C · CARRUSEL INFINITO   (.mj-woo-slider)
   Widget "Shortcode":  [products tag="bajo-reserva" limit="7" columns="7"]
   + clase CSS  mj-woo-slider
   NO simplificar los selectores dobles: pierden contra el bloque A.
   ========================================================================= */

.mj-sl-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 40px;
}

.mj-sl-nav {
  display: flex;
  gap: 12px;
}

.mj-sl-btn {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line, rgba(28, 23, 17, .14));
  border-radius: 0;
  background: transparent;
  color: var(--espresso, #1C1711);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: all .4s cubic-bezier(.22, 1, .36, 1);
}

.mj-sl-btn:hover {
  border-color: var(--espresso, #1C1711);
  background: var(--espresso, #1C1711);
  color: var(--ivory, #F4EFE6);
}

.mj-woo-slider {
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.mj-woo-slider ul.products.products {
  display: flex !important;
  flex-wrap: nowrap !important;
  grid-template-columns: none !important;
  gap: 26px !important;
  max-width: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 max(48px, calc(50vw - 640px + 48px)) !important;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  list-style: none;
  cursor: grab;
}

.mj-woo-slider ul.products.products::-webkit-scrollbar {
  display: none;
}

.mj-woo-slider ul.products.products::before,
.mj-woo-slider ul.products.products::after {
  display: none !important;
}

.mj-woo-slider ul.products.products.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto !important;
}

.mj-woo-slider ul.products.products li.product.product {
  flex: 0 0 clamp(280px, 30vw, 380px) !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left;
  position: relative;
  overflow: visible;
  background: transparent !important;
}

.mj-woo-slider ul.products.products li.product.product img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 3.2;
  object-fit: cover;
  display: block;
  border-radius: 0 !important;
  transition: transform 1.2s cubic-bezier(.22, 1, .36, 1);
}

.mj-woo-slider ul.products.products li.product.product:hover img {
  transform: scale(1.05);
}

.mj-woo-slider ul.products.products li.product.product .woocommerce-loop-product__title,
.mj-woo-slider ul.products.products li.product.product h2,
.mj-woo-slider ul.products.products li.product.product h3 {
  margin: 18px 0 6px !important;
  padding: 0;
  font-family: var(--serif, 'Fraunces', Georgia, serif) !important;
  font-weight: 500 !important;
  font-size: 21px !important;
  letter-spacing: .02em;
  line-height: 1.2;
  text-transform: none;
  color: var(--ink, #2B241B);
}

.mj-woo-slider ul.products.products li.product.product .price,
.mj-woo-slider ul.products.products li.product.product .price bdi,
.mj-woo-slider ul.products.products li.product.product .price .amount {
  font-family: var(--serif, 'Fraunces', Georgia, serif) !important;
  font-size: 16px !important;
  font-weight: 500;
  color: var(--sand-deep, #8F7142) !important;
}

.mj-woo-slider ul.products.products li.product.product p:not(.price) {
  display: none !important;
}

.mj-woo-slider ul.products.products li.product.product .button,
.mj-woo-slider ul.products.products li.product.product .added_to_cart {
  display: inline-flex !important;
  align-items: center;
  gap: 9px;
  margin-top: 14px !important;
  padding: 13px 24px !important;
  border: 1px solid var(--espresso, #1C1711) !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--espresso, #1C1711) !important;
  font-family: var(--sans, 'Jost', sans-serif) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  position: relative;
  overflow: hidden;
  z-index: 0;
  transition: color .45s cubic-bezier(.22, 1, .36, 1);
}

.mj-woo-slider ul.products.products li.product.product .button::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--espresso, #1C1711);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}

.mj-woo-slider ul.products.products li.product.product .button:hover {
  color: var(--ivory, #F4EFE6) !important;
}

.mj-woo-slider ul.products.products li.product.product .button:hover::after {
  transform: scaleX(1);
}

.mj-woo-slider ul.products.products li.product.product .star-rating {
  display: none !important;
}

@media (max-width: 1080px) {
  .mj-woo-slider ul.products.products {
    padding: 0 32px !important;
  }
}

@media (max-width: 640px) {
  .mj-woo-slider ul.products.products {
    gap: 18px !important;
    padding: 0 22px !important;
  }
  .mj-woo-slider ul.products.products li.product.product {
    flex: 0 0 78vw !important;
  }
  .mj-sl-nav {
    display: none;
  }
}


/* =========================================================================
   BLOQUE D · PRECIO OCULTO EN CARRUSEL Y GRID
   El PHP "MJ · Composicion" deja el precio vacio; aqui se elimina el
   contenedor para que no quede un hueco.
   ========================================================================= */

.mj-woo-slider ul.products.products li.product.product .price:empty,
.mj-woo-grid li.product .price:empty,
body.tax-product_cat li.product .price:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}