.d4d-wpg{
  --d4d-cols: 3;
  position: relative;
}

.d4d-wpg__filters{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
}

.d4d-wpg__filter{
  width: 100%;
}

.d4d-wpg__filters{
  gap: 50px;                 /* more breathing space like screenshot */
  margin-bottom: 28px;
}

/* Each filter block */
.d4d-wpg__filter{
  position: relative;
}

/* Limit native select dropdown height (works in most browsers) */
.d4d-wpg__select{
  max-height: 48px; /* keep the control itself same height */
}

.d4d-wpg__select:focus{
  /* show a scrollable list rather than a full-page overlay */
  size: 8;
}

/* Inputs + selects */
.d4d-wpg__input,
.d4d-wpg__select{
  border: 0 !important;
  border-bottom: 1px solid rgba(0,0,0,0.18) !important;
  background: transparent;
  padding: 14px 38px 14px 0; /* right padding for icons/arrows */
  height: 48px;
  border-radius: 0;
  outline: none;
  box-shadow: none;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #1a1a1a;
}

/* Hover/focus underline */
.d4d-wpg__input:focus,
.d4d-wpg__select:focus{
  border-bottom-color: rgba(0,0,0,0.55);
}

/* Placeholder (SUCH(E) look) */
.d4d-wpg__search::-webkit-input-placeholder{
  color: rgba(0,0,0,0.65);
  opacity: 1;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.d4d-wpg__search::-moz-placeholder{
  color: rgba(0,0,0,0.65);
  opacity: 1;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.d4d-wpg__search:-ms-input-placeholder{
  color: rgba(0,0,0,0.65);
  opacity: 1;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.d4d-wpg__search::-ms-input-placeholder{
  color: rgba(0,0,0,0.65);
  opacity: 1;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.d4d-wpg__search::placeholder{
  color: rgba(0,0,0,0.65);
  opacity: 1;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.d4d-wpg__select{
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;

  padding-right: 46px; /* space for arrow */
  background-color: transparent;

  background-image: url("https://meister1881.com/wp-content/uploads/2025/12/arrow-down.svg");
  background-repeat: no-repeat;
  background-position: calc(100% - 12px) 50%;
  background-size: 14px 14px; /* adjust if needed */
}

/* Search icon on right (like screenshot) */
.d4d-wpg__filter--search::after{
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  opacity: .75;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  /* inline SVG (magnifier) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  pointer-events: none;
}
.d4d-wpg__select:focus{
  background-image: url("https://meister1881.com/wp-content/uploads/2025/12/arrow-down.svg");
  /* no reliable “rotate background-image”, so we leave it */
}


/* Remove number spinners etc. */
.d4d-wpg__input::-webkit-search-cancel-button{
  -webkit-appearance: none;
}

/* Tablet/mobile spacing */
@media (max-width: 1024px){
  .d4d-wpg__filters{ gap: 22px; }
}
@media (max-width: 767px){
  .d4d-wpg__filters{ gap: 18px; }
  .d4d-wpg__input,
  .d4d-wpg__select{ height: 46px; }
}


.d4d-wpg__grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* fallback */
  gap: 50px;
}

.d4d-wpg__item{
  display: flex;
  flex-direction: column;
  text-align: center;
}

.d4d-wpg__image{
  display: flex;
  align-items: center;
  justify-content: center;
  height: 480px; /* overridden by Elementor control */
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.10) !important;
}

.d4d-wpg__image img{
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
}

.d4d-wpg__content{
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
}

.d4d-wpg__title{
  margin: 0;
  line-height: 1.15;
}

.d4d-wpg__title a{
  text-decoration: none;
}

.d4d-wpg__price{
  margin-top: 2px;
}

.d4d-wpg__btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 14px auto 0;
  padding: 12px 20px;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  text-decoration: none;
  letter-spacing: .04em;
}

.d4d-wpg__btn-arrow{
  font-size: 18px;
  line-height: 1;
}

.d4d-wpg__empty,
.d4d-wpg__notice{
  padding: 18px;
  border: 1px solid rgba(0,0,0,0.12);
}

/* Loading state */
.d4d-wpg.is-loading{
  opacity: .6;
  pointer-events: none;
}

.d4d-wpg__media{
  position: relative;
}

.d4d-wpg__image-wrap{
  position: relative;
}

.d4d-wpg__badges{
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  z-index: 3;
  pointer-events: none;
}

.d4d-wpg__badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 72px;
  border-radius: 999px;
  text-transform: lowercase;
  pointer-events: none;
}

/* adjust this color later to match theme */
.d4d-wpg__badge--sale{
  background: rgba(122, 108, 90, 1);
  color: #fff;
}

.d4d-wpg__btn-icon{
  display: inline-flex;
  align-items: center;
}

.d4d-wpg__btn-icon svg{
  display: block;
  width: 21.125px;
  height: 10.5px;
}


.d4d-wpg__submit{
  position:absolute;
  width:1px;height:1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
}

.d4d-wpg__select:focus{
  outline: none;
  box-shadow: none;
  border-bottom-color: rgba(0,0,0,0.55);
}
