/* =============================================================================
   Truck Filter Form
   ============================================================================= */

.truck-filter-wrap {
    width: 100%;
    margin-bottom: 30px;
    background-color: #fff;
    border: 1px solid #e07a8a;
    border-radius: 0px;
    padding: 32px 36px;
}

.truck-filter-heading {
    text-align: center;
    font-weight: 700;
    margin: 0 0 24px;
}

.truck-results-count {
    text-align: center;
    margin: 16px 0 0;
    font-size: 15px;
    color: #555;
}

.category-filters .button-group {
    display: grid;
    grid-template-columns: repeat( 4, 1fr );
    gap: 10px;
}

.category-filters .form-select {
    min-width: 0;
}

.category-filters .form-select select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 0px;
    background-color: #fff;
    font-size: 14px;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.category-filters .form-select select:focus {
    outline: none;
    border-color: #0073aa;
}

.category-filters .form-submit {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
}

.category-filters .form-submit input[type="submit"] {
    padding: 11px 40px;
    background-color: #1b3a5c;
    color: #fff;
    border: none;
    border-radius: 0px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.category-filters .form-submit input[type="submit"]:hover {
    background-color: #254d7a;
}

.truck-filter-reset {
    font-size: 13px;
    color: #666;
    text-decoration: underline;
    cursor: pointer;
}

.truck-filter-reset:hover {
    color: #333;
}

/* =============================================================================
   Loading state – overlay on the Divi loop container
   ============================================================================= */

#truck-loop-wrapper {
    position: relative;
    transition: opacity 0.2s ease;
}


#truck-loop-wrapper.truck-filter-loading {
    opacity: 0.4;
    pointer-events: none;
}

#truck-loop-wrapper.truck-filter-loading::after {
    content: '';
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    border: 3px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: truck-filter-spin 0.7s linear infinite;
    z-index: 10;
}

@keyframes truck-filter-spin {
    to { transform: translateX(-50%) rotate(360deg); }
}

/* =============================================================================
   Responsive
   ============================================================================= */

@media ( max-width: 900px ) {
    .category-filters .button-group {
        grid-template-columns: repeat( 2, 1fr );
    }
}

@media ( max-width: 480px ) {
    .category-filters .button-group {
        grid-template-columns: 1fr;
    }

    .category-filters .form-submit input[type="submit"] {
        width: 100%;
    }
}
