.waf-archive {
  --waf-primary: var(--e-global-color-primary);
  --waf-accent: var(--e-global-color-primary);
  --waf-border: #e5e7eb;
  --waf-muted: #6b7280;
  --waf-bg: #ffffff;
  --waf-soft: #f8fafc;

  display: grid;
  grid-template-columns: 22% 78%;
  width: 100%;
  gap: 35px;
  box-sizing: border-box;
  position: relative;
}

.waf-archive *,
.waf-archive *::before,
.waf-archive *::after {
  box-sizing: border-box;
}

/* --------------------------------
   SIDEBAR
-------------------------------- */

.waf-sidebar {
  width: 100%;
}

.waf-filter-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--waf-border);
}

.waf-filter-title strong {
  font-weight: 500 !important;
}

.waf-filter-icon {
  font-size: 18px;
}

.waf-filter-section {
  padding: 32px 0;
}

.waf-filter-section h3 {
  margin: 0px;
  font-size: 18px;
  font-weight: 500;
  color: #000;
}

/* --------------------------------
   PRICE
-------------------------------- */

.waf-price-slider {
  position: relative;
  height: 45px;
  margin: 5px 5px 0;
}

.waf-slider-track {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 5px;
  background: #e5e7eb;
  border-radius: 10px;
  z-index: 1;
}

.waf-range {
  position: absolute;
  left: 0;
  top: 13px;
  width: 100%;
  height: 18px;
  pointer-events: none;
  appearance: none;
  background: transparent;
  z-index: 3;
}

.waf-range::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--waf-accent);
  border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
  cursor: pointer;
}

.waf-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--waf-accent);
  border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
  cursor: pointer;
}

.waf-price-values {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-weight: 600;
  font-size: 17px;
}

.waf-reset-price {
  margin-top: 5px;
  border-radius: 200px;
  background: var(--waf-primary) !important;
  padding: 8px 14px;
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  text-decoration: none;
}

/* --------------------------------
   CHECKBOXES
-------------------------------- */

.waf-rating-row,
.waf-category-list label,
.waf-brand-list label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  cursor: pointer;
  font-size: 14px;
}

.waf-rating-row input,
.waf-category-list input,
.waf-brand-list input {
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  position: relative;
  cursor: pointer;
}

.waf-rating-row input:checked,
.waf-category-list input:checked,
.waf-brand-list input:checked {
  background: var(--waf-primary);
  border-color: var(--waf-primary);
}

.waf-rating-row input:checked::after,
.waf-category-list input:checked::after,
.waf-brand-list input:checked::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  top: 5px;
  left: 5px;
}

.waf-rating-list,
.waf-category-list {
  width: 100%;
  margin-top: 20px;
}

.waf-stars {
  white-space: nowrap;
  letter-spacing: 1px;
  font-size: 16px;
}

.waf-stars .active {
  color: #f59e0b;
}

.waf-stars .inactive {
  color: #d9dee5;
  opacity: 0.75;
}

.waf-rating-label {
  color: var(--waf-muted);
  margin-left: auto;
  font-size: 12px;
}

/* --------------------------------
   CATEGORIES / BRANDS
-------------------------------- */

.waf-category-list label,
.waf-brand-list label {
  width: 100%;
}

.waf-category-list label span,
.waf-brand-list label span {
  flex: 1;
}

.waf-category-list small,
.waf-brand-list small {
  color: #9ca3af;
  font-size: 12px;
}

/* --------------------------------
   RESET
-------------------------------- */

.waf-reset-all {
  width: 100%;
  margin-top: 22px;
  min-height: 46px;
  border: 1px solid var(--waf-primary);
  background: var(--waf-primary);
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s ease;
}

.waf-reset-all:hover {
  background: #000;
}

/* --------------------------------
   PRODUCTS AREA
-------------------------------- */

.waf-products-area {
  min-width: 0;
}

.waf-toolbar {
  min-height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
  padding-bottom: 0;
}

.waf-result-text {
  color: #000;
  font-size: 18px;
  font-weight: 500;
}

.waf-sort-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--waf-muted);
  font-size: 14px;
}

.waf-orderby {
  min-width: 210px;
  height: 42px;
  border: 1px solid var(--waf-border);
  background: #f8f5ef;
  padding: 0 12px;
  border-radius: 5px;
  outline: none;
}

/* --------------------------------
   GRID
-------------------------------- */

.waf-products-grid {
  display: grid;
  grid-template-columns: repeat(var(--waf-desktop-columns, 3), minmax(0, 1fr));
  gap: 25px;
}

.waf-product-item {
  min-width: 0;
}

/* WooCommerce default card */
.waf-product-item ul.products {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

.waf-product-item li.product {
  width: 100% !important;
  margin: 0 !important;
}

/* --------------------------------
   LOADER
-------------------------------- */

.waf-products-wrapper {
  position: relative;
  min-height: 200px;
}

.waf-loader {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
}

.waf-products-wrapper.is-loading .waf-loader {
  display: flex;
}

.waf-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #e5e7eb;
  border-top-color: var(--waf-primary);
  border-radius: 50%;
  animation: waf-spin 0.7s linear infinite;
}

@keyframes waf-spin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------
   EMPTY
-------------------------------- */

.waf-no-products {
  grid-column: 1 / -1;
  padding: 80px 20px;
  text-align: center;
  border: 1px solid var(--waf-border);
  border-radius: 8px;
}

.waf-no-products-icon {
  font-size: 50px;
  margin-bottom: 15px;
  color: #cbd5e1;
}

.waf-no-products h3 {
  margin: 0 0 8px;
}

.waf-no-products p {
  margin: 0;
  color: var(--waf-muted);
}

.waf-error {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  color: #b91c1c;
}

/* --------------------------------
   PAGINATION
-------------------------------- */

.waf-pagination {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.waf-page-numbers {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.waf-page-number {
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--waf-border);
  background: #fff;
  color: var(--waf-primary);
  border-radius: 5px;
  cursor: pointer;
}

.waf-page-number:hover,
.waf-page-number.active {
  background: var(--waf-primary);
  border-color: var(--waf-primary);
  color: #fff;
}

.waf-load-more {
  min-width: 190px;
  height: 46px;
  border: 0;
  background: var(--waf-primary);
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
}

.waf-load-more:hover {
  background: #000;
}

/* --------------------------------
   RESPONSIVE
-------------------------------- */

@media (min-width: 1025px) {
  .waf-products-grid {
    grid-template-columns: repeat(
      var(--waf-desktop-columns, 3),
      minmax(0, 1fr)
    );
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .waf-archive {
    grid-template-columns: 28% 72%;
    gap: 25px;
  }

  .waf-products-grid {
    grid-template-columns: repeat(var(--waf-tablet-columns, 2), minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .waf-archive {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .waf-sidebar {
    width: 100%;
  }

  .waf-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .waf-sort-label {
    justify-content: space-between;
  }

  .waf-orderby {
    flex: 1;
    min-width: 0;
  }

  .waf-products-grid {
    grid-template-columns: repeat(var(--waf-mobile-columns, 1), minmax(0, 1fr));
  }
}
