/* ============================================================
   COSMO 产品中心视觉优化样式表 (products.css)
   适用于：产品列表页 (products-dynamic.php) & 产品详情页 (product-detail-dynamic.php)
   与全站（首页、新闻资讯、知识库、服务支持）保持统一的视觉系统与科技质感
   ============================================================ */

/* ------------------------------------------------------------
   1. 统一内页横幅 (Inner Page Hero) 与页面背景
   ------------------------------------------------------------ */
.inner-page-hero {
    height: 40vh !important;
    min-height: 270px !important;
    max-height: 380px !important;
    position: relative !important;
}

.inner-page-hero .overlay-color {
    background: linear-gradient(135deg, rgba(8, 24, 46, 0.86) 0%, rgba(9, 44, 82, 0.75) 100%) !important;
    opacity: 1 !important;
}

.inner-page-hero .hero-text-area .hero-title {
    font-size: clamp(2rem, 3.8vw, 3rem) !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    letter-spacing: 0.02em !important;
    line-height: 1.25 !important;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.45) !important;
    margin-bottom: 12px !important;
}

.inner-page-hero .hero-text-area .breadcrumb {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.inner-page-hero .hero-text-area .breadcrumb-item {
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.72) !important;
    font-weight: 500 !important;
}

.inner-page-hero .hero-text-area .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.45) !important;
    padding-right: 6px !important;
}

.inner-page-hero .hero-text-area .breadcrumb-link {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.inner-page-hero .hero-text-area .breadcrumb-link:hover {
    color: #38bdf8 !important;
}

.inner-page-hero .hero-text-area .breadcrumb-item.active {
    color: #ffffff !important;
    font-weight: 700 !important;
}

.products-by-category.mega-section,
.product-detail.mega-section {
    background: #f8fafc !important;
    padding: 3.5rem 0 5rem !important;
}

/* ------------------------------------------------------------
   2. 产品列表页 (products-dynamic.php)
   ------------------------------------------------------------ */

/* 分类分组标题 */
.category-section {
    margin-bottom: 48px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
}

.category-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
    margin: 0;
    white-space: nowrap;
    position: relative;
    padding-left: 14px;
}

.category-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 15%;
    bottom: 15%;
    width: 4px;
    background: linear-gradient(180deg, #08adef 0%, #0284c7 100%);
    border-radius: 4px;
}

.category-divider {
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, #e2e8f0 0%, transparent 100%);
}

/* 产品网格与产品卡片 */
.products-grid {
    margin-left: -10px;
    margin-right: -10px;
}

.product-item {
    padding: 10px;
    margin-bottom: 8px;
}

.product-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: #7dd3fc;
    box-shadow: 0 16px 36px rgba(8, 173, 239, 0.12);
}

.product-link {
    display: block;
    text-decoration: none;
}

.product-img-wrapper {
    background: #ffffff;
    padding: 24px 20px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #f1f5f9;
}

.product-img {
    max-height: 175px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

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

/* 产品卡片信息 */
.product-card .product-info {
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card .product-title {
    font-size: 16.5px;
    font-weight: 800;
    line-height: 1.4;
    margin: 0 0 8px;
}

.product-card .product-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-card:hover .product-title a {
    color: #08adef;
}

.product-card .product-summary {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 14px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 无产品提示 */
.no-products {
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    color: #64748b;
}

.no-products h4 {
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 8px;
}

/* ------------------------------------------------------------
   3. 产品详情页 (product-detail-dynamic.php)
   ------------------------------------------------------------ */
.product-detail-content {
    background: #ffffff !important;
    padding: 36px 36px 40px !important;
    border-radius: 18px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04) !important;
    margin-bottom: 30px !important;
}

/* 画廊大图 */
.product-gallery .main-image {
    text-align: center;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 14px;
    padding: 30px 20px;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.main-product-img {
    max-height: 360px !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    transition: transform 0.3s ease;
}

/* 缩略图列表 */
.thumbnail-images {
    display: flex !important;
    gap: 12px !important;
    margin-top: 16px !important;
    flex-wrap: wrap !important;
}

.thumb-img {
    width: 82px !important;
    height: 70px !important;
    object-fit: contain !important;
    padding: 6px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    cursor: pointer;
    opacity: 0.75;
    transition: all 0.25s ease !important;
}

.thumb-img:hover {
    opacity: 1;
    border-color: #08adef !important;
    transform: translateY(-2px);
}

.thumb-img.active {
    opacity: 1 !important;
    border-color: #08adef !important;
    box-shadow: 0 0 0 3px rgba(8, 173, 239, 0.2) !important;
}

/* 顶部标签元数据 */
.product-meta {
    background: #f8fafc !important;
    padding: 14px 20px !important;
    border-radius: 12px !important;
    border-left: 4px solid #08adef !important;
    border-top: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    margin-bottom: 28px !important;
}

.product-meta span {
    font-size: 14px !important;
    font-weight: 600;
    color: #475569 !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 !important;
}

.product-meta .product-category {
    background: #e0f2fe;
    color: #0369a1 !important;
    padding: 4px 12px;
    border-radius: 6px;
}

.product-meta .product-model {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #0f172a !important;
    padding: 4px 12px;
    border-radius: 6px;
}

/* 章节大标题 */
.product-info h4 {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 32px 0 16px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #e2e8f0 !important;
    position: relative;
}

.product-info h4::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 36px;
    height: 2px;
    background: #08adef;
    border-radius: 2px;
}

/* 规格列表 */
.spec-list,
.features-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.spec-list li,
.features-list li {
    padding: 11px 14px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    font-size: 14.5px;
    color: #334155;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
}

.spec-list li:nth-child(even),
.features-list li:nth-child(even) {
    background: #f8fafc;
    border-radius: 6px;
}

.features-list li i {
    margin-right: 10px;
    color: #08adef !important;
    margin-top: 3px;
}

/* 应用标签 */
.app-tags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}

.app-tag {
    background: #e0f2fe !important;
    color: #0284c7 !important;
    border: 1px solid #bae6fd !important;
    padding: 6px 14px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
}

.app-tag:hover {
    background: #08adef !important;
    color: #ffffff !important;
    border-color: #08adef !important;
}

/* 详细描述图文排版 */
.description-content {
    font-size: 15px;
    line-height: 1.85;
    color: #334155;
}

.description-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    margin: 18px 0;
}

/* 相关资料下载与申请模型图按钮组 */
.download-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.btn-download {
    padding: 12px 28px !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-download.btn-primary {
    background: linear-gradient(135deg, #08adef 0%, #0284c7 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(8, 173, 239, 0.32);
}

.btn-download.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(8, 173, 239, 0.48);
}

.btn-download.btn-outline-primary {
    background: #ffffff !important;
    border: 1.5px solid #08adef !important;
    color: #0284c7 !important;
}

.btn-download.btn-outline-primary:hover {
    background: #08adef !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(8, 173, 239, 0.25);
}

/* ------------------------------------------------------------
   4. 统一侧边栏视觉 (Products Sidebar)
   ------------------------------------------------------------ */
.blog-sidebar,
.product-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-box,
.sidebar-widget {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 24px !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04) !important;
    margin-bottom: 0 !important;
}

.sidebar-box-title,
.widget-title {
    font-size: 16.5px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    padding-bottom: 12px !important;
    margin: 0 0 16px !important;
    border-bottom: 2px solid #f1f5f9 !important;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-box-title::after,
.widget-title::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 32px;
    height: 2px;
    background: #08adef;
    border-radius: 2px;
}

.sidebar-box-title i,
.widget-title i {
    color: #08adef;
    font-size: 15px;
}

/* 侧边栏搜索框 */
.search-form {
    display: flex;
    position: relative;
}

.search-input {
    width: 100%;
    height: 46px;
    padding: 0 48px 0 16px;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    font-size: 14px;
    color: #0f172a;
    transition: all 0.25s ease;
}

.search-input:focus {
    outline: none;
    background: #ffffff !important;
    border-color: #08adef !important;
    box-shadow: 0 0 0 3px rgba(8, 173, 239, 0.15) !important;
}

.search-btn {
    position: absolute;
    right: 6px;
    top: 6px;
    bottom: 6px;
    width: 34px;
    background: linear-gradient(135deg, #08adef, #0284c7) !important;
    border: none !important;
    border-radius: 8px;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.search-btn:hover {
    transform: scale(1.05);
}

/* 侧边栏分类列表 */
.cats-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.cat-item {
    margin-bottom: 6px;
}

.cat-item:last-child {
    margin-bottom: 0;
}

.cat-link {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 14px !important;
    color: #475569 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease !important;
}

.cat-count {
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.cat-link:hover,
.cat-link.active {
    background: #e0f2fe !important;
    color: #0284c7 !important;
}

.cat-link:hover .cat-count,
.cat-link.active .cat-count {
    background: #08adef;
    color: #ffffff;
}

/* 侧边栏推荐产品 */
.r-posts-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.r-post-item {
    padding: 12px 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.r-post-item:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.r-post-link {
    display: flex !important;
    gap: 12px !important;
    text-decoration: none !important;
}

.r-post-img-wrapper,
.product-thumb {
    width: 72px !important;
    height: 58px !important;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.r-post-img-wrapper img,
.product-thumb img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain !important;
}

.r-post-info,
.featured-product-item .product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.r-post-title,
.featured-product-item .product-info h6 {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 4px !important;
    line-height: 1.4 !important;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.r-post-link:hover .r-post-title,
.featured-product-item .product-info h6 a:hover {
    color: #08adef !important;
}

.r-post-meta,
.product-model {
    font-size: 12px !important;
    color: #94a3b8 !important;
    margin: 0;
}

/* 侧边栏联系我们卡片 */
.contact-widget p {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 18px;
}

.contact-widget .btn-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 20px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.contact-widget .btn-primary {
    background: linear-gradient(135deg, #08adef 0%, #0284c7 100%);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(8, 173, 239, 0.32);
}

.contact-widget .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(8, 173, 239, 0.45);
}

.contact-widget .btn-outline-primary {
    background: #ffffff;
    border: 1.5px solid #08adef;
    color: #0284c7;
}

.contact-widget .btn-outline-primary:hover {
    background: #08adef;
    color: #ffffff;
    transform: translateY(-2px);
}

/* ------------------------------------------------------------
   5. 响应式微调
   ------------------------------------------------------------ */
@media (max-width: 991px) {
    .blog-sidebar,
    .product-sidebar {
        margin-top: 36px;
    }
}

@media (max-width: 575px) {
    .product-detail-content {
        padding: 24px 18px !important;
    }

    .product-gallery .main-image {
        min-height: 260px;
        padding: 16px;
    }

    .main-product-img {
        max-height: 240px !important;
    }

    .thumb-img {
        width: 64px !important;
        height: 56px !important;
    }

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

    .btn-download {
        width: 100%;
        justify-content: center;
    }
}
