/* JC Fitment Pro - Frontend UI */
.vf-list[hidden] { display: none !important; }

/* --- Buscador Híbrido --- */
#vf.vf-wrap { display: grid; grid-template-columns: repeat(6, minmax(140px, 1fr)); gap: 10px; align-items: end; max-width: 1100px; margin: 0 auto; }
.vf-combo { position: relative; }
.vf-input { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; background: #fff; box-sizing: border-box; font: 14px/1.3 system-ui; }
.vf-combo[data-disabled="1"] .vf-input { background: #f5f5f5; color: #999; cursor: not-allowed; }
.vf-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow-y: auto; overflow-x: hidden; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.08); z-index: 9999; }
.vf-item { padding: 8px 12px; cursor: pointer; font: 14px/1.3 system-ui; }
.vf-item[aria-selected="true"], .vf-item:hover { background: #f3f4f6; }
.vf-empty { padding: 8px 12px; color: #6b7280; font: 14px italic system-ui; }
.vf-badge { opacity: .7; font-size: 12px; margin-left: 6px; }

#vf .vf-actions { grid-column: 1/-1; display: flex; justify-content: center; margin-top: 10px; }
#vf #vf-search { padding: 10px 24px; border-radius: 8px; border: 1px solid #ddd; background: #f7f7f7; cursor: pointer; font-weight: 600; min-width: 150px; }
#vf #vf-search:not(:disabled) { background: #007cba; color: #fff; border-color: #007cba; }

/* Native Select (Mobile Mode) */
.vf-native-select { display: none; width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; background: #fff; font: 14px/1.3 system-ui; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8.825L1.175 4 2.238 2.938 6 6.7 9.763 2.938 10.825 4z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }

/* --- Tabla Fused Frontend --- */
.wc-fitment { width: 100%; border-collapse: collapse; border-spacing: 0; }
.wc-fitment thead th { background: #0f172a; color: #f8fafc; text-align: left; padding: 12px 14px; font-weight: 700; }
.wc-fitment tbody td { background: #fff; color: #111827; padding: 12px 14px; border-bottom: 1px solid #e5e7eb; }
.wc-fitment tbody tr:nth-child(even) td { background: #f8fafc; }

/* --- Responsive --- */
@media (max-width: 980px) {
    #vf.vf-wrap { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    #vf .vf-input, #vf .vf-list { display: none !important; }
    #vf .vf-native-select { display: block; }
    .vf-combo[data-disabled="1"] .vf-native-select { background-color: #f5f5f5; color: #888; opacity: 1; border-color: #e5e5e5; }
}
@media (max-width: 780px) {
    .wc-fitment thead { display: none; }
    .wc-fitment, .wc-fitment tbody, .wc-fitment tr, .wc-fitment td { display: block; width: 100%; }
    .wc-fitment tbody tr { margin: 12px 0; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #f5f7fb; box-shadow: 0 2px 10px rgba(2,6,23,.06); }
    .wc-fitment td { border: 0; border-bottom: 1px solid #eef2f7; padding: 10px 14px 12px; background: transparent; }
    .wc-fitment td:last-child { border-bottom: 0; }
    .wc-fitment td::before { content: attr(data-label); display: block; font-weight: 700; color: #6b7280; margin-bottom: 6px; }
}
@media (max-width: 480px) {
    #vf.vf-wrap { grid-template-columns: 1fr; }
    #vf .vf-actions { grid-column: auto; }
}