/* CSS Document */
.page-filter {
	margin-left: auto !important;
	width: 130px !important;
	border: solid 1px #EDEDED;
	padding: 0.25rem 0.5rem;
}
.page-filter:not(.bootstrap-select) li {
	margin-left: 1.5rem;
}
.page-filter:not(.bootstrap-select) li a {
	position: relative;
	padding-bottom: 8px;
	color: var(--dark);
}
.page-filter:not(.bootstrap-select) li.active a:before {
	content: '';
	display: block;
	width: 100%;
	height: 3px;
	background-color: var(--bg-color);
	position: absolute;
	left: 0;
	bottom: 0;
}
.page-filter:not(.bootstrap-select) li.active a, .page-filter:not(.bootstrap-select) li:hover a {
	color: var(--color-link);
}
.page-filter:not(.bootstrap-select) li.active a .st0, .page-filter:not(.bootstrap-select) li a:hover .st0 {
	fill: var(--color-link);
}
.page-filter .dropdown-item.active, .page-filter .dropdown-item:active {
	background-color: var(--secondary-color);
}
.page-filter .btn-light {
	background-color: #fff;
	border-color: #D0D0D0;
}
.page-filter .btn-light:not(:disabled):not(.disabled):active, 
.page-filter .btn-light:not(:disabled):not(.disabled).active, 
.page-filter.show > .btn-light.dropdown-toggle {
	background-color: #fff;
	border-color: #D0D0D0;
}
.page-filter .dropdown-item.active {
	color: #fff;
}
.sale-flash {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 5;
	min-width: 60px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.25rem;
}
.sale-flash .badge {
	display: block;
	text-align: center;
	background-color: rgba(200,200,200,0.3);
	padding: 0.35rem 0.5rem;
	border-radius: 0.25rem;
	min-width: 45px;
}
.badge.badge-new {
	color: #fff;
    background-color: #f40000;
}
#view-type {
	display: inline-flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	flex: 0 0 auto !important;
	width: auto !important;
	max-width: none !important;
}
#view-type > a.btn,
#view-type > a.btn-sm {
	display: inline-flex !important;
	flex: 0 0 auto !important;
	width: auto !important;
	max-width: none !important;
	float: none !important;
	clear: none !important;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	border-color: #EDEDED;
}
#view-type > a.btn.active,
#view-type > a.btn-sm.active {
	background-color: #eeeeee;
}
#view-type .material-symbols-outlined {
	display: inline-block;
	line-height: 1;
	font-size: 20px;
}
#cart_modal .product-modal-specs .checkbox-style-3-label {
	margin-bottom: 0;
}

/* 詳情頁：不顯示右側第二商品區塊時改全寬 2026/8/5 */
.product-detail-no-sidebar .product-detail-main-full {
	max-width: 100%;
	flex: 0 0 100%;
}
.product-detail-no-sidebar .product_detail_block {
	width: 100%;
}
.product-detail-no-sidebar #myTab.nav-tabs.sticky {
	width: 100%;
	left: 0;
	right: 0;
}

@media (max-width: 991.98px) {
	#view-type {
		margin-left: auto;
	}
	.page-filter {
		margin-left: 10px !important;
		width: 90px !important;
	}
	.product-type-title-xs {
		width: auto;
		flex: 1 1 auto;
		min-width: 0;
	}
}

/* 無售價時：操作圖示貼標題右側，避免空洞底欄 2026/08/11 starfire */
.shop .product-title .product-item-action,
.shop .product-title .product-actions,
.oc-item .product-title .product-item-action {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	gap: 0.5rem;
	margin-left: 0.5rem;
	padding-top: 0.15rem;
}
.shop .product-title > h3,
.oc-item .product-title > h3 {
	flex: 1 1 auto;
	min-width: 0;
	margin-bottom: 0;
}
.shop:not(.list-view) .product-desc:not(:has(.product-price-box)) h3 a,
.oc-item .product-desc:not(:has(.product-price-box)) h3 a {
	min-height: 0;
}
.shop .product-price-box .product-item-action,
.oc-item .product-price-box .product-item-action {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	margin-left: auto;
	gap: 0.5rem;
	line-height: 1;
}
.shop.list-view .product-footer .product-actions {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	margin-left: auto;
	gap: 0.75rem;
}
.product-item-action .add-to-fav, .product-item-action .add-to-fav .material-symbols-outlined {
	font-size: 1.625rem;
}
.product-item-action .add-to-fav i, .product-fav i, .product-sticky-cart-fav .add-to-fav i {
  display: inline-block;
  width: 1.625rem;
  height: 1.625rem;
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 -960 960 960' width='24px' fill='%231f1f1f'%3E%3Cpath d='m480-146.93-44.15-39.69q-99.46-90.23-164.5-155.07-65.04-64.85-103.08-115.43-38.04-50.57-53.15-92.27Q100-591.08 100-634q0-85.15 57.42-142.58Q214.85-834 300-834q52.38 0 99 24.5t81 70.27q34.38-45.77 81-70.27 46.62-24.5 99-24.5 85.15 0 142.58 57.42Q860-719.15 860-634q0 42.92-15.12 84.61-15.11 41.7-53.15 92.27-38.04 50.58-102.89 115.43Q624-276.85 524.15-186.62L480-146.93Zm0-81.07q96-86.38 158-148.08 62-61.69 98-107.19t50-80.81q14-35.3 14-69.92 0-60-40-100t-100-40q-47.38 0-87.58 26.88-40.19 26.89-63.65 74.81h-57.54q-23.85-48.31-63.85-75Q347.38-774 300-774q-59.62 0-99.81 40Q160-694 160-634q0 34.62 14 69.92 14 35.31 50 80.81t98 107q62 61.5 158 148.27Zm0-273Z'/%3E%3C/svg%3E");
  background-color: currentColor;
  -webkit-mask-image: var(--svg);
  mask-image: var(--svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
.product-item-action .add-to-fav.active i, .product-fav.active i, .product-sticky-cart-fav .add-to-fav.active i {
  display: inline-block;
  width: 1.625rem;
  height: 1.625rem;
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 -960 960 960' width='24px' fill='%231f1f1f'%3E%3Cpath d='m480-146.93-44.15-39.69q-99.46-90.23-164.5-155.07-65.04-64.85-103.08-115.43-38.04-50.57-53.15-92.27Q100-591.08 100-634q0-85.15 57.42-142.58Q214.85-834 300-834q52.38 0 99 24.5t81 70.27q34.38-45.77 81-70.27 46.62-24.5 99-24.5 85.15 0 142.58 57.42Q860-719.15 860-634q0 42.92-15.12 84.61-15.11 41.7-53.15 92.27-38.04 50.58-102.89 115.43Q624-276.85 524.15-186.62L480-146.93Z'/%3E%3C/svg%3E");
  background-color: red;
  -webkit-mask-image: var(--svg);
  mask-image: var(--svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
.product-fav i, .product-fav.active i {
	font-size: 1.5rem;
}

/* 商品詳情頁籤：完整顯示標籤文字，禁止省略 2026/08/11 starfire */
.product_detail_block .nav.nav-tabs .nav-item {
	flex: 1 1 0;
	min-width: 0;
}
.product_detail_block .nav-tabs .nav-link {
	white-space: nowrap;
	overflow: visible;
	text-overflow: clip;
	padding-left: 0.5rem;
	padding-right: 0.5rem;
}
@media (max-width: 575.98px) {
	.product_detail_block .nav.nav-tabs .nav-item {
		flex: 1 1 auto;
	}
	.product_detail_block .nav-tabs .nav-link {
		font-size: 0.875rem;
		padding-left: 0.25rem;
		padding-right: 0.25rem;
	}
}

/* sticky 數量列：桌機／手機共用結構 2026/08/12 starfire */
.product-sticky-qty-ctrl {
	display: flex;
	align-items: stretch;
	width: 100%;
}
.product-sticky-qty-ctrl .minus,
.product-sticky-qty-ctrl .plus {
	flex: 0 0 40px;
	width: 40px;
	cursor: pointer;
}
.product-sticky-qty-ctrl .qty {
	flex: 1 1 auto;
	min-width: 0;
	width: auto !important;
	text-align: center;
}

/* 手機詳情底欄購物車：對齊、滿寬、消除右側白邊 2026/08/12 starfire */
@media (max-width: 991.98px) {
	.single-product .product {
		padding-bottom: 64px;
	}
	.product-sticky-cart {
		position: fixed;
		z-index: 199;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		max-width: 100%;
		margin: 0 !important;
		padding: 0;
		padding-bottom: env(safe-area-inset-bottom, 0);
		background: #fff;
		border-top: 1px solid #e6e6e6;
		box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
		display: flex !important;
		flex-wrap: wrap;
		align-items: stretch;
		min-height: 52px;
	}
	.product-sticky-cart .sticky-spec-mobile-wrapper {
		flex: 0 0 100%;
		width: 100%;
		order: -1;
		padding: 8px 12px !important;
		border-bottom: 1px solid #eee;
		background: #fff;
	}
	.product-sticky-cart-fav {
		flex: 0 0 56px;
		width: 56px;
		border-right: 1px solid #ececec;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.product-sticky-cart-fav .add-to-fav {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 52px;
		padding: 0;
		margin: 0;
		line-height: 1.1;
		font-size: 11px;
		color: #555;
		text-decoration: none;
	}
	.product-sticky-cart-fav .add-to-fav i {
		width: 22px;
		height: 22px;
		font-size: 22px;
		line-height: 1;
		margin-bottom: 2px;
	}
	.product-sticky-cart-qty .quantity {
		width: 100%;
		margin: 0;
		float: none;
	}
	.product-sticky-qty-ctrl {
		display: flex;
		align-items: stretch;
		width: 100%;
		height: 52px;
	}
	.product-sticky-qty-ctrl .minus,
	.product-sticky-qty-ctrl .plus,
	.product-sticky-qty-ctrl .qty {
		height: 52px !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: #fff !important;
		box-shadow: none !important;
		margin: 0 !important;
	}
	.product-sticky-qty-ctrl .minus,
	.product-sticky-qty-ctrl .plus {
		flex: 0 0 36px;
		width: 36px;
		padding: 0;
		color: #515154 !important;
		font-size: 18px;
		line-height: 52px;
		cursor: pointer;
	}
	.product-sticky-qty-ctrl .qty {
		flex: 1 1 auto;
		min-width: 0;
		width: auto !important;
		text-align: center;
		font-size: 15px;
		line-height: 52px;
		padding: 0;
		color: #222;
	}
	.product-sticky-cart-action .button,
	.product-sticky-cart-action .add-to-cart {
		width: 100%;
		min-height: 52px;
		height: 100%;
		margin: 0 !important;
		padding: 0 12px !important;
		border: 0 !important;
		border-radius: 0 !important;
		line-height: 52px !important;
		font-size: 15px;
		font-weight: 600;
		letter-spacing: 0.02em;
	}
}

/* Specification Style */
.product-detail-option-row {
    margin-bottom: 0.25rem;
}
.product-detail-option-label {
    min-width: 5.5rem;
    white-space: nowrap;
    line-height: 33px;
}
#product_detail_spec .checkbox-style-3-label, 
#product_detail_spec_sticky .checkbox-style-3-label, 
.sticky-spec-mobile-wrapper .checkbox-style-3-label {
	border: solid 2px #ddd;
	padding: 0.375rem 0.65rem;
	margin-left: 0;
	margin-top: 0;
}
#product_detail_spec .checkbox-style:checked + .checkbox-style-3-label, 
#product_detail_spec_sticky .checkbox-style:checked + .checkbox-style-3-label, 
.sticky-spec-mobile-wrapper .checkbox-style:checked + .checkbox-style-3-label {
	border-color: var(--primary-color, var(--main-color));
	color: var(--primary-color, var(--main-color));
}
#product_detail_spec .checkbox-style-3-label:before, 
#product_detail_spec_sticky .checkbox-style-3-label:before, 
.sticky-spec-mobile-wrapper .checkbox-style-3-label:before {
	display: none;
}

/* Product Content Styles */
.product_detail_block .nav-tabs .nav-link {
    border-radius: 0;
}
.product_detail_block .nav-tabs .nav-link:first-child {
    border-top-left-radius: 10px;
}
.product_detail_block .nav-tabs .nav-link:last-child {
    border-top-right-radius: 10px;
}
.product_detail_block .nav-tabs .nav-link:hover, .product_detail_block .nav-tabs .nav-link:focus {
	border-color: transparent transparent transparent;
}
.product_detail_block .nav.nav-tabs .nav-item {
    -ms-flex-preferred-size: 0;
    flex-basis: 0;
    -ms-flex-positive: 1;
    flex-grow: 1;
    text-align: center;
    font-weight: 500;
}
.product_detail_block .nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link {
    border-color: transparent;
	border-bottom: 3px solid var(--primary-color, var(--main-color));
    top: -2px;
	color: var(--primary-color, var(--main-color));
}

/* Alert Modal Style */
.alert-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 40px;
    border-radius: 8px;
    z-index: 9999;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.alert-modal-content i {
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--color-tonal);
}

.product-modal-cart .add-to-fav {
	display: block;
    text-align: center;
    font-size: 0.75rem;
    padding: 0 0.75rem;
}
.product-modal-cart .add-to-fav i {
	font-size: 1.25rem;
	width: 20px;
	height: 20px;
}