body {
    background-color: #fdf6eb;
    margin: 0;
}

.page-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .sidebar {
        width: 200px;
        padding: 16px;
        background: #f5f5f5;
        height: 100vh;
        box-sizing: border-box;
    }

    .left-sidebar {
        border-right: 1px solid #ddd;
    }

    .right-sidebar {
        border-left: 1px solid #ddd;
    }

    #main-content {
        flex: 1;
        padding: 16px;
    }
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

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

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

.card-body {
    padding: 0.5rem;
}

.card-title {
    font-size: 1rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.card-text {
    font-size: 0.9rem;
    color: #444;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #eee;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    border-top: 1px solid #ccc;
}

.footer a {
    text-decoration: none;
    color: #555;
    text-align: center;
    font-size: 0.9rem;
}

h2 {
    text-align: center;
    color: #5a2da0;
}

.post {
    background: white;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.post h3 {
    margin-top: 0;
}

.post img {
    height: 80px;
    margin-right: 5px;
    margin-top: 10px;
    border-radius: 4px;
}

.images {
    margin-top: 100px;
}

.product {
    background: white;
    border-radius: 5px;
    padding: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.product img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
}

.product-title {
    font-size: 18px;
    font-weight: bold;
    margin-top: 5px;
}

.product-price {
    font-size: 16px;
    color: red;
}

.product-adress {
    font-size: 14px;
    margin-bottom: 1px;
    margin-top: 1px;
}

.product-meta {
    font-size: 12px;
    color: gray;
}

.products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 7px;
    margin-bottom: 1px;
}

#post-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 5px;
}

#loader {
    text-align: center;
    padding: 15px;
    font-size: 14px;
    color: #888;
}

/* Container 2 cột */
#post-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Mỗi cột */
.column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Bài đăng */
.post-card {
  position: relative; /* ✅ để .bottom-info định vị đúng */
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding-bottom: 55px; /* ✅ chừa chỗ cho .bottom-info */
}

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

/* Ảnh bài đăng */
.post-card img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 350px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

/* Tiêu đề bài */
.post-card h3 {
  margin: 6px 10px 10px;
  font-size: 1rem;
  color: #333;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

/* Phần thông tin giá & vị trí */
.post-card .bottom-info {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  font-size: 0.9rem;
}

/* Giá */
.post-card .gia {
  margin: 0;
  font-weight: normal;
  color: #222;
}

/* Quốc gia / vị trí */
.post-card .location {
  margin: 3px 0 0;
  font-size: 0.85rem;
  color: #777;
}

.notice-bar {
    background-color: #fff3cd;
    color: #b94a48;
    padding: 1px;
    font-weight: bold;
    font-size: 16px;
    border-top: 4px solid #fff3cd;
    border-bottom: 1px solid #fce5b9;
    text-align: center;
}

#scrollTopBtn {
    position: fixed;
    display: none;
    bottom: 95px; /* cao hơn scrollTopBtn */
    right: 16px;
    z-index: 600;
    background: rgba(128, 64, 255, 0.8);
    color: rgb(247, 177, 85);
    border: none;
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 100%;
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: opacity 0.3s;
}

#filter-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 6px;
    background: #fdf6eb;
    flex-wrap: wrap;
}

#filter-bar select,
#filter-bar button {
    padding: 5px 8px;
    border: none;
    border-radius: 5px;
    background: #f0f0f0;
    color: #000;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    outline: none;
    appearance: none;
    text-align: center;
}

#filter-bar button {
    cursor: pointer;
    font-weight: bold;
}

.pi-price-container {
    margin: 0;
    margin-bottom: 5px;
    padding: 0;
    font-family: Arial, sans-serif;
}

.pi-price-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    padding: 0;
    text-align: center;
}

.pi-price-table th,
.pi-price-table td {
    border: 1px solid gray;
    padding: 4px;
    font-size: 14px;
    width: 50%;
}

#popup-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 92%;
    background: #000000aa;
    z-index: 999;
}

#popup-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

#popup-box {
    width: 95%;
    height: 95%;
    margin: auto;
    background: white;
    position: relative;
    top: 2%;
    border-radius: 10px;
    overflow: hidden;
}

#popup-box button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #900;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}