* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #292929;
  background: #f7f7f7;
}

a {
  color: inherit;
}

/* MAIN LISTING PAGE */

.hero {
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
}

.hero-inner {
  max-width: 1300px;
  margin: auto;
  padding: 50px 24px 40px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #681818;
}

.hero h1 {
  margin: 0;
  font-size: 42px;
}

.hero-copy {
  margin: 12px 0 0;
  color: #666;
  font-size: 17px;
}

.controls {
  max-width: 1300px;
  margin: 28px auto 10px;
  padding: 0 24px;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.control label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
}

.control select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  background: white;
  font-size: 15px;
}

.results {
  max-width: 1300px;
  margin: auto;
  padding: 10px 24px 60px;
}

.results-header {
  margin: 20px 0;
}

.results-header h2 {
  font-size: 21px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
}

.property-card {
  overflow: hidden;
  background: white;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.06);
}

.image-link {
  position: relative;
  display: block;
  height: 260px;
  overflow: hidden;
  background: #eee;
}

.image-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.property-card:hover .image-link img {
  transform: scale(1.025);
}

.for-sale-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 7px 10px;
  background: #681818;
  color: white;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

.photo-count {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 6px 9px;
  background: rgba(0, 0, 0, 0.68);
  color: white;
  border-radius: 4px;
  font-size: 12px;
}

.no-photo {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #777;
}

.card-body {
  padding: 20px;
}

.price {
  margin-bottom: 8px;
  color: #681818;
  font-size: 25px;
  font-weight: 700;
}

.card-body h3 {
  margin: 0;
  font-size: 20px;
}

.location {
  margin: 6px 0 18px;
  color: #707070;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 18px 0;
  padding: 16px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.stats div {
  text-align: center;
}

.stats strong {
  display: block;
  font-size: 18px;
}

.stats span {
  display: block;
  margin-top: 3px;
  color: #777;
  font-size: 12px;
}

.view-button,
.interest-button {
  display: block;
  padding: 13px 18px;
  border-radius: 5px;
  background: #681818;
  color: white;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.view-button:hover,
.interest-button:hover {
  background: #4f1010;
}

.no-results {
  margin-top: 40px;
  padding: 40px;
  background: white;
  text-align: center;
}

/* PROPERTY DETAIL PAGE */

.detail-page {
  max-width: 1300px;
  margin: auto;
  padding: 30px 24px 60px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #681818;
  font-weight: 700;
  text-decoration: none;
}

.main-photo {
  overflow: hidden;
  height: 600px;
  background: #eee;
  border-radius: 8px;
}

.main-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnails {
  display: flex;
  gap: 9px;
  margin-top: 10px;
  padding-bottom: 8px;
  overflow-x: auto;
}

.thumb {
  width: 110px;
  height: 75px;
  padding: 0;
  flex: 0 0 auto;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}

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

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 45px;
  margin-top: 35px;
}

.detail-main h1 {
  margin: 4px 0;
  font-size: 39px;
}

.detail-location {
  margin: 7px 0 24px;
  color: #686868;
  font-size: 18px;
}

.detail-price {
  margin-bottom: 25px;
  color: #681818;
  font-size: 35px;
  font-weight: 700;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 550px;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}

.detail-stats div {
  padding: 20px 10px;
}

.detail-stats strong {
  display: block;
  font-size: 24px;
}

.detail-stats span {
  display: block;
  margin-top: 4px;
  color: #777;
  font-size: 13px;
}

.interest-card {
  align-self: start;
  padding: 28px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.05);
}

.interest-card h2 {
  margin-top: 0;
}

.interest-card p {
  color: #666;
  line-height: 1.5;
}

.interest-note {
  margin-bottom: 0;
  font-size: 12px;
  text-align: center;
}

/* TABLET */

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-content {
    grid-template-columns: 1fr;
  }

  .main-photo {
    height: 450px;
  }
}

/* MOBILE */

@media (max-width: 620px) {
  .hero-inner {
    padding-top: 38px;
    padding-bottom: 32px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .image-link {
    height: 240px;
  }

  .main-photo {
    height: 310px;
  }

  .detail-main h1 {
    font-size: 30px;
  }
}

/* GALLERY NAV START */

.main-photo {
  position: relative;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 10;

  width: 48px;
  height: 48px;

  transform: translateY(-50%);

  border: none;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.80);
  color: #333;

  font-size: 27px;
  font-weight: bold;

  cursor: pointer;

  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.22);

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.gallery-arrow:hover {
  background: rgba(255, 255, 255, 0.98);

  transform:
    translateY(-50%)
    scale(1.07);
}

.gallery-arrow-left {
  left: 18px;
}

.gallery-arrow-right {
  right: 18px;
}

.gallery-counter {
  position: absolute;
  right: 18px;
  bottom: 16px;
  z-index: 10;

  padding: 7px 11px;

  border-radius: 5px;

  background: rgba(0, 0, 0, 0.62);
  color: white;

  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 620px) {

  .gallery-arrow {
    width: 42px;
    height: 42px;
    font-size: 22px;
  }

  .gallery-arrow-left {
    left: 10px;
  }

  .gallery-arrow-right {
    right: 10px;
  }

  .gallery-counter {
    right: 10px;
    bottom: 10px;
  }
}

/* GALLERY NAV END */

