/* ============================================
   product.css — 产品页专用样式
   ============================================ */

/* ---------- Product Detail Grid ---------- */
.product-detail {
    padding: 50px 0;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 45px;
    margin-bottom: 50px;
}

/* ---------- Gallery ---------- */
.product-gallery .main-image {
    width: 100%;
    height: 380px;
    background: linear-gradient(135deg, #f5f8fc 0%, #e8eef5 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: #c0cdd9;
    margin-bottom: 15px;
    object-fit: cover;
    border: 1px solid #e8ecf1;
    transition: all 0.3s ease;
}

.product-gallery .thumb-row {
    display: flex;
    gap: 10px;
}

.product-gallery .thumb {
    width: 80px;
    height: 80px;
    background: #f5f8fc;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #c0cdd9;
    transition: all 0.2s ease;
}

.product-gallery .thumb:hover {
    border-color: #0077be;
    background: #eaf4fe;
}

.product-gallery .thumb.active {
    border-color: #0077be;
    background: #eaf4fe;
}

/* ---------- Product Info ---------- */
.product-info h1 {
    font-size: 28px;
    color: #0b1f3a;
    margin-bottom: 15px;
    line-height: 1.3;
}

.product-info .product-desc {
    font-size: 15px;
    color: #5a6879;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* ---------- Spec Table ---------- */
.product-specs {
    margin-bottom: 25px;
}

.product-specs h3 {
    font-size: 18px;
    color: #0b1f3a;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #0077be;
    display: inline-block;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 10px;
}

.spec-table th,
.spec-table td {
    padding: 10px 14px;
    border: 1px solid #e8ecf1;
    text-align: left;
}

.spec-table th {
    background: #f5f8fc;
    color: #0b1f3a;
    font-weight: 600;
    width: 40%;
}

.spec-table td {
    color: #444;
}

.spec-table tr:nth-child(even) th,
.spec-table tr:nth-child(even) td {
    background: #fafbfd;
}

/* ---------- CTA Buttons ---------- */
.product-info .btn {
    margin-bottom: 8px;
}

/* ---------- Product Features ---------- */
.product-features {
    margin: 50px 0;
}

.product-features h2 {
    font-size: 24px;
    color: #0b1f3a;
    margin-bottom: 25px;
    text-align: center;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.feature-item {
    text-align: center;
    padding: 25px 20px;
    border: 1px solid #e8ecf1;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #fff;
}

.feature-item:hover {
    border-color: #0077be;
    box-shadow: 0 6px 20px rgba(0,119,190,0.07);
    transform: translateY(-2px);
}

.feature-item .fi-icon {
    font-size: 32px;
    color: #0077be;
    margin-bottom: 12px;
}

.feature-item h4 {
    font-size: 16px;
    color: #0b1f3a;
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 13px;
    color: #5a6879;
    line-height: 1.5;
}

/* ---------- Download Buttons ---------- */
.product-downloads {
    margin: 40px 0;
    padding: 30px;
    background: #f5f8fc;
    border-radius: 10px;
}

.product-downloads h3 {
    font-size: 18px;
    color: #0b1f3a;
    margin-bottom: 18px;
}

.download-list {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #dce2e9;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.download-btn:hover {
    background: #0077be;
    color: #fff;
    border-color: #0077be;
}

/* ---------- Related Products ---------- */
.related-products {
    margin: 50px 0;
}

.related-products h2 {
    font-size: 24px;
    color: #0b1f3a;
    text-align: center;
    margin-bottom: 25px;
}

/* ---------- Product Description + Related Links ---------- */
.product-desc-section {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 45px;
    margin: 50px 0;
    align-items: start;
}

.pd-desc-col,
.pd-related-col {
    min-width: 0;
}

.pd-desc-col .pd-eyebrow,
.pd-related-col .pd-eyebrow {
    display: block;
    font-size: 13px;
    color: #e74c3c;
    text-transform: lowercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.pd-desc-col h2 {
    font-size: 24px;
    color: #0b1f3a;
    text-align: left;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0077be;
    display: inline-block;
}

.pd-desc-col .post-content {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
}

.pd-desc-col .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.pd-related-col {
    background: #f8fafc;
    border: 1px solid #e8ecf1;
    border-radius: 10px;
    padding: 25px;
}

.pd-related-col h3 {
    font-size: 18px;
    color: #0b1f3a;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0077be;
}

.pd-related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pd-related-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.pd-related-item:hover {
    border-color: #0077be;
    box-shadow: 0 4px 12px rgba(0,119,190,0.08);
}

.pd-related-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f4f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pd-related-placeholder {
    font-size: 24px;
    color: #a0aec0;
    line-height: 1;
}

.pd-related-title {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.pd-related-item:hover .pd-related-title {
    color: #0077be;
}

.pd-related-empty {
    font-size: 14px;
    color: #5a6879;
    padding: 10px 0;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    padding: 20px 0;
    font-size: 13px;
    color: #8897aa;
}

.breadcrumb a {
    color: #8897aa;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #0077be;
}

/* ---------- Quote Form in Product Page ---------- */
.product-detail .quote-form-wrapper {
    background: #f5f8fc;
    border-radius: 10px;
    padding: 30px;
    margin: 40px auto;
    max-width: 650px;
}

.product-detail .quote-form-wrapper h3 {
    text-align: center;
    font-size: 22px;
    color: #0b1f3a;
    margin-bottom: 8px;
}

.product-detail .quote-form .form-group {
    margin-bottom: 15px;
}

.product-detail .quote-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.product-detail .quote-form input,
.product-detail .quote-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dce2e9;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.product-detail .quote-form input:focus,
.product-detail .quote-form textarea:focus {
    outline: none;
    border-color: #0077be;
    box-shadow: 0 0 0 3px rgba(0,119,190,0.1);
}

.product-detail .quote-form textarea {
    resize: vertical;
    min-height: 100px;
}

.product-detail .quote-form .btn-submit {
    width: 100%;
    background: #0077be;
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.product-detail .quote-form .btn-submit:hover {
    background: #005a8e;
}

/* ============================================
   PRODUCT CATEGORY GRID (taxonomy-product_cat.php)
   图片 + 名称卡片，每行 3 个，不分页
   ============================================ */
.product-cat-section {
    padding: 70px 0;
    background: #fff;
}

.product-cat-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.product-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.product-cat-card {
    display: block;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    transition: all 0.35s ease;
}

.product-cat-card:hover {
    border-color: #0077be;
    box-shadow: 0 12px 35px rgba(0,119,190,0.12);
    transform: translateY(-5px);
}

.product-cat-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #f5f8fc 0%, #e8eef5 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-cat-img-wrap:empty::before {
    content: '';
    width: 48px;
    height: 48px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c0cdd9' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.55;
}

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

.product-cat-card:hover .product-cat-img {
    transform: scale(1.06);
}

.product-cat-body {
    padding: 18px 20px;
    text-align: center;
}

.product-cat-title {
    font-size: 16px;
    font-weight: 600;
    color: #0b1f3a;
    line-height: 1.45;
    margin: 0;
    transition: color 0.25s ease;
}

.product-cat-card:hover .product-cat-title {
    color: #0077be;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-gallery .main-image {
        height: 300px;
    }

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

    .product-desc-section {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .pd-related-col {
        position: static;
    }
}

@media (max-width: 768px) {
    .product-cat-section {
        padding: 50px 0;
    }

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

    .product-cat-title {
        font-size: 15px;
    }

    .product-info h1 {
        font-size: 24px;
    }

    .spec-table th {
        width: 45%;
        font-size: 13px;
    }

    .spec-table th,
    .spec-table td {
        padding: 8px 10px;
        font-size: 13px;
    }

    .download-list {
        flex-direction: column;
    }

    .download-btn {
        justify-content: center;
    }
}

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

    .product-cat-body {
        padding: 16px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .product-gallery .thumb {
        width: 60px;
        height: 60px;
        font-size: 18px;
    }
}

/* ============================================
   PRODUCT ARCHIVE (archive-product.php V2.2)
   ============================================ */
.product-archive-body {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 35px;
    padding: 40px 0;
}

/* Sidebar */
.product-sidebar {
    position: sticky;
    top: 90px;
    align-self: start;
}

.product-sidebar h3 {
    font-size: 16px;
    color: #0b1f3a;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0077be;
}

.product-cat-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
}

.product-cat-list li {
    margin-bottom: 4px;
}

.product-cat-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    color: #444;
    font-size: 14px;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.product-cat-list a:hover,
.product-cat-list li.active a {
    background: #eaf4fe;
    color: #0077be;
    padding-left: 18px;
}

.product-cat-list a span {
    color: #8897aa;
    font-size: 12px;
}

/* Toolbar */
.product-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e8ecf1;
}

.product-count {
    font-size: 14px;
    color: #5a6879;
}

/* Grid Area */
.product-grid-area {
    min-width: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .product-archive-body {
        grid-template-columns: 220px 1fr;
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .product-archive-body {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-sidebar {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        align-items: flex-start;
    }

    .product-cat-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 0;
        flex: 1;
    }

    .product-cat-list a {
        padding: 6px 12px;
        border: 1px solid #dce2e9;
        border-radius: 20px;
        font-size: 13px;
    }

    .product-cat-list a:hover,
    .product-cat-list li.active a {
        padding-left: 12px;
    }

    .product-sidebar .quote-form-wrapper {
        width: 100%;
        margin-top: 10px;
    }
}
