/* 寵物好物 PDP 改版 2026-10-18（商品 11／12）
   主圖輪播＋縮圖列｜≥1024px 左 55% 圖、右 45% 購買｜<1024px 固定底欄 */
.mldi-pdp-v2 {
  --mp-red: var(--nw-brand-600, #A85A16); /* t6 */
  --mp-red-d: var(--nw-brand-700, #854612);
  --mp-navy: #14343c;
  --mp-navy2: #1a3d46;
  --mp-teal: #1a9b8e;
  --mp-ink: #1a2a33;
  --mp-ink2: #2c3e48;
  --mp-muted: #6b7a82;
  --mp-line: #e3e8ea;
  --mp-soft: #f5f7f8;
  --mp-cream: #fdf3f1;
  background: #fff;
}
.mldi-pdp-v2 #content > .ast-container { display: block; max-width: 1240px; padding-left: 20px; padding-right: 20px; }
.mpdp, .mpdp button, .mpdp input {
  font-family: var(--nw-font, system-ui, Inter, "PingFang TC", "Microsoft JhengHei", "微軟正黑體", "Noto Sans TC", sans-serif);
}
.mpdp { width: 100%; color: var(--mp-ink); padding: 14px 0 48px; font-size: 15px; line-height: 1.6; }
.mpdp *, .mpdp *::before, .mpdp *::after { box-sizing: border-box; }
.mpdp a { color: var(--mp-navy); text-decoration: underline; text-underline-offset: 3px; }
.mpdp-ico { display: inline-block; flex: 0 0 auto; vertical-align: middle; }

.mpdp-crumb { font-size: 13px; color: var(--mp-muted); margin: 0 0 12px; display: flex; gap: 8px; }
.mpdp-crumb a { color: var(--mp-muted); text-decoration: none; }
.mpdp-crumb a:hover { color: var(--mp-navy); }
.mpdp-notices:empty { display: none; }
.mpdp-notices .woocommerce-message, .mpdp-notices .woocommerce-error, .mpdp-notices .woocommerce-info {
  margin: 0 0 14px; border-top: 2px solid var(--mp-navy); background: var(--mp-soft); color: var(--mp-ink); font-size: 14px;
}
.mpdp-notices .woocommerce-error { border-top-color: var(--mp-red); }
.mpdp-notices .button { background: transparent !important; color: var(--mp-navy) !important; padding: 0 0 0 12px !important; text-decoration: underline; font-weight: 600; }

/* —— 圖庫 —— */
.mpdp-gallery { min-width: 0; }
.mpdp-stage { position: relative; background: var(--mp-soft); border-radius: 10px; overflow: hidden; }
.mpdp-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; outline: none; box-shadow: none;
}
.mpdp-track::-webkit-scrollbar { display: none; }
.mpdp-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; background: #fff; }
.mpdp-slide img { width: 100%; height: 100%; object-fit: contain; display: block; max-width: 100%; }
.mpdp .mpdp-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--mp-line); background: rgba(255,255,255,.92); color: var(--mp-navy); padding: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 8px rgba(20,52,60,.08);
}
.mpdp .mpdp-nav:hover { background: #fff; color: var(--mp-red); }
.mpdp-prev { left: 10px; }
.mpdp-next { right: 10px; }
.mpdp-count {
  position: absolute; right: 10px; bottom: 10px; background: rgba(20,52,60,.72); color: #fff; font-size: 12px;
  padding: 2px 10px; border-radius: 999px; letter-spacing: .02em; font-variant-numeric: tabular-nums;
}
.mpdp-count b { font-weight: 600; }
.mpdp-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: thin; scroll-behavior: smooth; }
.mpdp .mpdp-thumb {
  flex: 0 0 64px; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 6px;
  background: var(--mp-soft); cursor: pointer; overflow: hidden; opacity: .72; transition: opacity .15s, border-color .15s;
}
.mpdp .mpdp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mpdp .mpdp-thumb:hover { opacity: 1; }
.mpdp .mpdp-thumb.is-on { border-color: var(--mp-red); opacity: 1; }
.mpdp-imgnote { font-size: 12px; color: var(--mp-muted); margin: 8px 0 0; }

/* —— 標題價 —— */
.mpdp-info { padding: 18px 0 4px; }
.mpdp .mpdp-title { font-size: 20px; line-height: 1.4; font-weight: 700; margin: 0 0 6px; color: var(--mp-ink); letter-spacing: 0; }
.mpdp-lead { margin: 0 0 14px; color: var(--mp-ink2); font-size: 14px; }
.mpdp-pricebox {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; background: var(--mp-cream);
  border-radius: 8px; padding: 12px 14px; margin: 0 0 14px;
}
.mpdp-price { color: var(--mp-red); font-size: 30px; font-weight: 700; line-height: 1; margin-right: 6px; font-variant-numeric: tabular-nums; }
.mpdp-price .woocommerce-Price-currencySymbol { font-size: 18px; margin-right: 1px; }
.mpdp-tag { font-size: 12px; line-height: 1; padding: 5px 8px; border-radius: 4px; background: var(--mp-red); color: #fff; font-weight: 600; }
.mpdp-tag-line { background: #fff; color: var(--mp-red); border: 1px solid var(--mp-red); padding: 4px 7px; }
.mpdp-svc { margin: 0 0 14px; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.mpdp-svc > div { display: flex; gap: 12px; align-items: flex-start; }
.mpdp-svc dt { flex: 0 0 64px; display: flex; align-items: center; gap: 6px; color: var(--mp-muted); font-weight: 400; margin: 0; }
.mpdp-svc dt .mpdp-ico { color: var(--mp-navy); width: 18px; height: 18px; }
.mpdp-svc dd { margin: 0; color: var(--mp-ink); }
.mpdp-box { border-top: 1px solid var(--mp-line); padding: 12px 0 0; }
.mpdp-box-h { font-size: 13px; color: var(--mp-muted); margin: 0 0 6px; }
.mpdp-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mpdp-box li { font-size: 14px; padding-left: 14px; position: relative; }
.mpdp-box li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 1px; background: var(--mp-navy); }
.mpdp-box li b { font-weight: 600; }
.mpdp-x { color: var(--mp-muted); font-size: 13px; }
.mpdp-box li small { display: block; color: var(--mp-muted); font-size: 12.5px; line-height: 1.5; }

/* —— 規格 —— */
.mpdp-form { margin: 0; }
.mpdp-sku { border-top: 1px solid var(--mp-line); margin-top: 14px; padding: 14px 0 4px; }
.mpdp-sku-h { margin: 0 0 12px; font-size: 15px; font-weight: 700; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.mpdp-sku-h span { font-size: 12px; font-weight: 400; color: var(--mp-muted); }
.mpdp .mpdp-row { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.mpdp .mpdp-row legend { padding: 0; margin: 0 0 8px; font-size: 14px; display: flex; gap: 8px; align-items: baseline; width: 100%; }
.mpdp-row-lab { font-weight: 600; color: var(--mp-ink); }
.mpdp-row-sel { font-size: 12px; color: var(--mp-muted); }
.mpdp-row-sel b { color: var(--mp-navy); font-weight: 600; }
.mpdp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mpdp .mpdp-chip {
  position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 6px 14px 6px 10px;
  border: 1px solid #cfd8db; border-radius: 6px; background: #fff; cursor: pointer; font-size: 14px; color: var(--mp-ink);
  margin: 0; line-height: 1.2; transition: border-color .12s, box-shadow .12s; user-select: none;
}
.mpdp .mpdp-chip:hover { border-color: var(--mp-navy); }
.mpdp .mpdp-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.mpdp .mpdp-chip i { width: 18px; height: 18px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(20,52,60,.18); }
/* 色選縮圖（2026-10-18）：有對應色圖的按鈕以小縮圖取代色點；按鈕寬高與色點版相同（24+6 = 18+7 −左內距 5） */
.mpdp .mpdp-chip.has-thumb { gap: 6px; padding-left: 5px; }
.mpdp .mpdp-chip .mpdp-chip-img {
  display: block; flex: 0 0 24px; width: 24px; height: 24px; max-width: none; margin: 0; padding: 0;
  border-radius: 4px; object-fit: cover; background: #f3f5f6; box-shadow: 0 0 0 1px rgba(20,52,60,.14);
}
.mpdp .mpdp-chip.is-on, .mpdp .mpdp-chip:has(input:checked) {
  border-color: var(--mp-red); box-shadow: inset 0 0 0 1px var(--mp-red); color: var(--mp-red-d); font-weight: 600; background: var(--nw-brand-50, #FDF6EF);
}
.mpdp .mpdp-chip:focus-within { outline: 2px solid var(--mp-navy); outline-offset: 2px; }
.mpdp-hint { margin: 6px 0 0; font-size: 12px; color: var(--mp-muted); }
.mpdp-qty { display: flex; align-items: center; gap: 14px; padding: 12px 0 2px; border-top: 1px dashed var(--mp-line); margin-top: 4px; }
.mpdp-qty label { font-size: 14px; font-weight: 600; margin: 0; }
.mpdp-qtybox { display: flex; border: 1px solid #cfd8db; border-radius: 6px; overflow: hidden; height: 38px; }
.mpdp .mpdp-qbtn { width: 38px; border: 0; background: var(--mp-soft); color: var(--mp-ink); padding: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 0; }
.mpdp .mpdp-qbtn:hover { background: #e9eef0; }
.mpdp .mpdp-qbtn .mpdp-ico { width: 16px; height: 16px; }
.mpdp .mpdp-qtybox input {
  width: 48px; border: 0; border-left: 1px solid #cfd8db; border-right: 1px solid #cfd8db; text-align: center;
  font-size: 15px; font-weight: 600; padding: 0; margin: 0; min-height: 0; height: 100%; background: #fff; color: var(--mp-ink);
  -moz-appearance: textfield; border-radius: 0; box-shadow: none;
}
.mpdp .mpdp-qtybox input::-webkit-outer-spin-button, .mpdp .mpdp-qtybox input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mpdp-qty-note { font-size: 12px; color: var(--mp-muted); }

/* —— 購買按鈕 —— */
.mpdp-ctas { display: none; gap: 12px; margin: 18px 0 0; }
.mpdp .mpdp-btn {
  flex: 1; height: 50px; border-radius: 6px; font-size: 16px; font-weight: 700; display: inline-flex; align-items: center;
  justify-content: center; gap: 8px; cursor: pointer; padding: 0 12px; line-height: 1; letter-spacing: .02em; transition: background .15s, color .15s;
}
.mpdp .mpdp-btn .mpdp-ico { width: 20px; height: 20px; }
.mpdp .mpdp-btn-cart { background: #fff; color: var(--mp-navy); border: 1.5px solid var(--mp-navy); }
.mpdp .mpdp-btn-cart:hover { background: var(--mp-navy); color: #fff; }
.mpdp .mpdp-btn-buy { background: var(--mp-red); color: #fff; border: 1.5px solid var(--mp-red); }
.mpdp .mpdp-btn-buy:hover { background: var(--mp-red-d); border-color: var(--mp-red-d); color: #fff; }
.mpdp-ctanote { font-size: 12px; color: var(--mp-muted); margin: 10px 0 0; }

/* —— 商品詳情（inc/pdp-detail.php 的區塊） —— */
.mpdp-detail { margin-top: 28px; border-top: 8px solid var(--mp-soft); padding-top: 4px; }
.mpdp .mpdp-detail-h { font-size: 18px; font-weight: 700; margin: 16px 0 4px; padding-bottom: 10px; border-bottom: 1px solid var(--mp-line); color: var(--mp-ink); }
.mpdp-detail-body { max-width: 860px; margin: 0 auto; }
.mpdp-detail-body .sec { padding: 22px 0; border-bottom: 1px solid var(--mp-line); }
.mpdp-detail-body .sec:last-child { border-bottom: 0; }
.mpdp-detail-body .h2 { font-size: 17px; font-weight: 700; margin: 0 0 12px; color: var(--mp-navy); padding-left: 10px; border-left: 3px solid var(--mp-red); line-height: 1.3; }
.mpdp-detail-body .prose { max-width: none; padding: 0; font-size: 15px; color: var(--mp-ink2); }
.mpdp-detail-body .prose p { margin: 0 0 10px; }
.mpdp-detail-body ul, .mpdp-detail-body ol { margin: 0 0 0 1.3em; padding: 0; }
.mpdp-detail-body li { margin: 0 0 6px; }
.mpdp-detail-body .steps { counter-reset: s; list-style: none; margin: 0; }
.mpdp-detail-body .steps li { counter-increment: s; position: relative; padding-left: 34px; min-height: 24px; }
.mpdp-detail-body .steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--mp-navy); color: var(--mp-navy); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.mpdp-detail-body .pdp-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mpdp-detail-body .pdp-card { border: 1px solid var(--mp-line); border-radius: 8px; padding: 12px; background: #fff; }
.mpdp-detail-body .pdp-card-img { aspect-ratio: 1 / 1; overflow: hidden; border-radius: 6px; background: var(--mp-soft); margin-bottom: 10px; }
.mpdp-detail-body .pdp-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mpdp-detail-body .pdp-card h3 { font-size: 15px; margin: 0 0 4px; font-weight: 700; color: var(--mp-ink); }
.mpdp-detail-body .pdp-card p { font-size: 13.5px; color: var(--mp-ink2); margin: 0; }
.mpdp-detail-body .qa { padding: 10px 0; border-top: 1px dashed var(--mp-line); }
.mpdp-detail-body .qa:first-of-type { border-top: 0; }
.mpdp-detail-body .qa h3 { font-size: 15px; margin: 0 0 4px; font-weight: 600; color: var(--mp-ink); }
.mpdp-detail-body .qa p { margin: 0; font-size: 14px; color: var(--mp-ink2); }
.mpdp-detail-body .note { font-size: 13px; color: var(--mp-muted); margin: 12px 0 0; }

/* —— 手機底欄 —— */
.mpdp-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: stretch; height: calc(58px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px); background: #fff; border-top: 1px solid var(--mp-line); box-shadow: 0 -4px 14px rgba(20,52,60,.06);
}
.mpdp .mpdp-bar-svc {
  flex: 0 0 68px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 11px; color: var(--mp-navy); text-decoration: none; border-right: 1px solid var(--mp-line);
}
.mpdp .mpdp-bar-svc .mpdp-ico { width: 22px; height: 22px; }
.mpdp .mpdp-bar-btn { flex: 1; border: 0; border-radius: 0; font-size: 15px; font-weight: 700; padding: 0 6px; cursor: pointer; margin: 0; line-height: 1.2; }
.mpdp .mpdp-bar .mpdp-btn-cart { background: #fff; color: var(--mp-navy); border: 0; }
.mpdp .mpdp-bar .mpdp-btn-buy { background: var(--mp-red); color: #fff; border: 0; }
.mpdp .mpdp-bar .mpdp-btn-cart:active { background: var(--mp-soft); }
.mpdp .mpdp-bar .mpdp-btn-buy:active { background: var(--mp-red-d); }

@media (max-width: 1023.98px) {
  body.mldi-pdp-v2 { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
  body.mldi-pdp-v2 .mldi-line-float { display: none !important; }
  .mldi-pdp-v2 #content > .ast-container { padding-left: 0; padding-right: 0; }
  .mpdp { padding-top: 0; }
  .mpdp-crumb { display: none; }
  .mpdp-notices { padding: 10px 16px 0; }
  .mpdp-stage { border-radius: 0; }
  .mpdp .mpdp-nav { display: none; }
  .mpdp-thumbs { padding: 10px 16px 2px; }
  .mpdp .mpdp-thumb { flex-basis: 56px; width: 56px; height: 56px; }
  .mpdp-imgnote { padding: 0 16px; }
  .mpdp-buy { padding: 0 16px; }
  .mpdp-detail { padding: 0 16px; }
  .mpdp-ctanote { display: none; }
}
@media (max-width: 480px) {
  .mpdp-detail-body .pdp-items { grid-template-columns: minmax(0, 1fr); }
  .mpdp .mpdp-title { font-size: 18px; }
  .mpdp-price { font-size: 28px; }
}

/* 寬螢幕：左圖右購 */
@media (min-width: 1024px) {
  .mpdp-top { display: flex; align-items: flex-start; gap: 0; }
  .mpdp-gallery { flex: 0 0 55%; width: 55%; padding-right: 32px; position: sticky; top: 16px; }
  .mpdp-buy { flex: 0 0 45%; width: 45%; min-width: 0; }
  .mpdp-info { padding-top: 0; }
  .mpdp .mpdp-title { font-size: 22px; }
  .mpdp-price { font-size: 34px; }
  .mpdp-ctas { display: flex; }
  .mpdp-bar { display: none; }
  .mpdp .mpdp-thumb { flex-basis: 72px; width: 72px; height: 72px; }
  .mpdp-detail { margin-top: 40px; }
}

/* 2026-10-19 fulltest-fix
 * - 手機回頂按鈕（Astra #ast-scroll-top）原本壓在底欄「貨到付款下單」上 → 抬到底欄上方
 * - 素材邊緣瑕疵：01-hero 左側 2–3px 黑線、round01 外框 13px 藍色選取框（圖檔本身就有）→ 圖框內微放大裁掉
 * - 主圖區不顯示焦點框／點擊高亮
 */
@media (max-width: 1023.98px) {
  body.mldi-pdp-v2 #ast-scroll-top { bottom: calc(58px + 14px + env(safe-area-inset-bottom, 0px)) !important; }
}
.mpdp-slide, .mpdp .mpdp-thumb, .mpdp .pdp-card-img { overflow: hidden; }
.mpdp img[src*="/01-hero"] { transform: scale(1.012); }
.mpdp img[src*="/round01"] { transform: scale(1.045); }
.mpdp-stage, .mpdp-track, .mpdp-slide, .mpdp-slide img { -webkit-tap-highlight-color: transparent; }
.mpdp-stage:focus, .mpdp-track:focus, .mpdp-track:focus-visible, .mpdp-slide:focus, .mpdp-slide img:focus { outline: none !important; box-shadow: none !important; }

/* Neway t2 override — visual tokens only */
.mldi-pdp-v2 {
  --mp-red: var(--nw-brand-600, #A85A16);
  --mp-red-d: var(--nw-brand-700, #854612);
  font-family: var(--nw-font, system-ui, Inter, "PingFang TC", "Microsoft JhengHei", "微軟正黑體", "Noto Sans TC", sans-serif);
  color: var(--nw-ink, #181818);
}
.mldi-pdp-v2 .mp-card,
.mldi-pdp-v2 .mp-gallery,
.mldi-pdp-v2 .mp-buy {
  border-radius: var(--nw-r-card, 1rem);
}
.mldi-pdp-v2 .button,
.mldi-pdp-v2 button.single_add_to_cart_button,
.mldi-pdp-v2 .mp-cta .button {
  background: var(--nw-brand-600, #A85A16) !important;
  border-color: var(--nw-brand-600, #A85A16) !important;
  border-radius: var(--nw-r-btn, 999px) !important;
}
.mldi-pdp-v2 .button:hover,
.mldi-pdp-v2 button.single_add_to_cart_button:hover {
  background: var(--nw-brand-700, #854612) !important;
  border-color: var(--nw-brand-700, #854612) !important;
}


/* t3: gallery / buy column / trust chips closer to demo PDP */
.mldi-pdp .mldi-pdp-gallery,
.mldi-tb-gallery {
  border-radius: 16px;
  overflow: hidden;
}
.mldi-pdp .mldi-trust,
.mldi-tb-trust,
.mldi-pdp-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.mldi-pdp .mldi-trust span,
.mldi-tb-trust span,
.mldi-pdp-trust span,
.mldi-pdp .trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--nw-fresh-100, #E3EFD6);
  color: var(--nw-ink, #181818);
  font-size: .875rem;
  font-weight: 600;
}
.mldi-pdp .single_add_to_cart_button,
.mldi-tb .single_add_to_cart_button {
  border-radius: 999px !important;
  min-height: 52px !important;
  font-weight: 600 !important;
}
