/* === Product Detail — layout fix patch === */
.product-detail.container {
	max-width: 1160px;
	margin: 32px auto;
	padding: 0 12px
}

.product-detail .row {
	margin-top: 10px;
	align-items: flex-start
}

/* 左邊：主圖 + 縮圖列 */
.product-detail .pd-media {
	border: 1px solid #eee;
	background: #fff;
	position: relative;
	overflow: hidden;
	/* 避免箭頭突出 */
}

.product-detail .pd-main {
	width: 100%;
	display: block;
	object-fit: cover;
	aspect-ratio: 1/1;
}

/* 左右箭頭共用樣式 */
.product-detail .pd-main-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;

	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;

	background: #ffffff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	display: flex;
	align-items: center;
	justify-content: center;

	cursor: pointer;
	opacity: 0.9;
	transition: all 0.2s ease;
}

.product-detail .pd-main-nav i {
	font-size: 1.2rem;
	color: #333;
}

/* 左右位置 */
.product-detail .pd-main-nav.prev {
	left: 12px;
}

.product-detail .pd-main-nav.next {
	right: 12px;
}

/* Hover 效果 */
.product-detail .pd-main-nav:hover {
	opacity: 1;
	transform: translateY(-50%) scale(1.06);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

@media (max-width: 992px) {
	.product-detail.container {
		padding: 0 20px
	}
}

/* 手機：縮小箭頭、靠近邊 */
@media (max-width: 768px) {
	.product-detail .pd-media {
        touch-action: pan-y;
        user-select: none;
        -webkit-user-select: none;
    }

    .product-detail .pd-main {
        -webkit-user-drag: none;
        user-select: none;
    }
	.product-detail .pd-main-nav {
		width: 32px;
		height: 32px;
	}

	.product-detail .pd-main-nav.prev {
		left: 6px;
	}

	.product-detail .pd-main-nav.next {
		right: 6px;
	}
}

.product-detail .pd-thumbs {
	display: flex;
	gap: 10px;
	margin-top: 10px;
	flex-wrap: wrap
}

.product-detail .pd-thumb {
	padding: 0;
	border: 1px solid #e6e6e6;
	background: #fff;
	line-height: 0;
	border-radius: 2px
}

.product-detail .pd-thumb img {
	width: 72px;
	height: 72px;
	display: block;
	object-fit: cover
}

.product-detail .pd-thumb.is-active {
	outline: 2px solid #0d3d5a;
	outline-offset: 2px
}

/* 商品描述（左下） */
.product-detail .pd-desc {
	margin-top: 14px;
	color: #444;
	font-size: 14px;
	line-height: 1.7;
}

.pd-desc ul {
	list-style: none;
	/* 移除小黑點 */
	padding-left: 0;
	/* 移除左縮排 */
	margin-left: 0;
}

/* 商品優惠活動整塊 */
.pd-promo-wrap {
	margin: 10px 0 14px;
}

/* 本商品適用的優惠活動（像截圖：淡灰字＋底線） */
.pd-promo-title {
	font-size: 13px;
	color: #9aa0a6;
	padding: 0 0 10px;
	margin: 20px 0 10px;
	border-bottom: 1px solid #e9ecef;
}

/* 多條活動之間間距 */
.pd-promo-wrap .pd-promo+.pd-promo {
	margin-top: 6px;
}

/* 產品內容頁：活動訊息條
.product-detail .pd-promo {
	display: flex;
	align-items: flex-start;
	font-size: 0.9rem;
	color: #666666;
	margin: 6px 0 10px;
	line-height: 1.5;
} */

/* 左側金色豎線
.product-detail .pd-promo::before {
	content: "";
	display: inline-block;
	width: 3px;
	height: 1.2em;
	background-color: #dba531;
	margin-right: 8px;
	margin-top: 2px;
} */

/* ===== 商品適用優惠活動：進階列（含 badge） ===== */
.pd-promo-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 5px 0;
	border-top: none;
	position: relative;
}


.pd-promo-badge {
	flex: 0 0 auto;
	font-size: 12px;
	line-height: 1;
	padding: 7px 10px;
	border-radius: 12px;
	font-weight: 700;
	letter-spacing: .5px;
	/* 讓 badge 不壓到左側直線 */
	white-space: nowrap;
}

/* badge 類型（維持你原來的乾淨感，不做太花） */
.pd-promo-badge.is-store {
	background: #dba531;
	border: 1px solid #dba531;
	color: #f6f6f6;
}

.pd-promo-badge.is-gift {
	background: #1ABC9C;
	/* 用你站內綠系的淡底 */
	border: 1px solid #1ABC9C;
	color: #f6f6f6;
}

.pd-promo-text {
	color: #333;
	font-size: 14px;
	line-height: 1.6;
	padding-right: 6px;
}


/* ===== Product Detail: Add-on ===== */
.pd-addon {
	margin-top: 18px;
	border: 1px solid #e9e9e9;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
}

.pd-addon-title {
	margin: 0;
	padding: 14px 16px 6px;
	font-weight: 700;
}

.pd-addon-sub {
	margin: 0;
	padding: 10px 16px 10px;
	color: #666;
	font-size: 14px;
}

.pd-addon-list {
	border-top: 1px solid #eee;
}

.pd-addon-item {
	display: grid;
	grid-template-columns: 44px 78px 1fr;
	gap: 12px;
	padding: 14px 16px;
	align-items: start;
	border-top: 1px solid #f0f0f0;
}

.pd-addon-item:first-child {
	border-top: none;
}

.pd-addon-check {
	display: flex;
	align-items: start;
	justify-content: center;
	padding-top: 6px;
}

.pd-addon-input {
	width: 18px;
	height: 18px;
	cursor: pointer;
}

.pd-addon-thumb {
	width: 78px;
	height: 78px;
	border-radius: 10px;
	overflow: hidden;
	background: #f6f6f6;
	border: 1px solid #eee;
}

.pd-addon-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pd-addon-name {
	font-size: 14px;
	line-height: 1.35;
	color: #222;
	margin-bottom: 6px;
}

.pd-addon-price {
	font-size: 13px;
	color: #1ABC9C;
	margin-bottom: 10px;
}

.pd-addon-price span {
	font-weight: 700;
}

.pd-addon-qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid #e6e6e6;
	border-radius: 10px;
	overflow: hidden;
	height: 34px;
	background: #fff;
}

.pd-qty-btn {
	width: 38px;
	height: 34px;
	border: 0;
	background: #fff;
	font-size: 18px;
	cursor: pointer;
}

.pd-qty-btn:disabled {
	opacity: .35;
	cursor: not-allowed;
}

.pd-qty-input {
	width: 46px;
	height: 34px;
	border: 0;
	outline: none;
	text-align: center;
	font-size: 14px;
	background: #fff;
}

.pd-qty-input:disabled {
	opacity: .6;
}

/* Mobile tighter */
@media (max-width: 576px) {
	.pd-addon-item {
		grid-template-columns: 40px 70px 1fr;
		padding: 12px 12px;
	}

	.pd-addon-thumb {
		width: 70px;
		height: 70px;
	}
}


/* 右邊：標題/SKU/價格 */
.product-detail .pd-title {
	font-size: 28px;
	letter-spacing: .3px;
	margin: 0 0 6px
}

/* 商品標題下方簡短描述 */
.product-detail .pd-short-desc {
	margin: 6px 0 12px;
	color: #f50606;
	font-size: 14px;
	line-height: 1.7;
	letter-spacing: .2px;
}

.product-detail .pd-short-desc br {
	line-height: 1.7;
}

@media (max-width: 575.98px) {
	.product-detail .pd-short-desc {
		font-size: 13.5px;
		margin-bottom: 10px;
	}
}

.product-detail .pd-sku {
	font-size: 12px;
	color: #666;
	margin-bottom: 8px
}

/* ===== 商品強制售完時間提示 ===== */
.product-detail .pd-sale-period {
	display: flex;
	align-items: center;
	gap: 9px;

	width: 100%;
	
	/* 上面多留空間給分隔線 */
	margin: 32px 0 8px;
	padding: 12px 14px;

	border: 1px solid #d9d9d9;
	border-radius: 6px;
	background: #fff;

	color: #666;
	font-size: 13px;
	line-height: 1.6;

	/* 給上方分隔線定位 */
	position: relative;
}

/* ===== 強制售完提示上方分隔線 ===== */
.product-detail .pd-sale-period::before {
	content: "";

	position: absolute;

	top: -21px;
	left: 0;
	right: 0;

	height: 1px;

	background: #dddddd;
}

.product-detail .pd-sale-period i {
	flex: 0 0 auto;
	color: #aaa;
	font-size: 16px;
}

.product-detail .pd-sale-period strong {
	color: #999;
	font-weight: 400;
}

@media (max-width: 575.98px) {
	.product-detail .pd-sale-period {
		padding: 10px 12px;
		font-size: 12px;
	}
}

.product-detail .pd-price {
	font-size: 20px;
	margin-top: 12px;
	margin-bottom: 12px
}

.product-detail .pd-price .old {
	color: #777;
	text-decoration: line-through;
	margin-right: 8px
}

.product-detail .pd-price .new {
	font-weight: 600
}

.product-detail .pd-price:has(.old) .new {
	color: #e03131;
}

/* 色票列 */
.product-detail .pd-field {
	margin: 20px 0
}

.product-detail .pd-label {
	display: block;
	font-size: 14px;
	margin-bottom: 8px
}


/* ===== Type / 型號 / SIZE / 容量 按鈕 ===== */
.product-detail .pd-types {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-top: 6px;
}

.product-detail .pd-type-btn {
	min-height: 34px;
	padding: 6px 16px;

	background: #fff;
	border: 1px solid #ddd;

	color: #222;
	font-size: 14px;
	line-height: 1.4;

	cursor: pointer;

	transition:
		border-color .2s ease,
		color .2s ease,
		background-color .2s ease;
}

/* 滑鼠移上去 */
.product-detail .pd-type-btn:hover {
	border-color: #1ABC9C;
	color: #1ABC9C;
}

/* 已選取 */
.product-detail .pd-type-btn.is-active {
	border-color: #1ABC9C;
	color: #1ABC9C;
	background: #f7fcff;
}


/* 原本顏色色票，完全不動 */
.product-detail .pd-swatches {
	display: flex;
	gap: 10px;
	align-items: center;
	min-height: 28px
}

.product-detail .pd-swatches {
	display: flex;
	gap: 10px;
	align-items: center;
	min-height: 28px
}

.product-detail .pd-swatches:empty {
	display: none;
	/* 沒有色票 → 不顯示、不佔位 */
}

.product-detail .pd-swatch {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 1px solid #bbb;
	cursor: pointer
}

.product-detail .pd-swatch.is-active {
	outline: 2px solid var(--green, #557c68);
	outline-offset: 2px
}

.pd-label #pdColorName {
	font-weight: 600;
	margin: 0 2px;
}


/* 數量 input-group 不要撐滿一整行 */
.product-detail .pd-qty {
	max-width: 120px;
}

.product-detail .pd-qty .btn {
	height: 34px;
	min-width: 38px
}

.product-detail .pd-qty .form-control {
	height: 34px
}

/* === 移除數量輸入框內的上下箭頭 === */

/* Chrome / Safari / Edge (WebKit) */
.product-detail input[type=number]::-webkit-inner-spin-button,
.product-detail input[type=number]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Firefox */
.product-detail input[type=number] {
	-moz-appearance: textfield;
}


/* 主要按鈕寬度一致 */
.product-detail #pdAdd {
	border: 1px solid #d5dcd8
}

.product-detail #pdAdd,
.product-detail #pdBuy {
	border-radius: 0;
	display: block;
	width: 100%
}

.product-detail #pdBuy:hover {
	filter: brightness(0.95);
}

/* ===== 主商品售完 / disabled 狀態 ===== */
.product-detail #pdAdd.is-disabled,
.product-detail #pdBuy.is-disabled,
.product-detail #pdAdd:disabled,
.product-detail #pdBuy:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	pointer-events: none;
	filter: grayscale(0.15);
}

/* ===== 商品售完文字 ===== */
.product-detail #pdSoldOutText {
	display: none;
	width: 100%;
	justify-content: center;
	align-items: center;
	text-align: center;
	font-size: 20px;
	font-weight: 600;
	margin: 14px 0 10px;
	color: #666;
}

.product-detail #pdAdd.is-disabled:hover,
.product-detail #pdBuy.is-disabled:hover,
.product-detail #pdAdd:disabled:hover,
.product-detail #pdBuy:disabled:hover {
	filter: grayscale(0.15);
}

/* 摺疊區塊按鈕改成一整列、左右對齊 + 邊線 */
.product-detail .pd-accord .pd-acc-btn {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #fff;
	border: 0;
	border-top: 1px solid #e9e9e9;
	padding: 14px 0;
	font-weight: 500;
	letter-spacing: .3px
}

.product-detail .pd-accord .pd-acc-body {
	padding: 8px 0 14px;
	color: #444;
	border-bottom: 1px solid #e9e9e9
}

/* 顧客評價來源小標示 */
.pd-review-source {
	margin-top: 12px;
	font-size: 0.85rem;
	color: #888;
}

.pd-review-source span {
	font-weight: 600;
	/* 「此店」稍微加粗 */
}

.pd-review-list {
	margin-top: 8px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* 單一評價 */
.pd-review-item {
	padding: 12px 14px;
	border: 1px solid #e6e6e6;
	border-radius: 6px;
	background: #fafafa;
}

.pd-review-user {
	font-weight: 600;
	margin-bottom: 4px;
	color: #333;
}

.pd-review-stars {
	color: #d49000;
	/* 星星顏色 */
	font-size: 0.9rem;
	margin-bottom: 6px;
}

.pd-review-text {
	font-size: 0.9rem;
	color: #444;
	line-height: 1.4;
}

/* 小螢幕微調 */
@media (max-width: 991.98px) {
	.product-detail.container {
		padding-top: 12px
	}

	.product-detail .pd-title {
		font-size: 24px
	}
}

@media (max-width: 575.98px) {
	.product-detail .pd-desc {
		font-size: 13.5px;
	}
}

/* === Breadcrumb 與 Prev/Next 對齊修正 === */
.product-detail .pd-topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 18px;
	flex-wrap: wrap;
}

/* 左邊 breadcrumb */
.product-detail .pd-breadcrumb {
	font-size: 14px;
	color: #666;
	margin: 0;
}

.product-detail .pd-breadcrumb a {
	color: #0d3d5a;
	text-decoration: none;
}

.product-detail .pd-breadcrumb a:hover {
	text-decoration: underline;
}

.product-detail .pd-breadcrumb .is-active {
	color: #000;
	font-weight: 600;
}

.product-detail .pd-breadcrumb .sep {
	color: #aaa;
	font-size: 12px;
	line-height: 1;
}

.product-detail .pd-breadcrumb span {
	margin: 0 6px;
}

/* 右邊 Prev | Next */
.product-detail .pd-prevnext {
	font-size: 14px;
	color: #777;
}

.product-detail .pd-prevnext a {
	color: #777;
	text-decoration: none;
	margin: 0 4px;
}

.product-detail .pd-prevnext a:hover {
	color: var(--green, #557c68);
	text-decoration: underline;
}

/* 加入收藏愛心：商品內頁 / 組合商品內頁共用 */
.pd-title-row {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.pd-title-row .pd-title {
	flex: 0 1 auto;
	margin: 0;
}

.pd-fav-btn {
	border: none;
	background: transparent;
	padding: 2px 0 0;
	margin: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: inherit;
	cursor: pointer;
	flex: 0 0 auto;
}

.pd-fav-btn .bi-heart,
.pd-fav-btn .bi-heart-fill {
	font-size: 1.25rem;
	line-height: 1;
}

.pd-fav-btn:hover {
	color: #e74c3c;
}

.pd-fav-btn.is-fav .bi-heart-fill {
	color: #e74c3c;
}

/* ===== Product Detail: Ad Banner (above full image) ===== */
.pd-ad-banner-wrap {
    margin: 36px auto 28px;
    max-width: 1200px;
	border-top: 1px solid #dedede; /* 保留原本上方灰線 */
    padding-top: 24px;             /* 灰線與輪播圖的距離 */
}

.pd-ad-banner {
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.pd-ad-banner img {
    display: block;
    width: 100%;
    height: auto;
}

.pd-product-slider .carousel-control-prev,
.pd-product-slider .carousel-control-next {
    width: 44px;
}

@media (max-width: 768px) {
    .pd-ad-banner-wrap {
        margin: 24px auto 20px;
        padding-top: 18px;
    }

}

/* ===== YouTube Thumbnail Player ===== */
.youtube-container {
	position: relative;
	max-width: 820px;
	/* 跟產品圖一致 */
	margin: 20px auto 20px;
	width: 100%;
	aspect-ratio: 16 / 9;
	/* 固定比例 */
	cursor: pointer;
	overflow: hidden;
	background: #000;
}

/* 縮圖 */
.youtube-thumbnail {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* 中央播放鍵 */
.youtube-play-button {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	pointer-events: none;
}

.youtube-play-button::before {
	content: '';
	width: 68px;
	height: 48px;
	background: rgba(0, 0, 0, .75);
	border-radius: 12px;
	position: absolute;
}

.youtube-play-button::after {
	content: '';
	border-style: solid;
	border-width: 10px 0 10px 18px;
	border-color: transparent transparent transparent #fff;
	margin-left: 4px;
	position: relative;
}

/* hover 效果 */
.youtube-container:hover .youtube-play-button::before {
	background: #ff0000;
}


/* 下方置中產品圖 */
.product-detail .pd-full-image-wrap {
	margin: 30px auto 30px;
	text-align: center;
	max-width: 960px;
	/* 不要太寬，跟版心對齊 */
}

.product-detail .pd-full-image {
	max-width: 820px;
	/* 依喜好調整尺寸 */
	width: 100%;
	height: auto;
	object-fit: contain;
}

/* 商品詳情圖單筆區塊 */
.product-detail .pd-content-image-item {
	max-width: 820px;
	margin: 0 auto;
	text-align: center;
}

/* 圖片上方文字 */
.product-detail .pd-content-image-caption {
    margin: 24px 0 12px;
    font-size: 16px;
    line-height: 1.6;
}

/* 有超連結的文字 */
.product-detail .pd-content-image-link {
	color: #1ABC9C;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.product-detail .pd-content-image-link:hover {
	color: #159a80;
}

/* 沒有超連結的普通文字 */
.product-detail .pd-content-image-text {
	color: #333;
}

.product-detail .pd-content-image-image-link {
    display: block;
    text-decoration: none;
}

.product-detail .pd-content-image-image-link .pd-full-image {
    display: block;
}

.product-detail .pd-content-image-image-link:hover {
    opacity: 0.96;
}

/* 手機 */
@media (max-width: 575.98px) {
    .product-detail .pd-content-image-caption {
        margin: 20px 0 10px;
        font-size: 14px;
    }
}

/* === Product Detail - Related Products (同品牌推薦) === */
.pd-related {
	max-width: 1100px;
	margin: 48px auto 56px;
	padding: 0 12px;
}

.pd-related-title {
	font-size: 1.3rem;
	font-weight: 600;
	margin-bottom: 20px;
}

/* 用 grid 自適應排版：桌機可 4~5 個，手機自動換行 */
.pd-related-list {
	display: grid;
	/*grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));*/
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

/* 單張卡片 */
.pd-rel-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e6e6e6;
	border-radius: 4px;
	background-color: #fff;
	text-align: center;
	padding: 12px;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	position: relative;
}

.pd-rel-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

/* 上半部連結：圖片＋文字 */
.pd-rel-link {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	flex: 1;
}

/* 「加入購物車」按鈕：用 btn-outline 樣式，再讓它撐滿寬度 */
.pd-rel-add,
.pd-rel-select {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin-top: auto;
	min-height: 46px;
	text-align: center;
	text-decoration: none !important;
}

/* 相關產品圖片區，要讓 SALE 標籤定位用 */
.pd-rel-img {
	position: relative;
}


/* SALE 標籤壓在圖片左上角 */
.pd-rel-img .badge-sale {
	position: absolute;
	top: 10px;
	/* 想更貼邊就改小一點 */
	left: 10px;
	right: auto;
	/* 把原本右邊定位覆蓋掉（如果有） */
	background-color: #b25500;
	color: #fff;
	font-size: 0.75rem;
	padding: 4px 6px;
	border-radius: 3px;
	z-index: 5;
}

/* 圖片 */
.pd-rel-img img {
	width: 100%;
	display: block;
	border-radius: 3px;
	object-fit: cover;
	aspect-ratio: 4 / 3;
	margin-bottom: 8px;
}

/* 名稱 & 價格 */
.pd-rel-name {
	font-size: 0.9rem;
	line-height: 1.6;
	height: 3.2em;
	margin-bottom: 4px;

	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pd-rel-price {
	font-weight: 600;
	font-size: 0.95rem;
	min-height: 24px;
	white-space: nowrap;
}

@media (max-width: 575.98px) {
	.pd-rel-price {
		font-size: 0.9rem;
	}

	.pd-price-old {
		margin-right: 4px;
		font-size: 0.8rem;
	}
}

/* 舊價格（劃掉） */
.pd-price-old {
	color: #999;
	text-decoration: line-through;
	margin-right: 6px;
	font-size: 0.85rem;
}

/* 新價格（強調） */
.pd-price-new {
	color: #333;
	font-weight: 600;
}

.pd-rel-price:has(.pd-price-old) .pd-price-new {
	color: #e03131;
}


@media (max-width: 575.98px) {
	.pd-related {
		margin-top: 32px;
		margin-bottom: 40px;
	}
}


/* 平板：2 欄 */
@media (max-width: 992px) {
	.pd-related-list {
		grid-template-columns: repeat(2, 1fr);
	}
}