/*根元素*/
:root{
--bg:#ffffff; /* 背景(白) var(--bg)*/
--p:#000000; /* 段落文字 var(--p)*/
--card:#f1f1f1; /* 卡片底(淺灰) var(--card)*/
--text:#92d14f; /* 主要文字(亮綠) var(--text)*/
--text2:#339933; /* h3次要文字(深綠) var(--text2)*/
--text3:#466c5b; /* h4次要文字(墨綠) var(--text3)*/
--text4:#1f1f1f; /* 次要文字(深灰黑) var(--text4)*/
--shadow: 0 5px 10px rgba(0,0,0,.25); /* 陰影 var(--shadow)*/
--gradient: linear-gradient(120deg, #6f86d6 0%, #48c6ef 100%); /* 漸層 var(--gradient)*/
}

.topnavbar {
    background-color: #fff;/*頁籤底圖顏色;background-color: rgba(255,255,255,0);透明Transparent*/
    position: relative;/*relative 頁籤&banner分開不重疊;頂置 fixed;*/
    line-height: 0;
    padding: 0;/*頁籤間距*/
}

.topnavbar .container {
  text-align: justify;
  padding: 0;
}

.topnavbar .container::after {
  display: inline-block;
  width: 100%;
}

body {
    background-color: #fff;/*背景底色*/
    font-family: 'Noto Sans TC', sans-serif;/*套用google font字型Noto Sans TC黑體*/
}

#logo h1 { text-align: center; }

/*動到表格手機不會破版*/
table {
  table-layout: fixed;
  word-wrap:break-word;
} 

hr {
  border-top: 1px solid #ddd;
  border-bottom: 0;
  margin: 2em 0;
}

/*編輯欄設定*/
#main-wrap .container {
  font-size: clamp(16px, 2vw, 18px);
  color: var(--p);
}/*編輯欄文字*/

body[data-type="fullpage"]:not(#managehome) #wrap>*:not(:last-child) {
    margin-bottom: 0px;
}

body[data-type="fullpage"] #product-header.main {
      min-height: auto;/*產品-編輯框不設定高*/
}

.fcol p{  
  line-height: 2;
  text-wrap: pretty ;  //適用內文,段落避開孤字
 }

h1, h2, h3, h4, h5, h6 { 
  text-wrap: balance ;  //適用標題和短文案,視覺效果更平衡
} 

.fcol h2 { 
  color: var(--text);
  font-size: clamp(26px, 3vw, 36px);/*最小值 首選值 最大值 限制屬性值區間*/
  line-height:2;
}

.fcol h3 { 
  color: var(--text2);
  font-size: clamp(24px, 3vw, 30px);/*最小值 首選值 最大值 限制屬性值區間*/
}

.fcol h4 { 
  color: var(--text3);
  font-size: clamp(20px, 3vw, 24px);/*最小值 首選值 最大值 限制屬性值區間*/
}

/*nav*/
#nav {
    vertical-align: bottom;
}
#nav ul li a {
    white-space: normal; /*自動換行*/
    font-size: 1.0rem;/*頁籤文字大小*/
    color: #000;/*頁籤文字顏色*/
    padding: 10px 20px;/*頁籤文字間隔;padding:2px 16px 2px 16px;*/
    line-height: 1.3;
    transition: .3s;
}

#nav ul li a:hover  {
    color: var(--text);/*頁籤滑過文字顏色*/
}
#nav ul li.current a {
    color: var(--text);/*頁籤按下後文字顏色*/
    font-weight: 500;
}

#nav .subnav {
    background-color: #fff;/*次頁籤底色*/
    max-width: 400px;/*次頁籤背景最大寬度*/
    width: max-content;/*最大內容*/
    text-align: left;
}

#nav .subnav .has-subnav span{
    max-width: 400px;/*次頁籤文字背景最大寬度*/
}

#nav li.has-subnav ul li.has-subnav>div a::after, #nav>ul>li.has-subnav>a::after {
    padding-left: 2px;/*下拉選單箭頭距離*/
}

/*產品頁*/
#side h3 {
  /*background-color: var(--card);*/
  background-image: var(--gradient);
  border-radius: 10px 10px 0 0;
  font-size: 1.4em;
  font-weight: 700;
  color: var(--bg);
}
#side ul li a {
  font-size: 16px;
  color: #333;
  border-bottom: 1px dashed #ddd;
}
#side ul li a:hover {
  color: var(--text);
}

ul.product-list li a {
    color: var(--text3);/*產品格文字顏色*/
    background-color: #eee;/*產品格底色*/
}
ul.product-list li a:hover {
    color: var(--text2);/*產品格滑過文字顏色*/
}
.productdetail .detail-spec h2 p{
    color: #333;
    font-size: 30px;
}/*產品內頁標題文字*/


/*title文字顏色*/
.h1title h1{
    color: var(--text2);
}

a {
    color: var(--text2);/*連結顏色*/
    text-decoration: none;
}

.swiper-container {
  height: auto !important; /* 將容器預設的高拿掉 */
}

.swiper-wrapper, .swiper-slide {
  height: 0 !important;
  padding-bottom: calc(750 / 1920 * 100%); /* 自定響應式圖片高度 */
}

.swiper-slide {
  width: 100% !important; /* 強制圖片寬度隨容器變更 */
}

/*各層編輯欄設定*/
#bodyinhome .fcol.fcol-1 .container {
   width: 100%;
   background-color: #e6e7e9;
   padding: 0;
}

#bodyinhome .fcol.fcol-2,
#bodyinhome .fcol.fcol-4 {
   padding: 3em 0;
}

#bodyinhome .fcol.fcol-3,
#bodyinhome .fcol.fcol-5 {
   background-color: var(--card);
   padding: 3em 0;
}
#bodyinhome .fcol.fcol-6 {
   background-color: var(--text);
}

/*首頁-about*/
@media only screen and (min-width: 768px){
  .t-box {
    z-index: 2;
    right: -4em;
  }
  .t-bg { 
    background-color: rgb(255 255 255 / 70%); 
    padding: 3em 4em; 
  }
}
@media only screen and (max-width: 767px){ .t-bg { background-color: #fff0; padding: 2em 3em; }}

.img-about {
  position: relative; /* 設置相對定位，方便控制偽元素位置 */
}
.img-about img {
  position: relative;
  z-index:1;
  display: block;
  aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
    object-fit: cover;
}
.img-about::after {
  content: ""; /* 偽元素的內容設為空 */
  position: absolute; /* 絕對定位 */
  left: -30%;
  bottom: 5%;
  width: 100%;
  height: 85%; 
  border: 10px #ddd solid;
}


/*標題裝飾線*/
.border-1 {position: relative; border-top: 1px solid #cccccc; width: 100%; margin: 10px auto;}
.border-1::after {
    content: "";
    position: absolute;
    top: -5px;
    left: -10px;
    width: 10px;
    height: 10px;
    background-color: var(--text3);
    z-index: 1;
}

.border-2 {position: relative; border-top: 1px dotted #ddd; width: 100%; margin: 10px auto;}
.border-2::before {
    content: "";
    position: absolute;
    top: -4px;
    right: 0px;
    width: 7px;
    height: 7px;
    background-color: var(--text3);
    z-index: 1;    
  border-radius: 100%;
}


/* 首頁-標題區 */
.section-title{
    text-align:center;
    margin-bottom:40px;
}

.section-title h2{
    font-size:38px;
    margin-bottom:10px;
    color:#1f4d3a;
    letter-spacing:2px;
}

.section-title h4{
    font-size:20px;
    color:#3c8c63;
    margin-bottom:20px;
}

.section-title p{
    max-width:800px;
    margin:0 auto;
    line-height:1.8;
    font-size:16px;
}

/* 產品卡片區 */
.product-grid{
    display:grid;
  justify-items: center;
    grid-template-columns:repeat(auto-fit, minmax(200px,1fr));
    gap:2em;
   /* margin-top:50px;*/
}

.product-card{
  max-width: 300px;
    background:#fff;
    border-radius:12px;
    overflow:hidden;
    box-shadow:var(--shadow);/*0 8px 20px rgba(0,0,0,0.08);*/
    transition:all 0.3s ease;
}

.product-card:hover{
    transform:translateY(-8px);
    box-shadow:0 12px 25px rgba(0,0,0,0.15);
}

.product-card img{
	width: 100%;
	height: auto;
object-fit: cover;  /*cover圖片剪裁不拉伸壓縮 ; contain不拉伸壓縮.等比縮放)*/
aspect-ratio: 4 / 3; /*比例*/
}

.product-card a{
    text-decoration:none;
    color:#1f4d3a;
    display:block;
    padding:18px;
    font-size:18px;
    font-weight:bold;
    text-align:center;
    transition:0.3s;
}

.product-card a:hover{
    background:#e8f3ed;
}

/* 特色區 */
.feature-box{
background: var(--text3);
    padding: 40px;
    border-radius: 0px;
    margin: 30px 0px;
    box-shadow: var(--shadow);
    color: var(--bg);
}

.feature-box ul{
  line-height:2;
  display: grid;
  gap: 1em 2em;
  grid-template-columns: repeat(3, 1fr);
}

@media only screen and (max-width: 430px){
  .feature-box ul{  grid-template-columns: repeat(1, 1fr) !important;}
}

.feature-box ul li {border-bottom: 3px solid var(--text);}