/* 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:hover:not(:disabled) { border-color: #9ca3af; }
.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);
}

.form-btn-pro:active:not(:disabled) { transform: translateY(0); }
.form-btn-pro:disabled {
    background: #f3f4f6;
    color: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.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); } }

/* Results Section */
.car-color-results { margin-top: 40px; }
.car-color-results h3 {
    text-align: center;
    margin-bottom: 8px;
    color: #000;
    font-size: 24px;
    font-weight: 700;
}

.results-count { text-align: center; margin-bottom: 30px; }
.results-count p {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    background: #f8fafc;
    padding: 6px 16px;
    border-radius: 12px;
    display: inline-block;
    border: 1px solid #e5e7eb;
}

/* OPTIMIZED GRID LAYOUT */
/* Desktop: 6 cards per row */
.car-color-grid-pro {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.car-color-card-pro {
    background: #fff;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: fit-content;
    display: flex;
    flex-direction: column;
}

.car-color-card-pro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    opacity: 0.8;
}

.car-color-card-pro:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.color-swatch-square {
    width: 100%;
    height: 120px;
    border-radius: 0;
    margin: 0;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.car-color-card-pro:hover .color-swatch-square {
    transform: scale(1.02);
    filter: brightness(1.05);
}

.color-info-pro {
    padding: 12px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    min-height: 50px;
    flex: 1;
}

.color-name-pro {
    text-align: center;
    width: 100%;
}

.color-name-pro h4 {
    margin: 0 !important;
    color: #1f2937 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    text-align: center;
}

/* Remove color code, brand, model, and subtitle displays */
.color-hex-pro,
.color-name-pro .color-model,
.color-name-pro .color-subtitle {
    display: none !important;
}

.hex-code-pro {
    display: none !important;
}

/* Clickable card styles */
.car-color-card-pro.clickable-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.car-color-card-pro.clickable-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Select button styles */
.color-select-button {
    padding: 8px;
    background: #ffffff;
}

.select-btn {
    width: 100%;
    padding: 8px 12px;
    background: linear-gradient(to right, #f9493c, #e42d68);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.select-btn:hover {
    background: linear-gradient(to right, #e42d68, #f9493c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(228, 45, 104, 0.4);
}

.select-btn:active {
    transform: translateY(0);
}

/* Make the entire card clickable */
.car-color-card-pro.clickable-card {
    position: relative;
}

/* Ensure the button doesn't trigger card click */
.color-select-button {
    position: relative;
    z-index: 2;
}

.color-swatch-square,
.color-info-pro {
    position: relative;
    z-index: 1;
}

/* Add overlay for clickable area */
.car-color-card-pro.clickable-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    cursor: pointer;
}

.color-select-button {
    position: relative;
    z-index: 3;
}

.car-color-no-results {
    text-align: center;
    padding: 48px 32px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
    max-width: 400px;
    margin: 0 auto;
}

.car-color-no-results h4 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #374151;
    font-weight: 600;
}

.car-color-no-results p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 0;
    line-height: 1.5;
}

/* RESPONSIVE BREAKPOINTS */

/* Large Desktop: Maintain 6 cards */
@media (min-width: 1440px) {
    .car-color-grid-pro { gap: 16px; }
    .color-info-pro { padding: 14px 8px; }
    .color-name-pro h4 { font-size: 15px !important; }
}

/* Desktop: Full width filter */
@media (min-width: 1025px) {
    .car-color-grid-pro {
        grid-template-columns: repeat(6, 1fr);
        gap: 12px;
		padding-bottom: 30px;
    }
    
    .car-color-filter-pro {
        width: 100%;
        max-width: 900px;
    }
    
    .form-row-pro {
        flex-direction: row;
        gap: 16px;
    }
    
    .form-action-pro {
        flex: 0 0 auto;
        align-self: stretch;
    }
    
    .form-btn-pro {
        width: auto;
        min-width: 140px;
    }
}

/* Tablet: 80% width filter + 4 cards per row */
@media (max-width: 1024px) and (min-width: 769px) {
    .car-color-grid-pro {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
		padding-bottom: 30px;
    }
    
    .car-color-filter-pro {
        width: 80%;
        max-width: none;
        padding: 32px;
        margin: 0 auto 32px;
    }
    
    .form-row-pro {
        flex-direction: row;
        gap: 12px;
    }
    
    .form-action-pro {
        flex: 0 0 auto;
        align-self: stretch;
    }
    
    .form-btn-pro {
        padding: 14px 24px;
        min-width: 120px;
        width: auto;
    }
    
    .color-swatch-square { height: 100px; }
    .color-info-pro { padding: 10px 8px; min-height: 45px; }
    .color-name-pro h4 { font-size: 13px !important; }
}

/* Mobile Large: 70% width filter + 2 cards per row */
@media (max-width: 768px) and (min-width: 450px) {
    .car-color-grid-pro {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
		 padding-bottom: 20px;
    }
    
    .car-color-filter-pro {
        width: 70%;
        max-width: none;
        padding: 24px;
        margin: 0 auto 24px;
    }
    
    .form-row-pro {
        flex-direction: column;
        gap: 20px;
    }
    
    .form-group-pro {
        width: 100%;
    }
    
    .form-action-pro {
        align-self: stretch;
        margin-top: 0;
    }
    
    .form-btn-pro {
        width: 100%;
        min-width: auto;
        height: 50px;
    }
    
    .color-swatch-square { height: 100px; }
    .color-info-pro { padding: 8px; min-height: 40px; }
    .color-name-pro h4 { font-size: 12px !important; }
}

/* Mobile Small: 90% width filter + 2 cards per row */
@media (max-width: 449px) {
    .car-color-grid-pro { 
        grid-template-columns: repeat(2, 1fr);
        gap: 8px; 
		padding-bottom: 20px;
    }
    
    .car-color-filter-pro { 
        width: 90%;
        max-width: none;
        padding: 20px; 
        margin: 0 auto 20px;
    }
    
    .form-row-pro {
        flex-direction: column;
        gap: 16px;
    }
    
    .form-group-pro {
        width: 100%;
    }
    
    .form-action-pro {
        align-self: stretch;
        margin-top: 0;
    }
    
    .form-btn-pro {
        width: 100%;
        min-width: auto;
        height: 50px;
        font-size: 14px;
    }
    
    .form-label-pro {
        font-size: 12px;
    }
    
    .form-select-pro {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .car-color-results h3 { 
        font-size: 20px; 
        padding: 0 10px;
    }
    
    .results-count p { 
        font-size: 13px; 
        padding: 5px 14px; 
    }
    
    .color-info-pro { 
        padding: 6px 4px; 
        min-height: 35px; 
    }
    
    .color-name-pro h4 { 
        font-size: 11px !important; 
    }
    
    .color-swatch-square { 
        height: 100px; 
    }
    
    .select-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Extra Small Mobile: 90% width filter + Single column cards */
@media (max-width: 360px) {
    .car-color-grid-pro { 
        grid-template-columns: 1fr;
        gap: 10px;
		padding-bottom: 20px;
    }
    
    .car-color-filter-pro { 
        width: 90%;
        padding: 16px; 
        margin: 0 auto 16px;
    }
    
    .form-row-pro {
        gap: 14px;
    }
    
    .form-btn-pro {
        height: 48px;
        font-size: 13px;
    }
    
    .color-swatch-square { 
        height: 100px; 
    }
    
    .color-info-pro { 
        padding: 8px 6px; 
        min-height: 40px; 
    }
    
    .color-name-pro h4 { 
        font-size: 12px !important; 
    }
}

/* Ensure proper spacing for very large screens */
@media (min-width: 1600px) {
    .car-color-filter-pro {
        max-width: 1000px;
    }
    
    .car-color-grid-pro {
        gap: 20px;
	 padding-bottom: 30px;
    }
    
    .color-swatch-square {
        height: 100px;
    }
    
    .color-info-pro {
        padding: 16px 8px;
    }
    
    .color-name-pro h4 {
        font-size: 16px !important;
    }
}