/* 📱 Mobile First - Listado de productos */
.main {
  margin-bottom: 10vh;
}
/* Layout principal */
.product_list_section {
  /* padding: 0 1rem; */
}

.product_list_header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 2.5rem 0;
  text-align: center;
}

.product_list_title {
  font-size: clamp(1.25rem, 2vw + 0.2rem, 1.8rem);
  font-weight: bold;
  margin: 0;
}

.product_list_controls {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  border: 1px solid #ccc;
  padding: 0.5rem 0;
}

/* Controles */
.order_select_wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.order_select {
  width: 100%;
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  appearance: none;
  background-color: #fff;
  background-image: none;
}

/* Layout general mobile */
.product_list_layout {
  display: block;
}

/* Filtros ocultos en mobile (aparecen en dropdown) */
.filters_panel {
  display: none;
}

.filter_dropdown > button {
  display: block;
}

.filter_wrapper::before {
  display: block;
  font-weight: bold;
  margin-bottom: 0.8rem;
}

/* Grilla de productos */
.products_grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  padding: 0 0.25rem;
}

/* Filtros individuales */
.filter_group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.clear_filters_btn {
  margin-top: 1rem;
  padding: 0.4rem 0.8rem;
  background-color: #f1f1f1;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.clear_filters_btn:hover {
  background-color: #e0e0e0;
}
.product_mobile_controls {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.filter_btn {
  display: flex;
  align-items: center;
  gap: 0.4rem; /* espacio entre icono y texto */
  padding: 0.6rem;
  font-size: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  justify-content: center;
  flex: 1;
}

.product_list_controls .icon {
  width: 16px;
  height: 16px;
}

.order_select_wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.4rem 0.6rem;
  background-color: #fff;
  border-left: 1px solid #ccc;
}

.order_select_wrapper label {
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
  display: flex;
  gap: 5px;
  align-items: center;
}

.order_select {
  font-size: 1rem;
  padding: 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 100%;
  display: none;
}

/* Panel deslizante para mobile */
.mobile_slide_panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  visibility: hidden;
  z-index: 1010;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  transition: visibility 0.3s, height 0.3s ease;
}

.mobile_slide_panel.active {
  height: 100%;
  visibility: visible;
}

.mobile_slide_inner {
  background: white;
  width: 100%;
  max-height: 90%;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  padding: 1rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  padding-top: 0;
}

.mobile_slide_panel.active .mobile_slide_inner {
  transform: translateY(0);
}

.close_slide_panel {
  display: block;
  margin-left: auto;
  font-size: 1.2rem;
  background: none;
  border: none;
  cursor: pointer;
}

.filter_toggle {
  background: none;
  border: none;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  margin-top: 2.5rem;
}
.mobile_order_option input[type="radio"] {
  transform: scale(1.1);
}
.mobile_order_option input[type="radio"]:checked + span {
  font-weight: 600;
}
/* 🖥️ Desktop Styles */
@media (min-width: 768px) {
  .product_list_section {
    display: grid;
    grid-template-columns: 250px 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "title    order"
      "layout  layout";
    column-gap: 1.5rem;
    row-gap: 1.5rem;
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 2.5rem;
  }

  .product_list_header {
    grid-area: title;
    align-self: center;
    justify-self: flex-start;
    font-size: 2rem;
    font-weight: bold;
    white-space: nowrap;
    align-items: flex-start;
    margin-bottom: 0;
  }

  .product_list_controls {
    grid-area: order;
    justify-self: end;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    margin-bottom: 0;
  }

  .order_select_wrapper {
    flex-direction: column;
    align-items: flex-end;
    justify-self: end;
  }

  .order_select_wrapper label {
    white-space: nowrap;
    display: none;
    margin-right: 0.5rem;
  }

  .order_select_wrapper {
    width: auto;
  }

  .order_select {
    text-align: end;
    display: block;
  }

  .product_list_layout {
    display: grid;
    grid-area: layout;
    grid-template-columns: 250px 1fr;
    gap: 1.5rem;
  }

  .filters_panel {
    padding-right: 1rem;
    display: block;
  }

  .filter_dropdown .dropdown_arrow {
    display: none;
  }

  .products_grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
  }

  .filter_btn {
    display: none;
  }
  .product_list_controls,
  .order_select_wrapper {
    border: none;
  }
  .order_select_wrapper .icon {
    display: none;
  }
}

.breadcrumb {
  font-size: 0.9rem;
  color: #666;
  margin: 1rem 0 0.25rem 0;
}
.breadcrumb a {
  color: inherit;
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb .sep {
  margin: 0 0.25rem;
}
.breadcrumb .current {
  font-weight: 600;
  color: #333;
}
@media (min-width: 768px) {
  .breadcrumb {
    margin: 0 0 0.25rem 0;
    grid-column: 1 / -1;
  }
}
/* centra la tarjeta dentro de la grilla */
.products_grid .empty_state {
  grid-column: 1 / -1; /* ocupa todo el ancho de columnas */
  justify-self: center; /* centra horizontalmente */
  max-width: 520px;
  width: 100%;
  height: fit-content;
}
.empty_state {
  border: 1px dashed #ccc;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  margin: 1rem 0;
}
.empty_emoji {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.empty_title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.empty_subtitle {
  color: #666;
  margin-bottom: 1rem;
}
.empty_clear_btn {
  padding: 0.5rem 0.9rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #f5f5f5;
  cursor: pointer;
}
.empty_clear_btn:hover {
  background: #eee;
}

/* Desktop */
#active_filters_summary {
  font-size: 0.9rem;
  color: #444;
  margin: 0 0 0.75rem 0;
  line-height: 1.35;
}

/* Mobile panel */
.mobile_active_summary {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.75rem;
}

#active_filters_summary,
.mobile_active_summary {
  white-space: pre-line; /* respeta \n */
}

.filter_btn .filter_count {
  font-weight: 600;
  margin-left: 0.25rem;
}

.mobile_panel_header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.75rem 0.5rem 1.75rem 0.5rem;
  border-bottom: 1px solid #eee;
}

.mobile_panel_title {
  font-weight: 600;
  font-size: 1rem;
}

.mobile_panel_actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: static;
}

.mobile_panel_actions .header_clear_btn {
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #f7f7f7;
  font-size: 0.9rem;
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  top: 50%;
  margin-top: 0;
  white-space: nowrap;
}

.mobile_panel_actions .header_clear_btn:hover {
  background: #efefef;
}

.close_slide_panel {
  font-size: 1.2rem;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}
