/* ============================================================
   Gallery Filters
   ============================================================ */

.gallery-filters-wrapper {
  margin-bottom: 30px;
}

#media-filter-form {
  margin-bottom: 20px;
}
#media-filter-form > div{
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--space-xs);
}

#media-filter-form > div > div {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* ── Shared pill: all labels + dropdown trigger ── */
#media-filter-form label,
.media-filter-dropdown-container .dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-xs);
  background: var(--primary);
  color: var(--white);
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  font-size: inherit;
  transition: background 0.2s ease;
  margin: 0;
}

/* ── Checkbox: visible, sized, no extra margin ── */
.media-filter-checkbox {
  display: none !important;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Remove the old span-only styling */
.media-filter-checkbox + span {
  display: inline;
  padding: 0;
  background: none;
  color: inherit;
}

/* ── Active / checked state ── */
#media-filter-form label:has(.media-filter-checkbox:checked) {
  background: var(--secondary);
  color: var(--white);
}


/* ============================================================
   Dropdown
   ============================================================ */

.media-filter-dropdown-container {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.media-filter-dropdown-container .dropdown-trigger {
  margin-bottom: 0;
}

/* Active state when a child is checked */
.media-filter-dropdown-container.is-active .dropdown-trigger {
  background: var(--primary);
}

/* Chevron rotation when open */
.media-filter-dropdown-container.is-open .dropdown-trigger i {
  transform: rotate(180deg);
  transition: transform 0.2s;
}

/* Dropdown menu */
.dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: var(--radius-xs);
  padding: 6px;
  z-index: 1000;
  min-width: 220px;
  box-shadow: var(--shadow-xl);
}

.media-filter-dropdown-container.is-open .dropdown-content {
  display: block;
}

/* Dropdown inner labels */
.dropdown-content label {
  height: 40px;
  padding: 0 12px;
  margin: 3px 0;
}


/* ============================================================
   Custom Gallery — Grid
   ============================================================ */

.custom-fancybox-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-s);
  list-style: none;
  padding: 0;
  margin: 0;
}

.custom-fancybox-gallery .bricks-layout-item {
  position: relative;
}

.custom-fancybox-gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-xs);
}

.custom-fancybox-gallery figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.custom-fancybox-gallery figure:hover img {
  transform: scale(1.04);
}

.custom-gallery-inner figure a {
  height: 100%;
}

.custom-gallery-inner figure,
.custom-gallery-inner figure img {
  height: 100%;
}

.custom-gallery-inner figure img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  height: 100%;
}
.custom-fancybox-gallery figure{
  display: flex;
  flex-direction: column;
}


.custom-fancybox-gallery figcaption {
  text-align: center;
  background-color: var(--primary);
  color: var(--white);
  padding: var(--space-xs);
  margin: 0;
  border-radius: 0 0 var(--radius-xs) var(--radius-xs);
  width: 100%;
}

.custom-gallery-wrapper .custom-gallery-inner figure img {
  aspect-ratio: 16 / 9;
  background-color: #fff;
  object-fit: cover;
  display: block;
  width: 100%;
  height: auto;
}


/* ============================================================
   Pagination
   ============================================================ */

.custom-gallery-pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.custom-gallery-pagination ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 10px;
}

.custom-gallery-pagination ul li .page-numbers {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: var(--white);
}

.custom-gallery-pagination ul li .page-numbers.current {
  background: var(--secondary);
  color: var(--white);
}


/* ============================================================
   Price Badge
   ============================================================ */

.cg-price,
.price-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary);
  color: #fff;
  padding: 4px 8px;
  font-weight: bold;
  z-index: 5;
  border-radius: var(--radius-xs);;
  line-height: 1.3;
  pointer-events: none;
  box-sizing: border-box !important;
}

.cg-price {
  position: unset;
  display: inline-block;
  top: unset;
  right: unset;
}

.cg-price del,
.price-tag del {
  text-decoration: line-through;
  opacity: 0.7;
  margin-right: 4px;
  font-size: 0.85em;
}

.cg-price ins,
.price-tag ins {
  text-decoration: none;
}


/* ============================================================
   Fancybox — General
   ============================================================ */

.fancybox__container .fancybox__content > .f-button.is-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  opacity: 1;
  background: var(--primary);
  border-radius: var(--radius-circle);
  color: #fff;
  fill: #fff;
}

.fancybox__container .fancybox__content {
  background: transparent;
  border-radius: var(--radius-xs);
  padding: 0;
  margin: var(--space-m);
}

.fancybox__container .fancybox__backdrop {
  background: var(--black-trans-70);
}

.fancybox__slide.has-html {
  padding: 0 !important;
}


/* ============================================================
   Fancybox — Two-column Panel (.cg-panel)
   ============================================================ */

.cg-panel.fancybox__content {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: var(--white);
  border-radius: var(--radius-xs, 6px);
  overflow: hidden;
  max-width: 1100px;
  width: 90vw;
  min-height: 400px;
  box-shadow: var(--shadow-xl, 0 8px 40px rgba(0, 0, 0, 0.35));
}

.cg-panel__info {
  flex: 0 0 40%;
  padding: var(--space-m);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--primary);
  justify-content: space-between;
  gap: var(--space-m);
}
.cg-panel__info .content{
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.cg-panel__info p:empty {
  display: none;
}

.cg-panel__image {
  flex: 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cg-panel__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cg-anfragen {
  display: inline-block;
  width: auto;
}


/* ============================================================
   Fancybox — Simple View (.cg-simple)
   ============================================================ */

.cg-simple {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--dark);
  border-radius: var(--radius-xs, 6px);
  overflow: hidden;
  max-width: 90vw;
  max-height: 90vh;
}

.cg-simple__image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cg-simple__image img {
  max-width: 100vw;
  max-height: calc(90vh - 60px);
  object-fit: cover;
  display: block;
}

.cg-simple__caption {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  padding: var(--space-xs) var(--space-s);
  background: var(--primary);
  color: #fff;
  backdrop-filter: blur(4px);
  flex-shrink: 0;
}

.cg-title--simple {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cg-panel__info {
  color: #fff;
}
.cg-panel__info .cg-subheadline{
  color: var(--text-light-muted);
  font-weight: 600;
}
.cg-title{
  font-weight: bold;
}

.cg-tax p{
  text-transform: uppercase;
  color: #fff;
  font-size: var(--text-s);
  font-weight: bold;
}
.cg-description{
  margin-bottom: var(--space-s);
}



/* ============================================================
   Price / Range Slider
   ============================================================ */

.price-slider-ui {
  margin-bottom: 30px;
  background: var(--primary);
  padding: 20px;
  border-radius: 8px;
}

.price-slider-ui label {
  color: #fff;
  max-width: 400px;
}

.range-slider-container {
  background: #e0e0e0;
  border-radius: 5px;
  color: #000;
  height: 6px;
}

.dual-range {
  position: absolute;
  width: 100%;
  pointer-events: none;
  appearance: none;
  background: none;
  outline: none;
  margin: 0;
}

.dual-range::-webkit-slider-thumb {
  pointer-events: auto;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dual-range::-moz-range-thumb {
  pointer-events: auto;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
}


/* ============================================================
   Loader
   ============================================================ */

.loader {
  width: 50px;
  padding: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--primary);
  --_m: conic-gradient(#0000 10%, #000), linear-gradient(#000 0 0) content-box;
  -webkit-mask: var(--_m);
  mask: var(--_m);
  -webkit-mask-composite: source-out;
  mask-composite: subtract;
  animation: l3 1s infinite linear;
}

@keyframes l3 {
  to { transform: rotate(1turn); }
}

.pill-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin: var(--space-xs) 0 var(--space-s) 0 ;
}

.pill {
  background-color: rgb(255 255 255 / 0.1);
  border-width: 1px;font: 1em sans-serif;ont-size: var(--text-xs);
  padding: calc(var(--space-xs) / 2) calc(var(--space-s) / 2);
  border-radius: var(--radius-circle);
}

.pagination-wrapper{
  display: flex;
  justify-content: center;
  align-items: center;
}
.custom-gallery-load-more{
  display: block;
  margin: var(--space-m) auto 0 auto;
}

/* ============================================================
   Page-specific overrides
   ============================================================ */

.postid-2485 #brxe-cnsmzm {
  background-position: top center;
}

.custom-fancybox-gallery + .custom-fancybox-gallery{
  padding-top: var(--space-s);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  .cg-panel.fancybox__content {
    flex-direction: column-reverse;
    width: 100vw;
    max-width: 100vw;
    height: auto;
    min-height: 100vh;
  }

  .cg-panel__info {
    flex: unset;
    padding: var(--space-s) var(--space-m);
  }

  .cg-panel__image {
    width: 100%;
    height: 40vh;
    display: block;
  }

  .cg-panel__image img {
    height: 100%;
    width: 100%;
    object-fit: cover;
  }

  .custom-fancybox-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .custom-fancybox-gallery {
    grid-template-columns: 1fr;
  }
}