/* ===== Zoekresultaten ===== */
.hero--search {
    padding: 40px 20px 20px;
    background: linear-gradient(135deg, #e8f8ec, #f4fef7);
    text-align: center;
}
.hero--search h1 { margin: 0 0 8px; }
.hero--search p { margin: 0 0 18px; }
.results-meta { color:#555; margin-top:12px; }

.results-page { padding: 24px 20px 60px; }

.results-grid {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 1100px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.result-card {
    background: #fff;
    border: 1px solid #e0e4e8;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(0,0,0,.05);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .2s ease;
}
.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(39,174,96,.18);
}

.result-link {
    display: grid;
    grid-template-rows: auto 1fr;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.result-image {
    margin: 0;
    background: #fff;
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    border-bottom: 1px solid #eef2f1;
}
.result-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}
.result-image .fallback { display: none; }
.result-image.is-fallback { background:#f8fafc; }
.result-image.is-fallback .fallback {
    display: block;
    color:#6b7280;
    font-weight: 700;
    font-size: .95rem;
}

.result-body { padding: 14px 14px 18px; display: grid; gap: 6px; }

.result-title { font-size: 1rem; margin: 0; color: #2c3e50; line-height: 1.25; }
.result-title mark { background: #fff2a8; padding: 0 2px; border-radius: 3px; }

.result-ean { margin: 0; font-size: .9rem; color: #6b7280; }
.result-ean span { font-weight: 700; color: #27ae60; margin-right: 6px; }

.result-price { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.result-price .price-number { font-size: 1.2rem; color: #27ae60; font-weight: 800; }
.result-price .price-sub { color: #6b7280; font-weight: 600; font-size: .9rem; }

.result-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; font-size: .92rem; color: #34495e; }
.result-meta .seller-count { background:#f6fbf7; border:1px solid #e0e4e8; border-radius:9999px; padding:4px 10px; font-weight:700; }
.result-meta .discount-badge { background:#e74c3c; color:#fff; font-weight:700; font-size:.85rem; padding:4px 8px; border-radius:9999px; }
.result-meta .stock-out { background:#f1f5f9; color:#64748b; font-weight:700; font-size:.85rem; padding:4px 8px; border-radius:9999px; }
.result-meta--nooffers { color:#6b7280; }

/* Responsive */
@media (max-width: 900px) {
    .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .hero--search { padding: 40px 15px 15px; }
    .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

.result-link {
    display: grid;
    grid-template-rows: auto 1fr;
    height: 100%;
}

/* Vierkante, vaste beeldbak zonder pixels */
.result-image {
    margin: 0;
    background: #fff;
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;            /* bepaalt de hoogte -> geen CLS */
    border-bottom: 1px solid #eef2f1;
    position: relative;
    overflow: hidden;
}

/* Afbeelding vult de bak zonder te rekken */
.result-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;                   /* optioneel, blijft schaalbaar */
    display: block;                  /* voorkomt baseline-gap */
}

/* Fallback is overlay (buiten de normale flow) */
.result-image .fallback {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    color:#6b7280;
    font-weight: 700;
    font-size: .95rem;
    background:#f8fafc;
}

/* Bij kapotte/missende afbeelding */
.result-image.is-fallback img { display: none; }
.result-image.is-fallback .fallback { display: grid; }

/* (Aanrader) Titel clampen -> alle kaarten even hoog */
.result-title{
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
    overflow:hidden;
}
