.dpf-group {
  margin-bottom: 20px;
}

.dpf-group-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.dpf-group-items {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 0 0 10px;
  gap: 2px;
}

.dpf-cat {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #fff;
  border: 1px solid #b4b9be;
  border-radius: 5px;
  clear: none;
  color: #555;
  cursor: pointer;
  display: inline-block;
  font-size: 16px;
  height: 20px;
  line-height: 1;
  margin: 0 4px 0 0;
  outline: none;
  padding: 0;
  text-align: center;
  transition: border-color 0.05s ease-in-out;
  vertical-align: middle;
  width: 20px;
}

.dpf-cat:checked {
  background: #000;
  border-color: #000;
}

.dpf-cat:checked::after {
  content: "✓";
  color: #fff;
  font-size: 14px;
  line-height: 20px;
}

.dpf-label {
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dpf-label:hover {
  opacity: 0.7;
}

.dpf-reset:hover {
  color: #000;
}

.dpf-check {
  margin-top: 0.3em;
  margin-bottom: 0.3em !important;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.dpf-check input {
  margin-top: 2px;
}

/* DPF pagination (Tantrade style) */
.dpf-pagination {
  display: flex;
  justify-content: center;
  margin: 40px 0 10px;
}

.dpf-pagination__list {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #f1d7d4; /* light pink border */
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.dpf-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 18px;
  font-size: 20px;
  line-height: 1;
  color: #000;
  text-decoration: none;
  border-right: 1px solid #f1d7d4;
  user-select: none;
}

.dpf-page:last-child {
  border-right: none;
}

.dpf-page--arrow {
  font-size: 20px;
}

.dpf-page.is-active {
  background: #c88d5a; /* active brown */
  color: #fff;
}

.dpf-page:hover {
  background: #f7ecea;
}

.dpf-page.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.dpf-page--dots {
  cursor: default;
  pointer-events: none;
  min-width: 56px;
}

/* =========================================================
   DPF UI polish: Reset button + Accordions
   ========================================================= */

/* Sidebar typography / spacing baseline */
.dpf-filters {
  font-family: inherit;
  color: inherit;
}

.dpf-filters h3 {
  margin: 0 0 14px 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

/* Reset button ("Tühista filter") */
.dpf-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0 14px 0;
  padding: 10px 14px;
  min-width: 100%;
  color: #111;
  background: #fff;
  border: 1px solid #d6d6d6;
  border-radius: 10px;

  cursor: pointer;
  user-select: none;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.05s ease;
}

.dpf-reset:hover {
  background: #f7f7f7;
  border-color: #cfcfcf;
}

.dpf-reset:active {
  transform: translateY(1px);
}

.dpf-reset:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

/* Options block spacing */
.dpf-options {
  margin-top: 26px;
}

.dpf-options h3 {
  margin: 0 0 12px 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

/* Each accordion item wrapper */
.dpf-option {
  margin: 10px 0;
}

/* Accordion toggle button */
.dpf-option-toggle,
.dpr-reset {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;

  padding: 10px 12px;

  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;

  color: inherit;
  background: #fff;
  border: 1px solid #d6d6d6;
  border-radius: 10px;

  cursor: pointer;
  user-select: none;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

/* Chevron */
.dpf-option-toggle::after {
  content: "▾";
  font-size: 14px;
  line-height: 1;
  opacity: 0.75;
  transform: translateY(-1px);
}

/* Open state */
.dpf-option-toggle[aria-expanded="true"] {
  background: #f7f7f7;
  border-color: #cfcfcf;
}

.dpf-option-toggle[aria-expanded="true"]::after {
  content: "▴";
  opacity: 0.85;
}

.dpf-option-toggle:hover {
  background: #f7f7f7;
  border-color: #cfcfcf;
}

.dpf-option-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

/* Accordion body */
.dpf-option-body {
  margin-top: 8px;
  padding-left: 6px;
}

/* Tighten checkbox rows in options */
.dpf-options .dpf-check {
  margin: 6px 0 !important;
}

.dpf-options .dpf-check span {
  font-size: 16px;
  line-height: 1.25;
}

.dpf-term {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #fff;
  border: 1px solid #b4b9be;
  border-radius: 5px;
  cursor: pointer;
  height: 20px;
  width: 20px;
  margin: 0 4px 0 0;
  vertical-align: middle;
}
.dpf-term:checked {
  background: #000;
  border-color: #000;
}
.dpf-term:checked::after {
  content: "✓";
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  display: block;
  text-align: center;
}
/* Mobile filter sheet */
.dpf-mobile-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: inherit;
  border: 1px solid #d6d6d6;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  user-select: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
  margin-left: auto;
}

.dpf-mobile-open--intro {
  animation: dpf-mobile-open-highlight 0.33s ease-in-out 0s 2;
}

.dpf-mobile {
  position: relative;
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.dpf-mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s ease;
  z-index: 9998;
}

.dpf-mobile-sheet {
  position: fixed;
  top: 5vh;
  right: 0;
  width: min(94vw, 420px);
  height: 90vh;
  transform: translateX(105%);
  transition: transform 0.75s ease;
  z-index: 9999;
}

.dpf-mobile-inner {
  position: relative;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 14px 0 0 14px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.dpf-mobile-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  background: #e7e4e4;
  color: #111;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.dpf-mobile-content {
  height: 100%;
  overflow: auto;
  padding: 52px 40px 30px;
}

.dpf-mobile-content .dpf-filters {
  min-height: 100%;
}

.dpf-filters--mobile h3 {
  font-size: 20px;
  text-transform: uppercase;
}

.dpf-mobile.is-active .dpf-mobile-overlay {
  opacity: 1;
  pointer-events: auto;
}

.dpf-mobile.is-active .dpf-mobile-sheet {
  transform: translateX(0);
}

body.dpf-mobile-opened {
  overflow: hidden;
}

@keyframes dpf-mobile-open-highlight {
  0% {
    background: #fff;
  }
  50% {
    background: #efefef;
  }
  100% {
    background: #fff;
  }
}

/* Oxygen shortcode wrapper fix: allow right alignment to work */
.ct-shortcode:has(> .dpf-mobile) {
  width: 100% !important;
}

/* Inherit typography for all filter text */
.dpf-filters,
.dpf-filters h3,
.dpf-filters .dpf-reset,
.dpf-filters .dpf-option-toggle,
.dpf-filters .dpf-check span,
.dpf-mobile-open,
.dpf-mobile-close {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
}

.dpf-filters h3 {
  letter-spacing: normal;
}
