/* public/css/sales.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Search Header Section */
.search-header-section {
    background: linear-gradient(to bottom, rgba(244, 245, 247, 0.85) 0%, rgba(240, 242, 244, 0.85) 100%),
                url('../images/sales/headsls.jpg') center center;
    background-size: cover;
    background-position: center;
    padding: 50px 0;
    position: relative;
}

.search-header-container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
}

.search-wrapper {
    background-color: #183B4E;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-search-input {
    flex: 1;
    background-color: #ffffff;
    border: 1px solid #ddd;
    padding: 12px 18px;
    font-size: 14px;
    border-radius: 5px;
    outline: none;
    min-width: 250px;
}

.main-search-input::placeholder {
    color: #999;
}

.search-dropdown-group {
    display: flex;
    gap: 10px;
}

.header-dropdown {
    background-color: #183B4E;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 18px;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    outline: none;
    min-width: 140px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px;
}

.header-dropdown option {
    background-color: #fff;
    color: #333;
}

.header-search-button {
    background-color: #854836;
    color: #fff;
    border: none;
    padding: 12px 35px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.header-search-button:hover {
    background-color: #183B4E;
}

/* Breadcrumb */
.breadcrumb-section {
    background-color: #fff;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.breadcrumb-link {
    color: #0e0e0e;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
}

.breadcrumb-link:hover {
    text-decoration: underline;
}

/* Page Header */
.page-header {
    background-color: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

/* Content Wrapper */
.content-wrapper {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 40px;
}

/* Sidebar */
.sidebar-filter {
    width: 300px;
    background-color: #183B4E;
    border-radius: 8px;
    padding: 10px;
    height: fit-content;
    position: sticky;
    top: 20px;
    margin-left: -10px;
}

.filter-header {
    background-color: #183B4E;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-header h3 {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.filter-group {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-item {
    color: #fff;
    font-size: 14px;
    padding: 8px 12px;
    margin-bottom: 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.filter-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.filter-item.active {
    background-color: #183B4E;
    font-weight: 600;
}

.filter-section {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-section-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.filter-list {
    max-height: 300px;
    overflow-y: auto;
}

.filter-list::-webkit-scrollbar {
    width: 6px;
}

.filter-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.filter-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* Main Content */
.main-content {
    flex: 1;
}

/* Properties Grid */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

/* Property Card */
.property-card {
    background-color: #c5d9f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Hot Deal Cards - Special Styling */
.property-card[data-hot-deal="true"] {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe6cc 100%);
    border: 2px solid #854836;
    position: relative;
}

.property-card[data-hot-deal="true"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #854836, #183B4E, #854836);
    animation: hotDealGlow 2s ease-in-out infinite;
}

@keyframes hotDealGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Trending Cards - Special Styling */
.property-card[data-trending="true"] {
    background: linear-gradient(135deg, #e6f7ff 0%, #d1f0ff 100%);
    border: 2px solid #183B4E;
    position: relative;
}

.property-card[data-trending="true"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #183B4E, #854836, #183B4E);
    animation: trendingGlow 2s ease-in-out infinite;
}

@keyframes trendingGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Property Image */
.property-image-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.property-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hot Deal Badge - Fire icon styling */
.badge-hot-deal {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #854836 0%, #183B4E 100%);
    color: #fff;
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(133, 72, 54, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.badge-hot-deal::before {
    content: '🔥 ';
    font-size: 13px;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Trending Badge - Chart icon styling */
.badge-trending {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #183B4E 0%, #854836 100%);
    color: #fff;
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(24, 59, 78, 0.4);
    animation: trendingPulse 2s ease-in-out infinite;
}

.badge-trending::before {
    content: '📈 ';
    font-size: 13px;
}

@keyframes trendingPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.badge-urgent {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #350707;
    color: #fff;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-location {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background-color: #f4f7f4;
    color: #100f0f;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

/* Property Content */
.property-content {
    padding: 16px;
}

.property-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.meta-badge {
    background-color: #f0f0f0;
    color: #333;
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 4px;
    font-weight: 500;
    border: none;
    cursor: default;
}

.btn-favorite {
    margin-left: auto;
    background: none;
    border: 1px solid #ddd;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-favorite:hover {
    background-color: #ff6b6b;
    color: #fff;
    border-color: #ff6b6b;
}

.property-price-section {
    margin-bottom: 10px;
}

.property-price {
    color: #854836;
    font-size: 22px;
    font-weight: 700;
    margin-right: 8px;
}

.property-price-unit {
    color: #666;
    font-size: 13px;
}

/* Price Discount Section - For Hot Deals */
.price-discount {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.original-price {
    color: #999;
    font-size: 14px;
    text-decoration: line-through;
    font-weight: 500;
}

.discount-badge {
    background: linear-gradient(135deg, #854836 0%, #183B4E 100%);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.property-description {
    color: #555;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 12px;
    min-height: 42px;
}

.property-footer {
    display: flex;
    gap: 15px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.property-icon {
    color: #183B4E;
    font-size: 12px;
    display: flex;
    align-items: center;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    padding: 20px 0;
}

.pagination-arrow,
.pagination-number {
    background-color: #fff;
    border: 1px solid #ddd;
    color: #333;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination-arrow:hover,
.pagination-number:hover {
    background-color: #183B4E;
    color: #fff;
    border-color: #183B4E;
}

.pagination-number.active {
    background-color: #ffc107;
    color: #333;
    border-color: #ffc107;
    font-weight: 700;
}

.pagination-text {
    color: #666;
    font-size: 13px;
    margin-left: 15px;
}

/* Description Section */
.description-section {
    background-color: #fff;
    padding: 40px 0;
    margin-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.description-title {
    font-size: 22px;
    font-weight: 600;
    color: #183B4E;
    margin-bottom: 20px;
    text-align: center;
}

.description-text {
    color: #555;
    font-size: 14px;
    line-height: 1.8;
    text-align: justify;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 992px) {
    .content-wrapper {
        flex-direction: column;
    }
    .sidebar-filter {
        width: 100%;
        position: static;
    }
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 820px) {
    .search-header-section {
        padding: 30px 0;
        min-height: 200px;
    }
    .search-header-container {
        justify-content: center;
        padding: 0 20px;
    }
    .search-wrapper {
        width: 100%;
        flex-direction: column;
        gap: 12px;
        padding: 20px;
    }
    .main-search-input {
        min-width: 100%;
    }
    .search-dropdown-group {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    .header-dropdown {
        width: 100%;
    }
    .header-search-button {
        width: 100%;
        margin-top: 5px;
    }
    .properties-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-title {
        font-size: 20px;
    }
    .container {
        padding: 0 15px;
    }
    .pagination-wrapper {
        flex-wrap: wrap;
    }
    .pagination-text {
        width: 100%;
        text-align: center;
        margin-top: 10px;
        margin-left: 0;
    }
    footer {
        margin-left: 0px;
        margin-right: 15px;
        padding: 30px 0 15px;
    }
}

@media screen and (max-width: 768px) {
    .properties-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media screen and (max-width: 480px) {
    .search-header-section {
        padding: 25px 0;
        min-height: 180px;
    }
    .search-wrapper {
        padding: 15px;
        gap: 10px;
    }
    .main-search-input,
    .header-dropdown,
    .header-search-button {
        padding: 10px 12px;
        font-size: 14px;
    }
    .property-meta {
        flex-wrap: wrap;
    }
    .property-footer {
        flex-direction: column;
        gap: 8px;
    }
    .property-image-wrapper {
        height: 200px;
    }
    .price-discount {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .badge-trending::before,
    .badge-hot-deal::before {
        font-size: 11px;
    }
}

/* Device-Specific Adjustments */

/* For iPad Air (820x1180) - Portrait */
@media screen and (max-width: 1180px) and (min-width: 821px) and (orientation: portrait) {
    .search-header-section {
        padding: 40px 0;
        min-height: 250px;
    }
    .search-header-container {
        padding: 0 30px;
        justify-content: flex-end;
    }
    .search-wrapper {
        width: 550px;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 12px;
        padding: 18px;
    }
    .main-search-input {
        min-width: 200px;
        flex: 1;
    }
    .search-dropdown-group {
        flex: 0 0 auto;
        gap: 10px;
    }
    .header-dropdown {
        min-width: 130px;
        padding: 10px 15px;
    }
    .header-search-button {
        padding: 10px 25px;
        white-space: nowrap;
    }
}

/* For Asus Zenbook Fold (853x1280) - Portrait */
@media screen and (max-width: 1280px) and (min-width: 854px) and (orientation: portrait) {
    .search-header-section {
        padding: 45px 0;
        min-height: 280px;
    }
    .search-header-container {
        padding: 0 35px;
        justify-content: flex-end;
    }
    .search-wrapper {
        width: 580px;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 15px;
        padding: 20px;
    }
    .main-search-input {
        min-width: 220px;
        flex: 1;
    }
    .search-dropdown-group {
        flex: 0 0 auto;
        gap: 12px;
    }
    .header-dropdown {
        min-width: 140px;
        padding: 11px 16px;
    }
    .header-search-button {
        padding: 11px 30px;
    }
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Landscape orientation for both devices */
@media screen and (max-width: 1180px) and (min-width: 821px) and (orientation: landscape),
       screen and (max-width: 1280px) and (min-width: 854px) and (orientation: landscape) {
    .search-header-container {
        justify-content: flex-end;
    }
    /* .search-wrapper {
        width: 500px;
    } */
    .properties-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}