/* === Tire Filter UI Styling === */
.tire-filter-wrapper {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

.tire-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tire-filter-field {
    flex: 1 1 auto;
    min-width: 180px;
}

.tire-filter-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.tire-filter-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    font-size: 16px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M7%2010l5%205%205-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

.tire-filter-field select:disabled {
    background-color: #e9e9e9;
    cursor: not-allowed;
}

/* === Buttons === */
#tire-filter-button,
#tire-reset-button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#tire-filter-button {
    background-color: #007bff;
    color: #fff;
}
#tire-filter-button:hover:not(:disabled) { background-color: #0056b3; }
#tire-filter-button:disabled { background-color: #cccccc; cursor: not-allowed; }

#tire-reset-button {
    background-color: #6c757d;
    color: #fff;
}
#tire-reset-button:hover { background-color: #5a6268; }

/* === Products Wrapper === */
.tire-products-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 15px;
    box-sizing: border-box;
}

.tire-products-results {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.tire-products-results .loading-message,
.tire-products-results .woocommerce-info {
    text-align: center;
    padding: 20px;
    font-size: 1.1em;
    color: #555;
}

/* === Product Grid Layout === */
/* 默认：每行 6 列 */
.tire-products-wrapper ul.products {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.tire-products-wrapper ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
}

/* === Responsive Columns === */
@media (max-width: 1199.98px) { /* 大屏缩小：4 列 */
    .tire-products-wrapper ul.products { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 991.98px) {  /* 平板：3 列 */
    .tire-products-wrapper ul.products { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 575.98px) {  /* 手机：2 列 */
    .tire-products-wrapper ul.products { grid-template-columns: repeat(2, 1fr); }

    /* 同时让筛选器在手机上纵向排列 */
    .tire-filter-form         { flex-direction: column; }
    .tire-filter-field        { width: 100%; min-width: unset; }
    #tire-filter-button,
    #tire-reset-button        { width: 100%; }
}

/* === Pagination Buttons === */
.tire-pagination {
    margin-top: 30px;
    text-align: center;
}
.tire-pagination .page-btn {
    display: inline-block;
    margin: 0 5px;
    padding: 8px 14px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}
.tire-pagination .page-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}
