:root {
    --brand-dark: #002f34;
    --brand-dark-2: #014d55;
    --brand-accent: #23e5db;
    --brand-border: #e7edf1;
    --brand-soft: #667085;
    --brand-bg: #f5f7fa;
    --brand-white: #ffffff;
    --brand-danger: #ff5a5f;
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 14px 34px rgba(15, 23, 42, 0.08);
}

body {
    background: var(--brand-bg);
}

.listing-page {
    min-height: 100vh;
}

.filter-box,
.results-panel {
    background: var(--brand-white);
    border: 1px solid var(--brand-border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.filter-box {
    padding: 18px;
}

.sticky-filters {
    position: sticky;
    top: 88px;
}

.filter-head {
    margin-bottom: 16px;
}

.filter-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin-bottom: 4px;
}

.filter-subtitle {
    color: var(--brand-soft);
    font-size: 0.88rem;
    margin-bottom: 0;
}

.form-control-custom,
.sort-select {
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid #d8e2e8;
    box-shadow: none !important;
    font-size: 0.9rem;
}

.form-control-custom:focus,
.sort-select:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 0.16rem rgba(35, 229, 219, 0.15) !important;
}

.btn-filter {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand-dark-2));
    border: none;
    color: #fff;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
}

.btn-clear-filter {
    background: #fff;
    border: 1px solid #d7e0e7;
    color: var(--brand-dark);
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.results-panel {
    padding: 14px;
    overflow: hidden;
}

.sticky-results-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eef2f4;
}

.listing-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.listing-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.listing-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-dark);
    line-height: 1.1;
}

.listing-subtitle {
    color: var(--brand-soft);
    font-size: 0.88rem;
}

.topbar-btn {
    border: 1px solid #d9e2e8;
    background: #fff;
    color: var(--brand-dark);
    border-radius: 12px;
    padding: 9px 12px;
    font-weight: 700;
    white-space: nowrap;
}

.sort-select {
    min-width: 165px;
    padding-right: 36px;
}

.category-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.category-chips::-webkit-scrollbar {
    display: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #d9e3e8;
    background: #fff;
    color: var(--brand-dark);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    transition: 0.2s ease;
}

.chip.active {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}

.products-scroll-area {
    overflow: visible;
}

.listing-card {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.listing-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.listing-image-area {
    position: relative;
    padding: 8px 8px 0 8px;
}

.listing-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    background: #eef2f4;
    display: block;
}

.listing-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: calc(100% - 54px);
}

.listing-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
}

.category-badge {
    background: rgba(0, 47, 52, 0.88);
    color: #fff;
}

.new-badge {
    background: rgba(35, 229, 219, 0.95);
    color: #00363a;
}

.favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.95);
    color: var(--brand-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
    transition: 0.2s ease;
}

.favorite-btn.is-favorited {
    color: #ff4d6d;
}

.listing-content {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.listing-meta-top {
    min-height: 18px;
    margin-bottom: 4px;
}

.listing-location {
    color: var(--brand-soft);
    font-size: 0.7rem;
    font-weight: 600;
}

.listing-product-title {
    color: var(--brand-dark);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
}

.listing-description {
    color: var(--brand-soft);
    font-size: 0.76rem;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 32px;
}

.listing-price {
    color: var(--brand-dark);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.1;
}

.btn-view-ad {
    border: 1px solid var(--brand-dark);
    color: var(--brand-dark);
    background: transparent;
    border-radius: 10px;
    padding: 8px 10px;
    font-weight: 800;
    font-size: 0.8rem;
}

.btn-view-ad:hover {
    background: var(--brand-dark);
    color: #fff;
}

.pagination-wrap {
    padding-top: 16px;
}

.pagination {
    gap: 6px;
}

.pagination .page-link {
    border-radius: 10px !important;
    border: 1px solid #dbe3e8;
    color: var(--brand-dark);
    padding: 8px 12px;
    box-shadow: none !important;
}

.pagination .active .page-link {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}

.btn-load-more {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand-dark-2));
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    font-weight: 800;
    min-width: 170px;
}

.mobile-filter-canvas {
    max-width: 320px;
}

.mobile-filter-canvas .offcanvas-body,
.mobile-filter-canvas .offcanvas-header {
    padding: 16px;
}

.skeleton-card {
    overflow: hidden;
}

.skeleton {
    position: relative;
    overflow: hidden;
    background: #e9eef2;
    border-radius: 10px;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 120%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.65) 50%, rgba(255,255,255,0) 100%);
    animation: shimmer 1.2s infinite;
}

.skeleton-image {
    width: 100%;
    height: 150px;
    border-radius: 12px;
}

.skeleton-line {
    height: 10px;
    width: 100%;
}

.skeleton-line-sm {
    width: 40%;
}

.skeleton-line-lg {
    width: 85%;
}

.skeleton-price {
    width: 45%;
    height: 16px;
}

.skeleton-btn {
    width: 100%;
    height: 36px;
    border-radius: 10px;
}

@keyframes shimmer {
    0% { left: -150%; }
    100% { left: 150%; }
}

@media (max-width: 991.98px) {
    .results-panel {
        padding: 12px;
        border-radius: 16px;
    }

    .listing-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .listing-topbar-actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 575.98px) {
    .container-fluid {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .results-panel {
        padding: 10px;
        border-radius: 14px;
    }

    .listing-title {
        font-size: 1.1rem;
    }

    .listing-subtitle {
        font-size: 0.8rem;
    }

    .topbar-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .sort-select {
        min-width: 132px;
        min-height: 40px;
        font-size: 0.8rem;
    }

    .chip {
        padding: 7px 10px;
        font-size: 0.76rem;
    }

    .products-grid > div {
        width: 50%;
    }

    .listing-image,
    .skeleton-image {
        height: 110px;
    }

    .listing-product-title {
        font-size: 0.82rem;
        min-height: 34px;
    }

    .listing-description {
        font-size: 0.72rem;
        min-height: 30px;
    }

    .listing-price {
        font-size: 0.92rem;
    }

    .btn-view-ad {
        padding: 7px 8px;
        font-size: 0.74rem;
    }
}