/* =============================================================
   Property KE Listing Grid — v2
   3-Column Sticky Layout with Geolocation & Active Filter Tags
   ============================================================= */

.propertyke-listing-grid-container {
    margin: 30px auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    color: #333;
}

/* ===== MAIN 3-COLUMN GRID ===== */
.propertyke-grid-main-layout {
    display: grid;
    grid-template-columns: 260px 1fr 260px;
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
    align-items: start;
}

/* ===== SIDEBARS (Sticky) ===== */
.propertyke-sidebar {
    position: sticky;
    top: 90px;
    align-self: start;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.12) transparent;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
    z-index: 40;
}

.propertyke-sidebar::-webkit-scrollbar {
    width: 4px;
}

.propertyke-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.propertyke-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 4px;
}

.propertyke-sidebar-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #222;
    padding-bottom: 10px;
    border-bottom: 2px solid #0164fe;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.propertyke-sidebar-section {
    margin-bottom: 28px;
}

.propertyke-sidebar-section:last-child {
    margin-bottom: 0;
}

/* ===== USER LOCATION DISPLAY ===== */
.propertyke-user-location {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: linear-gradient(135deg, #f0f5ff 0%, #e8f0fe 100%);
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid rgba(1, 100, 254, 0.12);
}

.propertyke-location-icon {
    width: 40px;
    height: 40px;
    background: #0164fe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.propertyke-location-icon--active {
    animation: pulse-location 2s ease-in-out 3;
}

@keyframes pulse-location {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

.propertyke-location-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.propertyke-location-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0164fe;
}

.propertyke-location-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== LOCATION SEARCH ===== */
.propertyke-location-search {
    display: flex;
    align-items: center;
    background: #f5f7fa;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    padding: 3px 12px;
    transition: all 0.2s ease;
}

.propertyke-location-search:focus-within {
    border-color: #0164fe;
    box-shadow: 0 0 0 3px rgba(1, 100, 254, 0.08);
}

.propertyke-location-search i {
    color: #999;
    font-size: 13px;
    margin-right: 8px;
}

.propertyke-location-search-input {
    background: transparent;
    border: none;
    padding: 9px 0;
    width: 100%;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    outline: none !important;
}

.propertyke-location-search-input::placeholder {
    color: #bbb;
    font-weight: 500;
}

/* ===== SIDEBAR LIST ITEMS ===== */
.propertyke-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.propertyke-sidebar-list li {
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 3px;
}

.propertyke-sidebar-list li:hover {
    background: #f0f4ff;
    color: #0164fe;
}

.propertyke-sidebar-list li.active {
    background: #0164fe;
    color: #fff;
}

.loc-count {
    font-size: 11px;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.propertyke-sidebar-list li.active .loc-count {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== AMENITIES ===== */
.propertyke-amenities-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.propertyke-amenity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    font-weight: 500;
    transition: color 0.2s ease;
}

.propertyke-amenity-item input {
    accent-color: #0164fe;
    width: 15px;
    height: 15px;
}

.propertyke-amenity-item:hover {
    color: #0164fe;
}

/* ===== MIDDLE COLUMN ===== */
.propertyke-grid-column {
    min-width: 0;
    overflow: visible;
}

/* Middle Header (Sticky) */
.propertyke-middle-header {
    position: sticky;
    top: 90px;
    z-index: 50;
    background: #fff;
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    margin-bottom: 25px;
}

/* New Filter Container with Scroll Buttons */
.propertyke-filter-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.propertyke-filter-scroller {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    padding: 2px 0;
    scroll-behavior: smooth;
    mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15px, black calc(100% - 15px), transparent);
}

.propertyke-filter-scroller::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.propertyke-filter-inner-row {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 0 5px;
}

/* Scroll Buttons - Absolute Positioned */
.filter-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ddd;
    color: #0164fe;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 60;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    opacity: 0;
    visibility: hidden;
}

.filter-scroll-btn.visible {
    opacity: 1;
    visibility: visible;
}

.filter-scroll-btn i {
    font-size: 10px;
}

.filter-scroll-btn:hover {
    background: #0164fe;
    color: #fff;
    border-color: #0164fe;
    box-shadow: 0 4px 12px rgba(1, 100, 254, 0.2);
}

.filter-scroll-btn--left {
    left: -10px;
}

.filter-scroll-btn--right {
    right: -10px;
}

/* Offer Tabs - inside scroller */
.propertyke-offer-tabs {
    display: flex;
    background: #f5f7fa;
    padding: 4px;
    border-radius: 10px;
    gap: 3px;
    flex-wrap: nowrap;
}

.propertyke-filter-separator {
    width: 1px;
    height: 20px;
    background: #e5e5e5;
    flex-shrink: 0;
}

.propertyke-filter-dropdowns {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.propertyke-offer-tab {
    padding: 6px 14px;
    border-radius: 8px;
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.propertyke-offer-tab:hover {
    color: #0164fe;
    background: rgba(1, 100, 254, 0.06);
}

.propertyke-offer-tab.active {
    background: #fff;
    color: #0164fe;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Toggle Switch */
.propertyke-toggle-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.propertyke-toggle-pill input {
    display: none;
}

.propertyke-toggle-slider {
    position: relative;
    width: 40px;
    height: 22px;
    background: #e0e6ed;
    border-radius: 22px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.propertyke-toggle-slider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all 0.3s ease;
}

.propertyke-toggle-pill input:checked+.propertyke-toggle-slider {
    background: #0164fe;
}

.propertyke-toggle-pill input:checked+.propertyke-toggle-slider::after {
    left: 21px;
}

.propertyke-toggle-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #444;
}

/* Sort Dropdown */
.propertyke-sort-wrapper {
    position: relative;
}

.propertyke-sort-select {
    appearance: none;
    -webkit-appearance: none;
    background: #f5f7fa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' strokeWidth='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 7px 30px 7px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.propertyke-sort-select:hover,
.propertyke-sort-select:focus {
    border-color: #0164fe;
    box-shadow: 0 0 0 3px rgba(1, 100, 254, 0.08);
}

/* ===== ACTIVE FILTER TAGS ===== */
.propertyke-active-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f2f2f2;
    flex-wrap: wrap;
}

.propertyke-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.propertyke-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 12px;
    background: #f0f4ff;
    border: 1px solid rgba(1, 100, 254, 0.15);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #0164fe;
    transition: all 0.2s ease;
    animation: fadeInTag 0.25s ease;
}

@keyframes fadeInTag {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.propertyke-tag-text {
    white-space: nowrap;
}

.propertyke-tag-remove {
    background: none;
    border: none;
    color: #0164fe;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.propertyke-tag-remove:hover {
    opacity: 1;
}

/* Clear All Button */
.propertyke-reset-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid #ff4d4d;
    color: #ff4d4d;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.propertyke-reset-btn:hover {
    background: #ff4d4d;
    color: #fff;
}

/* Results Meta */
.propertyke-results-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.propertyke-count-badge {
    font-size: 13px;
    font-weight: 600;
    color: #888;
}

#propertyke-count {
    color: #222;
    font-weight: 800;
}

/* ===== RIGHT SIDEBAR — PRICE FILTER ===== */
.propertyke-price-filter-vertical {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.propertyke-price-input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.propertyke-price-input-wrap {
    display: flex;
    align-items: center;
    background: #f5f7fa;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    padding: 3px 12px;
    transition: all 0.2s ease;
}

.propertyke-price-input-wrap:focus-within {
    border-color: #0164fe;
    box-shadow: 0 0 0 3px rgba(1, 100, 254, 0.08);
}

.propertyke-currency {
    font-size: 12px;
    font-weight: 700;
    color: #888;
    margin-right: 8px;
    white-space: nowrap;
}

.propertyke-price-input {
    background: transparent;
    border: none;
    padding: 10px 0;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    outline: none !important;
}

.propertyke-price-input::placeholder {
    color: #bbb;
    font-weight: 500;
}

/* ===== LISTING GRID ===== */
.propertyke-listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.propertyke-listing-grid .listivo-listing-card-v4 {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.listivo-listing-card-v4__address-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.listivo-listing-card-v4__distance {
    font-size: 11px;
    font-weight: 700;
    color: #0164fe;
    background: rgba(1, 100, 254, 0.08);
    padding: 2px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.listivo-listing-card-v4__distance i {
    font-size: 10px;
}

/* Card gallery slider — overflow hidden to clip slides */
.propertyke-listing-grid .listivo-swiper-container {
    overflow: hidden !important;
    position: relative;
}

.propertyke-listing-grid .listivo-swiper-wrapper {
    display: flex;
    will-change: transform;
}

/* Ensure nav arrows are visible and clickable */
.propertyke-listing-grid .listivo-listing-card-v4__prev,
.propertyke-listing-grid .listivo-listing-card-v4__next {
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
    z-index: 5;
}

.propertyke-listing-grid .listivo-listing-card-v4:hover .listivo-listing-card-v4__prev.listivo-listing-card-v4__prev--active,
.propertyke-listing-grid .listivo-listing-card-v4:hover .listivo-listing-card-v4__next.listivo-listing-card-v4__next--active {
    opacity: 1;
}

/* ===== INFINITE SCROLL SENTINEL ===== */
.propertyke-load-more-sentinel {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 40px 0 60px;
    width: 100%;
}

.propertyke-loader--infinite {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: fadeInSentinel 0.5s ease;
}

@keyframes fadeInSentinel {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.propertyke-loader-text {
    font-size: 13px;
    font-weight: 600;
    color: #0164fe;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    opacity: 0.8;
}

/* ===== BACK TO TOP BUTTON ===== */
.propertyke-back-to-top {
    position: fixed;
    bottom: 25px;
    left: 50%;
    z-index: 1000;
    background: linear-gradient(135deg, #0164fe 0%, #0041d9 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 8px 18px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(1, 100, 254, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 20px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.propertyke-back-to-top--visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0) scale(1);
}

.propertyke-back-to-top:hover {
    transform: translate(-50%, -5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(1, 100, 254, 0.35);
    filter: brightness(1.1);
}

.propertyke-back-to-top i {
    font-size: 12px;
}

@media (max-width: 768px) {
    .propertyke-back-to-top {
        bottom: 20px;
        padding: 8px 14px;
        font-size: 10px;
    }

    /* Keep text on tablet, hide on very small mobile */
}

@media (max-width: 480px) {
    .propertyke-back-to-top span {
        display: none;
    }

    .propertyke-back-to-top {
        width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
}

/* ===== NO RESULTS ===== */
.propertyke-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 15px;
    font-weight: 500;
}

/* ===== LOADING ===== */
.propertyke-loader {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 60px 0;
}

.propertyke-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(1, 100, 254, 0.1);
    border-top: 3px solid #0164fe;
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===== SKELETON CARD PLACEHOLDERS ===== */
.propertyke-skeleton-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.propertyke-skeleton-card__image {
    height: 170px;
    background: #e8ecf1;
    position: relative;
    overflow: hidden;
}

.propertyke-skeleton-card__body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.propertyke-skeleton-card__line {
    height: 12px;
    border-radius: 6px;
    background: #e8ecf1;
    position: relative;
    overflow: hidden;
}

.propertyke-skeleton-card__line--title {
    width: 75%;
    height: 14px;
}

.propertyke-skeleton-card__line--title-short {
    width: 50%;
    height: 14px;
}

.propertyke-skeleton-card__line--desc {
    width: 100%;
}

.propertyke-skeleton-card__line--desc-mid {
    width: 90%;
}

.propertyke-skeleton-card__line--desc-short {
    width: 60%;
}

.propertyke-skeleton-card__amenities {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    margin: 2px 0;
}

.propertyke-skeleton-card__amenity {
    width: 50px;
    height: 12px;
    border-radius: 6px;
    background: #e8ecf1;
    position: relative;
    overflow: hidden;
}

.propertyke-skeleton-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
}

.propertyke-skeleton-card__price {
    width: 100px;
    height: 16px;
    border-radius: 6px;
    background: #e8ecf1;
    position: relative;
    overflow: hidden;
}

.propertyke-skeleton-card__buttons {
    display: flex;
    gap: 8px;
}

.propertyke-skeleton-card__btn {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: #e8ecf1;
    position: relative;
    overflow: hidden;
}

/* Shimmer animation */
.propertyke-skeleton-card__image::after,
.propertyke-skeleton-card__line::after,
.propertyke-skeleton-card__amenity::after,
.propertyke-skeleton-card__price::after,
.propertyke-skeleton-card__btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.5) 50%,
            transparent 100%);
    animation: propertykeShimmer 1.5s ease-in-out infinite;
}

@keyframes propertykeShimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Stagger shimmer for visual depth */
.propertyke-skeleton-card:nth-child(2) .propertyke-skeleton-card__image::after,
.propertyke-skeleton-card:nth-child(2) .propertyke-skeleton-card__line::after,
.propertyke-skeleton-card:nth-child(2) .propertyke-skeleton-card__amenity::after,
.propertyke-skeleton-card:nth-child(2) .propertyke-skeleton-card__price::after,
.propertyke-skeleton-card:nth-child(2) .propertyke-skeleton-card__btn::after {
    animation-delay: 0.15s;
}

.propertyke-skeleton-card:nth-child(3) .propertyke-skeleton-card__image::after,
.propertyke-skeleton-card:nth-child(3) .propertyke-skeleton-card__line::after,
.propertyke-skeleton-card:nth-child(3) .propertyke-skeleton-card__amenity::after,
.propertyke-skeleton-card:nth-child(3) .propertyke-skeleton-card__price::after,
.propertyke-skeleton-card:nth-child(3) .propertyke-skeleton-card__btn::after {
    animation-delay: 0.3s;
}

.propertyke-grid--loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Mobile Toggles */
.propertyke-mobile-toggles {
    display: none;
    gap: 12px;
    margin-bottom: 12px;
}

.propertyke-mobile-toggle {
    flex: 1;
    height: 44px;
    background: #f5f7fa;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    color: #0164fe;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.propertyke-mobile-toggle:hover {
    background: #eef2f7;
    border-color: #0164fe;
}

.propertyke-mobile-toggle i {
    font-size: 16px;
}

/* Sidebar Close Buttons (Mobile Only) */
.propertyke-sidebar-close {
    display: none;
    width: 32px;
    height: 32px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    color: #1a1a1a;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.propertyke-sidebar-close:hover {
    background: #e0e0e0;
}

/* Overlay */
.propertyke-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.propertyke-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =============================================================
   RESPONSIVE (DRAWER MODE)
   ============================================================= */

@media (max-width: 1024px) {
    .propertyke-grid-main-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .propertyke-sidebar {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 300px;
        max-height: 100vh !important;
        z-index: 1001;
        border-radius: 0;
        margin: 0;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
        transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        display: block !important;
    }

    .propertyke-sidebar-left {
        left: 0;
        transform: translateX(-100%);
    }

    .propertyke-sidebar-right {
        right: 0;
        transform: translateX(100%);
        grid-template-columns: 1fr !important;
        /* Force single column inside right sidebar */
    }

    .propertyke-sidebar.active {
        transform: translateX(0);
    }

    .propertyke-mobile-toggles {
        display: flex;
    }

    /* Show close buttons in sidebars only on mobile */
    .propertyke-sidebar-close {
        display: flex;
    }

    .propertyke-sidebar-close--left {
        position: absolute;
        top: 15px;
        right: 15px;
        z-index: 10;
    }

    .propertyke-sidebar-close--right {
        position: absolute;
        top: 15px;
        right: 15px;
        z-index: 10;
    }

    /* FORCE PARENTS TO ALLOW STICKY */
    .propertyke-listing-grid-container,
    .propertyke-grid-main-layout,
    .propertyke-grid-column {
        overflow: visible !important;
    }

    /* Adjust headers behavior on mobile */
    .propertyke-middle-header {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 60px !important;
        /* Standard mobile sticky offset */
        border-radius: 12px;
        margin-top: 10px;
        z-index: 990;
        background: #fff !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .admin-bar .propertyke-middle-header {
        top: 106px !important;
        /* 60 + 46 (mobile admin bar) */
    }

    .propertyke-sidebar-left .propertyke-user-location {
        padding-top: 20px;
        position: relative;
    }
}

@media (max-width: 768px) {
    .propertyke-listing-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .propertyke-sidebar {
        width: 85%;
    }

    .propertyke-listing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Listing Card Overrides for 2-column mobile */
    .propertyke-listing-grid .listivo-listing-card-v4 {
        max-width: none;
        min-width: 0;
        width: 100%;
    }

    .listivo-listing-card-v4__content {
        padding: 6px;
    }

    .listivo-listing-card-v4__name-text {
        font-size: 13px !important;
        line-height: 1.1;
        height: 2.2em;
    }

    .listivo-listing-card-v4__gallery {
        height: 120px;
    }

    .listivo-listing-card-v4__description {
        -webkit-line-clamp: 2;
        line-clamp: 2;
        min-height: 32px;
        font-size: 11px;
    }

    .listivo-listing-card-v4__value {
        font-size: 14px !important;
    }

    .listivo-listing-card-v4__amenity {
        font-size: 10px;
    }

    .listivo-listing-card-v4__amenity i {
        margin-right: 3px;
    }

    .listivo-listing-card-v4__contact {
        gap: 5px;
    }

    .listivo-listing-card-v4__contact-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}
