/* ===== FORM ===== */
.nhadat-form {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nhadat-form h2 {
    margin-bottom: 15px;
    font-size: 20px;
}

.nhadat-form input,
.nhadat-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* ===== DROP AREA ===== */
#drop-area {
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

#drop-area:hover {
    border-color: #e60023;
    background: #fafafa;
}

.drop-label {
    cursor: pointer;
    display: block;
    width: 100%;
}

#file-input {
    display: none;
}

/* PREVIEW */
#preview {
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
}

#preview img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    margin: 5px;
    border-radius: 6px;
}

/* BUTTON */
button {
    background: #e60023;
    color: #fff;
    padding: 12px;
    border: none;
    width: 100%;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background: #c4001d;
}

/* ===== LIST ===== */
.nhadat-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* ===== CARD ===== */
.card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* IMAGE */
.thumb {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f5f5f5;
}

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

/* BODY */
.card-body {
    padding: 10px;
}

/* TITLE */
.card-body h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;

    display: -webkit-box;
    -webkit-line-clamp: 2; /* giới hạn 2 dòng */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* PRICE + AREA */
.price-area {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
    font-size: 13px;
}

.price {
    color: #e60023;
    font-weight: bold;
}

.area {
    color: #555;
}

/* ADDRESS */
.address {
    font-size: 12px;
    color: #777;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.detail-address {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.5;
}

.detail-address .icon-location {
    flex-shrink: 0;
    margin-top: 3px;
}
/* PHONE */
.meta {
    margin-top: 5px;
    font-size: 13px;
    color: #e60023;
    font-weight: bold;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .nhadat-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .nhadat-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .nhadat-form {
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .nhadat-list {
        grid-template-columns: 1fr;
    }
}
.nhadat-form textarea.desc {
    min-height: 200px;
    line-height: 1.6;
    font-size: 14px;
    padding: 12px;
}


.nhadat-pagination {
    margin-top: 20px;
    text-align: center;
}

.nhadat-pagination .page-num {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}

.nhadat-pagination .page-num.active {
    background: #e11d48;
    color: #fff;
    border-color: #e11d48;
}

.nhadat-pagination .page-num:hover {
    background: #f1f1f1;
}