/* style.css - FINAL VERSION (Estetică Filtre Îmbunătățită) */
:root {
    --primary-color: #dc3545; 
    --secondary-color: #f8f9fa;
    --text-color: #343a40;
    --success-color: #28a745; 
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.2);
}
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background-color: var(--secondary-color); 
    margin: 0; 
    padding: 0; 
    color: var(--text-color); 
}

/* --- HEADER & NAVIGAȚIE --- */
header { 
    background-color: var(--primary-color); 
    color: white; 
    padding: 15px 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 2px 4px var(--shadow-light); 
}
header h1 { 
    margin: 0; 
    font-size: 2em; 
    font-weight: 700; 
}
nav a, button { 
    color: white; 
    text-decoration: none; 
    margin-left: 15px; 
    padding: 10px 18px; 
    border-radius: 4px; 
    border: none; 
    cursor: pointer; 
    transition: background-color 0.3s; 
    background-color: transparent; 
}
.btn-primary { 
    background-color: var(--primary-color); 
    border: 1px solid white; 
}
.btn-primary:hover { 
    background-color: #c82333; 
}
footer {
    text-align: center;
    padding: 15px;
    background-color: var(--text-color);
    color: white;
    margin-top: 50px;
}

/* --- BARA DE FILTRE (NOU) --- */
#filter-bar {
    background-color: white;
    padding: 20px;
    box-shadow: 0 4px 12px var(--shadow-light);
    margin: 25px auto;
    max-width: 1200px;
    border-radius: 8px;
    border: 1px solid #eee;
}

#filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; 
    align-items: stretch;
}

#search-text {
    flex-grow: 1;
    min-width: 250px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    flex-grow: 3;
}

.filter-select,
#filter-form input[type="text"],
#filter-form input[type="number"],
#search-text {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    min-width: 100px; 
    flex-grow: 1;
    height: 42px;
    box-sizing: border-box; /* Asigură că padding-ul nu strică lățimea */
}

#filter-form button {
    height: 42px; 
    padding: 0 20px;
    margin-left: 0; 
}

/* --- CARDURI ANUNȚURI & LAYOUT (Restul rămâne la fel) --- */
#ads-container { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 25px; 
    padding: 25px; 
    max-width: 1200px;
    margin: 0 auto;
}
.ad-card { 
    background-color: white; 
    border-radius: 8px; 
    box-shadow: 0 4px 12px var(--shadow-light); 
    overflow: hidden; 
    cursor: pointer; 
    text-decoration: none; 
    color: var(--text-color); 
    transition: transform 0.3s; 
}
.ad-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 6px 15px var(--shadow-medium); 
}
.ad-img { 
    width: 100%; 
    height: 220px; 
    object-fit: cover; 
}
.ad-info { 
    padding: 15px; 
}
.ad-price { 
    font-size: 1.6em; 
    color: var(--primary-color); 
    font-weight: bold; 
    margin-top: 5px; 
}

/* --- FORMULAR & AUTENTIFICARE (Restul rămâne la fel) --- */
form label { 
    display: block; 
    margin-top: 10px; 
    font-weight: 600; 
}
form input, form select, form textarea { 
    width: 100%; 
    padding: 10px; 
    margin-top: 5px; 
    border: 1px solid #ced4da; 
    border-radius: 4px; 
    box-sizing: border-box; 
}
.social-login-btn { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 100%; 
    padding: 12px; 
    margin-top: 10px; 
    border-radius: 4px; 
    font-weight: 600; 
}
.google-btn { 
    background-color: #db4437; 
    color: white; 
}
.apple-btn { 
    background-color: #000000; 
    color: white; 
}
.social-icon { 
    margin-right: 10px; 
    width: 20px; 
    height: 20px; 
    filter: invert(1); 
}
hr { 
    border: 0; 
    border-top: 1px solid #eee; 
    margin: 25px 0; 
}

/* --- GALERIE IMAGINI (ad.html) --- */
#image-gallery-main {
    text-align: center;
    margin-bottom: 25px;
}
#main-photo {
    width: 100%;
    max-height: 450px; 
    object-fit: contain; 
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-light);
    margin-bottom: 15px;
    cursor: zoom-in; 
}
#thumbnail-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    overflow-x: auto; 
    padding-bottom: 10px;
}
.thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    opacity: 0.7;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}
.thumbnail:hover, .thumbnail.active {
    opacity: 1;
    border-color: var(--primary-color);
}

/* --- ADSENSE & ADMIN --- */
.ad-slot-container {
    width: 100%;
    grid-column: 1 / -1; 
    margin: 25px 0;
    text-align: center;
    border: 1px dashed var(--primary-color); 
    padding: 15px;
    background-color: #fffaf0; 
    min-height: 100px;
}

#admin-list { padding: 20px; }
.admin-ad-item { 
    background-color: white; 
    border: 1px solid #ddd; 
    margin-bottom: 10px; 
    padding: 15px; 
    border-radius: 6px; 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: space-between; 
    align-items: center; 
}
.admin-ad-item div:first-child { flex-basis: 70%; }
.admin-ad-item div:last-child { flex-basis: 25%; text-align: right; }
.admin-ad-item button { 
    padding: 8px 15px; 
    margin-left: 10px; 
    cursor: pointer; 
    border-radius: 4px; 
    color: white; 
    border: none;
}
.approve-btn { background-color: var(--success-color); }
.reject-btn { background-color: var(--primary-color); }

/* --- MEDIA QUERIES (Mobile) --- */
@media (max-width: 768px) {
    header { flex-direction: column; text-align: center; }
    nav { margin-top: 10px; }
    
    /* Filtre pe mobil */
    #filter-bar { padding: 15px; margin: 15px auto; }
    .filter-group { display: grid; grid-template-columns: 1fr 1fr; }
    #filter-form input[type="number"], .filter-select { min-width: 0; }
    #filter-form { align-items: stretch; }
    
    .admin-ad-item { flex-direction: column; align-items: flex-start; }
    .admin-ad-item div:first-child { flex-basis: 100%; margin-bottom: 10px; }
    .admin-ad-item div:last-child { flex-basis: 100%; text-align: left; }
    .admin-ad-item button { margin-left: 0; margin-right: 10px; margin-top: 5px; }
    #ads-container { padding: 15px; gap: 15px; }
}