/* ============================================
   product-detail.css v3 — MZS 产品详情页
   完全原创代码，布局与视觉还原参考页面
   ============================================ */

/* ─── 面包屑导航 ─── */
.breadcrumb {
    padding: 16px 0 10px;
    font-size: 12px;
    color: #999;
}
.breadcrumb a {
    color: #888;
    text-decoration: none;
}
.breadcrumb a:hover {
    color: #333;
}
.breadcrumb span {
    color: #ccc;
    margin: 0 5px;
}
.breadcrumb > span:last-child {
    color: #666;
}

/* ─── 详情页整体 — flex 布局 ─── */
.products_detail_box {
    display: flex;
    gap: 50px;
    margin: 10px 0 40px;
}
@media (max-width: 1000px) {
    .products_detail_box {
        flex-direction: column;
        gap: 30px;
    }
}

/* ─── 左侧图片画廊 56% ─── */
.products_detail_box .detail_left {
    flex: 0 0 56%;
    max-width: 56%;
}
@media (max-width: 1000px) {
    .products_detail_box .detail_left {
        flex: none;
        max-width: 100%;
    }
}

.thumb_package {
    position: relative;
    width: 100%;
}
.thumb_size {
    position: relative;
}

/* 主图容器 */
.thumb_big {
    width: 100%;
    background: #f8f8f8;
    position: relative;
}
.thumb_big ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.thumb_big ul li {
    display: none;
}
.thumb_big ul li:first-child {
    display: block;
}
.thumb_big ul li img {
    width: 100%;
    height: auto;
    display: block;
}

/* 页码指示器 */
.thumb_tab {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    background: rgba(0,0,0,.6);
    color: #fff;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 12px;
    z-index: 5;
    line-height: 22px;
}

/* 缩略图列表 */
.thumb_small {
    margin-top: 8px;
}
.thumb_small ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.thumb_small ul li {
    width: 56px;
    height: 56px;
    border: 2px solid #eee;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    opacity: .7;
    transition: border-color .2s, opacity .2s;
    position: relative;
}
.thumb_small ul li:hover {
    border-color: #ccc;
    opacity: 1;
}
.thumb_small ul li.cur {
    border-color: #555;
    opacity: 1;
}
.thumb_small ul li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ─── 右侧产品信息 42% ─── */
.products_detail_box .detail_right {
    flex: 0 0 calc(44% - 50px);
    max-width: calc(44% - 50px);
}
@media (min-width: 1001px) {
    .products_detail_box .detail_right {
        position: sticky;
        top: 90px;
        align-self: flex-start;
    }
}
@media (max-width: 1000px) {
    .products_detail_box .detail_right {
        flex: none;
        max-width: 100%;
    }
}

/* 产品标题 */
.detail_name {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px;
    line-height: 1.35;
}

/* SKU */
.detail_sku {
    font-size: 12px;
    color: #bbb;
    margin-bottom: 6px;
}

/* ─── 评分 ─── */
.visual_box {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.star_box {
    display: inline-block;
}
.review_star {
    display: inline-block;
    font-size: 0;
    vertical-align: middle;
}
.review_star .iconfont {
    font-size: 14px;
    margin-right: 4px;
    color: #ccc;
    vertical-align: middle;
}
.review_star .iconfont.star_1 {
    color: #f0c040;
}
.rating {
    font-size: 13px;
    color: #888;
    vertical-align: middle;
}
.rating strong {
    font-weight: 600;
}
.total_review {
    font-size: 12px;
    color: #aaa;
    vertical-align: middle;
}

/* ─── 价格 ─── */
.detail_price {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}
.detail_price strong {
    font-size: 24px;
    font-weight: 700;
    color: #c00;
    vertical-align: middle;
}
.detail_price del {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
    vertical-align: middle;
    font-weight: 400;
}

/* ─── 表单/变体属性 ─── */
.prod_info_form {
    margin: 0;
}

.detail_attr {
    margin-bottom: 16px;
}
.widget.attributes {
    list-style: none;
    margin: 0;
    padding: 0;
}
.attr_show {
    margin-bottom: 14px;
}
.attr_title {
    font-size: 13px;
    color: #333;
    margin-bottom: 8px;
}
.attr_title strong {
    font-weight: 600;
}
.attr_title span {
    color: #22c55e;
    font-weight: 500;
    margin-left: 4px;
}
.attr_box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 变体按钮 */
.btn_attr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    min-width: 40px;
    font-size: 13px;
    color: #444;
    background: #fff;
    border: 1px solid #ccc;
    cursor: pointer;
    user-select: none;
    transition: border-color .15s, box-shadow .15s;
    line-height: 20px;
}
.btn_attr:hover {
    border-color: #22c55e;
}
.btn_attr.selected {
    border-color: #22c55e;
    box-shadow: 0 0 0 2px #22c55e;
    color: #22c55e;
    font-weight: 500;
}

/* ─── 数量选择 ─── */
.detail_qty {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}
.detail_qty h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.prod_info_quantity {
    display: flex;
    align-items: center;
}
.qty_box {
    width: 36px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    user-select: none;
    transition: background .15s;
}
.qty_box:first-child {
    border-right: none;
}
.qty_box:last-child {
    border-left: none;
}
.qty_box:hover {
    background: #f0f0f0;
}
.quantity_box input {
    width: 50px;
    height: 34px;
    border: 1px solid #ddd;
    text-align: center;
    font-size: 14px;
    color: #333;
    outline: none;
    background: #fff;
}
.quantity_box input::-webkit-inner-spin-button,
.quantity_box input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.quantity_box input[type="tel"] {
    -moz-appearance: textfield;
}

/* ─── 操作按钮 ─── */
.detail_actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.detail_actions .button {
    flex: 1;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity .2s;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.detail_actions .button:hover {
    opacity: .8;
}
#addtocart_button {
    background: #1a1a1a;
    color: #fff;
}
#buynow_button {
    background: #22c55e;
    color: #fff;
}

/* ─── Tab 描述区域 ─── */
.detail_description {
    margin-top: 50px;
}

/* Tab 导航栏 */
.desc_menu_title {
    position: relative;
    border-bottom: 1px solid #e0e0e0;
}
.desc_menu_title ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
.desc_menu_title ul li {
    margin: 0;
    padding: 0;
    cursor: pointer;
}
.desc_menu_title ul li div {
    padding: 10px 20px;
    font-size: 14px;
    color: #888;
    position: relative;
    transition: color .2s;
}
.desc_menu_title ul li:hover div {
    color: #333;
}
.desc_menu_title ul li.current div {
    color: #000;
    font-weight: 600;
}
.desc_menu_title ul li.current div::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #333;
}

/* Tab 内容 */
.desc_menu_list {
    margin-top: 20px;
}
.desc_menu_list .editor_txt {
    display: none;
}
.desc_menu_list .editor_txt.active {
    display: block;
}
.editor_txt {
    font-size: 13px;
    line-height: 1.7;
    color: #444;
    overflow: hidden;
}
.editor_txt p {
    margin: 0 0 12px;
}
.editor_txt ul {
    margin: 0 0 14px;
    padding-left: 20px;
}
.editor_txt ul li {
    margin-bottom: 4px;
    list-style: disc;
}
.editor_txt strong {
    font-weight: 600;
    color: #333;
}
.editor_txt .product-single__description-full {
    overflow: hidden;
}

/* ─── You May Like 相关产品 ─── */
.products_may_like {
    margin-top: 50px;
}
.like_title {
    text-align: center;
    margin-bottom: 30px;
}
.like_title h2 {
    font-size: 22px;
    font-weight: 400;
    color: #333;
    margin: 0;
}
.like_products_box {
    margin: 0;
}

/* 相关产品卡片 — 浮动4列 */
.like_products_box::after {
    content: '';
    display: table;
    clear: both;
}
.like_products_item {
    float: left;
    width: 23.5%;
    margin-left: 2%;
    margin-bottom: 30px;
    text-align: center;
}
.like_products_item:nth-child(4n+1) {
    margin-left: 0;
    clear: both;
}
.like_products_item .item_img {
    display: block;
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: #f8f8f8;
}
.like_products_item .item_img .compute_item_img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.like_products_item .item_img .compute_process_img {
    width: 100%;
    height: 100%;
    padding-top: 0;
}
.like_products_item .item_img img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
}
.like_products_item .item_name {
    display: block;
    margin-top: 10px;
    text-decoration: none;
    font-size: 13px;
    line-height: 18px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 36px;
}
.like_products_item .item_name h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 18px;
}
.like_products_item .item_name:hover {
    color: #999;
}

@media (max-width: 768px) {
    .like_products_item {
        width: 48%;
        margin-left: 4%;
    }
    .like_products_item:nth-child(4n+1) {
        margin-left: 4%;
        clear: none;
    }
    .like_products_item:nth-child(2n+1) {
        margin-left: 0;
        clear: both;
    }
}

/* ─── Toast 消息（自定义功能） ─── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background: #333;
    color: #fff;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 14px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .3s, transform .3s;
    pointer-events: none;
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
}
