/* 2026-10-18 官網使用體驗重整 卡 06 商品頁（Q8；inc/nav.php 只在商品頁載）。全部在 html.ifd-pdp 後面：沒有＝跟今天一樣。
   ①名字／價格／加入購物車貼到大圖下 ②縮圖一排橫條 ③「點亮這系列」的牆移到購物車下面 ④長說明收合 ⑤點大圖全螢幕看原檔（pdp.js） */

/* ---------- 牆搬到商品資訊正下方、說明分頁往後（手機、電腦都一樣） ---------- */
html.ifd-pdp body.single-product div.product{display:flex;flex-direction:column}
html.ifd-pdp body.single-product div.product > *{order:5}
html.ifd-pdp body.single-product div.product > .product-entry-wrapper{order:1}
html.ifd-pdp body.single-product div.product > .ifd-shelf--product{order:2;margin-top:8px}
html.ifd-pdp body.single-product div.product > #real-ones{order:3}
html.ifd-pdp body.single-product div.product > .woocommerce-tabs{order:4}
html.ifd-pdp body.single-product .woocommerce-product-gallery .flexy-item .ct-media-container{cursor:zoom-in}

/* ---------- 收合（長說明、手機的簡短說明；pdp.js 只在真的很長時才加 class） ---------- */
.ifd-clamp{position:relative;overflow:hidden;max-height:var(--ifd-clamp,420px)}
.ifd-clamp::after{content:"";position:absolute;left:0;right:0;bottom:0;height:80px;background:linear-gradient(rgba(10,10,16,0),var(--ifd-bg,#0a0a10));pointer-events:none}
html[data-ifd-theme="sun"] .ifd-clamp::after{background:linear-gradient(rgba(239,240,243,0),var(--ifd-bg,#eff0f3))}
.ifd-clamp.is-open{max-height:none}
.ifd-clamp.is-open::after{display:none}
.ifd-more{display:inline-flex;align-items:center;gap:6px;height:auto!important;min-height:44px;margin:4px 0 12px;padding:0 18px!important;border-radius:999px!important;border:1px solid var(--ifd-line,rgba(255,255,255,.11))!important;background:var(--ifd-panel,#15151f)!important;color:var(--ifd-fg,#f1eff7)!important;font-size:15px!important;font-weight:700;text-transform:none!important;letter-spacing:0!important;cursor:pointer;box-shadow:none!important}
.ifd-more:hover{border-color:var(--ifd-brand,#6fe3c0)!important}

/* ---------- 手機 ---------- */
@media (max-width:999.98px){
  /* 內容欄放寬：商品外框原本 88vw 再加左右 20 內距（390 寬只剩 303）→ 左右各 16，主圖 301→358 */
  html.ifd-pdp body.single-product .ct-container-full > article{width:calc(100% - 32px)!important;max-width:none!important;padding-left:0!important;padding-right:0!important}
  html.ifd-pdp body.single-product div.product > .product-entry-wrapper,html.ifd-pdp body.single-product .hero-section{width:100%!important;max-width:none!important}
  /* 麵包屑一行（原本兩行 75 高）；每格可點 44 高 */
  html.ifd-pdp body.single-product .hero-section{margin-bottom:4px!important}
  html.ifd-pdp body.single-product .ct-breadcrumbs{display:flex!important;flex-wrap:nowrap;align-items:center;overflow-x:auto;white-space:nowrap;scrollbar-width:none;-webkit-mask-image:linear-gradient(90deg,#000 88%,transparent);mask-image:linear-gradient(90deg,#000 88%,transparent)}
  html.ifd-pdp body.single-product .ct-breadcrumbs::-webkit-scrollbar{display:none}
  html.ifd-pdp body.single-product .ct-breadcrumbs > span{flex:none}
  html.ifd-pdp body.single-product .ct-breadcrumbs a{display:inline-flex;align-items:center;min-height:44px}
  /* 縮圖：3 欄格子（5 張＝2 排 211 高）→ 一排小橫條，手指滑 */
  html.ifd-pdp body.single-product .flexy-pills ol{flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;gap:6px;margin:8px 0 0!important;padding:0!important}
  html.ifd-pdp body.single-product .flexy-pills ol::-webkit-scrollbar{display:none}
  html.ifd-pdp body.single-product .flexy-pills li{flex:0 0 64px!important;width:64px!important;max-width:64px!important;height:64px!important;padding:0!important;margin:0!important}
  html.ifd-pdp body.single-product .flexy-pills li .ct-media-container{width:64px;height:64px;border-radius:10px;overflow:hidden}
  /* 名字 → 價格 → 加入購物車 → PayPal 鈕 → 簡短說明 → 先買後付訊息 → 分類 */
  html.ifd-pdp body.single-product .summary.entry-summary{display:flex;flex-direction:column}
  html.ifd-pdp body.single-product .summary.entry-summary > *{order:7}
  html.ifd-pdp body.single-product .woocommerce-product-gallery{margin-bottom:0!important}
  html.ifd-pdp body.single-product .summary.entry-summary > .product_title{order:1;margin-top:14px!important}
  html.ifd-pdp body.single-product .summary.entry-summary > .price{order:2}
  html.ifd-pdp body.single-product .summary.entry-summary > .ct-product-add-to-cart{order:3}
  html.ifd-pdp body.single-product .summary.entry-summary > .ppc-button-wrapper{order:4}
  html.ifd-pdp body.single-product .summary.entry-summary > .ifd-shelf--product{order:4;margin:16px 0 4px!important}   /* pdp.js 把牆搬進來、放在 PayPal 鈕後面＝「點亮這系列」在購物車正下方 */
  html.ifd-pdp body.single-product .summary.entry-summary > .woocommerce-product-details__short-description{order:5;margin-top:14px!important}
  html.ifd-pdp body.single-product .summary.entry-summary > .ifd-more{order:5;align-self:flex-start}
  html.ifd-pdp body.single-product .summary.entry-summary > .ppcp-messages{order:6}
  html.ifd-pdp body.single-product .summary.entry-summary > .ct-product-divider{display:none}
  html.ifd-pdp body.single-product .summary.entry-summary > .product_meta{order:8}
}

/* ---------- 全螢幕看照片（pdp.js） ---------- */
html.ifd-pv-open{overflow:hidden}
.ifd-pv{position:fixed;inset:0;z-index:1000040;background:#000;color:#fff;display:flex;flex-direction:column;touch-action:pan-x pinch-zoom}
.ifd-pv[hidden]{display:none!important}
.ifd-pv__track{flex:1 1 auto;display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior:contain}
.ifd-pv__track::-webkit-scrollbar{display:none}
.ifd-pv__s{flex:0 0 100%;width:100%;height:100%;margin:0;display:flex;align-items:center;justify-content:center;scroll-snap-align:center;scroll-snap-stop:always}
.ifd-pv__s img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;display:block;-webkit-user-select:none;user-select:none}
.ifd-pv__bar{position:absolute;left:0;right:0;top:0;display:flex;align-items:center;justify-content:space-between;padding:calc(8px + env(safe-area-inset-top,0px)) 12px 8px 18px;background:linear-gradient(rgba(0,0,0,.55),rgba(0,0,0,0));pointer-events:none}
.ifd-pv__n{font-size:15px;font-weight:700;letter-spacing:.02em}
.ifd-pv__x,.ifd-pv__nav{pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px!important;padding:0!important;margin:0;border-radius:999px!important;border:0!important;background:rgba(255,255,255,.14)!important;color:#fff!important;font-size:26px!important;line-height:1;cursor:pointer;box-shadow:none!important}
.ifd-pv__nav{position:absolute;top:50%;transform:translateY(-50%);font-size:30px!important}
.ifd-pv__nav--p{left:14px}.ifd-pv__nav--n{right:14px}
.ifd-pv__nav[disabled]{opacity:.25;cursor:default}
@media (hover:none){.ifd-pv__nav{display:none}}
