/*
 * AH Woo Elementor Loop + Filtros — Public Stylesheet
 * Card style: Medika
 * All selectors are prefixed with .ahwoo- to prevent theme conflicts.
 * Version: 0.1.0
 */

/* ============================================================
   0. CSS Custom Properties
   ============================================================ */
:root {
  --ahwoo-primary: #0066cc;
  --ahwoo-primary-dark: #004fa3;
  --ahwoo-primary-light: #e8f0fe;
  --ahwoo-accent: #00b894;
  --ahwoo-accent-dark: #00927a;
  --ahwoo-whatsapp: #25d366;
  --ahwoo-whatsapp-dark: #1ebe5d;
  --ahwoo-danger: #e53e3e;
  --ahwoo-pix-bg: #eafaf5;
  --ahwoo-pix-text: #006e4e;
  --ahwoo-pix-border: #b2dfdb;
  --ahwoo-gray-50: #f8f9fa;
  --ahwoo-gray-100: #f1f3f5;
  --ahwoo-gray-200: #e9ecef;
  --ahwoo-gray-400: #ced4da;
  --ahwoo-gray-600: #6c757d;
  --ahwoo-gray-800: #343a40;
  --ahwoo-gray-900: #212529;
  --ahwoo-text: var(--ahwoo-gray-900);
  --ahwoo-text-muted: var(--ahwoo-gray-600);
  --ahwoo-bg: #ffffff;
  --ahwoo-border: var(--ahwoo-gray-200);
  --ahwoo-radius-sm: 6px;
  --ahwoo-radius: 10px;
  --ahwoo-radius-lg: 16px;
  --ahwoo-shadow-sm: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
  --ahwoo-shadow: 0 4px 12px rgba(0, 0, 0, .08), 0 2px 4px rgba(0, 0, 0, .05);
  --ahwoo-shadow-hover: 0 8px 24px rgba(0, 0, 0, .12), 0 3px 8px rgba(0, 0, 0, .07);
  --ahwoo-transition: 220ms ease;
  --ahwoo-font-size-xs: 11px;
  --ahwoo-font-size-sm: 13px;
  --ahwoo-font-size-base: 14px;
  --ahwoo-font-size-md: 16px;
  --ahwoo-font-size-lg: 18px;
  --ahwoo-font-size-xl: 20px;
  --ahwoo-font-weight-regular: 400;
  --ahwoo-font-weight-medium: 500;
  --ahwoo-font-weight-semibold: 600;
  --ahwoo-font-weight-bold: 700;
}

/* ============================================================
   1. Loop Grid / List Container
   ============================================================ */
.ahwoo-loop-outer {
  position: relative;
  width: 100%;
}

.ahwoo-loop--grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ahwoo-loop--list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ============================================================
   2. Card Base
   ============================================================ */
.ahwoo-card {
  background: var(--ahwoo-bg);
  border-radius: var(--ahwoo-radius);
  box-shadow: var(--ahwoo-shadow-sm);
  border: 1px solid var(--ahwoo-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--ahwoo-transition), transform var(--ahwoo-transition);
  position: relative;
}

.ahwoo-card:hover {
  box-shadow: var(--ahwoo-shadow-hover);
  transform: translateY(-2px);
}

/* List mode card */
.ahwoo-loop--list .ahwoo-card {
  flex-direction: row;
  max-height: 200px;
}

.ahwoo-loop--list .ahwoo-card__media {
  flex: 0 0 180px;
  max-width: 180px;
}

.ahwoo-loop--list .ahwoo-card__body {
  flex: 1;
  padding: 16px;
}

/* ============================================================
   3. Card Media / Image
   ============================================================ */
.ahwoo-card__media {
  position: relative;
  overflow: hidden;
  background: var(--ahwoo-gray-50);
  flex-shrink: 0;
}

/* Aspect ratios */
.ahwoo-card__media--1-1 {
  aspect-ratio: 1 / 1;
}

.ahwoo-card__media--4-5 {
  aspect-ratio: 4 / 5;
}

.ahwoo-card__media--16-9 {
  aspect-ratio: 16 / 9;
}

.ahwoo-card__media--auto {
  aspect-ratio: auto;
}

.ahwoo-card__image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.ahwoo-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 350ms ease;
}

.ahwoo-card:hover .ahwoo-card__img {
  transform: scale(1.04);
}

/* OOS overlay */
.ahwoo-card__oos-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: var(--ahwoo-font-size-base);
  font-weight: var(--ahwoo-font-weight-semibold);
  letter-spacing: .5px;
}

/* ============================================================
   4. Discount Badge
   ============================================================ */
.ahwoo-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: var(--ahwoo-font-size-xs);
  font-weight: var(--ahwoo-font-weight-bold);
  letter-spacing: .4px;
  line-height: 1;
  z-index: 2;
  white-space: nowrap;
}

.ahwoo-badge--discount {
  background: var(--ahwoo-danger);
  color: #fff;
}

/* ============================================================
   5. Card Body
   ============================================================ */
.ahwoo-card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.ahwoo-card__title {
  margin: 0;
  font-size: var(--ahwoo-font-size-base);
  font-weight: var(--ahwoo-font-weight-semibold);
  line-height: 1.4;
  color: var(--ahwoo-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ahwoo-card__title-link {
  color: inherit;
  text-decoration: none;
  transition: color var(--ahwoo-transition);
}

.ahwoo-card__title-link:hover,
.ahwoo-card__title-link:focus-visible {
  color: var(--ahwoo-primary);
  outline: none;
}

/* ============================================================
   6. Price Block
   ============================================================ */
.ahwoo-card__price-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ahwoo-price--regular {
  color: var(--ahwoo-text-muted);
  font-size: var(--ahwoo-font-size-sm);
}

.ahwoo-price--regular del {
  text-decoration-color: var(--ahwoo-text-muted);
}

.ahwoo-price-from-label {
  font-size: var(--ahwoo-font-size-xs);
  color: var(--ahwoo-text-muted);
  margin-bottom: 0;
}

.ahwoo-price--current {
  font-size: var(--ahwoo-font-size-xl);
  font-weight: var(--ahwoo-font-weight-bold);
  color: var(--ahwoo-text);
  line-height: 1.1;
}

/* WooCommerce outputs .woocommerce-Price-amount */
.ahwoo-price--current .woocommerce-Price-amount {
  font-size: inherit;
  color: inherit;
}

.ahwoo-installments {
  font-size: var(--ahwoo-font-size-xs);
  color: var(--ahwoo-text-muted);
  margin: 0;
}

/* PIX Stripe */
.ahwoo-pix-stripe {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--ahwoo-pix-bg);
  border: 1px solid var(--ahwoo-pix-border);
  border-radius: var(--ahwoo-radius-sm);
  padding: 7px 10px;
  margin-top: 4px;
}

.ahwoo-pix-icon {
  color: var(--ahwoo-pix-text);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.ahwoo-pix-label {
  font-size: var(--ahwoo-font-size-sm);
  font-weight: var(--ahwoo-font-weight-semibold);
  color: var(--ahwoo-pix-text);
}

/* ============================================================
   7. Buttons
   ============================================================ */
.ahwoo-card__buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.ahwoo-filters .ahwoo-btn,
.ahwoo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 18px;
  height: 42px !important;
  border-radius: var(--ahwoo-radius-sm);
  font-size: var(--ahwoo-font-size-base);
  font-weight: var(--ahwoo-font-weight-semibold);
  line-height: normal;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background var(--ahwoo-transition), color var(--ahwoo-transition),
    border-color var(--ahwoo-transition), box-shadow var(--ahwoo-transition),
    transform var(--ahwoo-transition);
  white-space: nowrap;
  width: 100%;
  box-sizing: border-box;
}

.ahwoo-btn:focus-visible {
  outline: 3px solid var(--ahwoo-primary);
  outline-offset: 2px;
}

/* Primary (add to cart) */
.ahwoo-btn--primary {
  background: var(--ahwoo-primary);
  color: #fff;
  border-color: var(--ahwoo-primary);
}

.ahwoo-btn--primary:hover {
  background: var(--ahwoo-primary-dark);
  border-color: var(--ahwoo-primary-dark);
  box-shadow: 0 4px 12px rgba(0, 102, 204, .35);
  transform: translateY(-1px);
  color: #fff;
}

/* Outline */
.ahwoo-btn--outline {
  background: transparent;
  color: var(--ahwoo-primary);
  border-color: var(--ahwoo-primary);
}

.ahwoo-btn--outline:hover {
  background: var(--ahwoo-primary-light);
  color: var(--ahwoo-primary-dark);
}

/* WhatsApp */
.ahwoo-btn--whatsapp {
  background: var(--ahwoo-whatsapp);
  color: #fff;
  border-color: var(--ahwoo-whatsapp);
}

.ahwoo-btn--whatsapp:hover {
  background: var(--ahwoo-whatsapp-dark);
  border-color: var(--ahwoo-whatsapp-dark);
  box-shadow: 0 4px 12px rgba(37, 211, 102, .35);
  transform: translateY(-1px);
  color: #fff;
}

/* Disabled */
.ahwoo-btn--disabled {
  background: var(--ahwoo-gray-200);
  color: var(--ahwoo-gray-600);
  border-color: var(--ahwoo-gray-200);
  cursor: not-allowed;
  pointer-events: none;
}

.ahwoo-btn__icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ahwoo-btn__icon svg,
.ahwoo-btn__icon i {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

/* ============================================================
   8. Slider
   ============================================================ */
.ahwoo-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.ahwoo-slider__track-wrap {
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.ahwoo-slider__track {
  display: flex;
  width: 100%;
  height: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  transition: transform 350ms cubic-bezier(.25, .46, .45, .94);
  will-change: transform;
}

.ahwoo-slider__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.ahwoo-slider__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 350ms ease;
}

.ahwoo-card:hover .ahwoo-slider__img {
  transform: scale(1.04);
}

/* Arrows */
.ahwoo-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(255, 255, 255, .9);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  opacity: 0;
  transition: opacity var(--ahwoo-transition), background var(--ahwoo-transition);
  padding: 0;
  color: var(--ahwoo-gray-800);
}

.ahwoo-slider__arrow--prev {
  left: 6px;
}

.ahwoo-slider__arrow--next {
  right: 6px;
}

.ahwoo-slider:hover .ahwoo-slider__arrow,
.ahwoo-slider__arrow:focus-visible {
  opacity: 1;
}

.ahwoo-slider__arrow:hover {
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
}

.ahwoo-slider__arrow:focus-visible {
  outline: 3px solid var(--ahwoo-primary);
  outline-offset: 2px;
}

/* Dots */
.ahwoo-slider__dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 3;
}

.ahwoo-slider__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  border: 1.5px solid rgba(255, 255, 255, .7);
  padding: 0;
  cursor: pointer;
  transition: background var(--ahwoo-transition), transform var(--ahwoo-transition);
}

.ahwoo-slider__dot.is-active {
  background: #fff;
  transform: scale(1.3);
}

.ahwoo-slider__dot:focus-visible {
  outline: 2px solid var(--ahwoo-primary);
  outline-offset: 2px;
}

/* ============================================================
   9. Pagination
   ============================================================ */
.ahwoo-pagination {
  margin-top: 32px;
  display: flex;
  justify-content: center;
}

.ahwoo-pagination .page-numbers {
  display: inline-flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.ahwoo-pagination .page-numbers li a,
.ahwoo-pagination .page-numbers li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--ahwoo-radius-sm);
  border: 1.5px solid var(--ahwoo-border);
  font-size: var(--ahwoo-font-size-sm);
  font-weight: var(--ahwoo-font-weight-medium);
  color: var(--ahwoo-text);
  text-decoration: none;
  transition: background var(--ahwoo-transition), color var(--ahwoo-transition), border-color var(--ahwoo-transition);
  background: #fff;
}

.ahwoo-pagination .page-numbers li a:hover {
  background: var(--ahwoo-primary-light);
  border-color: var(--ahwoo-primary);
  color: var(--ahwoo-primary);
}

.ahwoo-pagination .page-numbers li span.current {
  background: var(--ahwoo-primary);
  border-color: var(--ahwoo-primary);
  color: #fff;
}

/* ============================================================
   10. Load More
   ============================================================ */
.ahwoo-load-more-wrap {
  margin-top: 32px;
  text-align: center;
}

.ahwoo-load-more {
  min-width: 200px;
  width: auto !important;
}

/* ============================================================
   11. Loading Spinner
   ============================================================ */
.ahwoo-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
}

.ahwoo-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid var(--ahwoo-gray-200);
  border-top-color: var(--ahwoo-primary);
  border-radius: 50%;
  animation: ahwoo-spin 0.7s linear infinite;
  display: inline-block;
}

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

/* ============================================================
   12. Empty State
   ============================================================ */
.ahwoo-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--ahwoo-text-muted);
}

.ahwoo-empty-state p {
  font-size: var(--ahwoo-font-size-md);
  margin: 0 0 16px;
}

/* ============================================================
   13. Results Count
   ============================================================ */
.ahwoo-results-count {
  font-size: var(--ahwoo-font-size-sm);
  color: var(--ahwoo-text-muted);
  margin: 0 0 12px;
}

/* ============================================================
   14. Filters Widget
   ============================================================ */
.ahwoo-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  /* gaps handled per-mode below */
  width: 100%;
  box-sizing: border-box;
}

/* ---- Vertical (default / sidebar) ------------------------- */
.ahwoo-filters--vertical {
  flex-direction: column;
  gap: 0;
  background: var(--ahwoo-bg);
  border: 1px solid var(--ahwoo-border);
  border-radius: var(--ahwoo-radius);
  box-shadow: var(--ahwoo-shadow-sm);
  overflow: hidden;
}

.ahwoo-filters--vertical .ahwoo-filter-group {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ahwoo-gray-100);
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.ahwoo-filters--vertical .ahwoo-filter-group:last-child {
  border-bottom: none;
}

/* Full-width search & selects in vertical mode */
.ahwoo-filters--vertical .ahwoo-search-wrap,
.ahwoo-filters--vertical .ahwoo-filter--sort,
.ahwoo-filters--vertical .ahwoo-filter--taxonomy {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Price inputs: grow to fill width */
.ahwoo-filters--vertical .ahwoo-price-inputs {
  width: 100%;
}

.ahwoo-filters--vertical .ahwoo-price-inputs input[type="number"] {
  flex: 1;
  width: auto;
  min-width: 0;
}

/* ---- Horizontal (top-bar) --------------------------------- */
.ahwoo-filters--horizontal {
  flex-direction: row;
  align-items: flex-start;
  /* labels all at the top */
  gap: 16px;
  flex-wrap: wrap;
}

.ahwoo-filters--horizontal .ahwoo-filter-group {
  flex: 1 1 140px;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Search group is wider than other groups */
.ahwoo-filters--horizontal .ahwoo-filter-group--search {
  flex: 2 1 200px;
}

.ahwoo-filters--horizontal .ahwoo-filter--sort,
.ahwoo-filters--horizontal .ahwoo-filter--taxonomy {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Ensure every label row is the same height so inputs align */
.ahwoo-filters--horizontal .ahwoo-filter-label {
  min-height: 1.6em;
  display: flex;
  align-items: flex-end;
}

/* ---- Shared filter-group ---------------------------------- */
.ahwoo-filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ahwoo-filter-label {
  font-size: var(--ahwoo-font-size-sm);
  font-weight: var(--ahwoo-font-weight-semibold);
  color: var(--ahwoo-gray-800);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin: 0;
  height: 20px;
}

/* ---- Search ----------------------------------------------- */
.ahwoo-search-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.ahwoo-filter--search {
  width: 100%;
  /* left padding: 38px (10px offset + 16px icon + 12px gap); right: 36px for X */
  padding: 0 36px 0 38px;
  height: 42px;
  border: 1.5px solid var(--ahwoo-border);
  border-radius: var(--ahwoo-radius-sm);
  font-size: var(--ahwoo-font-size-base);
  color: var(--ahwoo-text);
  background: var(--ahwoo-bg);
  transition: border-color var(--ahwoo-transition), box-shadow var(--ahwoo-transition);
  outline: none;
  box-sizing: border-box;
}

.ahwoo-filter--search:focus {
  border-color: var(--ahwoo-primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, .12);
}

/* Lupa — ícone à ESQUERDA, não interativo */
.ahwoo-search-icon--left {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--ahwoo-gray-400);
  display: flex;
  align-items: center;
  z-index: 1;
}

/* Botão X — à DIREITA, aparece ao digitar */
.ahwoo-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--ahwoo-gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--ahwoo-transition), color var(--ahwoo-transition);
  z-index: 1;
  line-height: 0;
}

.ahwoo-search-clear:hover {
  background: var(--ahwoo-gray-200);
  color: var(--ahwoo-gray-800);
}

/* Suprimir o botão nativo de limpar do browser no tipo search */
.ahwoo-filter--search::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

/* ---- Price inputs ----------------------------------------- */
.ahwoo-price-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ahwoo-price-inputs input[type="number"] {
  width: 80px;
  padding: 0 10px;
  height: 42px;
  border: 1.5px solid var(--ahwoo-border);
  border-radius: var(--ahwoo-radius-sm);
  font-size: var(--ahwoo-font-size-base);
  text-align: center;
  outline: none;
  transition: border-color var(--ahwoo-transition);
  box-sizing: border-box;
}

.ahwoo-price-inputs input[type="number"]:focus {
  border-color: var(--ahwoo-primary);
}

.ahwoo-price-sep {
  color: var(--ahwoo-text-muted);
  flex-shrink: 0;
}

.ahwoo-price-display {
  margin-top: 4px;
  font-size: var(--ahwoo-font-size-xs);
  color: var(--ahwoo-text-muted);
}

/* ---- Checkboxes ------------------------------------------- */
.ahwoo-checkboxes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ahwoo-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: var(--ahwoo-font-size-base);
  color: var(--ahwoo-text);
  transition: color var(--ahwoo-transition);
}

.ahwoo-checkbox-label:hover {
  color: var(--ahwoo-primary);
}

.ahwoo-checkbox-label input[type="checkbox"],
.ahwoo-checkbox-label input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--ahwoo-primary);
  flex-shrink: 0;
  cursor: pointer;
}

.ahwoo-count {
  color: var(--ahwoo-text-muted);
  font-size: var(--ahwoo-font-size-xs);
  margin-left: auto;
  /* push count to the right */
}

/* ---- Pills ------------------------------------------------ */
.ahwoo-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ahwoo-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border: 1.5px solid var(--ahwoo-border);
  border-radius: 999px;
  font-size: var(--ahwoo-font-size-sm);
  color: var(--ahwoo-text);
  cursor: pointer;
  transition: background var(--ahwoo-transition), border-color var(--ahwoo-transition), color var(--ahwoo-transition);
  background: var(--ahwoo-gray-50);
  line-height: 1.3;
}

.ahwoo-pill:hover {
  border-color: var(--ahwoo-primary);
  color: var(--ahwoo-primary);
  background: var(--ahwoo-primary-light);
}

.ahwoo-pill:has(input:checked) {
  background: var(--ahwoo-primary);
  border-color: var(--ahwoo-primary);
  color: #fff;
}

/* ---- Dropdown select -------------------------------------- */
.ahwoo-filter--taxonomy,
.ahwoo-filter--sort {
  padding: 0 12px;
  height: 42px;
  border: 1.5px solid var(--ahwoo-border);
  border-radius: var(--ahwoo-radius-sm);
  font-size: var(--ahwoo-font-size-base);
  color: var(--ahwoo-text);
  background: var(--ahwoo-bg);
  outline: none;
  cursor: pointer;
  transition: border-color var(--ahwoo-transition);
  min-width: 0;
  box-sizing: border-box;
  appearance: auto;
}

.ahwoo-filter--taxonomy:focus,
.ahwoo-filter--sort:focus {
  border-color: var(--ahwoo-primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, .12);
}

/* Toggle switch */
.ahwoo-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: var(--ahwoo-font-size-base);
  color: var(--ahwoo-text);
  user-select: none;
}

.ahwoo-toggle-switch {
  display: inline-block;
  width: 38px;
  height: 22px;
  background: var(--ahwoo-gray-400);
  border-radius: 999px;
  position: relative;
  flex-shrink: 0;
  transition: background var(--ahwoo-transition);
}

.ahwoo-toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform var(--ahwoo-transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.ahwoo-toggle-label input:checked~.ahwoo-toggle-switch {
  background: var(--ahwoo-primary);
}

.ahwoo-toggle-label input:checked~.ahwoo-toggle-switch::after {
  transform: translateX(16px);
}

/* Active filter chips */
.ahwoo-filters .ahwoo-active-tags {
  display: flex !important;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.ahwoo-filters .ahwoo-active-tag {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px;
  padding: 4px 6px 4px 12px !important;
  background: #EFF5FF !important;
  /* Light blue */
  border: 1px solid #1E70DF !important;
  /* Blue border */
  border-radius: 20px !important;
  font-size: var(--ahwoo-font-size-sm) !important;
  color: #1E70DF !important;
  font-weight: var(--ahwoo-font-weight-semibold) !important;
  margin: 0 !important;
  height: auto !important;
  line-height: 1 !important;
}

.ahwoo-filters .ahwoo-active-tag__remove {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  background: transparent !important;
  border: 1px solid #CC284B !important;
  /* Red border */
  color: #CC284B !important;
  /* Red x */
  border-radius: 4px !important;
  /* Square-ish inside the round pill */
  cursor: pointer;
  font-size: 16px !important;
  line-height: 1 !important;
  padding: 0 !important;
  transition: all var(--ahwoo-transition);
  margin: 0 !important;
}

.ahwoo-filters .ahwoo-active-tag__remove:hover {
  background: #CC284B !important;
  color: #FFFFFF !important;
}

.ahwoo-filters .ahwoo-clear-all {
  background: #FFFFFF !important;
  border: 1px solid #CC284B !important;
  color: #CC284B !important;
  font-size: var(--ahwoo-font-size-sm) !important;
  font-weight: var(--ahwoo-font-weight-semibold) !important;
  cursor: pointer;
  padding: 6px 16px !important;
  border-radius: 4px !important;
  text-decoration: underline !important;
  text-decoration-color: transparent !important;
  /* Animate underline */
  transition: all var(--ahwoo-transition);
  position: relative;
  margin: 0 0 0 8px !important;
  /* space for the separator */
  height: auto !important;
  line-height: 1.5 !important;
}

/* Vertical separator line before the clear button */
.ahwoo-filters .ahwoo-active-tags .ahwoo-clear-all::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 50%;
  transform: translateY(-50%);
  height: 24px;
  width: 1px;
  background-color: var(--ahwoo-border-color, #E2E8F0);
}

.ahwoo-filters .ahwoo-clear-all:hover {
  text-decoration-color: currentColor !important;
  background: rgba(204, 40, 75, 0.04) !important;
}

/* ============================================================
   15. Responsive Breakpoints
   ============================================================ */
@media (max-width: 1024px) {
  .ahwoo-loop--grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .ahwoo-loop--grid {
    grid-template-columns: 1fr;
  }

  .ahwoo-filters--horizontal {
    flex-direction: column;
  }

  .ahwoo-loop--list .ahwoo-card {
    flex-direction: column;
    max-height: none;
  }

  .ahwoo-loop--list .ahwoo-card__media {
    flex: none;
    max-width: none;
    aspect-ratio: 16/9;
  }

  .ahwoo-btn {
    font-size: var(--ahwoo-font-size-sm);
    padding: 10px 14px;
  }
}

/* ============================================================
   16. Screen Reader Utilities
   ============================================================ */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}