/* Basic reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

/* HEADER */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  border-bottom: 1px solid #ddd;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FF5A5F;
}

nav a {
  margin-left: 16px;
  text-decoration: none;
  color: #333;
}

.nav-user {
  margin-left: 16px;
  font-size: 14px;
  color: #555;
}

/* BANNER */
.banner {
  background-image: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1400');
  background-size: cover;
  background-position: center;
  height: 480px;
  position: relative;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: white;
  text-align: center;
  padding: 20px;
}

.banner-overlay h1 {
  font-size: 48px;
  font-weight: bold;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.banner-overlay p {
  font-size: 18px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.banner-overlay input {
  width: 420px;
  padding: 14px 20px;
  font-size: 16px;
  border: none;
  border-radius: 30px;
  outline: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* CATEGORY FILTERS */
.categories {
  display: flex;
  gap: 12px;
  padding: 24px 32px 0;
  flex-wrap: wrap;
}

.category-btn {
  padding: 8px 20px;
  border-radius: 24px;
  border: 1px solid #ddd;
  background: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: #333;
}

.category-btn:hover {
  border-color: #333;
}

.category-btn.active {
  background: #333;
  color: white;
  border-color: #333;
}

/* LISTINGS GRID */
.listings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 40px 32px;
}

/* PROPERTY CARD */
.card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s;
}

.card:hover {
  transform: scale(1.02);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-info {
  padding: 12px;
}

.card-info h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.card-info p {
  color: #777;
  font-size: 14px;
}

.card-info .price {
  font-weight: bold;
  color: #333;
  margin-top: 8px;
}

/* LISTING DETAIL PAGE */
.listing-detail {
  max-width: 860px;
  margin: 40px auto;
  padding: 0 24px 60px;
}

.detail-image {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 32px;
}

.detail-info h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.detail-location {
  color: #777;
  font-size: 16px;
  margin-bottom: 12px;
}

.detail-meta {
  display: flex;
  gap: 8px;
  color: #555;
  font-size: 15px;
  margin-bottom: 24px;
}

.detail-description {
  font-size: 16px;
  line-height: 1.7;
  color: #444;
  border-top: 1px solid #eee;
  padding-top: 24px;
  margin-bottom: 32px;
}

.detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #eee;
  padding-top: 24px;
}

.detail-price {
  font-size: 22px;
  font-weight: 700;
  color: #333;
}

.reserve-btn {
  background-color: #FF5A5F;
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.reserve-btn:hover {
  background-color: #e04a50;
}

.not-found {
  text-align: center;
  margin-top: 80px;
  font-size: 18px;
  color: #777;
}

.not-found a {
  color: #FF5A5F;
}

/* AUTH PAGE */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 70px);
  padding: 40px 16px;
  background: #f7f7f7;
}

.auth-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
  border-bottom: 2px solid #eee;
}

.auth-tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: none;
  font-size: 15px;
  font-weight: 600;
  color: #999;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.auth-tab.active {
  color: #FF5A5F;
  border-bottom-color: #FF5A5F;
}

.auth-form h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  color: #333;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border 0.2s;
}

.form-group input:focus {
  border-color: #FF5A5F;
}

.auth-btn {
  width: 100%;
  padding: 14px;
  background: #FF5A5F;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}

.auth-btn:hover {
  background: #e04a50;
}

.auth-error {
  color: #e04a50;
  font-size: 13px;
  margin-bottom: 8px;
  min-height: 18px;
}

.auth-success {
  color: #2e7d32;
  font-size: 13px;
  margin-bottom: 8px;
  min-height: 18px;
}

.hidden {
  display: none;
}

/* ================================
   RESPONSIVE — Tablet (max 768px)
   ================================ */
@media (max-width: 768px) {
  /* Header */
  header {
    padding: 12px 16px;
  }

  /* Banner */
  .banner {
    height: 360px;
  }

  .banner-overlay h1 {
    font-size: 32px;
  }

  .banner-overlay p {
    font-size: 15px;
  }

  .banner-overlay input {
    width: 100%;
    max-width: 100%;
  }

  /* Listings grid: 2 columns on tablet */
  .listings {
    grid-template-columns: repeat(2, 1fr);
    padding: 24px 16px;
    gap: 16px;
  }

  /* Detail page */
  .detail-image {
    height: 280px;
    border-radius: 10px;
  }

  .detail-info h1 {
    font-size: 24px;
  }
}

/* ================================
   RESPONSIVE — Mobile (max 480px)
   ================================ */
@media (max-width: 480px) {
  /* Banner */
  .banner {
    height: 300px;
  }

  .banner-overlay h1 {
    font-size: 26px;
  }

  /* Listings grid: 1 column on mobile */
  .listings {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  /* Detail page */
  .detail-image {
    height: 220px;
  }

  .detail-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .reserve-btn {
    width: 100%;
    text-align: center;
  }
}
