html,
body {
  height: 100%;
  overflow-x: hidden;
}

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

/* Page background */
body {
  background-color: #f4f4f4;
}

/* Top Filter Bar */
#head {
  display: flex;
  gap: 12px;
  padding: 15px 20px;
  background-color: #222;
  position: sticky;
  top: 0;
  z-index: 99999;

  justify-content: center;
  align-items: center;
}

#head button {
  background-color: #2ecc71;
  color: #ffffff;

  border: none;
  padding: 8px 16px;
  border-radius: 4px;

  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

#head button:hover {
  background-color: #27ae60;
}

/* Cards Grid */
#root {
  padding: 25px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(326px, 1fr));
  gap: 20px;
}

/* Card */
.card {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

/* Card Image */
.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* Card Content */
.card-content {
  padding: 18px;
}

/* Card Header */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

/* Rating badge */
.rating {
  background-color: #267e3e;
  color: #fff;
  padding: 4px 6px;
  border-radius: 5px;
  font-size: 13px;
}

/* Card Footer */
.card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #666;
  margin-bottom: 6px;
}

/* Location + Distance */
.card-location {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #888;
}

#head {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;

  padding: 12px 0;
  background-color: #2b2b2b;

  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Popup card */
#filterPopup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

#filterPopup.active {
  display: flex;
}

.logo {
  color: #f0eeeb;
  margin-right: 45px;
  font-weight: bold;
  font-size: 35px;

  @media (max-width: 768px) {
    .logo {
      font-size: 18px;
    }
  }
}

.popup-card-small {
  background: #fff;
  width: 420px;
  padding: 24px 26px;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.popup-card-small h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 14px;
}

.popup-card-small label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 10px;
  cursor: pointer;
}

.popup-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
}

.popup-actions .apply,
.popup-actions .close {
  background: #4caf50;
  border: none;
  color: #fff;
  padding: 8px 18px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
}

/* ---------- Mobile Responsive ---------- */
@media (max-width: 768px) {
  /* Header */
  #head {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
  }

  #head button {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* Cards grid */
  #root {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  /* Card */
  .card {
    border-radius: 10px;
  }

  .card img {
    height: 180px;
  }

  .card-content {
    padding: 14px;
  }

  .card-header h3 {
    font-size: 15px;
  }

  .rating {
    font-size: 12px;
  }
}
