/* ============================================================ */
/* 景林珠宝 - 自定义修复 CSS                                       */
/* ============================================================ */

/* ------------------------------------------------------------ */
/* 1. 全局防撑破：产品页、tab、正文                                  */
/* ------------------------------------------------------------ */
.product-summery,
.product-head,
.product-head .product-title,
.desc-content,
.product_tab_content,
.size-tab,
.single-product-tab .tab-content,
.single-product-tab .tab-content .desc-content,
.product_info_content {
    max-width: 100%;
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* 图片自适应 */
.desc-content img,
.product_tab_content img,
.tab-content img,
.product_info_content img,
.product-summery img,
.size-tab img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 15px auto;
    object-fit: contain;
}

/* 视频自适应 */
.desc-content video,
.product_tab_content video,
.tab-content video,
.product_info_content video,
.product-summery video {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    object-fit: contain;
    margin: 15px auto;
}

/* 表格自适应 */
.desc-content table,
.product_tab_content table,
.tab-content table,
.product_info_content table {
    max-width: 100%;
    width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ------------------------------------------------------------ */
/* 2. 产品详情页主图 + 缩略图                                     */
/* ------------------------------------------------------------ */
.single-product-slider .gallery-top {
    width: 100%;
    margin-bottom: 15px;
}

.single-product-slider .gallery-top .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.single-product-slider .gallery-top .swiper-slide img {
    max-width: 100% !important;
    max-height: 520px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* --- 缩略图容器 --- */
.single-product-slider .gallery-thumbs {
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    position: relative;
    height: 90px;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.single-product-slider .gallery-thumbs .swiper-wrapper {
    height: 90px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center !important;
}

/* --- 缩略图正方形强制修复 --- */
.single-product-slider .gallery-thumbs .swiper-slide {
    width: 80px !important;
    height: 80px !important;
    flex-shrink: 0;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity .2s, border-color .2s;
    border: 2px solid transparent;
    border-radius: 4px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.single-product-slider .gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border-color: #2e2e2e;
}

.single-product-slider .gallery-thumbs .swiper-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    margin: 0 auto;
}

.single-product-slider .gallery-thumbs .swiper-button-prev,
.single-product-slider .gallery-thumbs .swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, .5);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    margin-top: 0;
}

.single-product-slider .gallery-thumbs .swiper-button-prev { left: 0; }
.single-product-slider .gallery-thumbs .swiper-button-next { right: 0; }

.single-product-slider .gallery-thumbs .swiper-button-prev::after,
.single-product-slider .gallery-thumbs .swiper-button-next::after {
    font-size: 12px;
    color: #fff;
}

/* ------------------------------------------------------------ */
/* 3. 相关产品图片防撑破                                          */
/* ------------------------------------------------------------ */
.product-carousel .swiper-slide img,
.product-carousel .thumb img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain;
}

/* ------------------------------------------------------------ */
/* 4. 文章正文图片防撑破                                          */
/* ------------------------------------------------------------ */
.blog-details img,
.article-details img,
.article_content img,
.article-content img,
.blog-content img,
.blog-single-post-wrapper img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    object-fit: contain;
}

.blog-details,
.article-details,
.article_content,
.article-content,
.blog-content {
    max-width: 100%;
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-word;
}

/* ------------------------------------------------------------ */
/* 5. 产品页保障政策链接                                          */
/* ------------------------------------------------------------ */
.product-delivery-policy li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.product-delivery-policy li i {
    color: #2e2e2e;
    font-size: 16px;
    width: 20px;
    text-align: center;
}
.product-delivery-policy li a {
    color: #2e2e2e;
    text-decoration: none;
    font-weight: 500;
    transition: color .2s;
}
.product-delivery-policy li a:hover {
    color: #c9a227;
    text-decoration: underline;
}
.product-delivery-policy li .policy-more {
    color: #999;
    font-size: 13px;
}

/* ------------------------------------------------------------ */
/* 6. 规格选项排版：图片自适应，无图紧凑                            */
/* ------------------------------------------------------------ */
.product-metarial {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.product-metarial > span {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 2px;
}

.product-metarial a {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 10px !important;
    margin: 0 !important;
    border: 1px solid #ebebeb !important;
    border-radius: 4px !important;
    background: #fff !important;
    box-sizing: border-box !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
}

.product-metarial a strong {
    font-size: 13px !important;
    line-height: 1.2 !important;
    font-weight: 500 !important;
    color: #333;
    white-space: nowrap;
}

.product-metarial a img {
    width: 30px !important;
    height: 30px !important;
    object-fit: contain !important;
    margin-bottom: 4px !important;
}

.product-metarial a:not(:has(img)) {
    padding: 8px 16px !important;
    min-width: 50px;
}

.product-metarial a.btn-danger {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}
.product-metarial a.btn-danger strong {
    color: #fff !important;
}
.product-metarial a.btn-danger img {
    background: #fff;
    border-radius: 2px;
    padding: 2px;
}

.product-summery .product-meta {
    margin-bottom: 15px !important;
}
.product-summery .product-meta:last-child {
    margin-bottom: 20px !important;
}
.product-summery .quantity {
    margin-bottom: 20px !important;
}
.product-summery .buy-now-button {
    margin-bottom: 20px !important;
}
.product-summery .cart-wishlist-btn {
    margin-bottom: 15px !important;
}

/* ------------------------------------------------------------ */
/* 7. 移动端适配                                                  */
/* ------------------------------------------------------------ */
@media (max-width: 767px) {
    .single-product-slider .gallery-top .swiper-slide img {
        max-height: 340px !important;
    }

    .single-product-slider .gallery-thumbs {
        height: 70px;
        padding: 0 20px;
    }
    .single-product-slider .gallery-thumbs .swiper-wrapper {
        height: 70px;
    }
    
    .single-product-slider .gallery-thumbs .swiper-slide {
        width: 60px !important;
        height: 60px !important;
    }
    .single-product-slider .gallery-thumbs .swiper-slide img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .desc-content img,
    .product_tab_content img,
    .tab-content img,
    .product_info_content img {
        margin: 10px auto;
    }

    .single-product-tab .size-tab table {
        min-width: 400px;
    }

    .footer-section .newsletter-form-wrap,
    .footer-section .widget-body .newsletter-form-wrap {
        display: none !important;
    }
}
/* ------------------------------------------------------------ */
/* 8. 价格与库存强制同行显示                                      */
/* ------------------------------------------------------------ */
.product-summery .price-box {
    display: inline-flex !important;
    align-items: baseline !important;
    margin-right: 15px !important; /* 价格和库存之间的间距 */
    margin-bottom: 15px !important; /* 距离下方描述的间距 */
}

.product-summery .sku {
    display: inline-flex !important;
    align-items: baseline !important;
    margin-bottom: 15px !important; /* 保持和价格一样的底边距 */
}

/* 可选：如果你希望库存文字稍微小一点、颜色浅一点，可以加这句 */
.product-summery .sku span {
    font-size: 14px;
    color: #666;
}
/* ------------------------------------------------------------ */
/* 9. 规格区极限收紧：让排版更紧凑（解决间隙过大问题）                */
/* ------------------------------------------------------------ */
.product-metarial {
    gap: 6px !important; /* 把方块之间的间距从 10px 缩小到 6px */
    margin-top: 8px !important;
}

.product-metarial a {
    padding: 5px 10px !important; /* 减小内边距 */
    min-width: auto !important;   /* 取消最小宽度限制，让文字自己撑开 */
}

.product-metarial a strong {
    font-size: 12px !important;   /* 字号稍微调小一点点，显得精致 */
}

.product-metarial a img {
    width: 26px !important;       /* 图片稍微缩小，不要占那么大空间 */
    height: 26px !important;
    margin-bottom: 2px !important;
}

/* 没图的选项（比如 S925、1ct）用更紧凑的内边距 */
.product-metarial a:not(:has(img)) {
    padding: 6px 12px !important; 
    min-width: 40px !important;
}

/* 缩小“形状：”、“Metal：”这些标题的上下间距 */
.product-metarial > span {
    margin-bottom: 0px !important;
    font-size: 13px !important;
}
/* ------------------------------------------------------------ */
/* 10. 砍掉缩略图底部空白，收紧标题间距                               */
/* ------------------------------------------------------------ */

/* 1. 强制缩略图容器高度自适应，去掉 90px 的死高度 */
.single-product-slider .gallery-thumbs {
    height: auto !important; 
    min-height: 80px !important;
    margin-bottom: 5px !important; /* 缩略图和下方内容之间的总间距 */
}

/* 2. 让 Swiper 轨道跟随图片自适应 */
.single-product-slider .gallery-thumbs .swiper-wrapper {
    height: auto !important;
    align-items: center !important;
}

/* 3. 强制收紧下方内容区的上内边距（干掉 pt-10 带来的巨大空白） */
.product-slider-summery {
    padding-top: 10px !important; 
    margin-top: 0 !important;
}

/* 4. 标题下方的间距微调 */
.product-summery .product-head {
    margin-bottom: 15px !important;
}
.product:hover .thumb .image .first-image,
.product-hover:hover .thumb .image .first-image {
    opacity: 1 !important;
}
/* 修复无障碍对比度不足 */
.breadcrumb-content ul li a,
.breadcrumb-content ul li,
.product .content .sub-title a,
.text-muted,
.color-text,
.single-product-tab .tab-content .desc-content {
    color: #333333 !important; /* 加深为深灰色 */
}