* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: #4e5346;
    font-size: 16px;
}


body {
    font-family: 'MyCustomFont', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
}

a,a:hover,
a:focus,a:active {
    text-decoration: none !important;
    /* color: rgb(255, 255, 255); */
}

.Image_Top{
    margin-top: var(--head-height); /* 確保主體內容不被固定的 header 遮擋 */
}

/* 商品麵包屑 */
.ProductList-breadcrumb{
    background-color: #4e5346;
    width: auto;
    
}
.breadcrumb-Label{
    padding: 8px;
    padding-left: 40px;
    margin: 0 auto;
    width: 80%;
    
}

.ProductList-breadcrumb .Label{
    color: #ebebeb;
}

/* 中間的商品列表 */
.content {
    /* margin-left: 200px; */
    padding: 20px;
    /* display: flex; */
    margin: 0 auto;
    width: 90%;
    
}

/* 左側導航欄 */
.sidebar {
    top: 20%;
    width: 200px;
    padding: 10px;
    border-radius: 8px;
    white-space: nowrap;
}

.sidebar a {
    display: flex;
    align-items: baseline;
    /* padding: 10px; */
    margin: 10px;
    text-decoration: none;
    color: #333;
    /* background-color: #eee; */
    border-radius: 4px;
    text-align: center;
    transition: background-color 0.3s;
}

.sidebar a:hover {
    background-color: #ddd;
}

.sidebar a img{
    width: 30px;
}

/* 產品類別菜單 */
.ProductList-categoryMenu{
    list-style-type: none;
}

/* 右下角固定的購物車按鈕 */
.fixed-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #28a745;
    color: white;
    padding: 15px;
    border-radius: 50px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.search-input {
    width: 180px;
    padding: 10px;
    padding-right: 40px;  /* 留出空間給放大鏡 */
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 16px;
    background: url('https://img.icons8.com/ios-filled/50/000000/search.png') no-repeat right 10px center;
    background-size: 20px 20px; /* 調整放大鏡圖片大小 */
    background-color: white;
}

.Product-summary ol, 
.Product-summary ul {
    /* padding-left: unset;  */
    font-size: 18px;
}



.category {
    margin-bottom: 50px;
    background-color: white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    padding: 30px;
}

.category h2 {
    border-bottom: 2px solid #ccc;
    padding-bottom: 5px;
    margin-bottom: 20px;
}

/* 主要內容CSS */
.Detail_Container{
    width: 100%;
}
.Product_Name{
    padding: 10px;

    
}

.Product_Name h2{
    font-weight: bold;
}

.Product_Content{
    width: 100%;
    display: flex;
}
.Product_Image{
    width: 60%;
    padding: 0 50px;
    overflow: hidden; /* 防止內容溢出導致頁面滾動條 */
}

.zoomImg{
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
    text-align: center;
}
.zoomImg img{
    width: 70%;
    padding-bottom: 20px;
}

.image-containers{
    display: flex;
    overflow-x: auto;
    margin: 0px 20px;
    scrollbar-width: thin;
    scrollbar-color: #8b8f83 #e4e4e4; /* 滑塊顏色與軌道顏色（Firefox） */
    cursor: pointer;
    /* 隱藏滾動條但保持滾動功能 */
    -ms-overflow-style: none; /* IE 和 Edge */
    scrollbar-width: none; /* Firefox */
}
/* 隱藏 Webkit 瀏覽器（Chrome, Safari）的滾動條 */
.image-containers::-webkit-scrollbar {
    display: none;
}

.image-container{
    margin-right: 10px;
    flex: 0 0 auto; /* 改為自動寬度，不強制 20% */
    min-width: 0; /* 允許縮小 */
}

.image-container img{
    width: 200px; /* 固定寬度，與 HTML 中的 style 一致 */
    height: auto;
    display: block;
}

.Product_Detail{
    margin-top: 30px;
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

}

.summary-list-ul{
    text-align: start;
}

.price-box{

    display: flex;
    align-items: center;
}

.price-box p{
    margin-right: 20px;
    color: #4e5346;
    font-weight: bold;
    font-size: 1.5rem;
    margin-bottom: 0rem;  
}

.price-box s{
    color: #b9b9b9;
}

.Order{
    
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.Order div{
    padding: 8px;
}

.Options{
    display: flex;
    align-items: baseline;
}

.Options p{
    color: #868686;
    white-space: nowrap;
}

.Options select{
    width: 80%;
    background: #ecececb2 !important;
    border: #ffffff 0;
    height: 50px;
    text-align: center;
}

.Order-Remarks{
    width: 100%;
}

.Order-Remarks input{
    width: 100%;
    background: #ecececb2 !important;
    border: #ffffff 0;
}


.quantity{
    display: flex;
    align-items: baseline;
}

.quantity p{
    color: #868686;
    white-space: nowrap;
}

.quantity div{
    background: #ecececb2;
    border-radius: 50px;
    padding: 0;
    display: flex;
    align-items: center;
    width: 80%;
}

.quantity input {
    flex-grow: 1; /* 讓 input 填滿剩餘空間 */
    min-width: 40px; /* 設定最小寬度，避免太小 */
    text-align: center;
    margin: 0 5px;
}

.quantity button{
    background: transparent ;
    border: 0;
}

.leftradius{
    border-radius: 50px 0 0 50px;
}

.rightradius{
    border-radius: 0px 50px 50px 0px;
}

.quantity input{
    background: transparent;
    border: #ffffff 0;
    text-align: center;
    padding: 8px 0;    
    box-sizing: border-box; 

}

.Confirm-Order button{
    width: 100%; 
    border: #ffffff 0;
    background: #4e5346 !important;
    color: #ffffff;
}

button:hover{
    background: #a19f9fb2 !important;
    color: #141414;
}

.share-box{
    display: flex;
    justify-content: center; /* 水平置中 */
    align-items: center;    /* 垂直置中 */
    gap: 8px;      

}

.share-box p{
    margin: 1% 0;
}

.share-box img{
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

/* 商品描述 */
.Product_Description{
    margin-top: 20px;
    border-top: solid 1px #ddd;
}

.Description_title{
    margin-top: 20px;
    text-align: center;
    /* border-bottom: solid 1px #ddd;
    display: inline-block;
    width: 60%;  */
}

.Description_title h5{
    margin: 0 45% 20px 45%;
    border-bottom: solid 1px #4e5346;
    color: #4e5346;
}

.Description_Content{
    width: 100%;
    display: inline-block;
    /* justify-items: center; */
    /* height: 1000px; */ /* 實際使用時不能用height1000px 測試用*/
    /* background-color: #28a745; */
}

@media (max-width: 950px) {
    .Description_Content img{
        max-width: 100%;  /* 讓圖片不超過父容器的寬度 */
        height: auto;
    }

    .Product-summary  li{
        font-size: 18px;
    }
}

/* 其他好物 */

.relatedProducts-title h5{
    color: #4e5346;
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: solid 1px #ddd;
}

.relatedProducts-list{
    display: flex;
    flex-wrap: wrap;
    text-align: center;
}

.relatedProduct {
    flex: 0 0 calc(25% - 10px); /* 每個項目占 25% 減去間距 */
    margin: 1% 5px;             /* 上下間距為 1%，左右間距為 5px */
    border-radius: 8px;         /* 圓角效果 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 陰影效果 */
    background-color: #ffffff;    /* 背景色 */
    text-align: center;        /* 文字置中 */
    padding: 10px;  
    overflow: hidden;
}

.relatedProduct img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.relatedProduct h3{
    font-size: 1rem;
}

.relatedProduct span{
    color: #a0a0a0;
    font-size: 12px;
}

.relatedProduct .price{
    /* margin-top: 20px; */
    font-size: 20px;
    text-align: center;
    color: #d89142;
    /* display: flex; */
    /* justify-content: space-between; */
}

.relatedProduct .price span{
    font-size: 15px;
    text-align: center;
    color: #d89142;
}

.relatedProduct .price s{
    font-size: 15px;
    text-align: center;
    color: #b3b3b3;
}
/* 好物推薦結束 */

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 130px; /* 4:3 比例 */
    background: rgba(86, 100, 88, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 20px;
    visibility: hidden;
}

.popup p{
    color: #ffffff;
}

.show {
    visibility: visible;
}
.checkmark {
    font-size: 35px;
    color: #ffffff;
}


/* 手機版CSS */
@media (max-width: 768px) {
    .content{
        width: auto;
    }
    .sidebar{
        display: none;
    }
    /* 麵包屑 */
    .breadcrumb-Label {
        width: 100%;
    }
    /* 主要內容 */
    .Detail_Container{
        text-align: center;
    }   

    .Product_Content {
        display: flex;
        flex-direction: column;
    }

    .Product_Image{
        width: 100%;
        padding: 0;
    }

    .zoomImg img{
        width: 100%;
    }

    .Product_Detail{
        text-align: center;
        width: 100%;
    }

    .price-box{
        align-items: center;
        justify-content: center;
    }

    .quantity input{
        width: 50%;
    }

    .Description_title h5{
        margin: 0 38% 20px 38%
    }

    .relatedProducts-title h5{
        /* margin: 0 38% 0px 38%  */
    }

    .relatedProduct{
        flex: 0 0 calc(50% - 10px);
    }
    
    .relatedProduct h3{
        height: 40px;          /* 設置高度為兩行文字 */
        line-height: 20px;     /* 設置行高 */
        overflow: hidden;      /* 隱藏超出的內容 */
        text-overflow: ellipsis; /* 顯示省略號 */
        display: -webkit-box;
        -webkit-line-clamp: 2; /* 限制顯示的行數 */
    }

    .relatedProduct span{
        color: #a0a0a0;
        font-size: 14px;
    }
}