/* =========================================
   PACKAGE FILTERS
========================================= */

.pkg-filters {
    width: 100%;
    margin: 0 0 36px;
    padding: 22px 22px 18px;
    background:
        linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    border: 1px solid rgba(20, 33, 61, 0.08);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(20, 33, 61, 0.05);
}

.pkg-filters-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.pkg-scope {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    background: #eef2f7;
    border-radius: 999px;
}

.pkg-scope-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 9px 16px;
    border-radius: 999px;
    color: #3d4c63;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.pkg-scope-btn:hover {
    color: #14213d;
    background: rgba(255, 255, 255, 0.7);
}

.pkg-scope-btn.is-active {
    background: #14213d;
    color: #fff;
}

.pkg-filter-count {
    margin: 0;
    color: #697386;
    font-size: 13px;
}

.pkg-filter-count strong {
    color: #14213d;
    font-size: 15px;
}

.pkg-filters-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(180px, 1fr) minmax(160px, 0.85fr) auto;
    gap: 12px;
    align-items: end;
}

.pkg-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.pkg-field > span {
    color: #5b6b7c;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pkg-field select,
.pkg-input-wrap {
    width: 100%;
    height: 46px;
    border: 1px solid #d7dee8;
    border-radius: 12px;
    background: #fff;
    color: #14213d;
    font-size: 14px;
    font-weight: 600;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pkg-field select {
    padding: 0 14px;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #697386 50%),
        linear-gradient(135deg, #697386 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 12px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    cursor: pointer;
}

.pkg-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
}

.pkg-input-wrap i {
    color: #8a97a8;
    font-size: 13px;
}

.pkg-input-wrap input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #14213d;
    font-size: 14px;
    font-weight: 600;
}

.pkg-input-wrap input::placeholder {
    color: #98a4b3;
    font-weight: 500;
}

.pkg-field select:focus,
.pkg-input-wrap:focus-within {
    border-color: #d4a017;
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.18);
}

.pkg-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 46px;
}

.pkg-apply-btn {
    height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 12px;
    background: #d4a017;
    color: #14213d;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.pkg-apply-btn:hover {
    background: #e0b12a;
    transform: translateY(-1px);
}

.pkg-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #d7dee8;
    color: #3d4c63;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    background: #fff;
}

.pkg-clear-btn:hover {
    border-color: #14213d;
    color: #14213d;
}

.pkg-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(20, 33, 61, 0.06);
}

.pkg-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #d7dee8;
    background: #fff;
    color: #3d4c63;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pkg-chip:hover {
    border-color: #d4a017;
    color: #14213d;
    transform: translateY(-1px);
}

.pkg-chip.is-active {
    background: #14213d;
    border-color: #14213d;
    color: #fff;
}

@media (max-width: 980px) {
    .pkg-filters-row {
        grid-template-columns: 1fr 1fr;
    }

    .pkg-field-grow {
        grid-column: 1 / -1;
    }

    .pkg-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .pkg-filters {
        padding: 16px;
        border-radius: 14px;
    }

    .pkg-filters-row {
        grid-template-columns: 1fr;
    }

    .pkg-scope {
        width: 100%;
    }

    .pkg-scope-btn {
        flex: 1;
    }

    .pkg-filter-actions {
        width: 100%;
    }

    .pkg-apply-btn,
    .pkg-clear-btn {
        flex: 1;
    }
}
