/* --- Base Layout --- */
body {
    background: #f4dede;
    margin: 0;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.container { 
    max-width: 1200px; 
    margin: 20px auto; 
    padding: 0 15px; 
}

/* --- Search Results Header --- */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.2rem;
    color: #333;
    margin: 0;
}

.see-all-link {
    color: #d63384;
    text-decoration: none;
    font-weight: 700;
}

/* --- Responsive Grid --- */
.ad-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, 1fr); /* 3 columns desktop */
}

/* --- Card Styling --- */
.ad-card-link {
    text-decoration: none; 
    color: inherit; 
    display: block; 
    transition: transform 0.2s;
}

.ad-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-top: 3px solid transparent;
}

.ad-card-link:hover { transform: translateY(-5px); }

/* Borders */
.vip-border { border-top-color: #ff4757; }
.super-border { border-top-color: #ffa502; }
.normal-border { border-top-color: #2f3542; }

/* Top Stats Bar */
.card-top-gray {
    background: #f8f9fa;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.card-badge {
    font-size: 0.65rem;
    font-weight: 800;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
}

.vip { background: #ff4757; }
.super { background: #ffa502; }
.normal { background: #2f3542; }

.card-stats {
    font-size: 0.75rem;
    color: #777;
    display: flex;
    gap: 10px;
}

.verified-text { color: #2ecc71; font-weight: 700; }

/* Main Content Row */
.card-main-row {
    display: flex;
    padding: 12px;
    gap: 12px;
}

.card-img-box img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
}

.card-info {
    flex: 1;
    min-width: 0;
}

.card-info h3 {
    font-size: 0.95rem;
    margin: 0;
    color: #222;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.4em; /* Strict 2 lines */
}

.card-info p {
    font-size: 0.8rem;
    color: #666;
    margin: 6px 0 0 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em; /* Strict 2 lines */
}

/* Price Badge */
.price-container { margin-top: 8px; }
.price-badge {
    background: #d63384;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
}

/* --- Empty Results State --- */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 0;
    color: #666;
}

.btn-back {
    display: inline-block;
    margin-top: 15px;
    color: #d63384;
    text-decoration: none;
    font-weight: bold;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}

.page-num, .page-btn {
    padding: 8px 15px;
    background: white;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
}

.page-num.active { background: #d63384; color: white; }

/* ==========================================================================
   5. TOASTER SYSTEM
   ========================================================================== */
.toaster {
    position: fixed; top: 90px; right: 20px; background: #2ed573; color: white;
    padding: 12px 20px; border-radius: 12px; display: flex; align-items: center; gap: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15); z-index: 9999; animation: slideInRight 0.5s ease-out forwards;
}
.toaster.success { background: #2ed573 !important; }
.toaster.info { background: #ef7e14 !important; }

/* Animations */
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-20px); } }
.toaster.fade-out { animation: fadeOut 0.5s ease-in forwards; }

/* --- RESPONSIVE QUERIES --- */
@media (max-width: 992px) {
    .ad-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .ad-grid { grid-template-columns: 1fr; } /* Mobile: 1 column */
    .card-img-box img { width: 90px; height: 80px; }
}

@media (max-width: 480px) {
    .page-num.active {
        display: block; /* Only show active number */
    }
    .page-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}

