/* =====================================================================
   Cordial Cars Directory — Front-end styles
   ===================================================================== */

/* ---------- Global ---------- */
.ccd-notice {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    border-left: 4px solid;
}
.ccd-notice-success { background: #ecf7ed; border-color: #46b450; color: #2a6b32; }
.ccd-notice-error   { background: #fdeeee; border-color: #dc3232; color: #8a1f1f; }

/* ---------- Buttons ---------- */
.ccd-whatsapp-btn,
.ccd-website-link,
.ccd-social-link {
    display: block;
    text-align: center;
    padding: 10px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 8px;
}
.ccd-whatsapp-btn { background: #25D366; color: #fff; }
.ccd-whatsapp-btn:hover { background: #1ebe5b; color: #fff; }
.ccd-website-link { background: #2271b1; color: #fff; }
.ccd-website-link:hover { background: #1a5a8a; color: #fff; }
.ccd-social-link { background: #333; color: #fff; }
.ccd-social-link:hover { background: #111; color: #fff; }

/* ---------- Pricing Grid ---------- */
.ccd-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin: 30px 0;
}
.ccd-pricing-card {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}
.ccd-pricing-card h3 { margin: 0 0 12px; font-size: 22px; }
.ccd-price { font-size: 32px; font-weight: 700; color: #2271b1; margin: 10px 0; }
.ccd-duration { color: #777; font-size: 14px; margin-bottom: 16px; }
.ccd-features { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; flex-grow: 1; }
.ccd-features li { padding: 6px 0 6px 24px; position: relative; font-size: 14px; }
.ccd-features li:before { content: "✓"; position: absolute; left: 0; color: #46b450; font-weight: 700; }
.ccd-buy-btn {
    background: #2271b1; color: #fff; border: none;
    padding: 12px 20px; border-radius: 4px; cursor: pointer;
    font-size: 15px; font-weight: 600;
}
.ccd-buy-btn:hover { background: #1a5a8a; color: #fff; }

/* ---------- Dashboard ---------- */
.ccd-dashboard { max-width: 1100px; margin: 0 auto; padding: 20px 0; }
.ccd-dash-header { margin-bottom: 24px; }
.ccd-dash-header h2 { margin: 0 0 4px; }
.ccd-dash-section {
    background: #fff; border: 1px solid #e2e2e2;
    border-radius: 8px; padding: 20px; margin-bottom: 20px;
}
.ccd-dash-section h3 { margin-top: 0; border-bottom: 1px solid #eee; padding-bottom: 10px; }

.ccd-stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px;
}
.ccd-stat {
    background: #f7f9fc; border-radius: 6px; padding: 16px; text-align: center;
}
.ccd-stat-num { display: block; font-size: 26px; font-weight: 700; color: #2271b1; }
.ccd-stat-label { display: block; font-size: 13px; color: #666; margin-top: 4px; }

.ccd-usage-table, .ccd-cars-table {
    width: 100%; border-collapse: collapse;
}
.ccd-usage-table th, .ccd-usage-table td,
.ccd-cars-table th, .ccd-cars-table td {
    padding: 10px; text-align: left; border-bottom: 1px solid #eee;
}
.ccd-usage-table th, .ccd-cars-table th { background: #f7f9fc; font-weight: 600; }
.ccd-cars-table img { max-width: 60px; height: auto; border-radius: 4px; }

.ccd-actions .button { margin-right: 8px; margin-bottom: 8px; }

/* ---------- Submit Car Form ---------- */
.ccd-submit-car { max-width: 760px; margin: 0 auto; padding: 20px 0; }
.ccd-car-form fieldset {
    border: 1px solid #e2e2e2; border-radius: 8px;
    padding: 20px; margin-bottom: 24px; background: #fff;
}
.ccd-car-form legend {
    font-weight: 700; padding: 0 10px; font-size: 16px; color: #2271b1;
}
.ccd-car-form label {
    display: block; margin-bottom: 16px;
}
.ccd-car-form label span {
    display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px;
}
.ccd-car-form input[type=text],
.ccd-car-form input[type=number],
.ccd-car-form input[type=email],
.ccd-car-form input[type=url],
.ccd-car-form input[type=file],
.ccd-car-form select,
.ccd-car-form textarea {
    width: 100%; padding: 10px; border: 1px solid #ccc;
    border-radius: 4px; font-size: 14px; box-sizing: border-box;
}
.ccd-car-form small { color: #888; font-size: 12px; }
.ccd-form-actions { text-align: right; }
.ccd-form-actions .button { margin-left: 8px; }

/* ---------- Archive ---------- */
.ccd-archive-wrap { max-width: 1200px; margin: 0 auto; padding: 20px 0; }
.ccd-archive-header { margin-bottom: 20px; }
.ccd-archive-header h1 { margin: 0 0 6px; }
.ccd-archive-header p { color: #666; margin: 0; }

.ccd-search-form {
    background: #fff; border: 1px solid #e2e2e2; border-radius: 8px;
    padding: 16px; margin-bottom: 24px;
}
.ccd-search-row {
    display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
}
.ccd-search-row:last-child { margin-bottom: 0; }
.ccd-search-row input, .ccd-search-row select {
    flex: 1; min-width: 140px; padding: 10px;
    border: 1px solid #ccc; border-radius: 4px; font-size: 14px;
}
.ccd-search-row .button { flex: 0 0 auto; }

.ccd-cars-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.ccd-car-card {
    background: #fff; border: 1px solid #e2e2e2; border-radius: 8px;
    overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: transform 0.15s, box-shadow 0.15s;
}
.ccd-car-card:hover { transform: translateY(-3px); box-shadow: 0 6px 14px rgba(0,0,0,0.1); }
.ccd-car-thumb { display: block; height: 180px; overflow: hidden; background: #f0f0f0; }
.ccd-car-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ccd-no-image {
    display: flex; align-items: center; justify-content: center;
    height: 100%; color: #999; font-size: 14px;
}
.ccd-car-body { padding: 14px; }
.ccd-car-body h3 { margin: 0 0 8px; font-size: 16px; }
.ccd-car-body h3 a { text-decoration: none; color: #222; }
.ccd-car-body h3 a:hover { color: #2271b1; }
.ccd-car-price { font-size: 18px; font-weight: 700; color: #2271b1; margin-bottom: 6px; }
.ccd-car-meta { color: #666; font-size: 13px; display: flex; gap: 12px; margin-bottom: 8px; }
.ccd-tag {
    display: inline-block; background: #eef3f8; color: #2271b1;
    font-size: 12px; padding: 3px 8px; border-radius: 10px; margin-right: 4px;
}

.ccd-pagination { text-align: center; margin: 30px 0; }
.ccd-pagination .page-numbers {
    display: inline-block; padding: 6px 12px; margin: 0 2px;
    border: 1px solid #ddd; border-radius: 4px; text-decoration: none; color: #333;
}
.ccd-pagination .page-numbers.current { background: #2271b1; color: #fff; border-color: #2271b1; }

.ccd-no-results { text-align: center; padding: 40px 0; color: #666; }

/* ---------- Single Car ---------- */
.ccd-single-car { max-width: 1100px; margin: 0 auto; padding: 20px 0; }
.ccd-single-header { margin-bottom: 20px; }
.ccd-single-header h1 { margin: 0 0 8px; }
.ccd-single-price { font-size: 28px; font-weight: 700; color: #2271b1; }
.ccd-special-badge {
    display: inline-block; margin-top: 8px; background: #fff3cd;
    color: #8a6d3b; padding: 6px 12px; border-radius: 4px; font-size: 14px;
}

.ccd-single-gallery { margin-bottom: 24px; }
.ccd-main-image img { width: 100%; height: auto; border-radius: 8px; display: block; }
.ccd-gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.ccd-gallery-thumbs img { width: 100px; height: 70px; object-fit: cover; border-radius: 4px; }

.ccd-single-body {
    display: grid; grid-template-columns: 2fr 1fr; gap: 30px;
}
@media (max-width: 780px) {
    .ccd-single-body { grid-template-columns: 1fr; }
    .ccd-cars-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
    .ccd-cars-grid { grid-template-columns: 1fr; }
}

.ccd-specs-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.ccd-specs-table th, .ccd-specs-table td {
    padding: 10px; border-bottom: 1px solid #eee; text-align: left;
}
.ccd-specs-table th { width: 40%; color: #666; font-weight: 600; }

.ccd-seller-box, .ccd-lead-form-box {
    background: #fff; border: 1px solid #e2e2e2; border-radius: 8px;
    padding: 20px; margin-bottom: 20px;
}
.ccd-seller-box h3, .ccd-lead-form-box h3 { margin-top: 0; }

.ccd-lead-form label { display: block; margin-bottom: 12px; }
.ccd-lead-form label span { display: block; margin-bottom: 4px; font-weight: 600; font-size: 13px; }
.ccd-lead-form input, .ccd-lead-form textarea {
    width: 100%; padding: 9px; border: 1px solid #ccc;
    border-radius: 4px; font-size: 14px; box-sizing: border-box;
}