/* Acerbis Product Filters v3 */

.apf-wrapper {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 18px 20px;
    margin-bottom: 24px;
    font-family: inherit;
    font-size: 14px;
}

/* Active bar */
.apf-active-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 7px 12px;
    margin-bottom: 14px;
    font-size: 13px;
}
.apf-active-label { font-weight: 700; color: #856404; }
.apf-reset-all { color: #dc3545; font-weight: 600; font-size: 12px; text-decoration: none; }
.apf-reset-all:hover { text-decoration: underline; }

/* Grid */
.apf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

/* Group */
.apf-group { display: flex; flex-direction: column; gap: 5px; }
.apf-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #555;
}

/* Inputs */
.apf-select,
.apf-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    color: #333;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: auto;
    appearance: auto;
}
.apf-select:focus,
.apf-input:focus {
    border-color: #86b7fe;
    outline: none;
    box-shadow: 0 0 0 3px rgba(13,110,253,.15);
}
.apf-select.is-active,
.apf-input.is-active {
    border-color: #0d6efd;
    background: #f0f5ff;
    font-weight: 600;
}

/* Actions */
.apf-actions { display: flex; gap: 8px; align-items: center; }

/* Buttons */
.apf-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background .15s;
    line-height: 1.5;
}
.apf-btn-apply { background: #0d6efd; color: #fff; border-color: #0d6efd; }
.apf-btn-apply:hover { background: #0b5ed7; border-color: #0a58ca; color: #fff; }
.apf-btn-reset { background: #fff; color: #666; border-color: #ced4da; }
.apf-btn-reset:hover { background: #f0f0f0; color: #333; }

/* Responsive */
@media (max-width: 640px) {
    .apf-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
    .apf-grid { grid-template-columns: 1fr; }
    .apf-actions { flex-direction: column; }
    .apf-btn { text-align: center; }
}

/* === BMY Cascade (Brand / Model / An) === */
/* === BMY Cascade (Brand / Model / An) === */
.apf-bmy-wrapper {
    display: contents; /* se integreaza in grid-ul parinte fara wrapper extra */
}

/* Select disabled = nivel neactivat */
.apf-bmy-select:disabled {
    background: #f0f0f0;
    color: #aaa;
    cursor: not-allowed;
    border-color: #e0e0e0;
    opacity: 0.6;
}

/* Animatie subtila cand se deblocheaza */
.apf-bmy-select:not(:disabled) {
    transition: border-color .15s, box-shadow .15s, opacity .2s;
}

/* === Search Bar Separata === */
.apf-search-wrapper {
    margin-bottom: 16px;
    font-family: inherit;
    font-size: 14px;
}

.apf-search-form {}

.apf-search-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.apf-search-input-wrap {
    position: relative;
    flex: 1;
}

.apf-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
}

.apf-search-input {
    width: 100%;
    padding: 9px 36px 9px 36px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
}
.apf-search-input:focus {
    border-color: #86b7fe;
    outline: none;
    box-shadow: 0 0 0 3px rgba(13,110,253,.15);
}
.apf-search-input.is-active {
    border-color: #0d6efd;
    background: #f0f5ff;
}

.apf-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
    text-decoration: none;
    line-height: 1;
}
.apf-search-clear:hover { color: #dc3545; }

.apf-btn-search {
    background: #212529;
    color: #fff;
    border-color: #212529;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    white-space: nowrap;
}
.apf-btn-search:hover { background: #000; border-color: #000; color: #fff; }

.apf-search-active {
    margin-top: 8px;
    font-size: 13px;
    color: #555;
}
.apf-search-active strong { color: #212529; }
.apf-search-active a { color: #dc3545; text-decoration: none; margin-left: 4px; }
.apf-search-active a:hover { text-decoration: underline; }

@media (max-width: 480px) {
    .apf-search-row { flex-direction: column; }
    .apf-btn-search { justify-content: center; }
}
