/* Carsell Dealer Directory */

.csdd-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Filter bar ─────────────────────────────────────────────────────────── */

.csdd-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
}

.csdd-filter-input,
.csdd-filter-select {
    flex: 1 1 180px;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    outline: none;
    transition: border-color .15s;
}

.csdd-filter-input:focus,
.csdd-filter-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.csdd-filter-btn {
    padding: 9px 20px;
    background: #1e3a5f;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}

.csdd-filter-btn:hover {
    background: #162d4a;
}

.csdd-filter-clear {
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
    white-space: nowrap;
}

.csdd-filter-clear:hover {
    color: #ef4444;
    text-decoration: underline;
}

/* ── Result count ───────────────────────────────────────────────────────── */

.csdd-result-count {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 16px;
}

/* ── Grid ───────────────────────────────────────────────────────────────── */

.csdd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

/* ── Card ───────────────────────────────────────────────────────────────── */

.csdd-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px 20px 20px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s, transform .2s, border-color .2s;
}

.csdd-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.10);
    transform: translateY(-2px);
    border-color: #c7d8f5;
    text-decoration: none;
    color: inherit;
}

.csdd-card__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a5f, #3b82f6);
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.csdd-card__body {
    width: 100%;
}

.csdd-card__name {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
    line-height: 1.3;
}

.csdd-card__badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.csdd-card__verified {
    font-size: 11px;
    font-weight: 600;
    color: #16a34a;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.csdd-card__tier {
    font-size: 11px;
    font-weight: 600;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.csdd-card__rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.csdd-card__location {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.csdd-card__count {
    font-size: 12px;
    color: #94a3b8;
}

/* ── Empty state ────────────────────────────────────────────────────────── */

.csdd-empty {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
}

.csdd-empty a {
    color: #3b82f6;
}

/* ── Pagination ─────────────────────────────────────────────────────────── */

.csdd-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 10px;
}

.csdd-pg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    background: #fff;
    transition: background .15s, border-color .15s, color .15s;
}

.csdd-pg-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    text-decoration: none;
    color: #1e293b;
}

.csdd-pg-active {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: #fff !important;
}

.csdd-pg-active:hover {
    background: #162d4a;
    border-color: #162d4a;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .csdd-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .csdd-filter-btn,
    .csdd-filter-clear {
        text-align: center;
    }

    .csdd-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

@media (max-width: 400px) {
    .csdd-grid {
        grid-template-columns: 1fr;
    }
}
