/* ============================================
   SEARCH.CSS - Dedicated Search Results Styles
   Full listing details in card - No "View Details" button
   ============================================ */

/* Search Results Section Container */
.search-results-section {
    padding: 30px 0;
    background: var(--bg-body);
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

/* Search Results Header */
.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary);
}

.search-results-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-results-title i {
    font-size: 24px;
    color: var(--primary);
}

.search-results-title h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.search-results-info {
    display: flex;
    gap: 12px;
    align-items: baseline;
    flex-wrap: wrap;
}

.results-count {
    font-size: 14px;
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.results-count.no-results {
    color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
}

.results-keyword {
    font-size: 14px;
    color: var(--text-secondary);
}

.results-keyword strong {
    color: var(--primary);
    font-weight: 600;
}

.search-clear-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 30px;
    transition: all 0.2s;
}

.search-clear-btn:hover {
    background: var(--bg-input);
    color: var(--danger);
}

/* Search Results Grid */
.listings-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-top: 10px;
}

/* Search Result Card - Full details with clickable cursor */
.listing-search-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.listing-search-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

/* Search Result Image */
.listing-search-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-input), var(--border));
}

.listing-search-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.listing-search-card:hover .listing-search-image img {
    transform: scale(1.08);
}

/* Verified Badge on Image */
.search-verified-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(16, 185, 129, 0.9);
    backdrop-filter: blur(4px);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

/* Price Badge */
.listing-search-price {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    color: #ffd700;
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    font-family: monospace;
    z-index: 2;
}

.listing-search-price .old-price {
    text-decoration: line-through;
    color: #ccc;
    font-size: 11px;
    margin-left: 8px;
    font-weight: normal;
}

/* Search Result Body */
.listing-search-body {
    padding: 16px;
}

/* Title */
.listing-search-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Business Name */
.listing-search-business {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border);
}

.listing-search-business i {
    color: var(--primary);
    width: 16px;
}

.listing-search-business .business-name {
    font-weight: 600;
    color: var(--text-primary);
}

/* Location */
.listing-search-location {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.listing-search-location i {
    color: var(--secondary);
    font-size: 12px;
}

/* Description - Full description */
.listing-search-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Stats Row - Views and Likes */
.listing-search-stats {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text-muted);
    padding: 12px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.listing-search-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.listing-search-stats span i.fa-eye {
    color: var(--info);
}

.listing-search-stats span i.fa-thumbs-up {
    color: var(--success);
}

.listing-search-stats span i.fa-calendar-alt {
    color: var(--warning);
}

/* Action Buttons Row - WhatsApp, Call, SMS */
.listing-search-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.search-action-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.search-action-btn.whatsapp {
    background: #25D366;
    color: white;
}

.search-action-btn.whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

.search-action-btn.call {
    background: var(--info);
    color: white;
}

.search-action-btn.call:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.search-action-btn.sms {
    background: var(--text-muted);
    color: white;
}

.search-action-btn.sms:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

/* Like/Dislike Buttons Row */
.search-rating-buttons {
    display: flex;
    gap: 15px;
    margin-top: 12px;
}

.search-rating-btn {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
}

.search-rating-btn.like:hover,
.search-rating-btn.like.active {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.search-rating-btn.dislike:hover,
.search-rating-btn.dislike.active {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

/* Empty Search State */
.search-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: 24px;
    border: 1px solid var(--border);
}

.search-empty-state i {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.search-empty-state h4 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.search-empty-state p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.search-suggestions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.search-suggestion-tag {
    background: var(--bg-input);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.search-suggestion-tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Loading State */
.search-loading-state {
    text-align: center;
    padding: 40px;
}

.search-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 992px) {
    .listings-search-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .search-results-section {
        padding: 20px 0;
    }
    
    .search-results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-results-title h3 {
        font-size: 18px;
    }
    
    .listings-search-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .listing-search-image {
        height: 180px;
    }
    
    .listing-search-price {
        font-size: 14px;
        padding: 4px 12px;
    }
    
    .search-action-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .search-clear-btn {
        align-self: flex-end;
    }
    
    .listing-search-actions {
        flex-wrap: wrap;
    }
    
    .search-action-btn {
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .listing-search-image {
        height: 160px;
    }
    
    .listing-search-price {
        font-size: 13px;
        padding: 3px 10px;
    }
    
    .listing-search-title {
        font-size: 16px;
    }
    
    .listing-search-description {
        -webkit-line-clamp: 3;
    }
    
    .listing-search-stats {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .listing-search-actions {
        flex-direction: column;
    }
    
    .search-action-btn {
        width: 100%;
    }
    
    .search-rating-buttons {
        flex-direction: column;
    }
    
    .search-empty-state i {
        font-size: 48px;
    }
    
    .search-empty-state h4 {
        font-size: 18px;
    }
}

/* Dark Mode Specific */
body.dark-mode .listing-search-card {
    background: var(--bg-card);
}

body.dark-mode .listing-search-price {
    background: rgba(0, 0, 0, 0.85);
}

body.dark-mode .search-suggestion-tag:hover {
    background: var(--primary);
}

/* Animation */
.listing-search-card {
    animation: fadeInUp 0.4s ease backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation */
.listing-search-card:nth-child(1) { animation-delay: 0.05s; }
.listing-search-card:nth-child(2) { animation-delay: 0.1s; }
.listing-search-card:nth-child(3) { animation-delay: 0.15s; }
.listing-search-card:nth-child(4) { animation-delay: 0.2s; }
.listing-search-card:nth-child(5) { animation-delay: 0.25s; }
.listing-search-card:nth-child(6) { animation-delay: 0.3s; }

/* Scrollbar for search results if needed */
.search-results-section::-webkit-scrollbar {
    width: 6px;
}

.search-results-section::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 10px;
}

.search-results-section::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}