/* Product Page Specific Styles */

/* 1. Header (Shared Base) */
.product-header {
    background: url("../images/主营业务.png") center center no-repeat;
    background-size: cover;
    height: 50vh;
    min-height: 350px;
    display: flex;
    align-items: center;
    position: relative;
    border-radius: 0 0 30px 30px;
}

.product-header::before {
    content: "";
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
    z-index: 1; border-radius: 0 0 30px 30px;
}

/* 2. Filter System */
.category-switcher {
    display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap;
}
.cat-btn {
    background: rgba(255, 255, 255, 0.5); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6); padding: 1rem 2rem;
    border-radius: 50px; font-size: 1.1rem; font-weight: 600; color: var(--text-main);
    cursor: pointer; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex; align-items: center; gap: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}
.cat-btn .cat-icon svg { width: 20px; height: 20px; }
.cat-btn:hover { background: white; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(51, 128, 200, 0.15); }
.cat-btn.active { background: var(--primary-color); color: white; border-color: var(--primary-color); box-shadow: 0 10px 20px rgba(51, 128, 200, 0.3); }

/* Sub Category Tags */
.sub-category-bar {
    display: flex; justify-content: flex-start; gap: 10px; margin-bottom: 3rem; flex-wrap: wrap; min-height: 40px;
}
.sub-tag {
    background: transparent; border: 1px solid rgba(51, 128, 200, 0.2);
    padding: 6px 16px; border-radius: 20px; color: var(--text-sub);
    font-size: 0.95rem; cursor: pointer; transition: all 0.3s ease;
}
.sub-tag:hover { border-color: var(--primary-color); color: var(--primary-color); }
.sub-tag.active { background: rgba(51, 128, 200, 0.1); border-color: var(--primary-color); color: var(--primary-color); font-weight: 600; }

/* 3. Product Grid */
.product-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem;
}
.product-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.35s ease;
    cursor: pointer;
    opacity: 0; animation: fadeInUp 0.5s forwards;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}
.product-card:hover {
    transform: translateY(-6px);
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 18px 36px rgba(16, 185, 129, 0.12);
}
.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-card-image {
    width: 100%;
    height: 180px;
    background: #f0f4f8;
    overflow: hidden;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.product-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.product-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.product-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.85rem;
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    font-size: 0.75rem;
    font-weight: 700;
}
.product-info {
    padding: 0;
}
.product-tag {
    font-size: 0.75rem;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
}
.product-title {
    font-size: 1.15rem;
    color: var(--text-main);
    margin: 0;
    font-weight: 700;
    line-height: 1.3;
}
.product-desc {
    font-size: 0.9rem;
    color: var(--text-sub);
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.product-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: #475569;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
}
.product-footer span {
    background: rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
}

.materials-section,
.why-section {
    padding: 4rem 0;
    background: #f8fafc;
}
.materials-section .section-header,
.why-section .section-header {
    max-width: 720px; margin: 0 auto 2rem auto; text-align: center;
}
.section-label {
    display: inline-block; color: var(--primary-color); font-size: 0.8rem; font-weight: 700;
    letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 0.75rem;
}
.section-title {
    font-size: 2.4rem; color: var(--text-main); margin-bottom: 0.85rem;
}
.section-desc {
    max-width: 680px; margin: 0 auto; color: var(--text-sub); line-height: 1.8;
}
.materials-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem;
}
.material-card {
    background: white; border: 1px solid rgba(226, 232, 240, 0.9); border-radius: 24px;
    padding: 1.5rem; transition: all 0.35s ease; display: flex; flex-direction: column; gap: 1rem;
}
.material-card:hover {
    border-color: rgba(16, 185, 129, 0.25); box-shadow: 0 18px 36px rgba(16, 185, 129, 0.12);
}
.material-badge {
    width: 48px; height: 48px; border-radius: 18px; display: grid; place-items: center;
    background: #f1fdf8; color: #059669; font-weight: 800; letter-spacing: 0.04em;
}
.material-card h4 {
    margin: 0; font-size: 1.15rem; color: var(--text-main);
}
.material-subtitle {
    color: var(--primary-color); font-size: 0.82rem; font-weight: 700; margin-top: 0.4rem;
}
.material-card p {
    margin: 0; color: var(--text-sub); line-height: 1.75;
}
.material-meta {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    font-size: 0.85rem; color: #6b7280; margin-top: auto;
}
.status-dots {
    display: flex; gap: 0.35rem;
}
.status-dots span {
    width: 9px; height: 9px; border-radius: 999px; background: #d1fae5;
}
.status-good span { background: #a7f3d0; }
.status-best span { background: #34d399; }
.status-premium span { background: #10b981; }

.why-grid {
    display: grid; grid-template-columns: 1fr; gap: 1.5rem;
}
@media (min-width: 1024px) {
    .why-grid { grid-template-columns: 1.1fr 1.4fr; }
}
.why-card {
    background: white; border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px; padding: 2rem; box-shadow: 0 12px 30px rgba(15, 23, 42, 0.03);
}
.chart-card h4,
.table-card h4 {
    margin: 0 0 1rem 0; font-size: 1.25rem; color: var(--text-main);
}
.chart-container {
    width: 100%; min-height: 320px;
}
.compare-table {
    width: 100%; border-collapse: collapse; font-size: 0.95rem; color: #475569;
}
.compare-table thead th {
    text-align: left; padding: 1rem 1rem; background: #eff6ff;
    color: #0f172a; font-weight: 700; border-bottom: 1px solid #e2e8f0;
}
.compare-table tbody tr {
    transition: background 0.25s ease;
}
.compare-table tbody tr:hover { background: #f8fafc; }
.compare-table td {
    padding: 1rem 1rem; border-bottom: 1px solid #e2e8f0;
}
.compare-table .highlight {
    color: #047857; font-weight: 700;
}

@media (max-width: 768px) {
    .materials-section, .why-section { padding: 3rem 0; }
    .section-title { font-size: 2rem; }
    .product-image-box { height: 100px; }
}

@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.no-result { grid-column: 1 / -1; text-align: center; padding: 4rem; color: var(--text-light); font-size: 1.2rem; }

/* =========================================
   4. Product Modal (Popup) Styles
   ========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px);
    z-index: 2000; opacity: 0; visibility: hidden;
    display: flex; justify-content: center; align-items: center;
    transition: all 0.3s ease; padding: 20px;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-container {
    background: rgba(255, 255, 255, 0.98);
    width: 900px; max-width: 100%; max-height: 90vh;
    border-radius: 20px; overflow-y: auto;
    position: relative;
    transform: scale(0.95); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.modal-overlay.active .modal-container { transform: scale(1); }

.modal-close-btn {
    position: absolute; top: 15px; right: 15px; z-index: 10;
    background: rgba(0,0,0,0.1); border: none; width: 32px; height: 32px;
    border-radius: 50%; cursor: pointer; font-size: 1.2rem; line-height: 1;
    transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.modal-close-btn:hover { background: var(--primary-color); color: white; }

.modal-body { display: grid; grid-template-columns: 1fr 1fr; }

/* Modal Left: Image */
.modal-image-col { background: #f8fafc; padding: 2rem; display: flex; align-items: center; justify-content: center; }
.modal-img-wrapper { width: 100%; height: 100%; max-height: 400px; display: flex; align-items: center; justify-content: center; }
.modal-img-wrapper img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }

/* Modal Right: Info */
.modal-info-col { padding: 3rem 2.5rem; display: flex; flex-direction: column; }
.product-tag-large { color: var(--primary-color); font-weight: 700; text-transform: uppercase; font-size: 0.9rem; margin-bottom: 0.5rem; display: block; }
.modal-title { font-size: 2rem; margin: 0 0 1rem 0; line-height: 1.2; color: var(--text-main); }
.modal-desc { color: var(--text-sub); line-height: 1.7; margin-bottom: 2rem; border-bottom: 1px solid rgba(0,0,0,0.05); padding-bottom: 1.5rem; }

/* Specs Grid */
.modal-specs-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2.5rem;
}
.spec-item { display: flex; align-items: flex-start; gap: 12px; }
.spec-icon {
    width: 40px; height: 40px; background: rgba(51, 128, 200, 0.1);
    border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.spec-icon svg { width: 20px; height: 20px; color: var(--primary-color); }
.spec-info { display: flex; flex-direction: column; }
.spec-label { font-size: 0.85rem; color: var(--text-light); margin-bottom: 2px; }
.spec-value { font-weight: 600; color: var(--text-main); font-size: 0.95rem; }

.modal-actions { margin-top: auto; }
.modal-btn { display: inline-block; padding: 12px 30px; font-size: 1.05rem; }

/* Mobile Modal */
@media (max-width: 768px) {
    .product-header { height: 35vh; }
    .page-title { font-size: 2.2rem; }
    .category-switcher { gap: 10px; }
    .cat-btn { padding: 0.8rem 1.2rem; font-size: 0.95rem; }
    
    .modal-body { grid-template-columns: 1fr; }
    .modal-image-col { padding: 1.5rem; height: 250px; }
    .modal-info-col { padding: 1.5rem; }
    .modal-title { font-size: 1.6rem; }
    .modal-specs-grid { grid-template-columns: 1fr; gap: 1rem; }
}