/* ============================================================
   FAQ PAGE 样式
   ============================================================ */

.faq-page {
    flex: 1;
    padding: 32px 24px 60px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ---- 面包屑 ---- */
.faq-page .breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--slate-500);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--slate-200);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.faq-page .breadcrumb a {
    color: var(--slate-500);
    transition: color 0.2s ease;
}
.faq-page .breadcrumb a:hover {
    color: var(--blue-500);
}
.faq-page .breadcrumb .sep {
    color: var(--slate-300);
    font-size: 10px;
}
.faq-page .breadcrumb .current {
    color: var(--slate-900);
    font-weight: 600;
}

/* ---- 头部 ---- */
.faq-header {
    text-align: center;
    padding: 16px 0 32px 0;
    border-bottom: 1px solid var(--slate-200);
    margin-bottom: 32px;
}
.faq-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--slate-900);
    letter-spacing: -0.02em;
    margin: 0 0 8px 0;
}
.faq-header p {
    font-size: 16px;
    color: var(--slate-500);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ---- 搜索区域 ---- */
.faq-search-area {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--slate-200);
    padding: 24px 28px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.faq-search-form {
    margin-bottom: 12px;
}
.faq-search-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--slate-50);
    border-radius: 8px;
    padding: 4px 16px;
    border: 1px solid var(--slate-200);
    transition: border-color 0.2s ease;
}
.faq-search-inner:focus-within {
    border-color: var(--blue-500);
}
.faq-search-inner i {
    color: var(--slate-400);
    font-size: 15px;
}
.faq-search-inner input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 15px;
    color: var(--slate-900);
    outline: none;
    font-family: var(--font);
}
.faq-search-inner input::placeholder {
    color: var(--slate-400);
}
.faq-search-inner button {
    background: var(--blue-500);
    color: var(--white);
    border: none;
    padding: 8px 22px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: var(--font);
}
.faq-search-inner button:hover {
    background: var(--blue-600);
}

.faq-hot-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
}
.hot-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--red-500);
}
.hot-label i {
    margin-right: 4px;
}
.hot-tag {
    display: inline-block;
    font-size: 13px;
    color: var(--slate-500);
    background: var(--slate-100);
    padding: 4px 14px;
    border-radius: 100px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.hot-tag:hover {
    background: var(--white);
    border-color: var(--blue-500);
    color: var(--blue-500);
    transform: translateY(-1px);
}

/* ---- FAQ 列表 ---- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 单个 FAQ 项 */
.faq-item {
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--slate-200);
    overflow: hidden;
    transition: all 0.2s ease;
}
.faq-item:hover {
    border-color: var(--slate-300);
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}
.faq-question:hover {
    background: var(--slate-50);
}
.faq-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--blue-500);
    transition: transform 0.3s ease;
    font-size: 14px;
}
.faq-item.open .faq-icon {
    transform: rotate(90deg);
}
.faq-title {
    flex: 1;
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--slate-800);
    line-height: 1.4;
}
.faq-title:hover {
    color: var(--blue-500);
}

.faq-answer {
    display: none;
    padding: 0 22px 20px 22px;
    border-top: 1px solid var(--slate-100);
    animation: fadeSlide 0.3s ease;
}
.faq-item.open .faq-answer {
    display: block;
}

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

.faq-content {
    font-size: 15px;
    color: var(--slate-700);
    line-height: 1.7;
    padding-top: 16px;
}
.faq-content p:last-child {
    margin-bottom: 0;
}

/* ---- 关联产品 ---- */
.faq-products {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--slate-300);
}
.products-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-500);
    margin: 0 0 12px 0;
}
.products-label i {
    color: var(--blue-500);
    margin-right: 6px;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}
.product-item {
    background: var(--slate-50);
    border-radius: 8px;
    border: 1px solid var(--slate-200);
    overflow: hidden;
    transition: all 0.2s ease;
}
.product-item:hover {
    border-color: var(--blue-500);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.product-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 8px 12px;
    text-decoration: none;
    color: inherit;
}
.product-img {
    width: 100%;
    aspect-ratio: 1/1;
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-img.placeholder {
    background: var(--slate-200);
    color: var(--slate-400);
    font-size: 28px;
}
.product-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--slate-700);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-link:hover .product-title {
    color: var(--blue-500);
}

/* ---- 无结果 ---- */
.faq-no-results {
    text-align: center;
    padding: 48px 0;
    color: var(--slate-500);
}
.faq-no-results i {
    font-size: 48px;
    opacity: 0.3;
    display: block;
    margin-bottom: 12px;
}
.faq-no-results p {
    font-size: 16px;
    margin: 4px 0;
}
.faq-no-results a {
    color: var(--blue-500);
    font-weight: 600;
}
.faq-no-results a:hover {
    color: var(--blue-600);
}

/* ---- 分页 ---- */
.faq-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--slate-200);
    flex-wrap: wrap;
}
.faq-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--slate-600);
    border-radius: 8px;
    border: 1px solid var(--slate-200);
    background: var(--white);
    transition: all 0.2s ease;
    margin: 0 2px;
}
.faq-pagination .page-numbers.current {
    background: var(--blue-500);
    color: var(--white);
    border-color: var(--blue-500);
}
.faq-pagination .page-numbers:hover {
    background: var(--slate-50);
    color: var(--blue-500);
    border-color: var(--blue-500);
}
.faq-pagination .page-numbers.prev,
.faq-pagination .page-numbers.next {
    font-size: 12px;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
    .faq-page {
        padding: 24px 20px 48px;
    }
}

@media (max-width: 820px) {
    .faq-page {
        padding: 20px 16px 40px;
    }
    .faq-header h1 {
        font-size: 28px;
    }
    .faq-header p {
        font-size: 15px;
    }
    .faq-search-area {
        padding: 18px 20px;
    }
    .faq-search-inner input {
        font-size: 14px;
        padding: 10px 0;
    }
    .faq-search-inner button {
        padding: 6px 16px;
        font-size: 13px;
    }
    .faq-title {
        font-size: 16px;
    }
    .faq-question {
        padding: 14px 18px;
    }
    .faq-answer {
        padding: 0 18px 16px 18px;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
}

@media (max-width: 480px) {
    .faq-page {
        padding: 12px 8px 24px;
    }
    .faq-header h1 {
        font-size: 22px;
    }
    .faq-header p {
        font-size: 14px;
    }
    .faq-search-area {
        padding: 14px 16px;
        margin-bottom: 24px;
    }
    .faq-search-inner {
        gap: 8px;
        padding: 2px 12px;
    }
    .faq-search-inner input {
        font-size: 13px;
        padding: 8px 0;
    }
    .faq-search-inner button {
        font-size: 12px;
        padding: 5px 12px;
    }
    .faq-hot-tags {
        gap: 6px 10px;
    }
    .hot-tag {
        font-size: 12px;
        padding: 3px 10px;
    }
    .faq-title {
        font-size: 15px;
    }
    .faq-question {
        padding: 12px 14px;
        gap: 10px;
    }
    .faq-answer {
        padding: 0 14px 14px 14px;
    }
    .faq-content {
        font-size: 14px;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .product-item {
        border-radius: 6px;
    }
    .product-title {
        font-size: 11px;
    }
    .faq-pagination .page-numbers {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        padding: 0 8px;
    }
}

@media (max-width: 360px) {
    .faq-header h1 {
        font-size: 20px;
    }
    .faq-search-inner {
        flex-wrap: wrap;
    }
    .faq-search-inner button {
        width: 100%;
        justify-content: center;
        padding: 8px;
    }
    .product-grid {
        grid-template-columns: 1fr 1fr;
    }
}