@charset "UTF-8";

/* 商品列表頁 */
.container-product h2{
  text-align: center;
  padding: 60px 35px 35px 35px;
  font-size: 35px;
  margin: 0;
  color: #333;
}

.product-container h2{
  text-align: center;
  padding: 35px;
  font-size: 35px;
  margin-top: 80px;
  color: #333;
}

.product-title1{
  margin-top: 100px;
}

.product-grid {
  padding: 0 30px 50px 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

/* 卡片本體 */
.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  transition: transform .3s ease, box-shadow .3s ease;
  max-height: 500px;
  width: 100%;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}

.product-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/ 15;
  padding: 0;             
  background: #f0f0f0;
  overflow: hidden;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;      
  display: block;
}

/* badge  */
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 14px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  color: #fff;
  background-color: blueviolet;
}

/* 內容區：對齊 product-card-body */
.product-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding:5px 0 15px;
  text-align: center;
}

/* 標題對齊 */
.product-name {
  font-size: 30px;
  margin: 10px 0 6px;
  line-height: 1.4;
  text-align: center;
  padding: 1px;
  margin: 0;
  color: #333;
}

.product-name a {
  color: #3C3C3C;
  text-decoration: none;
}

.product-desc {
  flex: 1;
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.6;
  color: #444;
}


/* 價格 */
.product-price {
  font-size: 18px;
  font-weight: 900;
  color: #d62929;
  margin-bottom: 4px;
}

/* 已售出 */
.product-sold-count {
  font-size: 18px;
  color:#333;
}

/* 按鈕：固定在底部 */
.product-btn {
  align-self: center;
  margin-top: auto;
  padding: 10px 18px;
  background: #007f7f;
  color: #fff;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: background .25s ease, transform .2s ease;
}

.product-btn:hover {
  background: #006666;
  transform: translateY(-2px);
}


@media (max-width: 64em) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 48em) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 3px 40px 3px;
  }

  .container-product h2{
    font-size: 26px;
    padding: 20px;
  }

  .product-desc{
    margin: 0;
    font-size: 15px;
  }

  .product-name{
    font-size: 25px;
  }

  .product-btn{
    width: 100px;
    text-align: center;
    padding: 6px;
  }

  .product-price{
    font-size: 16px;
  }
}


/* Product Detail (單項商品頁) */
.shop-breadcrumb {
font-size: 14px;
color: #666;
margin-bottom: 18px;
display: flex;
flex-wrap: wrap;
gap: 8px;
}

.shop-breadcrumb a {
color: #666;
text-decoration: none;
}

.shop-breadcrumb a:hover {
text-decoration: underline;
}

.shop-breadcrumb .current {
color: #111;
font-weight: 700;
}

.product-detail {
display: grid;
grid-template-columns: 1.05fr 0.95fr;
gap: 34px;
align-items: start;
margin: 120px 300px 0px;
}

.product-badge {
    z-index: 2;
}

.pd-image {
     position: absolute;
    top: 18px;
    left: 18px;
    width: calc(100% - 36px);
    height: calc(100% - 36px);
    object-fit: contain;
    display: none;
    transition: opacity 0.2s ease;
    z-index: 5; 
}

.pd-image.active {
     display: block;
}

.pd-image-wrap {
    position: relative;
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.07);
    padding: 10px;
    height: 520px;     
    z-index: 1;
}

.thumb-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: 0.2s;
}

.thumb-img.active {
    border-color: #2f6bff ; 
    border-width: 2px;
    border-style: solid;
}

.pd-thumb-list {
    position: relative;
    z-index: 10; 
    margin-top: 15px; 
} 
 
.pd-title {
font-size: 28px;
font-weight: 900;
margin: 0 0 10px;
line-height: 1.3;
}

.pd-price {
font-size: 20px;
font-weight: 900;
color: #d62929;
margin-bottom: 16px;
}

.pd-short {
margin: 0 0 18px;
color: #444;
line-height: 1.8;
}

.pd-line {
border: 0;
border-top: 1px solid #eee;
margin: 18px 0;
}

.pd-label {
display: block;
font-weight: 900;
margin-bottom: 10px;
}

.variant-group {
display: flex;
flex-wrap: wrap;
gap: 10px;
}

.variant-option input {
display: none;
}

.variant-pill {
display: inline-block;
padding: 8px 14px;
border-radius: 10px;
border: 1px solid #d9d9d9;
cursor: pointer;
font-weight: 800;
font-size: 16px;
background: #fff;
transition: 0.15s ease;
}

.variant-option input:checked + .variant-pill {
border-color: #2f6bff;
background: #2f6bff;
color: #fff;
}

.variant-pill:hover {
border-color: #2f6bff;
}

.variant-empty {
color: #777;
font-size: 14px;
}

.pd-form {
margin-top: 6px;
}

.pd-btn {
width: 100%;
margin-top: 18px;
padding: 10px 0;
border: 0;
border-radius: 10px;
background: #DAA520;
color: #fff;
font-weight: 700;
font-size: 22px;
cursor: pointer;
transition: 0.15s ease;
}

.pd-btn:hover {
background: teal;
}

.pd-note {
margin-top: 14px;
color: #666;
font-size: 13px;
line-height: 1.7;
}

/* Tabs */
.pd-tabs {
margin: 40px 300px 0px;
background: #fff;
border-radius: 14px;
box-shadow: 0 12px 24px rgba(0,0,0,0.07);
overflow: hidden;
}

.tab-header {
display: flex;
border-bottom: 1px solid #eee;
}

.tab-btn {
flex: 1;
padding: 14px 0;
background: transparent;
border: 0;
cursor: pointer;
font-weight: 900;
color: #444;
transition: 0.15s ease;
}

.tab-btn.active {
color: #2f6bff;
border-bottom: 3px solid #2f6bff;
}

.tab-body {
padding: 22px;
}

.tab-panel {
display: none;
line-height: 1.9;
color: #333;
}

.tab-panel.active {
display: block;
}

.pd-extra-list {
margin: 0;
padding-left: 18px;
}


/* 針對 img、table、iframe */
.tab-panel img {
    max-width: 100% !important; 
    height: auto !important; 
    display: block;
    margin: 10px auto;
}

.tab-panel table {
    display: block;
    width: 100% !important;
    overflow-x: auto;
    border-collapse: collapse;
}

.tab-panel iframe, 
.tab-panel video {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
}

/* 平板與手機通用修正 (≤ 992px) */
@media (max-width: 992px) {
    .product-detail {
        grid-template-columns: 1fr; 
        margin: 100px 5px 0 !important; 
        gap: 30px;
    }

    .pd-tabs {
        margin: 30px 1px !important; 
    }
}

@media (max-width: 48em) { 
    .tab-body {
        padding: 15px 10px; 
        overflow-x: hidden; 
        word-wrap: break-word;
    }
    
    .tab-panel {
        width: 100%;
        font-size: 16px; 
    }
}

/* 手機版精確優化 (≤ 576px) */
@media (max-width: 576px) {
    .product-detail {
        margin-top: 80px !important; 
        padding: 10px 0 !important;
    }

    .pd-image-wrap {
        height: 350px;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .pd-image {
        position: relative !important; 
        top: 0 !important;
        left: 0 !important;
        width: auto !important;
        max-width: 100%;
        max-height: 100%;
        height: auto !important;
        padding: 10px;
    }

    .pd-thumb-list {
        display: flex;
        flex-wrap: nowrap; 
        overflow-x: auto; 
        gap: 8px;
        padding-bottom: 5px;
    }

    .thumb-img {
        width: 60px;
        height: 60px;
        flex-shrink: 0; 
    }

    .variant-group {
        display: grid !important; 
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
    }

    .variant-pill {
        display: flex !important; 
        align-items: center;
        justify-content: center;
        width: auto !important; 
        margin: 0 !important;
        padding: 12px 5px !important; 
        font-size: 14px !important;
        box-sizing: border-box; 
    }

    .pd-title {
        font-size: 22px;
        line-height: 1.2;
    }

    .pd-btn {
        width: 100% !important;
        padding: 15px 0 !important;
        font-size: 18px;
    }
}



