/* ============================================================
   FaWoWa - marketplace.css
   Marktplaats module styles
   ============================================================ */

/* === Hoofdcontainer === */
:root {
    --f-shadow: 0 10px 30px rgba(15,23,42,0.1);
    --f-radius: 16px;
}

.hoofd-inhoud {
    padding: 3rem 0 5rem;
    background: var(--light, #f8fafc);
    min-height: calc(100vh - var(--header-height, 80px));
}

/* === Kopgedeelte === */
.sectie-kop {
    margin-bottom: 1.5rem;
}
.sectie-kop h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    font-family: 'Montserrat', sans-serif;
}

/* === BEDIENING BALK === */
.bediening-balk {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.6rem 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Zoekgroep & Filter Alignment */
.balk-rechts {
    display: flex;
    gap: 0.60rem;
    align-items: center;
    flex: 1 1 auto;
    justify-content: flex-end;
}

.zoek-groep {
    display: flex;
    align-items: center;
    flex: 0 1 250px;
    min-width: 150px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    height: 44px;
    background: #f8fafc;
    transition: all 0.2s;
}
.zoek-groep:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(39,174,96,0.15);
    background: #fff;
}
.veld-invoer, .mkt-input, .ad-input {
    height: 44px;
    padding: 0 0.85rem;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    color: var(--dark);
    font-family: 'Montserrat', sans-serif;
    width: 100%;
}
.zoek-knop, .mkt-search-btn, .ad-search-btn {
    height: 44px;
    width: 44px;
    flex-shrink: 0;
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.keuze-lijst {
    height: 44px;
    width: auto;
    min-width: unset;
    padding: 0 1.25rem 0 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    box-sizing: border-box;
    cursor: pointer;
    flex-shrink: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: var(--dark);
    transition: all 0.2s;
}
.keuze-lijst:hover, .keuze-lijst:focus {
    border-color: var(--primary);
    background: #fff;
    outline: none;
}

/* Knoppen */
.actie-knop, .mkt-btn, .ad-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 44px;
    padding: 0 1.1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
    flex-shrink: 0;
    font-family: 'Montserrat', sans-serif;
}
.knop-hoofd { background: var(--primary); color: #fff !important; }
.knop-oranje { background: var(--secondary); color: #fff !important; }
.knop-oranje:hover { background: var(--secondary-dark); }
.knop-blauw { background: var(--accent-blue); color: #fff !important; }
.knop-blauw:hover { background: var(--accent-blue-dark); }
.knop-lijn { background: #fff; color: var(--dark) !important; border: 1px solid #e2e8f0; }
.knop-wis-klein { background: #fee2e2; color: #dc2626 !important; border: 1px solid #fca5a5; }

/* Klant info */
.klant-regio {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.klant-naam {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0 0.5rem;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badge */
.getal-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* === OVERZICHT ROOSTER === */
.item-rooster, .tegel-rooster, .mkt-grid, .mkt-rooster {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* === PRODUCT KAART === */
.product-kaart, .mkt-card, .mkt-card-link, .ad-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--f-radius, 12px);
    box-shadow: var(--f-shadow, 0 4px 15px rgba(0,0,0,0.05));
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.product-kaart:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    border-color: var(--primary);
}

.foto-regio {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f1f5f9;
    overflow: hidden;
    flex-shrink: 0;
}
.foto-regio img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.tekst-regio {
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1.25rem;
    flex: 1;
}
.kop-titel {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 0.4rem;
    line-height: 1.3;
    font-family: 'Montserrat', sans-serif;
}
.data-regel {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}
.omschrijving {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 auto;
    padding-bottom: 1rem;
}
.kant-voet {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}
.bedrag {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}
.ga-naar {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
}

/* === Leeg Scherm === */
.leeg-scherm {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

/* === DETAIL SECTIES === */
.pagina-verdeling { display: grid; grid-template-columns: 1fr 380px; gap: 2rem; }
.hoofd-sectie { display: flex; flex-direction: column; gap: 2rem; }
.zijbalk-info { display: flex; flex-direction: column; gap: 1rem; }
.extra-info-sectie { 
    background: var(--white); 
    padding: 2rem; 
    border-radius: var(--f-radius); 
    box-shadow: var(--f-shadow); 
    border: 1px solid #e2e8f0; 
    height: fit-content; 
}
.prijs-label { font-size: 2.2rem; font-weight: 800; color: var(--primary); margin-bottom: 1.5rem; }
.info-lijst { list-style: none; padding: 0; margin: 1.5rem 0; border-top: 1px solid #f1f5f9; padding-top: 1.5rem; }
.info-lijst li { display: flex; align-items: center; gap: 0.75rem; color: var(--text-muted); margin-bottom: 0.75rem; font-size: 0.95rem; }

/* === BEHEER LIJST === */
.beheer-rooster { display: flex; flex-direction: column; gap: 1rem; }
.lijst-kaart { display: flex; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1px solid #e2e8f0; }
.lijst-inhoud { flex: 1; padding: 1.5rem; display:flex; flex-direction: column; justify-content: space-between; }
.lijst-foto { width: 150px; height: 120px; flex-shrink: 0; background: #f1f5f9; }
.lijst-titel { font-size: 1.25rem; font-weight: 700; color: var(--dark); margin-bottom: 0.5rem; }
.lijst-data { display: flex; gap: 1rem; font-size: 0.85rem; color: var(--text-light); }

/* === CHAT BUBBELS KLEUR (Verkoper Oranje, Koper Groen) === */
.chat-msg {
    box-shadow: 0 4px 12px rgba(15,23,42,0.1);
}
.bubble-seller { background: #ff9800 !important; color: white !important; border-top-right-radius: 2px !important; }
.bubble-buyer { background: #27ae60 !important; color: white !important; border-top-left-radius: 2px !important; }
.bubble-seller .msg-meta, .bubble-buyer .msg-meta { color: rgba(255,255,255,0.8) !important; }

@media (max-width: 992px) { 
    .pagina-verdeling { grid-template-columns: 1fr; } 
    .extra-info-sectie { position: static; } 
}

@media (max-width: 768px) {
    .hoofd-inhoud { padding: 2rem 0; }
    .sectie-kop { flex-direction: column; align-items: flex-start; }
    .sectie-kop > div { width: 100%; flex-direction: column; align-items: stretch; }
    .sectie-kop .actie-knop { width: 100%; justify-content: center; }
    .klant-naam { max-width: 100%; }

    .bediening-balk { flex-direction: column; align-items: stretch; gap: 1rem; padding: 1rem; }
    .bediening-balk .actie-knop { width: 100%; justify-content: center; }
    .klant-regio { flex-direction: column; width: 100%; }
    .klant-regio .actie-knop { width: 100%; justify-content: center; }

    .balk-rechts { flex-direction: column; width: 100%; margin-left: 0; }
    .keuze-lijst { width: 100%; }
    .zoek-groep { width: 100%; flex: 1; }

    .tegel-rooster, .mkt-grid, .mkt-rooster { grid-template-columns: 1fr; }
    
    .product-kaart .foto-regio { height: 180px; }
    
    /* Beheer lijst mobiel fixes (Mijn advertenties) */
    .lijst-kaart { flex-direction: column; }
    .lijst-foto { width: 100%; height: 180px; }
    .lijst-inhoud { gap: 1rem; }
    .lijst-inhoud > div:last-child { width: 100%; }
    .lijst-inhoud .actie-knop { width: 100%; justify-content: center; margin-top: 0.5rem; }
}
