/* WooCommerce Loop Grid Toolbar Main Styles */
.woo-loop-grid-toolbar-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  padding: 12px 18px;
  background: #ffffff;
  border-radius: 10px;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  font-family: inherit;
}

.woo-toolbar-left,
.woo-toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Filter Button */
.woo-toolbar-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #c82333;
  color: #ffffff;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.woo-toolbar-filter-btn:hover {
  background-color: #a71d2a;
  transform: translateY(-1px);
}

.woo-filter-icon svg,
.woo-filter-icon i {
  font-size: 14px;
  width: 14px;
  height: 14px;
}

/* Product Count */
.woo-toolbar-product-count {
  color: #666666;
  font-size: 14px;
  font-weight: 500;
}

.woo-toolbar-count-num {
  font-weight: 700;
  color: #222222;
}

/* Sorting Dropdown */
.woo-toolbar-sorting {
  display: flex;
  align-items: center;
  gap: 8px;
}

.woo-sorting-label {
  font-size: 14px;
  color: #777777;
  font-weight: 500;
}

.woo-toolbar-sort-select {
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
  color: #333333;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
}

.woo-toolbar-sort-select:focus {
  border-color: #c82333;
}

/* View Switcher Buttons */
.woo-toolbar-view-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
}

.woo-toolbar-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #888888;
  cursor: pointer;
  transition: all 0.2s ease;
}

.woo-toolbar-view-btn:hover {
  color: #c82333;
  background-color: #fcefe8;
}

.woo-toolbar-view-btn.is-active {
  color: #c82333;
  background-color: #fdeef0;
}

/* =======================================================
   Elementor Loop Grid Custom Layout Transformations
   -------------------------------------------------------
   Column counts are NOT here: they are generated per widget from the Views
   repeater, using the site's own Elementor breakpoints. See
   Woo_Loop_Grid_Toolbar_Widget::print_views_css().
   ======================================================= */

/* List View. NOTE: Elementor Pro wraps each item in `.e-loop-item`;
   `.elementor-loop-item` only exists on older Pro versions, so both are
   always targeted together. */
.woo-layout-is-list {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 16px !important;
}

.woo-layout-is-list .e-loop-item,
.woo-layout-is-list .elementor-loop-item {
  width: 100% !important;
  max-width: 100% !important;
}

/* List view internal item flex layout on desktop */
@media (min-width: 768px) {
  .woo-layout-is-list .e-loop-item > .elementor-element,
  .woo-layout-is-list .elementor-loop-item > .elementor-element {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
}

/* Toolbar Mobile Adjustments */
@media (max-width: 767px) {
  .woo-loop-grid-toolbar-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  .woo-toolbar-left,
  .woo-toolbar-right {
    justify-content: space-between;
    width: 100%;
  }
  .woo-toolbar-right {
    margin-top: 5px;
  }
}
