.text-danger {
    color: #ff4d4f;
}

.scentsService-grid-edit-v3 {
    display: flex
}

.xiangfen-products-v3 {
    display: flex;
}

.xiangfen-imgContainer-v3 {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}


/* 左側卡片 */
.xiangfen-list-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 15px; 
    max-width: 1015px;
    margin: 0 auto; 
}


@media (max-width: 1200px) {
  .xiangfen-list-box {
    grid-template-columns: repeat(2, 1fr); /*手機版變兩欄*/
    margin-bottom: 200px; /* 調整底部間距 */
  }
}
@media (max-width: 768px) {
    
}

@media (max-width: 480px) {
  .xiangfen-list-box {
    grid-template-columns: 1fr; /* 更小螢幕變成單欄*/
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    max-width: 1015px;
	justify-content: center;
  }
}

.xiangfen-card {
    /* width: 315px; */
    width: 100%;
    margin-left: 10px;
    margin-right: 10px;
    box-sizing: border-box;
   
}


/* 導航項目間距調整 */
.sidebar-categories a {
    margin: 4px 8px;
    font-family: "Leelawadee UI", sans-serif;
    font-size: 18px;
    /* 字體略微縮小 */
    padding: 6px 0;
}

/* 下拉選單標題樣式 */
.dropdown-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #f5f5f5;
    border-radius: 5px 5px 0 0;
    /* 只保留頂部圓角 */
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;
}

/* 下拉箭頭 */
.dropdown-trigger:after {
    content: "▼";
    font-size: 12px;
    transition: transform 0.3s ease;
}

/* 展開時箭頭旋轉 */
.dropdown-trigger.open:after {
    transform: rotate(180deg);
}

.sidebar-categories {
    display: none;
}



/* 卡片圖片與文字 */
.xiangfen-image .img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* transition: opacity 0.8s; */
    filter: brightness(60%)  brightness(80%);
  
    transition: filter 0.8s;
    display: block;
}

.notes {
    font-family: Roboto;
    font-weight: 500;
    font-size: 14px;
    line-height: 140%;
    letter-spacing: 20%;
    margin-bottom: 8px;
    color: #fff;
    padding-left: 16px;
    padding-right: 16px;
}

.xiangfen-imgContainer-v3:hover .xiangfen-image {
    filter: brightness(60%);
    transition: filter 0.8s;
}

.xiangfen-imgContainer-v3:hover .xiangfen-title-before {
    opacity: 1;
    transform: translateY(0);
    /* 回到原位 */
    top: 20%;
    /* 目標位置，可依需求調整 */
}

.xiangfen-imgContainer-v3:hover .xiangfen-title-after {
    opacity: 1;
    transform: translateY(0);
    /* 回到原位 */
    top: 40%;
    /* 目標位置，可依需求調整 */
}

.xiangfen-title-before {
    width: 100%;
    height: 100%;
    top: 20%;
    position: absolute;
    text-align: center;
    transform: translateY(40px);
    /* 往下偏移，數值可調 */
    transition:
        transform 0.8s cubic-bezier(.4, 2, .6, 1),
        opacity 0.8s;
}

.xiangfen-title-after {
    display: block;
    position: absolute;
    bottom: 0%;
    /* 起始位置可依需求調整 */
    width: 100%;
    color: #fff;
    pointer-events: none;
    opacity: 0;
    transform: translateY(40px);
    /* 往下偏移，數值可調 */
    transition:
        transform 0.8s cubic-bezier(.4, 2, .6, 1),
        opacity 0.8s;
}

.xiangfen-number {
    font-family: "Leelawadee UI";
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    line-height: 100%;
    letter-spacing: 0.2em;
    margin-bottom: 8px;
    padding-left: 16px;
    padding-right: 16px;
}

.xiangfen-subtitle {
    font-family: "Leelawadee UI";
    font-size: 16px;
    font-weight: 400;
    color: #fff;
    line-height: 100%;
    letter-spacing: 0.2em;
    margin-bottom: 8px;
    text-wrap: wrap;
    padding-left: 16px;
    padding-right: 16px;
}

.xiangfen-name {
    font-family: "Leelawadee UI";
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    line-height: 100%;
    letter-spacing: 0.8em;
    margin-bottom: 16px;
    padding-left: 16px;
    padding-right: 16px;
}

/* 側邊欄位 */
.xiangfen-list-sidebar {
    /* width: 263px;
    position: fixed;
    top: 80px; /*視實際 header 高度調整*/
    /*right: 20px;
    max-height: calc(100vh - 100px); /*預留空間避免超出*/
    /*overflow-y: auto;
    background-color: #fff; 
    border-left: 1px solid #ccc;
    padding: 1rem;
    z-index: 100; */

    width: 263px;
    height: 44px;
    margin: 48px auto 36px auto;
    
    
}

/* 按鈕樣式 */
.button-container {
    /* display: flex;
    justify-content: center; */
    display: block;
    margin-top: 120px;
    width: 150px !important;

}

/* 作用按鈕樣式調整 */
.scentsService-button {
    background: #6EA09C;
    width: 150px !important;
    border-radius: 14px;
    padding: 12px 18px;
    /* margin: 24px auto 64px auto; */
    color: #fff;
}
 .xiangfen-list-main{
    /* margin: 0 auto; */
    /* padding: 0 20px;
    margin-top: 65px; */
    max-width: 1200px;         /* 自行調整 */
    /* margin: 65px auto 0;       置中 */
    padding: 0 20px;
    box-sizing: border-box;
    margin-bottom: 80px;
 }

@media screen and (min-width: 768px) {
    .xiangfen-list-container {
        display: flex;
        flex-direction: row-reverse;
       justify-content: center;
       /* align-items: center; */
       margin-bottom: 48px;
    }

    /* 卡片容器 */
    .xiangfen-list-main {
        /* margin-top: 65px; */
    }

    .xiangfen-sidebar {
        /* margin: 80px 60px 0 60px; */
        margin: 80px 60px 0 96px;
    

    }

    .sidebar-categories {
        display: block;
    }

    .xiangfen-list-box {
        /* margin-left: 75px; */
    }


}

@media screen and (min-width: 1920px) and (min-height: 1400px) {
    .xiangfen-list-container {
        height: calc(100vh - 626px);
    }

    /* .xiangfen-list-box {
        max-width: 1675px;
    } */
}

@media screen and (min-width: 1400px) {
    .xiangfen-list-box {
        /* margin-left: 120px; */
    }

    /* .xiangfen-list-box {
        max-width: 1675px;
    } */

}

@media screen and (min-width: 2400px) {
    /* .xiangfen-list-box {
        max-width: 2010px;
    } */

}

#pagination {
  display: flex !important;
  justify-content: center;  /* 置中 */
  align-items: center;
  gap: 50px;                 /* 按鈕間距 */
  margin-top: 96px; /* 調整底部間距 */
}

#pagination button {
  border: none;
  background: none;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 18px;
  color: #555;        
}

#pagination button.active {
  color: #00afa9;           /* 點選到的頁數主題色 */
  font-weight: bold;      
}

#pagination button:focus {
  outline: none;
}
/* 手機版下隱藏分頁，顯示載入更多 */
@media (max-width: 768px) {
  #pagination {
    display: none !important;
  }
  .load-more-btn {
    display: block;
    margin: 15px 75px;     /* 上下 15px，左右 75px */
    width: 214px;
    height: 48px;
    padding: 12px;
    background: #6EA09C;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
  }
}

/* 大螢幕隱藏載入更多 */
@media (min-width: 769px) {
  #load-more-btn {
    display: none;
  }
}
