/* Car Color Filter - Optimized Professional Design */
.car-color-filter-pro { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); max-width: 900px; margin: 0 auto 40px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.filter-form-pro { width: 100%; }
.form-row-pro { display: flex; align-items: flex-end; gap: 16px; width: 100%; }
.form-group-pro { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.form-label-pro { font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-select-pro { width: 100%; padding: 14px 16px; font-size: 15px; font-weight: 500; color: #111827; background: #fff; border: 2px solid #e5e7eb; border-radius: 8px; appearance: none; cursor: pointer; transition: all 0.2s ease; background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9L12 15L18 9' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 16px; }
.form-select-pro:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.form-select-pro:disabled { background-color: #f9fafb; color: #9ca3af; cursor: not-allowed; }
.form-action-pro { flex: 0 0 auto; align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; }
.form-btn-pro { padding: 14px 32px; background: linear-gradient(to right, #f9493c, #e42d68); color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; height: 48px; min-width: 140px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.form-btn-pro:hover:not(:disabled) { background: linear-gradient(to right, #e42d68, #f9493c); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(228, 45, 104, 0.4); }
.btn-text-pro { display: block; }
.btn-loading-pro { display: flex; align-items: center; gap: 8px; }
.spinner-pro { width: 16px; height: 16px; border: 2px solid transparent; border-top: 2px solid currentColor; border-radius: 50%; animation: spin-pro 1s linear infinite; }
@keyframes spin-pro { to { transform: rotate(360deg); } }

/* COMPACT REAL-TIME FILTER (Base Styles) */
.compact-filter-section { background: white; border-radius: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); margin: 3px !important; padding: 20px; border: 1px solid #e5e7eb; position: relative; transition: all 0.3s ease; }
.compact-filter-section:hover { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); }
.compact-filter-header { margin-bottom: 15px; text-align: center; }
.compact-filter-title { font-size: 18px; color: #1f2937; margin: 0 0 4px 0; font-weight: 600; }
.compact-filter-description { font-size: 13px; color: #6b7280; margin: 0; }
.compact-filter-form-wrapper.centered-filter { display: flex; justify-content: center; }
.compact-filter-form { width: 100%; max-width: 1000px; }
.compact-filter-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.compact-filter-row.centered-row { justify-content: center; }
.compact-filter-group { flex: 1; min-width: 0; position: relative; }
.compact-search-group { flex: 2; min-width: 200px; }
.search-input-wrapper { position: relative; width: 100%; }
.compact-search-input { width: 100%; padding: 10px 12px; padding-right: 40px; font-size: 14px; color: #111827; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; transition: all 0.2s ease; font-weight: 400; }
.compact-search-input:focus { outline: none; border-color: #667eea; background: white; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); }
.compact-clear-search { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #9ca3af; cursor: pointer; padding: 4px; opacity: 0; visibility: hidden; transition: all 0.2s ease; border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.compact-clear-search.visible { opacity: 1; visibility: visible; }
.compact-filter-select { width: 100%; padding: 10px 12px; font-size: 14px; color: #111827; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; appearance: none; cursor: pointer; transition: all 0.2s ease; font-weight: 400; background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9L12 15L18 9' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
.compact-filter-select:focus { outline: none; border-color: #667eea; background: white; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); }
.compact-filter-select:disabled { background-color: #f3f4f6; color: #9ca3af; cursor: not-allowed; opacity: 0.7; }
.compact-clear-btn { display: flex; align-items: center; gap: 6px; padding: 10px 16px; background: white; color: #374151; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s ease; white-space: nowrap; height: 40px; }
.compact-clear-btn:hover { background: #f9fafb; border-color: #d1d5db; color: #dc2626; }

.compact-find-colors-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; background: linear-gradient(to right, #f9493c, #e42d68); color: white; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s ease; white-space: nowrap; height: 40px; min-width: 140px; position: relative; }
.compact-find-colors-btn:hover { background: linear-gradient(to right, #e42d68, #f9493c); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(228, 45, 104, 0.3); }
.compact-find-colors-btn .btn-text { display: inline-block; transition: opacity 0.2s ease; }
.compact-find-colors-btn .btn-spinner { display: none; align-items: center; justify-content: center; }
.compact-find-colors-btn .btn-spinner svg { width: 14px; height: 14px; animation: spin 1s linear infinite; }

.car-color-filter-compact { max-width: 1200px; margin: 0 auto; }

/* STATISTICS GRID */
.statistics-grid-compact { display: flex; gap: 15px; margin-bottom: 25px; flex-wrap: wrap; justify-content: center; }
.stat-card-compact { background: white; border-radius: 8px; padding: 15px; display: flex; align-items: center; gap: 12px; border: 1px solid #e5e7eb; flex: 1; min-width: 180px; max-width: 250px; transition: all 0.2s ease; }
.stat-card-compact:hover { border-color: #667eea; box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1); }
.stat-icon-compact { width: 40px; height: 40px; border-radius: 8px; background: #f0f9ff; display: flex; align-items: center; justify-content: center; color: #0369a1; }
.stat-content-compact { flex: 1; }
.stat-number-compact { font-size: 20px; font-weight: 700; color: #1f2937; margin: 0 0 2px 0; line-height: 1; }
.stat-label-compact { font-size: 12px; color: #6b7280; margin: 0; font-weight: 500; }

/* BRAND SECTIONS */
.brand-section-compact { margin-bottom: 30px; }
.brand-section-header-compact { margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #f3f4f6; }
.brand-header-content-compact { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.brand-title-compact { font-size: 18px; color: #1f2937; margin: 0; font-weight: 600; }
.brand-meta-compact { display: flex; gap: 10px; font-size: 13px; }
.brand-colors-count-compact, .brand-models-count-compact { color: #6b7280; background: #f9fafb; padding: 4px 10px; border-radius: 12px; }

/* FILTERED RESULTS */
.filtered-results-header-compact { background: #f0f9ff; border-radius: 10px; padding: 20px; margin-bottom: 25px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; border: 1px solid #bae6fd; }
.filtered-title-compact { font-size: 20px; color: #0c4a6e; margin: 0 0 5px 0; font-weight: 600; }
.filtered-header-actions-compact .btn-outline-compact { background: white; color: #0c4a6e; border: 1px solid #0ea5e9; padding: 8px 16px; border-radius: 8px; text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.2s ease; }
.filtered-header-actions-compact .btn-outline-compact:hover { background: #f0f9ff; }

.search-results-header-compact { margin-bottom: 20px; }
.search-results-title-compact { font-size: 16px; color: #374151; margin: 0; font-weight: 600; padding: 10px 0; border-bottom: 1px solid #e5e7eb; }

/* MAIN GRID LAYOUT */
.car-color-grid-pro { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 15px; }
@media (max-width: 1200px) { .car-color-grid-pro { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 992px) { .car-color-grid-pro { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .car-color-grid-pro { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .car-color-grid-pro { grid-template-columns: repeat(1, 1fr); gap: 12px; } }

/* UPDATED CARD DESIGN - No borders, pure image + button floating */
.car-color-card-pro { background: transparent; border: none; border-radius: 8px; overflow: visible; transition: all 0.3s ease; display: flex; flex-direction: column; height: 100%; position: relative; box-shadow: none; }
.car-color-card-pro:hover { transform: translateY(-4px); }

/* Image is strictly locked to 220px to guarantee uniformity. Object-fit: contain shows whole image perfectly. */
.color-image-container { width: 100%; height: 220px; flex: none; background: transparent; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 0 !important; margin: 0 !important; border: none; }
.color-image-container img { width: 100%; height: 100%; object-fit: contain; object-position: center; transition: transform 0.5s ease; padding: 0 !important; margin: 0 !important; display: block; border: none; }
.car-color-card-pro:hover .color-image-container img { transform: scale(1.05); }

/* Hide standard text output entirely */
.color-info-pro { display: none !important; }

/* Button docked directly below image */
.color-select-button { padding: 12px 0; background: transparent; margin-top: auto; position: relative; z-index: 2; height: 60px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
.select-btn { width: 100%; padding: 10px 16px; background: #fff; color: #374151; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); height: 100%; box-sizing: border-box; }
.car-color-card-pro:hover .select-btn { background: linear-gradient(to right, #f9493c, #e42d68); color: white; border-color: transparent; box-shadow: 0 4px 12px rgba(228, 45, 104, 0.3); }
.select-btn:hover { transform: translateY(-1px); }
.select-btn:active { transform: translateY(0); }
.car-color-card-pro.clickable-card { cursor: pointer; }

/* EMPTY STATES (No colors found) - Perfectly centered and sleek */
.car-color-no-results-wrapper { width: 100%; display: flex; justify-content: center; align-items: center; margin: 40px 0; grid-column: 1 / -1; }
.car-color-no-results, .no-search-results-compact { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 20px; background: #f8fafc; border-radius: 12px; border: 2px dashed #e5e7eb; width: 100%; max-width: 350px; margin: 0 auto; }
.car-color-no-results h4, .no-search-results-compact h4 { font-size: 15px; margin: 12px 0 0 0; color: #6b7280; font-weight: 500; letter-spacing: 0.5px; }
.no-results-illustration { display: flex; align-items: center; justify-content: center; color: #9ca3af; }
.no-results-actions { margin-top: 16px; }

/* LOADING */
.filtered-results-container { margin-top: 20px; min-height: 200px; position: relative; }
.results-loading { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, 0.9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; opacity: 0; visibility: hidden; transition: all 0.2s ease; z-index: 10; border-radius: 8px; }
.results-loading.active { opacity: 1; visibility: visible; }
.loading-spinner { width: 30px; height: 30px; border: 3px solid #e5e7eb; border-top-color: #667eea; border-radius: 50%; animation: spin 1s linear infinite; }

.main-content-container { background: white; border-radius: 12px; padding: 25px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); border: 1px solid #e5e7eb; }

@media (max-width: 992px) {
    .compact-filter-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .compact-search-group { grid-column: 1 / -1; }
    .compact-find-colors-btn, .compact-clear-btn { width: 100%; justify-content: center; }
}
@media (max-width: 768px) {
    .compact-filter-section { padding: 15px !important; margin: 3px !important; }
    .compact-filter-row { flex-direction: column; gap: 10px; }
    .compact-filter-group { width: 100%; }
    .compact-search-group { min-width: 100%; }
    .statistics-grid-compact { flex-direction: column; align-items: center; }
    .stat-card-compact { min-width: 100%; max-width: 300px; }
}
