.carti-no-results {
    text-align: center;
    font-size: 18px;
    margin: 60px 0;
    color: #555;
}

/* Container filtre */
#carti-filters {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 17px;
    flex-wrap: wrap;
}

/* Fiecare filtru (Varsta / Editura / Search) */
#carti-filters > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Label (Varsta:, Editura:) */
#carti-filters strong {
    font-weight: 600;
    font-size: 18px;
    white-space: nowrap;
}

/* Dropdown-uri */
#carti-filters select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 6px 40px 6px 11px; /* loc pentru text + săgeată */
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237D7F85' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center; /* 14px = distanța săgeții de capăt */
    background-size: 12px 8px;
    border-radius:7px;
    color:#666;
}

/* Focus dropdown */
#carti-filters select:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

/* Search input */
#filter-search input {
    min-width: 300px;
    padding: 8px 11px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Focus search */
#filter-search input:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

/* GRILA DEFAULT (Desktop) - 3 coloane */
.carti-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.carte-item {
    border: 1px solid #D9FCD5;
    background-color:#212526!important;
    padding: 10px;
    text-align: center;
    border-radius: 15px!important;
}

.carte-item img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    border-radius: 10px!important;
}

.carte-item h3 {
    font-size: 24px!important;
    margin: 5px 0;
    line-height: 1.3;
}

.carte-item p {
    font-size: 16px;
    color: #555;
    margin: 0;
}

.prompt-item {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.prompt-item img {
    align-self: center;
}

.prompt-item h3 {
    text-align: center;
    font-weight: 600;
}

.prompt-text {
    text-align: justify;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #ffffff!important;
    margin: 8px 10px 7px 12px!important;
    word-break: break-word;
}

.prompt-ellipsis {
    color: #ffffff;
}

.prompt-read-more-link {
    font-size: 14px;
    font-weight: 600;
    color: #00DE8E!important;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.prompt-read-more-link:hover,
.prompt-read-more-link:focus {
    color: #D9FCD5!important;
    text-decoration: underline;
}

.prompt-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    justify-content: center;
}

.prompt-badges .badge {
    display: inline-block;
    padding: 0px 9px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    background: #f0f0f0;
    color: #333;
}

.prompt-badges .badge-categorie {
    background: #e8f4fc;
    color: #1a5a7a;
}

.prompt-badges .badge-nivel {
    background: #f5f0e8;
    color: #6b4e16;
}

.copy-prompt-btn {
    align-self: center;
    padding: .1rem .7rem!important;
    margin-bottom: 5px!important;
    font-size: 14px!important;
    font-weight: 600;
    border: 1px solid #00DE8E!important;
    border-radius: 6px;
    background: #fff;
    color: #00DE8E!important;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.copy-prompt-btn:hover {
    background: #00DE8E!important;
    color: white!important;
}

.copy-prompt-btn:focus {
    background: none!important;
    color: #00DE8E!important;
}

/* Paginare */
#carti-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

#carti-pagination .pag-btn {
    padding: 10px 14px;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    border-radius: 6px;
    color: white;
    border: 1px solid #D9FCD5;
    background-color:#212526!important;
}

#carti-pagination .pag-btn:hover {
    color:#121212!important;
    background-color:#D9FCD5!important;
}

#carti-pagination .pag-btn:disabled {
    background: #000;
    color: #fff;
    cursor: default;
}

#carti-pagination .pag-btn.active {
    background-color: black;
    color: white;
}

/* --- RESPONSIVE (MOBIL) --- */
@media (max-width: 768px) {
    /* Filtrele pe coloană */
    #carti-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    #carti-filters > div {
        width: 100%;
        justify-content: space-between;
    }

    #carti-filters select,
    #filter-search input {
        width: 100%;
        min-width: unset;
    }
    
    #carti-filters strong {
        font-size: 15px;
    }

    /* MODIFICĂRI PENTRU CĂRȚI (1 COLOANĂ) */
    
    /* 1. Grila pe 1 singură coloană */
    .carti-grid {
        grid-template-columns: 1fr; /* O singură coloană pe tot rândul */
        gap: 25px; /* Spațiu mai generos între cărți */
    }

    /* 2. Cardul */
    .carte-item {
        padding: 15px; /* Padding confortabil */
    }

    /* 3. Titlul - poate fi mai mare acum */
    .carte-item h3 {
        font-size: 27px!important; 
        margin-top: -10px;
        margin-bottom: -5px;
    }

    /* 4. Textul promptului */
    .carte-item p,
    .prompt-text {
        font-size: 14px;
    }
    
    /* Imaginea */
    .carte-item img {
        object-fit: contain; /* Păstrează proporțiile */
        margin-bottom: 15px;
        border-radius: 10px!important;
    }
}