/* --- PREMIUM VARIABLE MATRIX & FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #f4f6f0; /* Soft Olive Tint Premium Light Background */
    margin: 0;
    padding: 0;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 4%;
    min-height: 85vh;
    box-sizing: border-box;
}

/* --- SEARCH & FILTER SECTION WRAPPER --- */
.search-filter-wrapper {
    background: #ffffff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    margin-bottom: 35px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.search-bar-core {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #f8fafc;
    padding: 6px 16px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-bar-core:focus-within {
    border-color: #556b2f;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(85, 107, 47, 0.1);
}

.search-bar-core i { 
    color: #64748b; 
    font-size: 18px; 
    transition: color 0.2s;
}

.search-bar-core:focus-within i {
    color: #556b2f;
}

.search-bar-core input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 4px;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    color: #1a1a1a;
}

.search-bar-core input::placeholder {
    color: #94a3b8;
}

/* --- INTERACTIVE ACTION ICON BUTTONS --- */
.icon-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.icon-btn:hover {
    border-color: #556b2f;
    color: #556b2f;
    background: #f4f6f0;
    transform: translateY(-1px);
}

.icon-btn.listening {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    animation: pulse 1.5s infinite;
}

/* --- AI SUGGESTED PILL FILTERS --- */
.ai-tags-container {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
    white-space: nowrap;
    align-items: center;
    -webkit-overflow-scrolling: touch;
}

.ai-tags-container::-webkit-scrollbar {
    display: none; /* Clean native horizontal scroll appearance */
}

.ai-label {
    font-size: 11px;
    font-weight: 800;
    color: #800020; /* Mehrum */
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 6px;
    flex-shrink: 0;
}

.filter-tag {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #475569;
    flex-shrink: 0;
}

.filter-tag:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: translateY(-1px);
}

.filter-tag.active {
    background: #556b2f; /* Premium Dark Olive */
    color: #ffffff;
    border-color: #556b2f;
    box-shadow: 0 4px 15px rgba(85, 107, 47, 0.25);
}

/* --- LISTINGS CARD GRID LAYOUT --- */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 25px;
    margin-top: 15px;
}

/* --- PREMIUM CARD COMPONENT SYSTEM --- */
.pg-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.pg-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.07);
}

.card-image-box {
    position: relative;
    height: 220px;
    overflow: hidden;
    background-color: #f1f5f9;
}

.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.pg-card:hover .card-image-box img {
    transform: scale(1.05);
}

.discount-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #800020; /* Brand Mehrum */
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
    box-shadow: 0 4px 10px rgba(128, 0, 32, 0.2);
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* --- PRICE STRUCTURE ROW --- */
.price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.original-price {
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 14px;
    font-weight: 500;
}

.current-price {
    color: #1a1a1a;
    font-size: 20px;
    font-weight: 800;
}

.saved-badge {
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 5px;
    margin-left: auto;
}

.pg-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- RATINGS & LOGISTICS --- */
.rating-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
    font-size: 13px;
}

.rating-row i { color: #ffb300; }
.rating-val { color: #1a1a1a; font-weight: 700; }
.reviews-count { color: #666666; }

.location-info {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 13px;
    color: #666666;
    margin-bottom: 6px;
    line-height: 1.4;
}

.location-info i {
    color: #556b2f;
    margin-top: 2px;
}

.directions-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #556b2f;
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 16px;
    width: fit-content;
    transition: opacity 0.2s;
}

.directions-link:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* --- AMENITIES MANAGEMENT PILLS --- */
.amenities-box {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    margin-top: auto; /* Pushes amenities to layout bottom boundary line */
}

.amenity-tag {
    background: #f0f2f5;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- BUTTON SETUPS --- */
.card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-details {
    border: 1.5px solid #800020;
    background: #ffffff;
    color: #800020;
    padding: 11px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-details:hover {
    background: #fff5f5;
    transform: translateY(-1px);
}

.btn-inquiry {
    background: #800020;
    color: #ffffff;
    border: none;
    padding: 11px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-inquiry:hover {
    background: #600018;
    box-shadow: 0 4px 12px rgba(128, 0, 32, 0.25);
    transform: translateY(-1px);
}

/* --- LOADER / EMPTY STATES --- */
.loader-text {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    font-weight: 600;
    font-size: 15px;
}

/* --- GLOBAL PULSE & RESPONSIVE MEDIA BOUNDS --- */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { transform: scale(1.04); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@media (max-width: 768px) {
    .main-container {
        padding: 15px 12px;
    }
    .search-filter-wrapper {
        padding: 15px;
        margin-bottom: 20px;
        border-radius: 16px;
    }
    .listings-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .card-image-box {
        height: 190px;
    }
}

@media (max-width: 360px) {
    .card-actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}