/* Product Center Styles */
.product-center-main {
    padding: 2rem 0;
    background-color: #f8f9fa;
    min-height: 80vh;
    margin-top: 40px;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Breadcrumb */
.breadcrumb {
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid #e1e5e9;
    margin-top: 100px;
}

.breadcrumb ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb li {
    color: #6c757d;
}

.breadcrumb li:not(:last-child)::after {
    content: '>';
    margin-left: 0.5rem;
    color: #dee2e6;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #0056b3;
}

/* Search and Filter Header */
.search-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 100px;
    z-index: 100;
}

.search-section {
    flex: 1;
    max-width: 500px;
}

.search-form {
    width: 100%;
}

.search-input-group {
    display: flex;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px 0 0 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #007bff;
}

.search-btn {
    padding: 12px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background: #0056b3;
}

.filter-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.results-count {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

.clear-filters {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 14px;
}

.clear-filters:hover {
    background: #5a6268;
}

/* Product Center Content */
.product-center-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* Filters Sidebar */
.filters-sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 200px;
    padding: 1.5rem;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e1e5e9;
}

.filters-header h3 {
    margin: 0;
    color: #212529;
    font-size: 18px;
    font-weight: 600;
}

.close-filters {
    display: none;
    background: none;
    border: none;
    font-size: 18px;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close-filters:hover {
    background: #f8f9fa;
    color: #495057;
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group h4 {
    margin: 0 0 1rem 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.filter-option:hover {
    background-color: #f8f9fa;
}

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #007bff;
}

.filter-option span {
    color: #495057;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-option i {
    color: #007bff;
    width: 16px;
}

/* Price Range */
.price-range {
    /*display: flex;*/
    gap: 1rem;
}

.price-input {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.price-input label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.price-input input {
    padding: 8px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.price-input input:focus {
    border-color: #007bff;
}

/* Filter Actions */
.filter-actions {
    margin-top: 2rem;
}

.apply-filters-btn {
    width: 100%;
    padding: 12px 24px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apply-filters-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* Mobile Filter Toggle */
.mobile-filter-toggle {
    display: none;
    margin-bottom: 1rem;
}

.filter-toggle-btn {
    width: 100%;
    padding: 12px 24px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.filter-toggle-btn:hover {
    background: #0056b3;
}

/* Products Main */
.products-main {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Sorting Options */
.sorting-options {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e1e5e9;
}

.sorting-options label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.sorting-options select {
    padding: 8px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
    background: white;
}

.sorting-options select:focus {
    border-color: #007bff;
}

/* Products Grid with Center Alignment */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 1rem 0;
}

.products-grid.center {
    justify-items: center;
    text-align: center;
}

/* Product Card with Center Alignment */
.product-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e1e5e9;
    width: 100%;
    max-width: 380px;
}

.product-card.center {
    text-align: center;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

/* Product Image */
.product-image {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

/* Product Overlay */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.quick-view-btn,
.inquiry-btn {
    padding: 12px;
    background: white;
    color: #212529;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-view-btn:hover,
.inquiry-btn:hover {
    background: #007bff;
    color: white;
    transform: scale(1.1);
}

/* Product Badges */
.product-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-new {
    background: #28a745;
    color: white;
}

.badge-sale {
    background: #dc3545;
    color: white;
}

/* Product Info with Center Alignment */
.product-info {
    padding: 1.5rem;
}

.product-info.center {
    text-align: center;
}

/* 产品名称标题样式 */
.product-name {
    margin-bottom: 10px;
    line-height: 1.3;
}

.product-name a {
    text-decoration: none;
    color: #007bff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 限制为2行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    word-break: break-word;
    height: 44px; /* 固定高度，2行文字 */
}

/* 悬停时显示完整标题 */
.product-name a:hover {
    text-decoration: none;
    color: #0056b3;
}

/* Product Meta with Center Alignment */
.product-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.product-meta.center {
    align-items: center;
}

.product-category,
.product-subcategory {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

.product-category i {
    color: #007bff;
    font-size: 14px;
}

/* Product Rating with Center Alignment */
.product-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.product-rating.center {
    text-align: center;
}

.stars {
    display: flex;
    gap: 2px;
    justify-content: center;
}

.stars i {
    color: #dee2e6;
    font-size: 16px;
    transition: color 0.3s ease;
}

.stars i.filled {
    color: #ffc107;
}

.rating-text {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

/* Product Price with Center Alignment */
.product-price {
    margin-bottom: 1.5rem;
}

.product-price.center {
    text-align: center;
}

.price {
    font-size: 26px;
    font-weight: 800;
    color: #28a745;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Product Actions with Center Alignment */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-actions.center {
    align-items: center;
}

.product-actions.center .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
}

/* Button Styles */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover:before {
    left: 100%;
}

.btn:active {
    transform: translateY(2px);
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

/* Outline Button */
.btn-outline {
    background: transparent;
    color: #007bff;
    border: 2px solid #007bff;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-outline:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #007bff;
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-outline:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.btn-outline:hover:before {
    width: 100%;
}

/* No Products Message with Center Alignment */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.no-products.center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.no-products i {
    font-size: 64px;
    margin-bottom: 2rem;
    color: #dee2e6;
}

.no-products h3 {
    margin: 0 0 1rem 0;
    color: #495057;
    font-size: 24px;
    font-weight: 600;
}

.no-products p {
    margin: 0 0 2rem 0;
    font-size: 16px;
    color: #6c757d;
    max-width: 400px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e1e5e9;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.page-link.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

 Modal Styles 
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

/* Inquiry Form */
.inquiry-form h2 {
    margin: 0 0 2rem 0;
    color: #212529;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #495057;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #007bff;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-center-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .filters-sidebar.active {
        left: 0;
    }
    
    .close-filters {
        display: block;
    }
    
    .mobile-filter-toggle {
        display: block;
    }
    
    .search-filter-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .filter-summary {
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-card {
        max-width: 100%;
    }
    
    .product-actions.center .btn {
        max-width: 100%;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 13px;
        min-height: 44px;
    }
    
    .sorting-options {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .product-info {
        padding: 1rem;
    }
    
    .product-name {
        font-size: 16px;
        min-height: 40px;
    }
    
    .price {
        font-size: 22px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 12px;
        min-height: 40px;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
        width: 95%;
    }
    
    .price-range {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Focus States for Accessibility */
.btn:focus,
.form-group input:focus,
.form-group textarea:focus,
.sorting-options select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.btn-outline:focus {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25), 0 0 0 1px #007bff;
}

/* Hover Effects */
.btn:hover {
    transform: translateY(-3px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Special Effects for Center Alignment */
.product-actions.center .btn {
    position: relative;
    overflow: hidden;
}

.product-actions.center .btn:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.product-actions.center .btn:hover:after {
    width: 300px;
    height: 300px;
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading:after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Filter Animation */
.filters-sidebar {
    animation: slideInLeft 0.3s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Product Card Hover Effects */
.product-card {
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,123,255,0.1), rgba(0,86,179,0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 16px;
}

.product-card:hover::before {
    opacity: 1;
}

/* Enhanced Button Interactions */
.btn {
    position: relative;
    z-index: 1;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}