@import url('../components-pengunjung/navbar.css');
@import url('../components-pengunjung/icons.css');
@import url('../components-pengunjung/property-card.css');
@import url('../components-pengunjung/sticky-search.css');
@import url('../components-pengunjung/search-modal.css');
@import url('../components-pengunjung/filter-modal.css');
@import url('../components-pengunjung/search-autocomplete.css');
@import url('../components-pengunjung/floating-buttons.css');
@import url('../global-css/footer-pengunjung.css');
.papi-navbar {
    display: none;
}
.papi-property-card {
    width: 100%;
}

/* ========= SEARCH RESULTS MAIN ========= */
.search-results-main {
    padding: 2rem 0;
    min-height: 60vh;
    background: var(--base);
    padding-top: 120px; /* ADD: Space for sticky search bar */
}

.search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========= SEARCH RESULTS HEADER ========= */
.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem 0;
    gap: 2rem;
}

.results-info {
    flex: 1;
}

.results-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.results-count {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
    font-weight: 500;
}

/* Sort Options Styling */
.sort-options-desktop {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.sort-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.sort-select {
    min-width: 180px;
    padding: 0.6rem 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-select:focus {
    outline: none;
    border-color: #1b75bb;
    box-shadow: 0 0 0 3px rgba(27, 117, 187, 0.1);
}

.sort-select:hover {
    border-color: #9ca3af;
}

/* ========= PROPERTIES GRID (Desktop/Tablet) - MATCH INDEX STYLE ========= */
.properties-grid-desktop {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); /* REDUCED from 280px to 240px */
    gap: 1.25rem; /* REDUCED from 1.5rem */
    margin-bottom: 3rem;
}

@media (min-width: 768px) and (max-width: 1023px) {
    .properties-grid-desktop {
        grid-template-columns: repeat(3, 1fr); /* INCREASE from 2 to 3 */
        gap: 1rem; /* REDUCE gap */
    }
}

@media (min-width: 1024px) and (max-width: 1280px) {
    .properties-grid-desktop {
        grid-template-columns: repeat(4, 1fr); /* INCREASE from 3 to 4 */
        gap: 1.25rem;
    }
}

@media (min-width: 1281px) {
    .properties-grid-desktop {
        grid-template-columns: repeat(5, 1fr); /* INCREASE from 4 to 5 cards per row */
        gap: 1.25rem;
    }
    
    .search-container {
        max-width: 1400px;
    }
}

/* FORCE property cards to be smaller like index */
.properties-grid-desktop .papi-property-card {
    width: 100%; 
    max-width: 260px; /* ADD max-width constraint */
    min-width: 220px; /* REDUCE from 280px to 220px */
}

/* OVERRIDE any component CSS that might make cards larger */
.search-results-content .papi-property-card {
    width: 100% !important;
    max-width: 260px !important;
}

.search-results-content .papi-property-card .papi-property-image {
    height: 180px; /* REDUCE image height */
}

.search-results-content .papi-property-card .papi-property-info {
    padding: 0.75rem; /* REDUCE padding */
}

.search-results-content .papi-property-card .property-title {
    font-size: 0.9rem; /* SMALLER font */
    line-height: 1.3;
}

.properties-list-mobile {
    display: none;
}

/* ========= MOBILE PROPERTY CARDS ========= */
.mobile-property-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
    position: relative;
    display: flex;
    height: 165px;
    transition: all 0.2s ease;
}

.mobile-card-link {
    display: flex;
    width: 100%;
    text-decoration: none !important;
    color: inherit;
    outline: none !important;
    border: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.mobile-card-link:hover,
.mobile-card-link:focus,
.mobile-card-link:active,
.mobile-card-link:visited {
    text-decoration: none !important;
    outline: none !important;
    border: none !important;
    color: inherit !important;
    box-shadow: none !important;
}

.mobile-card-link:hover .mobile-property-title,
.mobile-card-link:active .mobile-property-title,
.mobile-card-link:focus .mobile-property-title {
    text-decoration: none !important;
}

.mobile-property-image {
    position: relative !important;
    width: 110px;
    height: 165px;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 16px 0 0 16px;
}

.mobile-property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none;
}

/* IMPROVED: Mobile badges with desktop-style icons */
.mobile-gender-badge {
    position: absolute !important;
    top: 0.5rem !important;
    left: 0.5rem !important;
    padding: 0.2rem 0.4rem; /* SMALLER padding for mobile */
    border-radius: 6px; /* SMALLER radius */
    font-size: 0.6rem; /* SMALLER font */
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    z-index: 3 !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3); /* THINNER border */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex !important; /* CHANGE to flex for icon + text */
    align-items: center;
    gap: 0.2rem; /* SPACE between icon and text */
    visibility: visible !important;
    opacity: 1 !important;
}

.mobile-gender-badge svg {
    width: 10px !important; /* SMALL icon for mobile */
    height: 10px !important;
    flex-shrink: 0;
}

/* Gender badge di image - TOP LEFT */
.mobile-gender-badge--pria {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(59, 130, 246, 0.7)) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.mobile-gender-badge--wanita {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.9), rgba(236, 72, 153, 0.7)) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.mobile-gender-badge--campur {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(34, 197, 94, 0.7)) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.mobile-room-status {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.mobile-room-status.available {
    color: var(--green);
}

.mobile-room-status.full {
    color: var(--red);
}

.mobile-property-details {
    flex: 1;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    height: 165px;
    min-width: 0;
    box-sizing: border-box;
    padding-right: 3rem; /* Space for wishlist button */
    position: relative; /* For absolute positioned stats */
}

.mobile-property-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.mobile-property-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--black);
    margin: 0 0 0.4rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6em;
    flex-shrink: 0;
    text-decoration: none !important;
    padding-right: 0.5rem;
}

.mobile-location {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    flex-shrink: 0;
    order: -1;
}

.mobile-location svg {
    color: var(--tab-active) !important;
    flex-shrink: 0;
}

.mobile-facilities {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
    flex-shrink: 0;
}

.mobile-facility-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 6px;
    color: var(--blue);
    flex-shrink: 0;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.mobile-facility-more {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    background: #f3f4f6;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.mobile-property-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: auto;
    padding-top: 0.6rem;
    flex-shrink: 0;
    min-height: 40px;
    background: white;
    position: relative;
}

.mobile-price {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}

.mobile-price-amount {
    font-size: 1rem;
    font-weight: 700;
    color: #059669;
    line-height: 1;
}

.mobile-price-period {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 500;
}

/* Stats - positioned at same height as price, right side */
.mobile-stats {
    position: absolute;
    bottom: 1.2rem; /* MATCH with footer padding-top */
    right: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem; /* ADD proper gap between stat items */
    z-index: 2;
}

.mobile-stat-item {
    color: #6b7280 !important;
    padding: 0.15rem 0.3rem !important;
    border-radius: 4px !important;
    font-size: 0.55rem;
    font-weight: 600;
    border: none !important;
    display: flex;
    align-items: center;
    gap: 0.4rem; 
}

.mobile-stat-item svg {
    color: #6b7280 !important;
    width: 9px;
    height: 9px;
}

/* Wishlist button - top right */
.mobile-wishlist-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: none !important;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    -webkit-tap-highlight-color: transparent !important;
}

.mobile-wishlist-btn:hover,
.mobile-wishlist-btn:active,
.mobile-wishlist-btn:focus {
    background: rgba(255, 255, 255, 0.98) !important;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    outline: none !important;
    text-decoration: none !important;
}

/* ========= PAGINATION - SIMPLE & CLEAN ========= */
.pagination-wrapper {
    text-align: center;
    margin: 3rem auto 2rem auto;
    padding: 0 1rem;
}

.pagination {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    max-width: fit-content;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 8px;
    white-space: nowrap;
}

.page-btn:hover {
    background: #f3f4f6;
    color: #374151;
    transform: translateY(-1px);
}

.page-btn.active {
    background: linear-gradient(135deg, #1b75bb 0%, #1564a0 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(27, 117, 187, 0.3);
}

.page-btn.active:hover {
    background: linear-gradient(135deg, #1564a0 0%, #134e8a 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(27, 117, 187, 0.4);
}

.page-btn--nav {
    color: #1b75bb;
    font-weight: 600;
    padding: 0 16px;
}

.page-btn--nav:hover {
    background: #eff6ff;
    color: #1564a0;
}

.page-btn--nav svg {
    flex-shrink: 0;
}

.page-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    color: #9ca3af;
    font-weight: 600;
    user-select: none;
    font-size: 16px;
}

/* Mobile Pagination */
@media (max-width: 768px) {
    .pagination-wrapper {
        display: none; /* Hide pagination on mobile (use infinite scroll) */
    }
    
    .search-results-header {
        flex-direction: column;
        align-items: center; /* Center on mobile too */
        gap: 1rem;
        padding: 1rem 0;
        text-align: center; /* Add center text alignment */
    }
    
    .sort-options-desktop {
        display: none; /* Hide sort on mobile */
    }
    
    .results-title {
        font-size: 1.5rem;
    }
    
    .search-results-main {
        padding-top: 100px; /* ADD: Less space on mobile */
    }
}

/* Responsive pagination for tablet */
@media (max-width: 1024px) {
    .pagination {
        padding: 0.75rem 1rem;
        gap: 0.25rem;
    }
    
    .page-btn {
        min-width: 40px;
        height: 40px;
        font-size: 13px;
    }
    
    .page-btn--nav {
        padding: 0 12px;
    }
}

/* Small screens */
@media (max-width: 640px) {
    .pagination {
        padding: 0.5rem 0.75rem;
        border-radius: 12px;
    }
    
    .page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 12px;
    }
    
    .page-btn--nav {
        padding: 0 8px;
    }
    
    .page-btn--nav span {
        display: none; /* Hide "Back"/"Next" text on very small screens */
    }
}

/* ========= NO RESULTS ========= */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray);
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.no-results-icon {
    margin-bottom: 1.5rem;
    color: var(--gray3);
}

.no-results h3 {
    font-size: 1.5rem;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.no-results p {
    font-size: 1rem;
    margin-bottom: 2rem;
}

.no-results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-reset-search,
.btn-browse-all {
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    border: none;
}

.btn-reset-search {
    background: var(--blue);
    color: white;
}

.btn-reset-search:hover {
    background: var(--blue-dark);
}

.btn-browse-all {
    background: white;
    color: var(--blue);
    border: 2px solid var(--blue);
}

.btn-browse-all:hover {
    background: var(--blue);
    color: white;
}

/* ========= RESPONSIVE ========= */
@media (max-width: 768px) {
    .search-results-header {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
    }
    
    .results-title {
        font-size: 1.4rem;
    }
    
    .sort-options-desktop {
        display: none;
    }
    
    .properties-grid-desktop {
        display: none;
    }
    
    .properties-list-mobile {
        display: block;
    }
    
    .search-container {
        padding: 0 0.5rem;
    }
    
    .no-results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-reset-search,
    .btn-browse-all {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .pagination {
        flex-wrap: wrap;
        padding: 1rem;
        gap: 0.375rem;
    }
    
    .pagination-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .pagination-numbers {
        margin: 0 0.5rem;
        gap: 0.125rem;
    }
    
    .pagination-number {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }
}

@media (min-width: 769px) and (max-width: 1023px) {
    .search-container {
        max-width: 100%;
        padding: 0 2rem;
    }
    
    .pagination {
        padding: 1.25rem 2rem;
    }
}

/* ========= SKELETON LOADING ANIMATIONS ========= */
.skeleton-loading {
    pointer-events: none;
    user-select: none;
}

.skeleton-box,
.skeleton-badge,
.skeleton-stat,
.skeleton-facility,
.skeleton-more,
.skeleton-wishlist {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-shimmer {
    overflow: hidden;
    position: relative;
}

.skeleton-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
        left: -100%;
    }
    100% {
        background-position: 200% 0;
        left: 100%;
    }
}

/* Skeleton specific adjustments */
.skeleton-loading .mobile-property-image img,
.skeleton-loading .papi-property-image img {
    opacity: 0;
}

.skeleton-loading .mobile-property-title,
.skeleton-loading .property-title,
.skeleton-loading .mobile-location,
.skeleton-loading .papi-location,
.skeleton-loading .mobile-price,
.skeleton-loading .papi-price {
    opacity: 0;
}

/* Dark mode skeleton support */
@media (prefers-color-scheme: dark) {
    .skeleton-box,
    .skeleton-badge,
    .skeleton-stat,
    .skeleton-facility,
    .skeleton-more,
    .skeleton-wishlist {
        background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
        background-size: 200% 100%;
    }
    
    .skeleton-shimmer::before {
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    }
}

/* Mobile Loading Indicator */
.mobile-loading-more {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin: 10px 0;
}

.mobile-loading-icon {
    display: flex;
    justify-content: center;
    align-items: center;
}

.spin-animation {
    animation: spin 1s linear infinite;
    color: #1b75bb;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile End Message */
.mobile-end-message {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.mobile-end-content {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

.mobile-end-content p {
    margin: 0;
    line-height: 1.4;
}
