/* =========================================================
   RR - ML Archive (Shop/Categorías)
   - 2 columnas desktop: sidebar izquierda + grid derecha
   - Mobile: sidebar pasa arriba como top bar (widgets)
   ========================================================= */

.rr-ml-archive {
  width: 100%;
}

/* Contenedor fluido */
.rr-ml-archive__container {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

/* Layout 2 columnas */
.rr-ml-archive-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}

/* Sidebar desktop */
.rr-ml-archive-sidebar {
  position: sticky;
  top: 92px; /* ajustá si tu header es más alto */
}

/* ✅ Widgets dentro de la sidebar (selector correcto) */
.rr-ml-archive-sidebar .widget,
.rr-ml-archive-sidebar .rr-widget {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
  margin: 0 0 12px;
}

.rr-ml-archive-sidebar .widget-title,
.rr-ml-archive-sidebar .rr-widget-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px;
}

/* Grid productos */
.rr-ml-products-grid ul.products,
ul.products {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

/* Card producto */
.rr-ml-products-grid li.rr-ml-card,
.rr-ml-products-grid li.rr-ra-card {
  margin: 0 !important;
}

.rr-ml-card__link {
  display: block;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
  transition: transform .15s ease, box-shadow .15s ease;
  height: 100%;
}

.rr-ml-card__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(0,0,0,.10);
}

.rr-ml-card__img {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rr-ml-card__img img {
  width: 100%;
  height: 200px;
  object-fit: contain;
}

.rr-ml-card__body {
  padding: 10px 12px 12px;
}

.rr-ml-card__title {
  font-size: 14px;
  line-height: 1.3;
  color: #333;
  min-height: 38px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 6px;
}

.rr-ml-card__old {
  font-size: 11px;
  color: #8c8c8c;
  text-decoration: line-through;
  margin: 0;
}

.rr-ml-card__price {
  font-size: 22px;
  font-weight: 500;
  color: #111;
  margin: 0;
}

.rr-ml-card__off {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #00a650;
  margin-top: 2px;
}

.rr-ml-card__ship {
  font-size: 12px;
  color: #00a650;
  margin-top: 6px;
}

/* Ocultar subcategorías en el grid */
ul.products li.product-category,
.product-category,
.swiper-slide.product-category.product {
  display: none !important;
}

/* Applied filters tags (si lo usás) */
.rr-ml-applied-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rr-ml-applied-filters .rr-ml-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 13px;
  border-radius: 12px;
  background: #FFE7E7;
  border: 1px solid #F5C6C6;
  color: #C8102E;
  cursor: pointer;
}
.rr-ml-applied-filters .rr-ml-filter-tag:hover {
  background: #FFDADA;
}

/* =========================================================
   ✅ MOBILE: sidebar pasa arriba como “top bar” (widgets)
   ========================================================= */
@media (max-width: 991px){

  /* 1 columna */
  .rr-ml-archive-layout{
    display: flex !important;
    flex-direction: column !important;
  }

  /* Top bar widgets */
  .rr-ml-archive-sidebar{
    position: static !important;
    top: auto !important;
    order: -1 !important;           /* sube arriba */
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 12px 0 !important;
    padding: 10px 12px !important;
    background: #fff !important;
    border-bottom: 1px solid rgba(0,0,0,.08) !important;
  }

  /* Widgets en mobile (separación prolija) */
  .rr-ml-archive-sidebar .widget,
  .rr-ml-archive-sidebar .rr-widget{
    margin: 0 0 10px 0 !important;
    box-shadow: none !important; /* más liviano en mobile */
    border: 1px solid rgba(0,0,0,.06);
  }

  /* Grid 2 columnas */
  .rr-ml-products-grid ul.products,
  ul.products{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .rr-ml-card__img img{
    height: 150px;
  }
}
