/* product-model/templates/css/products.css */

.product-listing-page,
.product-detail-page {
    padding: 20px 0;
    max-width: 1366px;
    margin: 0 auto;    
}

/* Header */
.pl-header,
.pd-header {
    text-align: center;
    margin-bottom: 40px;
}

.pl-header h1,
.pd-header h1 {
    font-size: 2.5em;
    margin: 0;
    color: #111;
}

.pl-header p,
.pd-header p {
    color: #666;
    margin-top: 10px;
}

/* Filters */
.pl-filters {
    display: grid;
    grid-template-columns: 24% 76%;
    gap:20px;
    border-radius: 8px;
    margin-bottom: 30px;
}
.pl-filters-widget{
    position: sticky;
    top:80px;
    background: #fff;
    padding: 10px 20px;
    border-radius: 10px;

}
.pl-filters form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.pl-filters select,
.pl-filters input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.pl-filters label {
    display: block;
    font-size: 0.9em;
    color: #555;
    margin-bottom: 4px;
}

.pl-filters button[type="submit"] {
    width: 100%;
    padding: 8px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.pl-filters button[type="submit"]:hover {
    background: #005a87;
}
.pl-filters-right{
    background-color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
}
.pl-filters-order form{
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.pl-filters-order form > div {
  display: flex;               /* label + input/select 横向排列 */
  align-items: center;
  gap: 6px;                    /* label 和 input/select 的间距 */
}

.pl-filters-order label {
  white-space: nowrap;       
}
/* Result Count */
.pl-result-count {
    margin-bottom: 20px;
    color: #666;
    text-align: center;
}

/* Product Grid */
.pl-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.pl-product-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.pl-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.pl-product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.pl-product-info {
    padding: 16px;
}

.pl-product-info h3 {
    margin: 0 0 8px;
    font-size: 1.2em!important;
    font-weight: 600;
}

.pl-product-info h3 a {
    color: #333;
    text-decoration: none;
}

.pl-product-info h3 a:hover {
    color: #0073aa;
}

.pl-product-info p {
    margin: 4px 0;
    color: #666;
    font-size: 0.95em;
}

.pl-product-info strong {
    color: #333;
}

.pl-product-info .published-date {
    color: #999;
    margin: 8px 0 0;
    font-size: 0.9em;
}

/* Pagination */
.pl-pagination{
    margin: 30px auto;
    text-align: center;
}
.pl-pagination ul {
    list-style: none;
    padding: 0;
    display: inline-block;
    margin: 0 auto;
}

.pl-pagination li {
    display: inline-block;
    margin: 0 4px;
}

.pl-pagination a,
.pl-pagination span {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 4px;
    min-width: 36px;
    text-align: center;
    text-decoration: none;
    color: #333;
}

.pl-pagination a {
    background: white;
    border: 1px solid #ddd;
}

.pl-pagination a:hover {
    background: #f0f0f0;
}

.pl-pagination .current {
    background: #0073aa;
    color: white;
    border: 1px solid #0073aa;
}

/* Responsive */
@media (max-width: 768px) {
    .pl-products {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }

    .pl-filters form {
        grid-template-columns: 1fr;
    }
}