/* DMH Archive (Shop/Category) — uses same vars from front.css */

.dmh-archive,
.dmh-archive * {
  font-family: var(--dmh-font) !important;
}

.dmh-archive {
  padding: 18px 0 34px;
}

.dmh-archive__wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px;
}

.dmh-archive__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dmh-archive__title {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 900;
  color: var(--dmh-txt);
}

/* mobile filters button */
.dmh-archive__filtersBtn {
  display: none;
  border: 1px solid var(--dmh-border);
  background: var(--dmh-soft);
  color: var(--dmh-txt);
  border-radius: 999px;
  height: 44px;
  padding: 0 14px;
  font-weight: 900;
  cursor: pointer;
}

.dmh-archive__grid {
  display: grid;
  gap: 16px;
}

.dmh-archive__grid.has-sidebar {
  grid-template-columns: 320px 1fr;
}

@media (max-width: 1024px) {
  .dmh-archive__grid.has-sidebar {
    grid-template-columns: 300px 1fr;
  }
}

@media (max-width: 980px) {
  .dmh-archive__filtersBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .dmh-archive__grid.has-sidebar {
    grid-template-columns: 1fr;
  }
}

/* Sidebar */
.dmh-archive__sidebar {
  position: relative;
}

.dmh-af {
  border: 1px solid var(--dmh-border);
  background: var(--dmh-card);
  border-radius: var(--dmh-radius);
  overflow: hidden;
  box-shadow: var(--dmh-shadow);
}

.dmh-af__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--dmh-border);
}

.dmh-af__ttl {
  font-weight: 900;
  color: var(--dmh-txt);
  font-size: 16px;
}

.dmh-af__close {
  display: none;
  border: 1px solid var(--dmh-border);
  background: var(--dmh-soft);
  color: var(--dmh-txt);
  border-radius: 999px;
  height: 38px;
  padding: 0 12px;
  font-weight: 900;
  cursor: pointer;
}

.dmh-af__form {
  padding: 14px;
}

.dmh-af__sec {
  margin-bottom: 14px;
}

.dmh-af__secTitle {
  font-weight: 900;
  color: var(--dmh-txt);
  margin: 0 0 10px;
  font-size: 14px;
}

.dmh-af__priceRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.dmh-af__pfield span {
  display: block;
  font-size: 12px;
  color: var(--dmh-muted);
  font-weight: 800;
  margin-bottom: 6px;
}

.dmh-af__pfield input {
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--dmh-border);
  background: var(--dmh-soft);
  color: var(--dmh-txt);
  font-weight: 900;
  padding: 0 12px;
}

/* dual range */
.dmh-af__range {
  position: relative;
  height: 34px;
}

.dmh-af__range input[type="range"] {
  position: absolute;
  left: 0;
  right: 0;
  top: 8px;
  width: 100%;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: transparent;
}

.dmh-af__range input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--dmh-accent);
  border: 0;
  box-shadow: 0 10px 22px rgba(251, 29, 8, 0.25);
}

.dmh-af__track {
  position: absolute;
  left: 0;
  right: 0;
  top: 14px;
  height: 4px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

html[data-dmh-theme="dark"] .dmh-af__track,
body.dmh-dark .dmh-af__track,
[data-theme="dark"] .dmh-af__track {
  background: rgba(255, 255, 255, 0.12);
}

.dmh-af__track span {
  position: absolute;
  left: 0;
  right: 0;
  height: 100%;
  background: var(--dmh-accent);
  border-radius: 999px;
}

/* categories */
.dmh-af__catsWrap {
  max-height: 380px;
  overflow: auto;
  padding-right: 6px;
}

.dmh-af__cats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.dmh-af__cats--d2 {
  margin-top: 6px;
  padding-left: 14px;
  border-left: 2px dashed rgba(0, 0, 0, 0.08);
}
html[data-dmh-theme="dark"] .dmh-af__cats--d2,
body.dmh-dark .dmh-af__cats--d2,
[data-theme="dark"] .dmh-af__cats--d2 {
  border-left-color: rgba(255, 255, 255, 0.12);
}

.dmh-af__cats--d3 {
  margin-top: 6px;
  padding-left: 14px;
  border-left: 2px dashed rgba(0, 0, 0, 0.06);
}
html[data-dmh-theme="dark"] .dmh-af__cats--d3,
body.dmh-dark .dmh-af__cats--d3,
[data-theme="dark"] .dmh-af__cats--d3 {
  border-left-color: rgba(255, 255, 255, 0.1);
}

.dmh-af__check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.dmh-af__check input {
  width: 18px;
  height: 18px;
  accent-color: var(--dmh-accent);
}

.dmh-af__check span {
  color: var(--dmh-txt);
  font-weight: 800;
  font-size: 14px;
}

/* actions */
.dmh-af__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.dmh-af__apply {
  height: 46px;
  border-radius: 999px;
  border: 0;
  background: var(--dmh-accent);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(251, 29, 8, 0.22);
}

html[data-dmh-theme="dark"] .dmh-af__apply,
body.dmh-dark .dmh-af__apply,
[data-theme="dark"] .dmh-af__apply {
  box-shadow: none;
}

.dmh-af__reset {
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--dmh-border);
  background: transparent;
  color: var(--dmh-txt);
  font-weight: 900;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dmh-af__reset:hover {
  background: var(--dmh-soft);
}

/* Main */
.dmh-archive__main {
  min-width: 0;
}

/* pagination */
.dmh-archive__pager {
  margin-top: 18px;
  border: 1px solid var(--dmh-border);
  background: var(--dmh-card);
  border-radius: var(--dmh-radius);
  padding: 10px 12px;
}

.dmh-archive__pager ul {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.dmh-archive__pager a,
.dmh-archive__pager span {
  min-width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--dmh-border);
  background: var(--dmh-soft);
  color: var(--dmh-txt);
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.dmh-archive__pager .current {
  background: var(--dmh-accent);
  border-color: var(--dmh-accent);
  color: #fff;
}

/* Mobile drawer sidebar */
@media (max-width: 980px) {
  .dmh-archive__sidebar {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
  }
  .dmh-archive__sidebar.is-open {
    display: block;
  }
  .dmh-archive__sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
  }
  .dmh-af {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(520px, 92vw);
    max-height: 82vh;
    overflow: auto;
  }
  .dmh-af__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
