/* ─── Property Listing Grid ─── */
.apl-listing-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.apl-property-grid {
    display: grid;
    gap: 24px;
}

.apl-cols-2 { grid-template-columns: repeat(2, 1fr); }
.apl-cols-3 { grid-template-columns: repeat(3, 1fr); }
.apl-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ─── Property Card ─── */
.apl-property-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.apl-property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* Card link wrapper */
.apl-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ─── Card Image ─── */
.apl-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.apl-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.apl-property-card:hover .apl-card-image img {
    transform: scale(1.05);
}

.apl-card-no-image {
    width: 100%;
    height: 100%;
    min-height: 220px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

/* ─── Status Badge (top-left overlay) ─── */
.apl-card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    font-style: italic;
    z-index: 2;
    line-height: 1.3;
}

.apl-badge-sell {
    background: rgba(255, 255, 255, 0.92);
    color: #1a6b4a;
}

.apl-badge-rent {
    background: rgba(255, 255, 255, 0.92);
    color: #1967d2;
}

.apl-badge-sold {
    background: rgba(255, 255, 255, 0.92);
    color: #d93025;
}

.apl-badge-rented {
    background: rgba(255, 255, 255, 0.92);
    color: #e37400;
}

/* ─── Agent (bottom-left overlay on image) ─── */
.apl-card-agent {
    position: absolute;
    bottom: 14px;
    left: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
}

.apl-agent-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.apl-agent-name {
    font-size: 13px;
    color: #fff;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.55);
    padding: 4px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ─── Card Body ─── */
.apl-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Category with pin icon */
.apl-card-category {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #1a6b4a;
    margin-bottom: 6px;
    font-weight: 500;
}

.apl-card-category svg {
    flex-shrink: 0;
}

/* Title */
.apl-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.3;
}

.apl-card-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s;
}

.apl-card-title a:hover {
    color: #1a6b4a;
}

/* Excerpt */
.apl-card-excerpt {
    font-size: 14px;
    color: #888;
    line-height: 1.55;
    margin: 0 0 16px;
    flex: 1;
}

/* ─── Card Footer: Price + Specs in one row ─── */
.apl-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

/* Price */
.apl-card-price {
    font-size: 20px;
    font-weight: 700;
    color: #1a6b4a;
    white-space: nowrap;
}

/* Specs with icons */
.apl-card-specs {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.apl-spec {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    white-space: nowrap;
}

.apl-spec svg {
    color: #999;
    flex-shrink: 0;
}

/* ─── Load More ─── */
.apl-load-more-wrap {
    text-align: center;
    margin-top: 40px;
}

.apl-load-more-btn {
    display: inline-block;
    padding: 14px 40px;
    background: #1a6b4a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.apl-load-more-btn:hover {
    background: #145438;
}

.apl-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.apl-load-more-btn.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    margin-left: 8px;
    animation: apl-spin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes apl-spin {
    to { transform: rotate(360deg); }
}

.apl-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #777;
    font-size: 16px;
}

/* ─── Empty listing state ─── */
.apl-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
    padding: 56px 24px;
}

.apl-empty-icon {
    color: #1a6b4a;
    opacity: 0.85;
    margin-bottom: 18px;
}

.apl-empty-message {
    color: #555;
    font-size: 16px;
    line-height: 1.7;
}

.apl-empty-message p {
    margin: 0 0 12px;
}

.apl-empty-message p:last-child {
    margin-bottom: 0;
}

.apl-empty-btn {
    display: inline-block;
    margin-top: 24px;
    padding: 13px 28px;
    background: #1a6b4a;
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s;
}

.apl-empty-btn:hover,
.apl-empty-btn:focus {
    background: #145438;
    color: #fff;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .apl-cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
    .apl-cols-2,
    .apl-cols-3,
    .apl-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .apl-card-body { padding: 14px 16px 16px; }
    .apl-card-title { font-size: 15px; }
    .apl-card-price { font-size: 17px; }
    .apl-card-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ─── View Details Button ─── */
.apl-card-btn {
    display: block;
    text-align: center;
    padding: 10px 20px;
    margin-top: 14px;
    background: #1a6b4a;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
}

.apl-card-btn:hover {
    background: #145438;
    color: #fff;
}

@media (max-width: 480px) {
    .apl-cols-2,
    .apl-cols-3,
    .apl-cols-4 {
        grid-template-columns: 1fr;
    }
}
