/*
	AHG36 2026, filter panel of the painting lists: the shop list (/shop-online/, page-shop-online.php)
	and the wall view (/gallery-offers/, where js/nx.js rebuilds the parent's form into the same panel).
*/

.nx_filters,
.nx_filters *,
.nx_toolbar,
.nx_toolbar * {
  box-sizing: border-box;
}
.nx_filters {
  font-family: var(--main_font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  text-align: left;
}
.nx_filters p {
  margin: 0;
}
.nx_filters a {
  color: inherit;
  text-decoration: none;
}
.nx_filters select,
.nx_sort select {
  font-family: var(--main_font);
  color: var(--ink);
}

/* filters: a plain column on desktop, a drawer below 1000px */
.nx_filters.nx_drawer {
  position: sticky;
  top: 100px;
  inset: auto;
  z-index: 1;
  background: none;
  opacity: 1;
  visibility: visible;
}
.nx_filters .nx_drawer_panel {
  position: static;
  width: auto;
  padding: 0;
  background: none;
  overflow: visible;
  transform: none;
}
.nx_filters .nx_drawer_close,
.nx_filters .shp_apply,
button.nx_filters_open {
  display: none;
}
.nx_filters_title {
  font-family: var(--header_font);
  font-size: 26px;
  margin-bottom: 6px !important;
}
.nx_filters details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.nx_filters summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 15.5px;
}
.nx_filters summary::-webkit-details-marker {
  display: none;
}
.nx_filters summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}
.nx_filters details[open] summary::after {
  content: "\2212";
}
.nx_filters details[open] summary {
  margin-bottom: 10px;
}
.nx_check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  font-size: 15px;
  cursor: pointer;
}
.nx_check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--ink);
}
.nx_filters select,
.nx_sort select {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 15px;
}
.nx_orient {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.nx_orient label {
  flex: 1;
  padding: 8px 2px 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 12.5px;
  text-align: center;
  cursor: pointer;
}
.nx_orient label.on,
.nx_orient label:has(input:checked) {
  border-color: var(--ink);
}
.nx_orient input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.nx_orient i {
  display: block;
  margin: 0 auto 5px;
  border: 1.5px solid var(--ink);
}
.nx_o_h {
  width: 26px;
  height: 17px;
  margin-top: 4px !important;
}
.nx_o_s {
  width: 21px;
  height: 21px;
}
.nx_o_v {
  width: 17px;
  height: 25px;
}
/* price: two sliders on one track */
.shp_price_lbl {
  font-size: 15px;
  margin-bottom: 2px;
}
.shp_range {
  position: relative;
  height: 38px;
}
.shp_range::before {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  top: 18px;
  height: 3px;
  background: var(--ink);
}
.shp_range input[type="range"] {
  position: absolute;
  left: 0;
  top: 8px;
  width: 100%;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}
.shp_range input[type="range"]::-webkit-slider-runnable-track {
  background: transparent;
  border: 0;
}
.shp_range input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--ink);
  cursor: pointer;
}
.shp_range input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--ink);
  cursor: pointer;
}
.shp_range input[type="range"]::-moz-range-track {
  background: none;
}
.shp_btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.nx_views {
  margin-top: 22px !important;
  font-size: 14.5px;
}
.nx_views a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.nx_views a:hover {
  color: var(--accent);
}
.nx_views .material-symbols-outlined {
  font-size: 20px;
}

.nx_toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
}
.nx_count {
  font-size: 15px;
  color: var(--muted);
}
.nx_sort select {
  width: auto;
  padding-right: 30px;
}

@media (max-width: 1000px) {
  .nx_filters.nx_drawer {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(21, 19, 18, 0.5);
    opacity: 0;
    visibility: hidden;
  }
  .nx_filters.nx_drawer.open {
    opacity: 1;
    visibility: visible;
  }
  .nx_filters .nx_drawer_panel {
    position: absolute;
    width: min(340px, 88vw);
    padding: 58px 22px 26px;
    background: var(--paper);
    overflow-y: auto;
    transform: translateX(-100%);
  }
  .nx_filters.open .nx_drawer_panel {
    transform: none;
  }
  .nx_filters .nx_drawer_close {
    display: block;
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .nx_filters .shp_apply {
    display: flex;
  }
  button.nx_filters_open {
    display: inline-flex;
    min-height: 42px;
    padding: 8px 16px;
  }
  .nx_count {
    display: none;
  }
}

@media (max-width: 767px) {
  .nx_toolbar .nx_sort {
    flex: 1;
    min-width: 0;
    display: flex;
  }
  .nx_sort select {
    width: 100%;
  }
}

/* ---------- wall view (/gallery-offers/): the same panel, built by js/nx.js from the parent's form ---------- */
body.nx_wall #content.nx_wall_grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  column-gap: 50px;
  align-items: start;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 32px;
}
body.nx_wall #content.nx_wall_grid > * {
  grid-column: 1 / -1;
  min-width: 0;
}
body.nx_wall #content.nx_wall_grid > .nx_wall_bar {
  grid-column: 2;
}
body.nx_wall #content.nx_wall_grid > .nx_wall_side {
  grid-column: 1;
  grid-row: span 2;
  width: auto;
  margin: 0;
  padding: 0;
}
body.nx_wall #content.nx_wall_grid > .nx_wall_main {
  grid-column: 2;
  width: auto;
}
body.nx_wall .nx_wall_side > div[style] {
  display: none;
}
body.nx_wall .nx_filters form.shp_filters {
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
}
body.nx_wall .nx_filters .shp_price_f {
  width: auto;
}
body.nx_wall .nx_filters .shp_price_lbl {
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
body.nx_wall .nx_filters .shp_price_lbl span {
  margin: 0;
  font-size: 15px;
}
body.nx_wall .nx_filters .shp_btns > * {
  flex: none;
}
body.nx_wall .nx_filters .shp_btns {
  margin-top: 0;
}
body.nx_wall .shp_views {
  display: none;
}
body.nx_wall .nx_toolbar {
  margin: 0 0 20px;
  font-family: var(--main_font);
}
body.nx_wall .nx_wall_main .min900 {
  min-width: 0;
}

@media (max-width: 1000px) {
  body.nx_wall #content.nx_wall_grid {
    display: block;
    padding: 0 16px;
  }
}

/* the parent prints its own filter CSS inside the page; these lines win over it on the wall view */
body.nx_wall .nx_filters select,
body.nx_wall .nx_sort select {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 15px;
}
body.nx_wall .nx_sort select {
  width: auto;
  padding-right: 30px;
}
body.nx_wall .nx_filters .shp_btns {
  flex: none;
  flex-direction: column;
  gap: 10px;
}
body.nx_wall .nx_filters .shp_reset,
body.nx_wall .nx_filters .shp_apply {
  height: auto;
  min-height: 46px;
}
body.nx_wall .nx_filters .nx_check {
  width: auto;
  flex-direction: row;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
body.nx_wall .nx_filters .nx_orient label {
  display: block;
  width: auto;
  font-size: 12.5px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
body.nx_wall .nx_filters [hidden] {
  display: none !important;
}
body.nx_wall .nx_toolbar .nx_sort {
  margin-left: auto;
}
body.nx_wall .nx_views a {
  text-decoration: none;
  font-family: var(--main_font);
  font-size: 14.5px;
  color: var(--ink);
}

/* ---------- head of a painting list: crumbs, title, lead, quick filter chips ---------- */
.nx_page_head {
  padding: 30px 0 34px;
  border-bottom: 1px solid var(--line);
}
.nx_crumbs {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 18px !important;
}
.nx_crumbs span {
  margin: 0 5px;
}
.nx_crumbs a:hover {
  color: var(--accent);
}
.nx_page_lead {
  max-width: 680px;
  margin-top: 12px !important;
  color: var(--muted);
}
.nx_quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.nx_chip {
  padding: 7px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 40px;
  font-size: 14.5px;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s;
}
.nx_chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
a.nx_chip.on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.nx_page_head,
.nx_page_head * {
  box-sizing: border-box;
}
.nx_page_head a {
  color: inherit;
  text-decoration: none;
}
/* wall view: the head is built by js/nx.js, the old breadcrumb row is hidden */
body.nx_wall .nx_page_head {
  margin-bottom: 36px;
  font-family: var(--main_font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  text-align: left;
}
body.nx_wall .nx_page_head h1 {
  margin: 0;
  padding: 0;
  font-family: var(--header_font);
  font-size: clamp(40px, 5.2vw, 76px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
body.nx_wall .nx_page_head p {
  margin: 0;
}
body.nx_wall .nx_wall_oldhead {
  display: none !important;
}
@media (max-width: 420px) {
  body.nx_wall .nx_quick {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-right: -16px;
    padding-right: 16px;
    scrollbar-width: none;
  }
}
