/**
 * Public Stylesheet
 *
 * @package XMarketplace
 */

/* Main Container */
.xmp-ads-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Search & Filters */
.xmp-filters {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.xmp-search-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
    align-items: center;
}

.xmp-search-input,
.xmp-select {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
}

.xmp-search-input:focus,
.xmp-select:focus {
    outline: none;
    border-color: #0073aa;
}

/* Ads Grid */
.xmp-ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Ad Card */
.xmp-ad-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.xmp-ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.xmp-ad-image {
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.xmp-ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.xmp-ad-content {
    padding: 15px;
}

.xmp-ad-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xmp-ad-price {
    font-size: 18px;
    font-weight: 700;
    color: #0073aa;
    margin: 10px 0;
}

.xmp-ad-location {
    font-size: 13px;
    color: #666;
    margin: 5px 0;
}

/* Badges */
.xmp-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    z-index: 10;
}

.xmp-badge.xmp-featured {
    background: #ff6b6b;
}

.xmp-badge.xmp-urgent {
    background: #ffa500;
}

/* Buttons */
.xmp-button {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.xmp-button:hover {
    background: #005a87;
    color: #fff;
}

.xmp-button-primary {
    background: #0073aa;
}

.xmp-button-secondary {
    background: #666;
}

.xmp-button-sm {
    padding: 8px 15px;
    font-size: 13px;
}

/* Pagination */
.xmp-pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.xmp-pagination-inner {
    display: flex;
    gap: 5px;
}

.xmp-page-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.xmp-page-btn:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.xmp-page-btn.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Loading */
.xmp-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.xmp-no-results {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .xmp-search-form {
        grid-template-columns: 1fr;
    }
    
    .xmp-ads-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 15px;
    }
}