/* Sale Page Specific Styles */

:root {
    --sale-primary: #1083b9;
    --sale-secondary: #0f172a;
    --sale-accent: #0a6a94;
    --sale-light: #f9fafb;
    --sale-text: #374151;
    --sale-text-light: #6b7280;
    --sale-white: #ffffff;
    --sale-tag-yellow: #fbbf24;
    --sale-tag-green: #10b981;
    --sale-tag-blue: #3b82f6;
}

body {
    background-color: #f3f4f6;
}

/* Header Adjustments */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Sale Hero Section */
.sale-hero {
    position: relative;
    height: 50vh;
    min-height: 350px;
    background: url('https://images.unsplash.com/photo-1512917774080-9991f1c4c750?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--sale-white);
    margin-bottom: 2rem;
}

.sale-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2038afc2 0%, #03afffc7 100%);
}

.sale-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 20px;
    animation: fadeInDown 1s ease-out;
}

.sale-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.sale-hero p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Controls Section */
.controls-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.ssection-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--sale-secondary);
}

.ssection-title span {
    color: var(--sale-accent);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.sort-dropdown,
.price-filter {
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: var(--sale-text);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
}

.sort-dropdown:hover,
.price-filter:hover {
    border-color: var(--sale-primary);
}

/* Listings Section */
.listings-section {
    padding: 0 0 5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 640px) {
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .sale-hero h1 {
        font-size: 2.5rem;
    }
}

@media (min-width: 1025px) {
    .listings-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Property Card */
.sale-card {
    background: var(--sale-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

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

.card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

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

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

.card-tags {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.badge {
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
    letter-spacing: 0.5px;
}

.badge.featured {
    background-color: var(--sale-tag-yellow);
    color: #333;
}

.badge.sale {
    background-color: var(--sale-tag-green);
}

.badge.new {
    background-color: var(--sale-tag-blue);
}

.card-heart {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--sale-accent);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sale-secondary);
}

.card-location {
    display: flex;
    align-items: center;
    color: #9ca3af;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.card-features {
    display: flex;
    gap: 15px;
    color: #6b7280;
    font-size: 0.85rem;
}

.feature i {
    color: var(--sale-accent);
    margin-right: 5px;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
    gap: 0.5rem;
}

.page-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.page-btn.active {
    background: var(--sale-primary);
    color: white;
    border-color: var(--sale-primary);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .sale-hero {
    height: 240px;
    min-height: 200px;
    }
    .listings-grid {
        gap: 10px;
    }
    .sale-hero h1 {
        font-size: 31px;
        line-height: 34px;
    }
    .sale-hero p {
    font-size: 14px;
    line-height: 16px;
    }

    .card-image {
        height: 150px;
    }

    .card-content {
        padding: 0.75rem;
    }

    .card-price {
        font-size: 1.1rem;
    }

    .card-title {
        font-size: 10px;
        margin-bottom: 2px;
    }

    .badge {
        padding: 4px 10px;
        font-size: 0.65rem;
    }

    .card-heart {
        width: 28px;
        height: 28px;
        top: 10px;
        right: 10px;
        font-size: 0.8rem;
    }

    .card-location {
        font-size: 0.75rem;
        margin-bottom: 5px;
    }

    .card-features {
        font-size: 0.7rem;
        display: none;
        gap: 8px;
    }
}

@media (max-width: 600px) {
    .sale-hero h1 {
        font-size: 2.2rem;
    }

    .controls-section {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        margin-bottom: 2.5rem;
    }

    .ssection-title {
        width: 100%;
    }

    .ssection-title h2 {
        font-size: 1.8rem;
    }

    .filter-controls {
        width: 100%;
        display: flex;
        gap: 10px;
        justify-content: center;
    }

    .price-filter,
    .sort-dropdown {
        flex: 1;
        min-width: 0;
        /* Prevents overflow */
        font-size: 11px;
        padding: 10px 5px;
    }
}