/* =========================================================
   CATÁLOGO MÓVIL DEFINITIVO — 2 COLUMNAS REALES
   Distingue la columna exterior de Flatsome y la card interior.
   Evita la doble reducción de 50% que convertía las cards en tiras.
   ========================================================= */
@media screen and (max-width: 849px) {
  /* El área del catálogo conserva todo el ancho disponible. */
  body.emz-dark-ocean-theme .category-page-row,
  body.emz-dark-ocean-theme .shop-container,
  body.emz-dark-ocean-theme .shop-container .row,
  body.emz-dark-ocean-theme .shop-container .large-12,
  body.emz-dark-ocean-theme .shop-container .large-9 {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* El loop es el ÚNICO elemento que divide en dos columnas. */
  body.emz-dark-ocean-theme .shop-container .products.row,
  body.emz-dark-ocean-theme .category-page-row .products.row,
  body.emz-dark-ocean-theme ul.products.row,
  body.emz-dark-ocean-theme .products.row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    align-items: stretch !important;
    gap: 9px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* COLUMNA EXTERIOR de Flatsome: ocupa una celda completa, no 50% otra vez. */
  body.emz-dark-ocean-theme .products.row > .product-small.col,
  body.emz-dark-ocean-theme .products.row > .product-small,
  body.emz-dark-ocean-theme .products.row > li.product,
  body.emz-dark-ocean-theme ul.products.row > li.product {
    display: block !important;
    grid-column: auto !important;
    align-self: stretch !important;
    float: none !important;
    clear: none !important;
    position: relative !important;
    box-sizing: border-box !important;
    flex: none !important;
    flex-basis: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
  }

  /* Wrapper intermedio: nunca debe volver a reducir el ancho. */
  body.emz-dark-ocean-theme .products.row > .product-small.col > .col-inner,
  body.emz-dark-ocean-theme .products.row > .product-small > .col-inner,
  body.emz-dark-ocean-theme .products.row > li.product > .col-inner,
  body.emz-dark-ocean-theme .products.row > li.product > a,
  body.emz-dark-ocean-theme .products.row > li.product > div {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* CARD INTERIOR: ancho completo dentro de la celda. */
  body.emz-dark-ocean-theme .products.row > .product-small.col > .col-inner > .product-small.box,
  body.emz-dark-ocean-theme .products.row > .product-small > .col-inner > .product-small.box,
  body.emz-dark-ocean-theme .products.row > li.product .product-small.box,
  body.emz-dark-ocean-theme .products.row > li.product .box,
  body.emz-dark-ocean-theme .products.row .product-small.box {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  /* La imagen llena la card y mantiene calidad/proporción. */
  body.emz-dark-ocean-theme .products.row .product-small.box .box-image,
  body.emz-dark-ocean-theme .products.row .product-small.box .box-image .image-cover,
  body.emz-dark-ocean-theme .products.row li.product .box-image,
  body.emz-dark-ocean-theme .products.row li.product .image-cover {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: clamp(150px, 43vw, 215px) !important;
    min-height: clamp(150px, 43vw, 215px) !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  body.emz-dark-ocean-theme .products.row .product-small.box .box-image img,
  body.emz-dark-ocean-theme .products.row li.product .box-image img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    image-rendering: auto !important;
  }

  /* Contenido legible dentro de cada mitad. */
  body.emz-dark-ocean-theme .products.row .product-small.box .box-text,
  body.emz-dark-ocean-theme .products.row li.product .box-text {
    box-sizing: border-box !important;
    display: block !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 126px !important;
    margin: 0 !important;
    padding: 12px 12px 7px !important;
    overflow: hidden !important;
  }

  body.emz-dark-ocean-theme .products.row .product-title,
  body.emz-dark-ocean-theme .products.row .product-title a {
    display: block !important;
    max-width: 100% !important;
    font-size: clamp(14px, 4vw, 18px) !important;
    line-height: 1.18 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  body.emz-dark-ocean-theme .products.row .price {
    display: block !important;
    max-width: 100% !important;
    font-size: clamp(20px, 5.8vw, 27px) !important;
    line-height: 1.08 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.emz-dark-ocean-theme .products.row .emz-stock {
    font-size: clamp(9px, 2.8vw, 11px) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.emz-dark-ocean-theme .products.row .emz-quick-cart {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: calc(100% - 16px) !important;
    max-width: calc(100% - 16px) !important;
    min-width: 0 !important;
    min-height: 40px !important;
    margin: 2px 8px 9px !important;
    padding: 8px 5px !important;
    font-size: clamp(8px, 2.45vw, 11px) !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

@media screen and (max-width: 370px) {
  body.emz-dark-ocean-theme .shop-container .products.row,
  body.emz-dark-ocean-theme .category-page-row .products.row,
  body.emz-dark-ocean-theme ul.products.row,
  body.emz-dark-ocean-theme .products.row {
    gap: 6px !important;
  }

  body.emz-dark-ocean-theme .products.row .product-small.box .box-text,
  body.emz-dark-ocean-theme .products.row li.product .box-text {
    padding-left: 9px !important;
    padding-right: 9px !important;
  }
}
