/* Container & Base */
.my-listing-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
}

/* BỘ LỌC - KHÔI PHỤC CSS XỊN */
.my-filter-header {
  background: #ffffff;
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 25px;
  border: 1px solid #f0f0f5;
}
.filter-input-group {
  display: flex;
  gap: 15px;
}
.select-box {
  flex: 1;
}
.select-box label {
  font-size: 11px;
  font-weight: 700;
  color: #8e8e93;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
  letter-spacing: 0.5px;
}
.my-filter-form select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d1d6;
  background: #fbfbfd;
  font-weight: 600;
  color: #1c1c1e;
  font-size: 14px;
  cursor: pointer;
}

/* GRID HỆ THỐNG */
.my-listing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
}

/* CARD LINK */
.my-pro-card-link {
  text-decoration: none;
  display: block;
  color: inherit;
  height: 100%;
}
.my-pro-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #f2f2f7;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
}
.my-pro-card-link:hover .my-pro-card {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.card-media {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: #f2f2f7;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-date-badge-right {
  position: absolute;
  top: 0;
  right: 0;
  background: #007aff;
  color: #fff;
  width: 48px;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-bottom-left-radius: 12px;
}
.card-date-badge-right .d {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}
.card-date-badge-right .m {
  font-size: 9px;
  font-weight: 700;
  margin-top: 2px;
}

/* NỘI DUNG */
.card-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 10px;
}
.card-meta-loc {
  font-size: 11px;
  font-weight: 700;
  color: #007aff;
  text-transform: uppercase;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: #1c1c1e;
  margin: 0;
}
.card-excerpt {
  font-size: 13px;
  color: #636366;
  line-height: 1.5;
  height: 58px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-action {
  border-top: 1px solid #f2f2f7;
  padding-top: 12px;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #007aff;
}

/* PHÂN TRANG - TẬN DỤNG BỀ NGANG */
.my-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-top: 30px;
  flex-wrap: nowrap; /* Ưu tiên nằm trên một hàng */
  width: 100%;
}
.my-pagination .page-numbers {
  flex: 1; /* Tự động chia đều bề ngang */
  max-width: 45px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #d1d1d6;
  border-radius: 8px;
  text-decoration: none;
  color: #1c1c1e;
  font-weight: 700;
  font-size: 14px;
}
.my-pagination .page-numbers.current {
  background: #007aff;
  color: #fff;
  border-color: #007aff;
}

/* MOBILE OPTIMIZATION */
@media (max-width: 600px) {
  .my-listing-wrapper {
    padding: 10px 8px;
  }
  .my-listing-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .filter-input-group {
    flex-direction: column;
    gap: 10px;
  }

  /* Phân trang Mobile dàn hàng ngang tối đa */
  .my-pagination {
    gap: 4px;
    padding: 0;
  }
  .my-pagination .page-numbers {
    flex: 1;
    min-width: 32px;
    height: 36px;
    font-size: 12px;
    padding: 0;
  }
}

/* TABLET */
@media (min-width: 601px) and (max-width: 1024px) {
  .my-listing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
