/* ============================================================
   Elementor WooCommerce AJAX Product Filter
   Design system: Neuro Binding
   ============================================================ */

.ewaf-container {
  /* brand palette */
  --ewaf-purple: #A100FF;
  --ewaf-purple-deep: #7A00C2;
  --ewaf-blue: #003366;
  --ewaf-blue-2: #318BE6;
  --ewaf-gray: #4D4D4D;
  --ewaf-white: #FFFFFF;
  --ewaf-ink: #0f1f33;

  --ewaf-tint-purple: rgba(161, 0, 255, .06);
  --ewaf-tint-purple-2: rgba(161, 0, 255, .10);
  --ewaf-tint-blue: rgba(0, 51, 102, .05);
  --ewaf-line: rgba(0, 51, 102, .12);
  --ewaf-line-soft: rgba(0, 51, 102, .08);

  --ewaf-shadow-sm: 0 1px 2px rgba(0, 51, 102, .06);
  --ewaf-shadow: 0 10px 30px -12px rgba(0, 51, 102, .18);
  --ewaf-shadow-lg: 0 24px 60px -20px rgba(0, 51, 102, .28);

  --ewaf-r: 16px;
  --ewaf-r-lg: 20px;
  --ewaf-r-sm: 10px;

  --ewaf-sans: "Poppins", system-ui, -apple-system, sans-serif;
  --ewaf-body: Helvetica, Arial, sans-serif;

  --ewaf-muted: #6d7a88;
  --ewaf-muted-2: #8894a2;
  --ewaf-muted-3: #a4b0bd;

  font-family: var(--ewaf-body);
  color: var(--ewaf-gray);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

.ewaf-container *,
.ewaf-container *::before,
.ewaf-container *::after {
  box-sizing: border-box;
}

.ewaf-container h1,
.ewaf-container h2,
.ewaf-container h3,
.ewaf-container h4 {
  font-family: var(--ewaf-sans);
  color: var(--ewaf-blue);
  line-height: 1.12;
  margin: 0;
  font-weight: 700;
}

.ewaf-container img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.ewaf-layout {
  display: grid;
  grid-template-columns: 262px 1fr;
  gap: 32px;
  align-items: start;
}

.ewaf-layout.ewaf-no-sidebar {
  grid-template-columns: 1fr;
}

.ewaf-products-section {
  min-width: 0;
}

/* ============================================================
   FILTER SIDEBAR
   ============================================================ */
.ewaf-filter-section {
  background: #fff;
  border: 1px solid var(--ewaf-line-soft);
  border-radius: var(--ewaf-r);
  padding: 8px 20px 20px;
  position: sticky;
  top: 96px;
}

/* sidebar header: title + Clear all + close */
.ewaf-fhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 0 6px;
}

.ewaf-fhead h4 {
  font-family: var(--ewaf-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--ewaf-blue);
  margin: 0;
  margin-right: auto;
}

/* "Clear all" is a text link, not a boxed button */
.ewaf-fhead .ewaf-clear-link {
  font-family: var(--ewaf-sans);
  font-size: 12.5px;
  color: var(--ewaf-purple);
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: auto;
  line-height: 1.4;
}

.ewaf-fhead .ewaf-clear-link:hover {
  text-decoration: underline;
  background: none;
  border: none;
  color: var(--ewaf-purple-deep);
}

.ewaf-filter-close-button {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ewaf-blue);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
  transition: background .15s ease, color .15s ease;
}

.ewaf-filter-close-button:hover {
  background: var(--ewaf-tint-blue);
  color: var(--ewaf-purple);
}

.ewaf-filter-close-button svg {
  width: 20px;
  height: 20px;
}

/* filter groups */
.ewaf-filter-item {
  border-top: 1px solid var(--ewaf-line-soft);
  padding: 16px 0;
  margin: 0;
}

.ewaf-filter-item:first-of-type {
  border-top: none;
}

.ewaf-filter-title {
  font-family: var(--ewaf-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ewaf-blue);
  margin: 0 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  letter-spacing: .2px;
}

/* accordion header with chevron */
.ewaf-accordion-header {
  cursor: pointer;
  position: relative;
  padding-right: 24px;
  user-select: none;
}

.ewaf-accordion-header::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ewaf-muted-2);
  border-bottom: 2px solid var(--ewaf-muted-2);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s ease;
}

.ewaf-accordion.active .ewaf-accordion-header::after,
.ewaf-accordion-header.active::after {
  transform: translateY(-25%) rotate(-135deg);
}

.ewaf-accordion-content {
  display: none;
}

.ewaf-accordion.active .ewaf-accordion-content,
.ewaf-accordion-content.active {
  display: block;
}

/* checkbox / radio options */
.ewaf-filter-options {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 2px;
}

.ewaf-filter-options::-webkit-scrollbar {
  width: 4px;
}

.ewaf-filter-options::-webkit-scrollbar-thumb {
  background: var(--ewaf-line);
  border-radius: 4px;
}

.ewaf-filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  position: relative;
}

.ewaf-filter-option input[type="checkbox"],
.ewaf-filter-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.ewaf-filter-option label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: var(--ewaf-body);
  font-size: 14px;
  color: var(--ewaf-gray);
  line-height: 1.35;
  width: 100%;
  margin: 0;
  transition: color .15s ease;
}

.ewaf-filter-option label::before {
  content: "";
  width: 19px;
  height: 19px;
  border: 1.5px solid var(--ewaf-line);
  border-radius: 6px;
  flex: none;
  background: #fff;
  transition: all .15s ease;
}

.ewaf-filter-option input[type="radio"] + label::before {
  border-radius: 50%;
}

.ewaf-filter-option label::after {
  content: "";
  position: absolute;
  left: 6px;
  width: 6px;
  height: 11px;
  border-right: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(45deg) scale(.6);
  opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
  margin-top: -2px;
}

.ewaf-filter-option input:checked + label::before {
  background: var(--ewaf-purple);
  border-color: var(--ewaf-purple);
}

.ewaf-filter-option input:checked + label::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.ewaf-filter-option input:focus-visible + label::before {
  outline: 3px solid rgba(161, 0, 255, .4);
  outline-offset: 2px;
}

.ewaf-filter-option label:hover {
  color: var(--ewaf-blue);
}

/* count badge next to labels */
.ewaf-filter-option .ewaf-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--ewaf-muted-3);
  font-family: var(--ewaf-sans);
  flex: none;
}

/* rating stars in filter */
.ewaf-filter-option label.rating {
  color: #f5a623;
  letter-spacing: 1px;
  font-size: 15px;
}

/* search box */
.ewaf-search-filter {
  padding-top: 18px;
}

.ewaf-search-input {
  width: 100%;
  border: 1px solid var(--ewaf-line);
  border-radius: var(--ewaf-r-sm);
  padding: 11px 14px;
  font-family: var(--ewaf-body);
  font-size: 14px;
  color: var(--ewaf-ink);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.ewaf-search-input::placeholder {
  color: var(--ewaf-muted-2);
}

.ewaf-search-input:focus {
  outline: none;
  border-color: var(--ewaf-purple);
  box-shadow: 0 0 0 3px rgba(161, 0, 255, .14);
}

/* price slider */
.ewaf-price-slider {
  padding: 6px 4px 0;
}

.ewaf-price-range.ui-slider {
  position: relative;
  height: 5px;
  background: var(--ewaf-line);
  border: none;
  border-radius: 4px;
  margin: 14px 8px 18px;
}

.ewaf-price-range .ui-slider-range {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, var(--ewaf-purple), var(--ewaf-blue-2));
  border-radius: 4px;
}

.ewaf-price-range .ui-slider-handle {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  transform: translateY(-50%);
  background: #fff;
  border: 2.5px solid var(--ewaf-purple);
  border-radius: 50%;
  cursor: grab;
  outline: none;
  box-shadow: var(--ewaf-shadow-sm);
  transition: box-shadow .15s ease;
}

.ewaf-price-range .ui-slider-handle:hover,
.ewaf-price-range .ui-slider-handle:focus {
  box-shadow: 0 0 0 5px rgba(161, 0, 255, .16);
}

.ewaf-price-range .ui-slider-handle:active {
  cursor: grabbing;
}

.ewaf-price-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--ewaf-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ewaf-blue);
}

.ewaf-price-values .ewaf-min-price,
.ewaf-price-values .ewaf-max-price {
  background: var(--ewaf-tint-purple);
  border: 1px solid var(--ewaf-tint-purple-2);
  border-radius: 20px;
  padding: 4px 12px;
  color: var(--ewaf-purple);
}

/* sorting select in sidebar */
.ewaf-sorting-filter .ewaf-sorting-select {
  width: 100%;
}

/* reset button */
.ewaf-filter-actions {
  padding-top: 18px;
  border-top: 1px solid var(--ewaf-line-soft);
  margin-top: 4px;
}

.ewaf-reset-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-family: var(--ewaf-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--ewaf-blue);
  border: 2px solid var(--ewaf-line);
  line-height: 1;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.ewaf-reset-button:hover {
  border-color: var(--ewaf-purple);
  color: var(--ewaf-purple);
  background: var(--ewaf-tint-purple);
}

/* mobile drawer footer — hidden on desktop */
.ewaf-drawer-actions {
  display: none;
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 14px 0 4px;
  border-top: 1px solid var(--ewaf-line-soft);
  margin-top: 10px;
}

.ewaf-apply-filters {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ewaf-purple);
  color: #fff;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 14px 20px;
  font-family: var(--ewaf-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease;
}

.ewaf-apply-filters:hover {
  background: var(--ewaf-purple-deep);
}

/* ============================================================
   TOP BAR
   ============================================================ */
.ewaf-top-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.ewaf-results-count {
  font-family: var(--ewaf-sans);
  font-size: 14px;
  color: var(--ewaf-muted);
  font-weight: 500;
  margin-right: auto;
}

.ewaf-results-count b,
.ewaf-results-count strong {
  color: var(--ewaf-blue);
  font-weight: 700;
}

.ewaf-results-count .ewaf-range {
  color: var(--ewaf-muted-2);
  font-size: 13px;
}

.ewaf-top-bar-sorting {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ewaf-sort-label {
  font-family: var(--ewaf-sans);
  font-size: 13px;
  color: var(--ewaf-muted-2);
  margin: 0;
}

/* grid / list view toggle */
.ewaf-viewtoggle {
  display: inline-flex;
  border: 1px solid var(--ewaf-line);
  border-radius: var(--ewaf-r-sm);
  overflow: hidden;
  flex: none;
}

.ewaf-view-btn {
  border: none;
  background: #fff;
  padding: 9px 11px;
  cursor: pointer;
  color: var(--ewaf-muted-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, color .15s ease;
}

.ewaf-view-btn + .ewaf-view-btn {
  border-left: 1px solid var(--ewaf-line);
}

.ewaf-view-btn svg {
  width: 18px;
  height: 18px;
}

.ewaf-view-btn:hover {
  color: var(--ewaf-purple);
}

.ewaf-view-btn.active,
.ewaf-view-btn[aria-pressed="true"] {
  background: var(--ewaf-tint-purple);
  color: var(--ewaf-purple);
}

.ewaf-sorting-select {
  font-family: var(--ewaf-sans);
  font-size: 14px;
  color: var(--ewaf-blue);
  border: 1px solid var(--ewaf-line);
  border-radius: var(--ewaf-r-sm);
  padding: 9px 34px 9px 12px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238894a2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 14px 14px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.ewaf-sorting-select:focus {
  outline: none;
  border-color: var(--ewaf-purple);
  box-shadow: 0 0 0 3px rgba(161, 0, 255, .14);
}

/* mobile filter toggle */
.ewaf-filter-toggle {
  display: none;
}

.ewaf-filter-toggle-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--ewaf-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--ewaf-blue);
  background: #fff;
  border: 1px solid var(--ewaf-line);
  border-radius: var(--ewaf-r-sm);
  padding: 9px 14px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}

.ewaf-filter-toggle-button:hover {
  border-color: var(--ewaf-purple);
  color: var(--ewaf-purple);
}

.ewaf-filter-toggle-button svg {
  width: 16px;
  height: 16px;
}

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.ewaf-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 22px;
}

.ewaf-products-grid.columns-1 { grid-template-columns: 1fr; }
.ewaf-products-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.ewaf-products-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.ewaf-products-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }
.ewaf-products-grid.columns-5 { grid-template-columns: repeat(5, 1fr); }

.ewaf-grid-1 .ewaf-products-grid { grid-template-columns: 1fr; }
.ewaf-grid-2 .ewaf-products-grid { grid-template-columns: repeat(2, 1fr); }
.ewaf-grid-3 .ewaf-products-grid { grid-template-columns: repeat(3, 1fr); }
.ewaf-grid-4 .ewaf-products-grid { grid-template-columns: repeat(4, 1fr); }
.ewaf-grid-5 .ewaf-products-grid { grid-template-columns: repeat(5, 1fr); }

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.ewaf-product-card {
  background: #fff;
  border: 1px solid var(--ewaf-line-soft);
  border-radius: var(--ewaf-r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.ewaf-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ewaf-shadow);
  border-color: var(--ewaf-tint-purple-2);
}

/* --- cover / image --- */
.ewaf-product-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.ewaf-product-image-wrap {
  position: relative;
  display: block;
  height: 100%;
}

.ewaf-product-image-wrap > a,
.ewaf-product-image > a {
  display: block;
  height: 100%;
}

.ewaf-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.ewaf-product-card:hover .ewaf-product-image img {
  transform: scale(1.04);
}

/* gradient cover (shown when a product has no image) */
.ewaf-pcover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  color: #fff;
  transition: transform .3s ease;
}

.ewaf-product-card:hover .ewaf-pcover {
  transform: scale(1.04);
}

.ewaf-pcover .ewaf-pcover-cat {
  font-family: var(--ewaf-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  opacity: .85;
  position: relative;
  z-index: 1;
  /* keep the category clear of any badge sitting in the top-left */
  align-self: flex-end;
  text-align: right;
  max-width: 58%;
}

.ewaf-pcover .ewaf-pcover-title {
  font-family: var(--ewaf-sans);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.12;
  letter-spacing: -.3px;
  position: relative;
  z-index: 1;
}

.ewaf-pcover .ewaf-nodes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .28;
  pointer-events: none;
}

/* cover colour variants — cycled per card */
.ewaf-cv-purple { background: linear-gradient(160deg, var(--ewaf-purple), var(--ewaf-purple-deep)); }
.ewaf-cv-blue   { background: linear-gradient(160deg, #0a4a86, var(--ewaf-blue)); }
.ewaf-cv-deep   { background: linear-gradient(160deg, #123a63, #04203d); }
.ewaf-cv-blue2  { background: linear-gradient(160deg, #4aa0f0, #1f6fc4); }
.ewaf-cv-light  { background: linear-gradient(160deg, #fff, #f3ecfe); color: var(--ewaf-blue); }

.ewaf-cv-light .ewaf-pcover-cat { color: var(--ewaf-purple); opacity: 1; }
.ewaf-cv-light .ewaf-pcover-title { color: var(--ewaf-blue); }

/* --- badges --- */
.ewaf-product-badge-wrap {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 3;
}

.ewaf-product-badge {
  background: var(--ewaf-purple);
  color: #fff;
  font-family: var(--ewaf-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .4px;
  padding: 5px 10px;
  border-radius: 20px;
  line-height: 1.2;
  white-space: nowrap;
}

.ewaf-product-badge.featured { background: var(--ewaf-purple); }
.ewaf-product-badge.new { background: var(--ewaf-blue-2); }
.ewaf-product-badge.best-seller { background: var(--ewaf-purple); }
.ewaf-product-badge.popular { background: var(--ewaf-blue); }
.ewaf-product-badge.free { background: #1f9d55; }

.ewaf-savings {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #1f9d55;
  color: #fff;
  font-family: var(--ewaf-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .4px;
  padding: 5px 10px;
  border-radius: 20px;
  z-index: 3;
  line-height: 1.2;
}

/* --- quick view --- */
.ewaf-product-actions {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease;
}

.ewaf-product-card:hover .ewaf-product-actions {
  opacity: 1;
  transform: translateY(0);
}

.ewaf-quick-view-button {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .95);
  color: var(--ewaf-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--ewaf-shadow-sm);
  transition: background .15s ease, color .15s ease;
}

.ewaf-quick-view-button:hover {
  background: var(--ewaf-purple);
  color: #fff;
}

.ewaf-quick-view-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* --- body --- */
.ewaf-product-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.bwd-category-rating-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-family: var(--ewaf-sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--ewaf-blue-2);
}

.ewaf-product-category {
  line-height: 1.3;
}

.ewaf-product-format {
  color: var(--ewaf-muted-2);
  letter-spacing: .3px;
  text-align: right;
  font-family: var(--ewaf-sans);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
}

.ewaf-product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.ewaf-rating-stars {
  color: #f5a623;
  font-size: 13px;
  letter-spacing: .5px;
}

.ewaf-star-empty {
  color: var(--ewaf-line);
}

.ewaf-rating-count {
  color: var(--ewaf-muted-2);
  font-size: 11px;
  font-weight: 500;
}

.ewaf-product-title {
  font-family: var(--ewaf-sans);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.2px;
  margin: 0;
}

.ewaf-product-title a {
  color: var(--ewaf-blue);
  text-decoration: none;
  transition: color .15s ease;
}

.ewaf-product-title a:hover {
  color: var(--ewaf-purple);
}

.ewaf-product-desc {
  font-size: 14px;
  color: var(--ewaf-muted);
  line-height: 1.55;
  flex: 1;
  margin: 0;
}

/* --- footer: price + actions --- */
.ewaf-product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  margin-top: auto;
  padding-top: 6px;
  flex-wrap: wrap;
}

/* when the card is narrow, let price and buttons occupy their own rows */
.ewaf-product-foot > * {
  min-width: 0;
}

.ewaf-product-price {
  font-family: var(--ewaf-sans);
  font-weight: 700;
  font-size: 22px;
  color: var(--ewaf-blue);
  line-height: 1.2;
}

.ewaf-product-price del {
  font-size: 13px;
  color: var(--ewaf-muted-3);
  text-decoration: line-through;
  margin-right: 4px;
  font-weight: 500;
}

.ewaf-product-price ins {
  text-decoration: none;
  background: transparent;
  color: var(--ewaf-blue);
}

.ewaf-product-price .woocommerce-Price-currencySymbol {
  font-size: .85em;
}

.ewaf-product-price small,
.ewaf-product-price .ewaf-save-note {
  font-size: 12px;
  color: var(--ewaf-muted-3);
  font-weight: 500;
}

.ewaf-product-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-left: auto;
}

/* container-query style fallback: in tight cards the buttons take a full row */
@media (min-width: 641px) {
  .ewaf-products-grid.columns-3 .ewaf-product-buttons,
  .ewaf-products-grid.columns-4 .ewaf-product-buttons,
  .ewaf-products-grid.columns-5 .ewaf-product-buttons {
    width: 100%;
    margin-left: 0;
  }

  .ewaf-products-grid.columns-3 .ewaf-view-button,
  .ewaf-products-grid.columns-4 .ewaf-view-button,
  .ewaf-products-grid.columns-5 .ewaf-view-button,
  .ewaf-products-grid.columns-3 .ewaf-add-to-cart-button,
  .ewaf-products-grid.columns-4 .ewaf-add-to-cart-button,
  .ewaf-products-grid.columns-5 .ewaf-add-to-cart-button {
    flex: 1 1 0;
    padding-left: 12px;
    padding-right: 12px;
    white-space: nowrap;
  }
}

/* view (ghost) button */
.ewaf-view-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fff;
  color: var(--ewaf-blue);
  border: 2px solid var(--ewaf-line);
  border-radius: 12px;
  padding: 11px 18px;
  font-family: var(--ewaf-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease;
}

.ewaf-view-button:hover {
  border-color: var(--ewaf-purple);
  color: var(--ewaf-purple);
}

/* add to cart (primary) */
.ewaf-add-to-cart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ewaf-purple);
  color: #fff !important;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 11px 16px;
  font-family: var(--ewaf-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}

.ewaf-add-to-cart-button:hover {
  background: var(--ewaf-purple-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(161, 0, 255, .5);
  color: #fff !important;
}

.ewaf-add-to-cart-button svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex: none;
}

.ewaf-add-to-cart-button.loading {
  opacity: .7;
  pointer-events: none;
}

.ewaf-add-to-cart-button.added {
  background: #1f9d55;
}

/* ============================================================
   LIST VIEW
   Cards become horizontal rows: cover left, content right.
   ============================================================ */
.ewaf-grid-wrap.ewaf-list-view .ewaf-products-grid,
.ewaf-grid-wrap.ewaf-list-view .ewaf-products-grid.columns-1,
.ewaf-grid-wrap.ewaf-list-view .ewaf-products-grid.columns-2,
.ewaf-grid-wrap.ewaf-list-view .ewaf-products-grid.columns-3,
.ewaf-grid-wrap.ewaf-list-view .ewaf-products-grid.columns-4,
.ewaf-grid-wrap.ewaf-list-view .ewaf-products-grid.columns-5 {
  grid-template-columns: 1fr;
  gap: 16px;
}

.ewaf-grid-wrap.ewaf-list-view .ewaf-product-card {
  flex-direction: row;
}

.ewaf-grid-wrap.ewaf-list-view .ewaf-product-image {
  width: 260px;
  flex: none;
  aspect-ratio: auto;
}

.ewaf-grid-wrap.ewaf-list-view .ewaf-product-info {
  flex: 1;
  justify-content: center;
}

.ewaf-grid-wrap.ewaf-list-view .ewaf-product-desc {
  flex: none;
}

/* in list mode there is room for the buttons beside the price again */
.ewaf-grid-wrap.ewaf-list-view .ewaf-product-buttons {
  width: auto;
  margin-left: auto;
}

.ewaf-grid-wrap.ewaf-list-view .ewaf-view-button,
.ewaf-grid-wrap.ewaf-list-view .ewaf-add-to-cart-button {
  flex: 0 0 auto;
}

@media (max-width: 640px) {
  /* stack again on small screens so the row never gets cramped */
  .ewaf-grid-wrap.ewaf-list-view .ewaf-product-card {
    flex-direction: column;
  }

  .ewaf-grid-wrap.ewaf-list-view .ewaf-product-image {
    width: 100%;
    aspect-ratio: 16 / 10;
  }

  .ewaf-grid-wrap.ewaf-list-view .ewaf-product-buttons {
    width: 100%;
    margin-left: 0;
  }

  .ewaf-grid-wrap.ewaf-list-view .ewaf-view-button,
  .ewaf-grid-wrap.ewaf-list-view .ewaf-add-to-cart-button {
    flex: 1;
  }
}

/* ============================================================
   NO RESULTS / LOADING
   ============================================================ */
.no-products,
.ewaf-no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--ewaf-line);
  border-radius: var(--ewaf-r);
  background: #fff;
  font-family: var(--ewaf-sans);
  font-size: 16px;
  color: var(--ewaf-muted);
}

.ewaf-products-grid.loading,
.ewaf-products-grid.ewaf-loading {
  opacity: .45;
  pointer-events: none;
  transition: opacity .2s ease;
}

/* inline "Loading..." text inside the quick view modal */
.ewaf-loading {
  text-align: center;
  padding: 50px 20px;
  font-family: var(--ewaf-sans);
  color: var(--ewaf-muted);
}

/* ============================================================
   PAGINATION / LOAD MORE
   ============================================================ */
.ewaf-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
}

.ewaf-pagination-btn,
.ewaf-pagination a,
.ewaf-pagination span {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ewaf-line);
  border-radius: var(--ewaf-r-sm);
  background: #fff;
  color: var(--ewaf-blue);
  font-family: var(--ewaf-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s ease;
}

.ewaf-pagination-btn:hover,
.ewaf-pagination a:hover {
  border-color: var(--ewaf-purple);
  color: var(--ewaf-purple);
  background: var(--ewaf-tint-purple);
}

.ewaf-pagination-btn.active,
.ewaf-pagination-btn.current,
.ewaf-pagination .current {
  background: var(--ewaf-purple);
  border-color: var(--ewaf-purple);
  color: #fff;
}

.ewaf-pagination-btn:disabled,
.ewaf-pagination-btn.disabled {
  opacity: .45;
  cursor: not-allowed;
}

.ewaf-load-more-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
}

.ewaf-load-more-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--ewaf-purple);
  color: #fff;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 14px 30px;
  font-family: var(--ewaf-sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}

.ewaf-load-more-button:hover {
  background: var(--ewaf-purple-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(161, 0, 255, .5);
}

.ewaf-load-more-button:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ewaf-loading-spinner {
  display: none;
  width: 30px;
  height: 30px;
  border: 3px solid var(--ewaf-tint-purple-2);
  border-top-color: var(--ewaf-purple);
  border-radius: 50%;
  animation: ewaf-spin .8s linear infinite;
}

.ewaf-loading-spinner.active {
  display: block;
}

@keyframes ewaf-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   NOTIFICATION
   ============================================================ */
.ewaf-notification {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 100000;
  background: var(--ewaf-blue, #003366);
  color: #fff;
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: 0 24px 60px -20px rgba(0, 51, 102, .28);
  animation: ewaf-slide-in .3s ease;
}

.ewaf-notification.success { background: #1f9d55; }
.ewaf-notification.error { background: #e0245e; }

@keyframes ewaf-slide-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   QUICK VIEW MODAL
   ============================================================ */
.ewaf-quick-view-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 31, 51, .5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.ewaf-quick-view-modal.active {
  display: flex;
}

.ewaf-quick-view-content {
  position: relative;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 60px -20px rgba(0, 51, 102, .28);
  max-width: 900px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 34px;
}

.ewaf-close-quick-view {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
  color: #003366;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.ewaf-close-quick-view:hover {
  background: rgba(0, 51, 102, .05);
  color: #A100FF;
}

/* ============================================================
   MOBILE FILTER OVERLAY
   ============================================================ */
.ewaf-filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 31, 51, .5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

.ewaf-filter-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  .ewaf-products-grid.columns-5 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1024px) {
  .ewaf-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ewaf-filter-toggle {
    display: inline-flex;
  }

  /* off-canvas drawer */
  .ewaf-filter-section {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(340px, 88vw);
    max-width: 88vw;
    z-index: 100000;
    border-radius: 0;
    border: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 20px 40px;
    transform: translateX(-100%);
    transition: transform .3s ease;
    box-shadow: 0 24px 60px -20px rgba(0, 51, 102, .28);
    visibility: hidden;
  }

  .ewaf-filter-section.active {
    transform: translateX(0);
    visibility: visible;
  }

  .ewaf-filter-overlay {
    z-index: 99999;
  }

  /* close (X) button only exists in drawer mode */
  .ewaf-filter-close-button {
    display: inline-flex;
  }

  /* "Show results" button only exists in drawer mode */
  .ewaf-drawer-actions {
    display: block;
  }

  /* the sidebar header sticks while the filters scroll */
  .ewaf-fhead {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
    padding-top: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ewaf-line-soft);
    margin-bottom: 4px;
  }

  .ewaf-products-grid.columns-4,
  .ewaf-products-grid.columns-5 { grid-template-columns: repeat(3, 1fr); }
}

/* stop the page behind the drawer from scrolling */
body.ewaf-filters-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .ewaf-products-grid.columns-3,
  .ewaf-products-grid.columns-4,
  .ewaf-products-grid.columns-5 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .ewaf-container { font-size: 16px; }

  .ewaf-products-grid,
  .ewaf-products-grid.columns-2,
  .ewaf-products-grid.columns-3,
  .ewaf-products-grid.columns-4,
  .ewaf-products-grid.columns-5 {
    grid-template-columns: 1fr;
  }

  .ewaf-top-bar { gap: 10px; }

  .ewaf-results-count {
    width: 100%;
    order: 3;
    margin-right: 0;
  }

  .ewaf-product-buttons { width: 100%; }

  .ewaf-view-button,
  .ewaf-add-to-cart-button { flex: 1; }

  .ewaf-quick-view-content { padding: 24px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .ewaf-container *,
  .ewaf-filter-section,
  .ewaf-product-card {
    animation: none !important;
    transition: none !important;
  }
}
