/* HEX Compatibility Filter - Frontend Styles v3.2 */

.hex-compatibility-wrapper,
.hex-compatibility-filter,
.hex-compatibility-results-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 100%;
}

/* Filter Bar - Inline */
.hex-filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 20px 0;
}

/* Select Fields - 40% wider (130 * 1.4 = 182) */
.hex-select {
    padding: 14px 45px 14px 18px;
    font-size: 15px;
    font-weight: 400;
    color: #333;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%23666' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") no-repeat right 18px center;
    cursor: pointer;
    width: 182px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color 0.2s;
}

.hex-select:hover:not(:disabled) { border-color: #999; }
.hex-select:focus { outline: none; border-color: #333; }
.hex-select:disabled { background-color: #fff; color: #999; cursor: not-allowed; }

/* Buttons */
.hex-btn {
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.hex-btn-primary { background: #c41e3a; color: #fff; }
.hex-btn-primary:hover:not(:disabled) { background: #a01830; }
.hex-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.hex-btn-clear { background: #c41e3a; color: #fff; }
.hex-btn-clear:hover { background: #a01830; }

/* Results */
.hex-results { padding: 30px 0; min-height: 50px; }
.hex-results-placeholder { text-align: center; color: #888; font-size: 16px; padding: 40px 20px; }
.hex-no-results { text-align: center; padding: 40px 20px; color: #666; background: #f9f9f9; border-radius: 20px; }

/* Cards */
.hex-results-cards { display: flex; flex-wrap: wrap; gap: 20px; }

.hex-product-card {
    display: flex;
    flex-direction: column;
    width: calc(25% - 15px);
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: #000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.hex-product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.12); }

/* Card Image */
.hex-card-image { width: 100%; aspect-ratio: 1/1; overflow: hidden; background: #f5f5f5; }
.hex-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.hex-product-card:hover .hex-card-image img { transform: scale(1.05); }

.hex-card-content { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.hex-card-title { font-size: 17px; font-weight: 600; line-height: 1.35; margin: 0 0 12px; color: #000; }

.hex-card-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.hex-card-vehicle, .hex-card-year { display: inline-block; padding: 4px 10px; background: #f0f0f0; border-radius: 4px; font-size: 12px; font-weight: 500; color: #555; }
.hex-card-year { background: #e8f4fd; color: #0066cc; }

.hex-card-row { margin-bottom: 10px; font-size: 14px; line-height: 1.5; }
.hex-card-label { display: block; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: #888; margin-bottom: 3px; }
.hex-card-value { display: block; color: #555; }

.hex-card-notes { margin-top: auto; padding: 12px 15px; background: #fff8e6; border-left: 4px solid #f5a623; border-radius: 0 8px 8px 0; display: flex; align-items: flex-start; gap: 10px; margin-top: 15px; }
.hex-card-notes-icon { color: #f5a623; font-size: 16px; flex-shrink: 0; }
.hex-card-notes-text { font-size: 13px; line-height: 1.4; color: #8a6d3b; }

/* Notes section with heading (like Additional Info) */
.hex-card-notes-section { margin-top: 15px; padding: 12px 15px; background: #fff8e6; border-radius: 8px; }
.hex-card-notes-section .hex-card-label { color: #8a6d3b; }
.hex-card-notes-section .hex-card-value { color: #8a6d3b; word-break: break-word; }
.hex-card-notes-section a { color: #0066cc; text-decoration: underline; }
.hex-card-notes-section a:hover { color: #004499; }

.hex-card-footer { padding: 15px 20px; background: #f8f8f8; border-top: 1px solid #eee; text-align: center; }
.hex-card-link { display: block; font-size: 14px; font-weight: 600; color: #c41e3a; text-transform: uppercase; letter-spacing: 0.5px; text-decoration: none; }
.hex-card-link:hover { color: #a01830; }

/* Loading */
.hex-loading { text-align: center; padding: 40px; }
.hex-loading::after { content: ''; display: inline-block; width: 30px; height: 30px; border: 3px solid #eee; border-top-color: #cc0000; border-radius: 50%; animation: hex-spin 0.8s linear infinite; }
@keyframes hex-spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 1024px) {
    .hex-product-card { width: calc(50% - 10px); }
}

@media (max-width: 768px) {
    .hex-filter-bar { flex-direction: column; align-items: stretch; gap: 12px; padding: 20px; }
    .hex-filter-label { text-align: center; margin-bottom: 5px; margin-right: 0; }
    .hex-select { width: 100%; }
    .hex-btn { width: 100%; }
    .hex-results { padding: 20px 0; }
    .hex-product-card { width: 100%; }
    .hex-card-content { padding: 16px; }
    .hex-card-title { font-size: 16px; }
}
