:root {
  --search-red: #ef4034;
  --search-red-hover: #ff5145;

  --search-gold: #d6a268;
  --search-gold-soft: rgba(226, 177, 116, 0.48);
  --search-gold-faint: rgba(236, 194, 139, 0.17);

  --search-brown: rgba(49, 26, 17, 0.91);
  --search-brown-light: rgba(72, 41, 26, 0.9);
  --search-brown-dark: rgba(24, 14, 11, 0.94);

  --search-text: #f6eee7;
  --search-muted: #d7c6b9;
  --search-line: rgba(225, 184, 134, 0.27);
}

/* Caixa principal */
.property-search {
  position: relative;
  width: min(1920px, 100%);
  margin: 0 auto;
  padding: 24px 24px 20px;

  color: var(--search-text);

  background:
    linear-gradient(
      115deg,
      rgba(94, 55, 34, 0.88) 0%,
      rgba(53, 29, 19, 0.93) 36%,
      rgba(39, 22, 16, 0.95) 70%,
      rgba(67, 35, 22, 0.91) 100%
    );

  border: 1px solid rgba(226, 180, 122, 0.6);
  border-radius: 18px;

  box-shadow:
    0 24px 55px rgba(0, 0, 0, 0.42),
    0 7px 18px rgba(0, 0, 0, 0.28),
    0 0 22px rgba(215, 157, 91, 0.25),
    0 0 3px rgba(255, 221, 175, 0.95),
    inset 0 1px 0 rgba(255, 231, 195, 0.52),
    inset 0 -2px 10px rgba(0, 0, 0, 0.36);

  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
}

/* Reflexo dourado delicado */
.property-search::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;

  background:
    linear-gradient(
      180deg,
      rgba(255, 224, 179, 0.18) 0%,
      rgba(255, 224, 179, 0.03) 18%,
      transparent 43%
    ),
    radial-gradient(
      circle at 50% -20%,
      rgba(241, 181, 108, 0.18),
      transparent 50%
    );
}

/* Linha luminosa à volta */
.property-search::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -3px;
  pointer-events: none;
  border-radius: 30px;

  background: linear-gradient(
    105deg,
    rgba(255, 222, 175, 0.7),
    rgba(181, 116, 61, 0.2) 28%,
    rgba(245, 191, 122, 0.63) 55%,
    rgba(157, 94, 47, 0.19) 76%,
    rgba(255, 220, 168, 0.72)
  );

  filter: blur(7px);
  opacity: 0.58;
}

/* Separadores */
.property-search__tabs {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  width: min(620px, 60%);
  overflow: hidden;

  border: 1px solid rgba(226, 180, 122, 0.55);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;

  background: rgba(56, 31, 21, 0.91);

  box-shadow:
    0 -5px 20px rgba(222, 161, 94, 0.17),
    inset 0 1px 0 rgba(255, 224, 186, 0.29);

  transform: translate(-50%, -100%);
  backdrop-filter: blur(17px);
  -webkit-backdrop-filter: blur(17px);
}

.property-search__tab {
  min-height: 40px;
  padding: 8px 16px;

  color: rgba(255, 246, 238, 0.9);
  font: inherit;
  font-size: 14px;
  font-weight: 400;

  background:
    linear-gradient(
      180deg,
      rgba(94, 56, 35, 0.7),
      rgba(55, 30, 20, 0.86)
    );

  border: 0;
  border-right: 1px solid rgba(231, 189, 139, 0.25);

  cursor: pointer;
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.property-search__tab:last-child {
  border-right: 0;
}

.property-search__tab:hover {
  color: #fff;
  background: rgba(115, 70, 43, 0.72);
}

.property-search__tab.is-active {
  color: #fff;
  font-weight: 650;

  background:
    linear-gradient(
      180deg,
      rgba(115, 73, 46, 0.92),
      rgba(66, 36, 23, 0.94)
    );

  box-shadow:
    inset 0 3px 0 rgba(248, 207, 151, 0.57),
    inset 0 -2px 15px rgba(0, 0, 0, 0.19),
    0 0 20px rgba(219, 160, 95, 0.12);
}

/* Grelha dos campos */
.property-search__grid {
  position: relative;
  z-index: 1;

  display: grid;
  grid-template-columns:
    minmax(190px, 1.25fr)
    minmax(190px, 1.25fr)
    minmax(220px, 1.45fr)
    minmax(160px, 0.85fr)
    minmax(180px, 0.9fr)
    minmax(200px, 0.88fr);

  gap: 12px;
  align-items: end;
}

.property-search__field {
  min-width: 0;
}

.property-search__field label {
  display: block;
  margin: 0 0 6px 2px;

  color: #f1d6bd;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.property-search__control {
  position: relative;
}

.property-search select,
.property-search input {
  width: 100%;
  height: 42px;
  padding: 0 34px 0 14px;

  color: var(--search-text);
  font: inherit;
  font-size: 13px;

  background:
    linear-gradient(
      180deg,
      rgba(44, 25, 18, 0.66),
      rgba(40, 23, 17, 0.84)
    );

  border: 1px solid rgba(225, 180, 128, 0.38);
  border-radius: 10px;
  outline: none;

  box-shadow:
    inset 0 1px 0 rgba(255, 235, 207, 0.07),
    inset 0 -3px 8px rgba(0, 0, 0, 0.15);

  transition:
    border-color 170ms ease,
    box-shadow 170ms ease,
    background 170ms ease;
}

.property-search input {
  padding-right: 14px;
}

.property-search select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.property-search select:hover,
.property-search input:hover {
  border-color: rgba(238, 193, 138, 0.65);
}

.property-search select:focus,
.property-search input:focus {
  border-color: var(--search-gold);
  background: rgba(53, 30, 21, 0.95);

  box-shadow:
    0 0 0 3px rgba(214, 162, 104, 0.15),
    0 0 18px rgba(214, 162, 104, 0.13),
    inset 0 1px 0 rgba(255, 235, 207, 0.09);
}

.property-search input::placeholder {
  color: rgba(231, 217, 205, 0.69);
}

/* Seta personalizada */
.property-search__arrow {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 8px;
  height: 8px;
  pointer-events: none;

  border-right: 2px solid #f1d7bf;
  border-bottom: 2px solid #f1d7bf;

  transform: translateY(-70%) rotate(45deg);
}

/* Botão vermelho */
.property-search__submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  width: 100%;
  min-height: 42px;
  padding: 8px 18px;

  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;

  background:
    linear-gradient(
      110deg,
      #e9372e 0%,
      #f24538 55%,
      #f45546 100%
    );

  border: 1px solid rgba(255, 117, 102, 0.6);
  border-radius: 37px;

  box-shadow:
    0 12px 27px rgba(207, 42, 34, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);

  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.property-search__submit svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
}

.property-search__submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);

  box-shadow:
    0 16px 32px rgba(207, 42, 34, 0.38),
    0 0 18px rgba(244, 79, 65, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.property-search__submit:active {
  transform: translateY(0);
}

/* Tablet */
@media (max-width: 1350px) {
  .property-search__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .property-search__tabs {
    width: min(500px, 82%);
  }
}

/* Telemóvel */
@media (max-width: 760px) {
  .hero-search {
    padding: 48px 14px 20px;
  }

  .property-search {
    padding: 20px 14px 16px;
    border-radius: 16px;
  }

  .property-search::after {
    border-radius: 18px;
  }

  .property-search__tabs {
    width: calc(100% - 24px);
    grid-template-columns: repeat(4, 1fr);
    border-radius: 12px 12px 0 0;
  }

  .property-search__tab {
    min-height: 34px;
    padding: 6px 4px;
    font-size: 12px;
  }

  .property-search__grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .property-search__field label {
    margin-bottom: 4px;
    font-size: 11px;
  }

  .property-search select,
  .property-search input,
  .property-search__submit {
    height: 40px;
    min-height: 40px;
    font-size: 13px;
  }

  .property-search__submit {
    margin-top: 4px;
  }
}
