/* Products Page Specific Styles */

.products-page {
    padding-top: 120px;
    min-height: 100vh;
}

/* Product Display Section */
.product-display {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
    background: #f5f5f5;
}

.product-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* Filters Sidebar */
.filters-sidebar {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.filters-sidebar h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
    font-weight: 600;
}

.filter-group {
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.toggle-btn {
    font-size: 0.8rem;
    color: #666;
    transition: transform 0.3s ease;
}

.filter-group.active .toggle-btn {
    transform: rotate(180deg);
}

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

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.option-text {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.count {
    color: #999;
    font-size: 0.8rem;
}

/* Products Main */
.products-main {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.search-btn {
    padding: 0.8rem;
    background: var(--color-primary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-btn img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.sort-select {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
    background: #fff;
    cursor: pointer;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
    width: 100%;
}

/* Product Item */
.product-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    height: 100%;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    width: 100%;
    height: 280px;
    background-color: #f5f5f5;
    overflow: hidden;
}

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

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #333;
    line-height: 1.3;
}

.product-description {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: #e74c3c;
    margin: 0 0 12px 0;
}

.view-details-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.view-details-btn:hover {
    background-color: #2980b9;
}

/* Color Options */
.color-options {
    display: flex;
    gap: 0.3rem;
    margin-top: 1rem;
}

.color-option {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #ddd;
}

/* States */
.loading-state,
.error-state,
.empty-state {
    text-align: center;
    padding: 3rem 0;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: #fff;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:not(:disabled):hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 8px;
}

.page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: #fff;
    color: #6c757d;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-number:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

.page-number.active {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
}

.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    color: #6c757d;
    font-size: 14px;
}

/* Mobile Filter Toggle */
.mobile-filter-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 100;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-filter-toggle svg {
    width: 24px;
    height: 24px;
}

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

@media (max-width: 992px) {
    .product-layout {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        z-index: 1000;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .filters-sidebar.active {
        display: block;
        transform: translateX(0);
    }

    .filter-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .filter-overlay.active {
        display: block;
    }

    .mobile-filter-toggle {
        display: flex;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .products-page {
        padding-top: 80px;
    }

    .product-display {
        padding: 1rem 0;
    }

    .products-main {
        padding: 1rem;
    }

    .products-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .sort-select {
        width: 100%;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .product-item {
        height: auto;
    }

    .product-image {
        height: 200px;
    }

    .product-info {
        display: none;
    }

    .product-item:hover {
        transform: none;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .product-item:hover .product-image img {
        transform: none;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .products-page {
        padding-top: 60px;
    }

    .product-display {
        padding: 0.5rem 0;
    }

    .products-main {
        padding: 0.8rem;
        border-radius: 0;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .product-image {
        height: 180px;
    }

    .product-info {
        display: none;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

/* Product Comparison */
.product-comparison {
    background: var(--color-background);
    padding: 4rem 0;
}

.product-comparison h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.2rem;
    color: var(--color-text);
}

.comparison-table {
    overflow-x: auto;
    margin: 0 -1rem;
    padding: 0 1rem;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.comparison-table th {
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
}

.comparison-table tr:nth-child(even) {
    background: var(--color-background);
}

.comparison-table tr:hover {
    background: rgba(var(--color-primary-rgb), 0.05);
}

@media (max-width: 768px) {
    .product-comparison {
        padding: 2rem 0;
    }

    .product-comparison h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.8rem;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .product-comparison {
        padding: 1.5rem 0;
    }

    .product-comparison h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.6rem;
        font-size: 13px;
    }
}

/* Product Consultation */
.product-consultation {
    padding: 4rem 0;
    background: #fff;
}

.consultation-content {
    text-align: center;
}

.consultation-content h2 {
    font-size: 2.2rem;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.consultation-content p {
    color: var(--color-text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.consultation-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.option {
    padding: 2rem;
    background: var(--color-background);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.option:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.option img {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.option h3 {
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.option p {
    color: var(--color-text-light);
    margin: 0;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .product-consultation {
        padding: 2rem 0;
    }

    .consultation-content h2 {
        font-size: 1.8rem;
    }

    .consultation-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .consultation-options {
        gap: 1rem;
    }

    .option {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .product-consultation {
        padding: 1.5rem 0;
    }

    .consultation-content h2 {
        font-size: 1.5rem;
    }

    .consultation-content p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .consultation-options {
        grid-template-columns: 1fr;
    }

    .option {
        padding: 1.2rem;
    }

    .option img {
        width: 40px;
        height: 40px;
    }

    .option h3 {
        font-size: 1.1rem;
    }

    .option p {
        font-size: 0.9rem;
    }
}

.products-main .product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.products-main .product-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.products-main .product-image {
    position: relative;
    width: 100%;
    height: 280px;
    background-color: #f5f5f5;
    overflow: hidden;
}

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

.products-main .product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.products-main .product-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.products-main .product-description {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin-bottom: 16px;
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .products-main .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .products-main .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .products-main .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .products-main .product-image {
        height: 200px;
    }

    .products-main .product-info {
        padding: 16px;
    }

    .products-main .product-name {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .products-main .product-description {
        font-size: 14px;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .products-main .product-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .products-main .product-image {
        height: 180px;
    }
}

/* Consultation Modal */
.consultation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.consultation-modal.active {
    opacity: 1;
    visibility: visible;
}

.consultation-modal .modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.consultation-modal.active .modal-content {
    transform: translateY(0);
}

.consultation-modal .close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    line-height: 1;
}

.consultation-modal h2 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.5rem;
}

.consultation-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.consultation-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.consultation-form label {
    color: #666;
    font-size: 0.9rem;
}

.consultation-form input,
.consultation-form textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

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

.consultation-form .submit-btn {
    background-color: #2c3e50;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.consultation-form .submit-btn:hover {
    background-color: #2c3e50;
}

@media (max-width: 768px) {
    .consultation-modal .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
} 

/* products.css 里添加或覆盖 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 0 56px 0;
    background: #f7f9f8;
    border-radius: 12px;
    min-height: 220px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    margin: 32px 0;
}

.empty-state img {
    width: 56px;
    height: 56px;
    margin-bottom: 18px;
    opacity: 0.7;
}

.empty-state p {
    color: #6b7680;
    font-size: 1.15rem;
    margin-bottom: 22px;
    letter-spacing: 0.01em;
}

.empty-state .clear-filters-btn {
    padding: 8px 28px;
    background: #1a7f6b;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(26,127,107,0.08);
    transition: background 0.2s;
}
.empty-state .clear-filters-btn:hover {
    background: #166a59;
}