﻿/*
 * ============================================================
 * TABLE OF CONTENTS (目錄)
 * ============================================================
 *
 *  1.  Filter Top
 *
 *  2.  Filter Tabs
 *
 *  3.  Filter Tab
 *      3-1. Filter Tab 基本樣式
 *      3-2. Filter Arrow Icons
 *
 *  4.  Products Layout
 *
 *  5.  Products Sidebar
 *
 *  6.  Products Main
 *
 *  7.  Intro Text
 *
 *  8.  Filter Section
 *
 *  9.  Filter Item
 *
 * 10.  Category Section
 *
 * 11.  Horizontal Product Grid
 *      11-1. Horizontal Product Card
 *      11-2. Select Dropdown in Card
 *
 * 12.  RWD: min-width: 1200px
 *
 * 13.  RWD: min-width: 1400px
 *
 * 14.  RWD: min-width: 1600px
 *
 * 15.  RWD: max-width: 1199px
 *
 * 16.  RWD: max-width: 991px
 *
 * 17.  RWD: max-width: 767px
 *
 * 18.  RWD: max-width: 576px
 *
 * ============================================================
 */
/* ============================================================
 * 1. Filter Top
 * ============================================================ */
.filter-tabs-top {
		top: 70px;
		background-color: var(--color-white);
}
.filter-top {
		top: 70px;
		min-height: 45px;
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-align: center;
		-ms-flex-align: center;
		align-items: center;
		background-color: var(--color-white);
}
.filter-top.active {
		-webkit-box-shadow: 0 .125rem .5rem rgba(0, 0, 0, .15);
		box-shadow: 0 .125rem .5rem rgba(0, 0, 0, .15);
		width: 100%;
}
.filter-top .filter-tabs {
		background-color: var(--color-white);
		min-height: 45px;
		height: inherit;
}
.filter-top.only.active .filter-tabs.only {
		top: 0;
		position: relative;
		min-height: 45px;
}
/* ============================================================
 * 2. Filter Tabs
 * ============================================================ */
.filter-tabs {
		position: relative;
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		gap: 0;
		-ms-flex-wrap: nowrap;
		flex-wrap: nowrap;
		margin-bottom: 0;
		overflow-y: hidden;
		overflow-x: auto;
		background-color: var(--color-white);
		line-height: 1.25;
		min-height: 45px;
		-webkit-overflow-scrolling: touch;
		scroll-behavior: smooth;
		scrollbar-width: none;
		-ms-overflow-style: none;
		width: 100%;
}
.filter-tabs::-webkit-scrollbar {
		display: none;
}
.filter-tabs-top:not(.only) .info-content, .filter-top:not(.only) .info-content {
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-align: center;
		-ms-flex-align: center;
		align-items: center;
}
.filter-tabs-top:not(.only) .info-content .filter-tabs, .filter-top:not(.only) .info-content .filter-tabs {
		-webkit-box-flex: 1;
		-ms-flex: 1;
		flex: 1;
		min-width: 0;
}
.nav-arrows-group {
		display: none;
		-ms-flex-negative: 0;
		flex-shrink: 0;
		-webkit-box-align: center;
		-ms-flex-align: center;
		align-items: center;
		gap: 5px;
		padding-left: .5rem;
}
.has-scroll .nav-arrows-group {
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
}
.nav-arrow {
		width: 26px;
		height: 26px;
		border-radius: 5px;
		border: 1px solid var(--color-gray);
		color: var(--color-gray);
		font-size: 1.75rem;
		line-height: .75;
		cursor: pointer;
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-pack: center;
		-ms-flex-pack: center;
		justify-content: center;
		-webkit-transition: opacity 0.2s ease, background 0.2s ease;
		transition: opacity 0.2s ease, background 0.2s ease;
		padding: 0;
		-webkit-user-select: none;
		-moz-user-select: none;
		-ms-user-select: none;
		user-select: none;
}
.nav-arrow:hover {
		background: rgba(0, 0, 0, 0.65);
		color: var(--color-white);
}
.filter-tabs-top .info-content, .filter-top:not(.only) .info-content {
		position: relative;
}
.filter-tabs-top .info-content::after, .filter-top:not(.only) .info-content::after {
		content: '';
		position: absolute;
		display: block;
		width: 100%;
		height: 2px;
		background: var(--bg-gradient-sp);
		left: 0;
		right: 0;
		bottom: 0;
		margin: auto;
}
.filter-tabs.only::after {
		display: none;
}
.filter-tabs.only .filter-tab:first-child {
		background-color: transparent;
		color: var(--secondary-blue);
		border: 0;
		padding: 0;
		-webkit-box-pack: start;
		-ms-flex-pack: start;
		justify-content: flex-start;
}
.filter-tabs.only .filter-tab:first-child img {
		-webkit-filter: var(--svg-hover-blue);
		filter: var(--svg-hover-blue);
}
/* ============================================================
 * 3. Filter Tab
 * ============================================================ */
/* ---- 3-1. Filter Tab 基本樣式 ---- */
.filter-tab {
		padding: 10px 8px;
		color: var(--color-gray);
		text-decoration: none;
		border-bottom: 3px solid transparent;
		white-space: nowrap;
		-webkit-transition: all 0.3s ease;
		transition: all 0.3s ease;
		position: relative;
		top: 0;
		text-align: center;
		font-size: var(--font-size-base);
		font-weight: normal;
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-align: center;
		-ms-flex-align: center;
		align-items: center;
		-webkit-box-pack: center;
		-ms-flex-pack: center;
		justify-content: center;
		line-height: 1;
		margin: auto;
}
.filter-divider {
		display: inline-block;
		-ms-flex-negative: 0;
		flex-shrink: 0;
		width: 1px;
		height: 20px;
		background-color: var(--color-gray);
		-ms-flex-item-align: center;
		-ms-grid-row-align: center;
		align-self: center;
		-webkit-transform: scaleX(0.99);
		-ms-transform: scaleX(0.99);
		transform: scaleX(0.99);
		-webkit-transform-origin: center center;
		-ms-transform-origin: center center;
		transform-origin: center center;
}
.filter-tab:hover {
		color: var(--dark-blue);
}
.filter-tab.active {
		color: var(--dark-blue);
}
.filter-tabs-top .filter-tabs:not(.only), .filter-top .filter-tabs:not(.only) {
		-webkit-box-pack: justify;
		-ms-flex-pack: justify;
		justify-content:flex-start;
}
.filter-top.sticky-top.active .filter-tab:first-child, .filter-tabs-top.sticky-top.active .filter-tab:first-child {
		border-radius: 0;
}
.filter-tab:first-child {
		background: var(--secondary-blue);
		color: var(--color-white);
		border-radius: 4px 4px 0 0;
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-align: center;
		-ms-flex-align: center;
		align-items: center;
		-webkit-box-pack: center;
		-ms-flex-pack: center;
		justify-content: center;
		gap: 8px;
		width: 150px;
	 min-width: 150px;
		max-width: 150px;
		position: sticky;
		left: 0;
		z-index: 2;
		 margin: 0;
    -webkit-box-flex: 0;
        -ms-flex: 0 0 150px;
            flex: 0 0 150px;
}
.filter-tab:first-child.collapsed, .filter-tab:first-child:hover {
		background-color: var(--dark-blue);
}
/* ---- 3-2. Filter Arrow Icons ---- */
.filter-arrow-left, .filter-arrow-right {
		width: 16px;
		height: 16px;
		-webkit-transition: opacity 0.3s ease;
		transition: opacity 0.3s ease;
		-webkit-filter: brightness(0) invert(1);
		filter: brightness(0) invert(1);
}
.filter-tab:first-child .filter-arrow-left {
		display: block;
		opacity: 1;
}
.filter-tab:first-child .filter-arrow-right {
		display: none;
		opacity: 0;
}
.filter-tab:first-child.collapsed .filter-arrow-left {
		display: none;
		opacity: 0;
}
.filter-tab:first-child.collapsed .filter-arrow-right {
		display: block;
		opacity: 1;
}
.filter-icon {
		width: 28px;
}
/* ============================================================
 * 4. Products Layout
 * ============================================================ */
.products-layout {
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		gap: 50px;
}
.products-layout.collapsed {
		gap: 0;
}
.products-layout.collapsed .products-sidebar {
		width: 0;
		height: 0;
		padding: 0;
		border: none;
		opacity: 0;

		visibility: hidden;
		overflow: hidden;
}
.products-layout.collapsed .has-change .category-header {
		text-align: start !important;
}
/* ============================================================
 * 5. Products Sidebar
 * ============================================================ */
.products-sidebar {
		position: relative;
		top: 0;
		width: 360px;
		-ms-flex-negative: 0;
		flex-shrink: 0;
		background-color: var(--color-white);
		border: 1px solid var(--border-color);
		-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.125);
		box-shadow: 0 2px 5px rgba(0, 0, 0, 0.125);
		border-radius: 8px;
		padding: 15px 20px;
		overflow-y: auto;
		-webkit-transition: all 0.3s ease;
		transition: all 0.3s ease;
		opacity: 1;
		visibility: visible;
		max-height: -webkit-fit-content;
		max-height: -moz-fit-content;
		max-height: fit-content;
}
/* ============================================================
 * 6. Products Main
 * ============================================================ */
.products-main {
		-webkit-box-flex: 1;
		-ms-flex: 1;
		flex: 1;
		min-width: 0;
}
/* ============================================================
 * 7. Intro Text
 * ============================================================ */
.intro-text {
		margin: 0 auto 45px auto;
		color: #666;
		font-size: var(--font-size-base);
		line-height: 1.8;
		position: relative;
		padding-right: 0;
		max-width: calc(100% - 100px);
}
.intro-text.collapsed {
		display: none;
}
.intro-close {
		position: absolute;
		top: -15px;
		right: 0;
		background-color: transparent;
		border: none;
		color: var(--color-gray);
		cursor: pointer;
		font-size: var(--font-size-2lg);
		padding: 5px 10px;
		display: none;
		pointer-events: none;
}
.intro-close:hover {
		color: var(--dark-gray);
}
/* ============================================================
 * 8. Filter Section
 * ============================================================ */
.filter-section-header {
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-pack: end;
		-ms-flex-pack: end;
		justify-content: flex-end;
		-webkit-box-align: center;
		-ms-flex-align: center;
		align-items: center;
		padding: 10px 0;
		cursor: pointer;
		-webkit-user-select: none;
		-moz-user-select: none;
		-ms-user-select: none;
		user-select: none;
		color: var(--dark-blue);
		font-size: var(--font-size-xs);
}
.filter-section:last-child .filter-section-header {
		border-bottom: 0;
}
.filter-section .filter-section-header {
		-webkit-box-pack: start;
		-ms-flex-pack: start;
		justify-content: flex-start;
		font-size: var(--font-size-base);
		color: var(--dark-gray);
		border-bottom: 1px solid var(--border-color);
}
.filter-toggle-icon {
		width: 16px;
		height: 16px;
		-webkit-transition: opacity 0.3s ease;
		transition: opacity 0.3s ease;
		margin-right: 10px;
}
.filter-section.collapsed .filter-toggle-icon {
		content: url('icon-add-g.svg');
}
.filter-section:not(.collapsed) .filter-toggle-icon {
		content: url('icon-minus-g.svg');
}
.filter-section-content {
		padding: 10px 0;
		max-height: 500px;
		overflow: hidden;
		-webkit-transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
		transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
		opacity: 1;
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-orient: horizontal;
		-webkit-box-direction: normal;
		-ms-flex-direction: row;
		flex-direction: row;
		-ms-flex-wrap: wrap;
		flex-wrap: wrap;
		margin-bottom: 0;
}
.filter-section.collapsed .filter-section-content {
		max-height: 0;
		padding: 0;
		opacity: 0;
}
/* ============================================================
 * 9. Filter Item
 * ============================================================ */
.filter-item {
		display: block;
		padding: 2px 0;
		color: var(--dark-blue);
		text-decoration: none;
		font-size: var(--font-size-base);
		-webkit-transition: all 0.3s ease;
		transition: all 0.3s ease;
		margin-right: 15px;
}
.filter-item:hover {
		padding-left: 5px;
		color: var(--color-black);
}
.filter-item.active {
		font-weight: bold;
		color: var(--secondary-blue);
}
.filter-item-has-children {
		padding: 3px 0;
}
.filter-sub-group {
		overflow: hidden;
		max-height: 300px;
		-webkit-transition: max-height 0.25s ease, opacity 0.2s ease;
		transition: max-height 0.25s ease, opacity 0.2s ease;
		opacity: 1;
		margin-top: 6px;
}
.filter-sub-group.collapsed {
		max-height: 0;
		opacity: 0;
		margin-top: 0;
}
.filter-sub-group-title {
		font-size: var(--font-size-base-lg);
		padding: 4px 0 4px 0;
		border-bottom: 1px solid #ddd;
		margin-bottom: 4px;
}
.filter-sub-menu {
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		padding-left: 0;
		-ms-flex-wrap: wrap;
		flex-wrap: wrap;
}
.filter-sub-menu li {
		padding: 2px 0;
}
a.filter-item-sub {
		text-decoration: none;
		padding-left: 2px;
}
a.filter-item-sub:hover {}
.filter-count {
		color: #999;
		font-size: var(--font-size-base);
		margin-left: 5px;
}
/* ============================================================
 * 10. Category Section
 * ============================================================ */
.products-category-section {
		margin-top: 30px;
}
.category-block {
		margin-bottom: 60px;
}
.category-header {
		margin-bottom: 30px;
		text-align: start !important;
}
.category-title {
		font-size: var(--font-size-4lg) !important;
		font-weight: 700;
		color: var(--secondary-blue);
		margin-bottom: 10px;
}
a .category-title:hover {
		color: var(--dark-blue);
}
.category-subtitle {
		font-size: var(--font-size-base);
		color: #666;
		margin: 0;
}
/* ============================================================
 * 11. Horizontal Product Grid
 * ============================================================ */
.products-horizontal-grid {
		display: -ms-grid;
		display: grid;
		-ms-grid-columns: 1fr 40px 1fr;
		grid-template-columns: repeat(2, 1fr);
		gap: 30px 40px;
}
/* ---- 11-1. Horizontal Product Card ---- */
.product-horizontal-card {
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		gap: 20px;
		background-color: var(--color-white);
		-webkit-transition: all 0.3s ease;
		transition: all 0.3s ease;
}
.product-horizontal-card:hover {
		-webkit-transform: translateY(-3px);
		-ms-transform: translateY(-3px);
		transform: translateY(-3px);
}
.product-horizontal-image {
		-ms-flex-negative: 0;
		flex-shrink: 0;
		width: 135px;
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-align: center;
		-ms-flex-align: center;
		align-items: center;
		-webkit-box-pack: center;
		-ms-flex-pack: center;
		justify-content: center;
		background-color: var(--color-white);
		border-radius: 8px;
		overflow: hidden;
		aspect-ratio: 1 / 1;
}
.product-horizontal-image img {
		width: 100%;
		height: 100%;
		-o-object-fit: contain;
		object-fit: contain;
}
.product-horizontal-content {
		-webkit-box-flex: 1;
		-ms-flex: 1;
		flex: 1;
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-orient: vertical;
		-webkit-box-direction: normal;
		-ms-flex-direction: column;
		flex-direction: column;
}
.product-horizontal-title {
		font-size: var(--font-size-base-lg);
		font-weight: 600;
		color: var(--dark-blue);
		margin-bottom: 10px;
}
.product-horizontal-title:hover {
		color: var(--secondary-blue);
}
.product-horizontal-description {
		font-size: var(--font-size-sm);
		color: #666;
		line-height: 1.6;
		margin-bottom: 0;
		-webkit-box-flex: 1;
		-ms-flex: 1;
		flex: 1;
}
/* ---- 11-2. Select Dropdown in Card ---- */
.product-horizontal-card .select-wrapper {
		position: relative;
		width: 100%;
		margin-bottom: 20px;
}
.product-horizontal-card .custom-select {
		position: relative;
		left: -10px;
		width: 100%;
		height: 40px;
		border: 0;
		border-radius: 0;
		padding: 0 40px 0 10px;
		font-size: var(--font-size-sm);
		color: #666;
		background-color: var(--color-white);
		cursor: pointer;
		-webkit-transition: all 0.3s ease;
		transition: all 0.3s ease;
}
.product-horizontal-card .select-wrapper .select-arrow {
		right: 8px;
}
.product-horizontal-card .select-wrapper::after {
		content: '';
		position: absolute;
		bottom: -1px;
		left: 0;
		width: calc(100% - 10px);
		height: 1px;
		background-color: #ccc;
}
/* ============================================================
 * 12. RWD: min-width: 1200px
 * ============================================================ */
@media (min-width: 1200px) {
		.products-sidebar {
				width: 280px;
		}
}
/* ============================================================
 * 13. RWD: min-width: 1400px
 * ============================================================ */
@media (min-width: 1400px) {
		.products-sidebar {
				width: 360px;
		}
}
/* ============================================================
 * 14. RWD: min-width: 1600px
 * ============================================================ */
@media (min-width: 1600px) {
		.products-sidebar {
				width: 390px;
		}
}
/* ============================================================
 * 15. RWD: max-width: 1199px
 * ============================================================ */
@media (max-width: 1199px) {
		.products-sidebar {
				width: 200px;
		}
		.products-layout {
				gap: 30px;
		}
		.category-block {
				margin-bottom: 0;
		}
		.filter-tabs-top, .filter-top {
				top: 62px;
		}
		.filter-top.only:not(.active) {
				width: 100%;
				position: relative;
				min-height: 45px;
				top: 0;
		}
}
/* ============================================================
 * 16. RWD: max-width: 991px
 * ============================================================ */
@media (max-width: 991px) {
		.products-horizontal-grid {
				-ms-grid-columns: 1fr;
				grid-template-columns: 1fr;
		}
		.filter-top, .filter-tabs-top {
				top: 50px;
		}
		.filter-tabs-top .filter-tabs {
				margin-bottom: 0;
		}
}
/* ============================================================
 * 17. RWD: max-width: 767px
 * ============================================================ */
@media (max-width: 767px) {
		.category-title {
				font-size: var(--font-size-base-lg);
		}
		.filter-tabs.is-height .filter-tab::after {
				height: 40px;
		}
		.filter-top .filter-tabs, .filter-tabs-top .filter-tabs {
				display: -webkit-box;
				display: -ms-flexbox;
				display: flex;
				overflow-x: auto;
				overflow-y: hidden;
				white-space: nowrap;
				-webkit-overflow-scrolling: touch;
				scroll-behavior: smooth;
				scrollbar-width: none;
				-ms-overflow-style: none;
		}
		/* 隱藏 scrollbar - Chrome/Safari/Opera */
		.filter-top .filter-tabs::-webkit-scrollbar, .filter-tabs-top .filter-tabs::-webkit-scrollbar {
				display: none;
		}
		.filter-top .filter-tab, .filter-tabs-top .filter-tab {
				top: 0;
				padding: 5px 10px;
		}
		.product-horizontal-card {
				-webkit-box-orient: vertical;
				-webkit-box-direction: normal;
				-ms-flex-direction: column;
				flex-direction: column;
		}
		.product-horizontal-image {
				width: 100%;
				height: 200px;
		}
		.filter-top.border-none .filter-tabs, .filter-tabs-top.border-none .filter-tabs {
				padding: .5rem 1rem;
		}
		.filter-icon {
				width: 20px;
		}
		.filter-tab:first-child {
				width: 120px;
			 min-width: 120px;
				max-width: 120px;
			 -webkit-box-flex: 0;
			     -ms-flex: 0 0 120px;
			         flex: 0 0 120px;
				border-radius: 0;
				z-index: 3;
				top: 0;
				position: sticky;
				left: 0;
		}
		.filter-tabs::after {
				display: none;
		}
		.filter-top .container-xxl, .filter-tabs-top .container-xxl {
				position: relative;
		}
		.filter-top:not(.border-none) .container-xxl::after, .filter-tabs-top:not(.border-none) .container-xxl::after {
				content: '';
				position: absolute;
				display: block;
				width: 100%;
				height: 2px;
				background: var(--bg-gradient-sp);
				left: 0;
				right: 0;
				bottom: 0;
		}
		.filter-top .container-xxl, .filter-tabs-top .container-xxl {
				padding-left: 0 !important;
				padding-right: 0 !important;
		}
}
/* ============================================================
 * 18. RWD: max-width: 576px
 * ============================================================ */
@media (max-width: 576px) {
		.has-scroll .nav-arrows-group {
				display: none !important;
		}
		.intro-text {
				max-width: calc(100% - 10px);
		}
		.filter-top.only.active .filter-tabs.only {
				margin-top: 0;
		}
		.filter-top.border-none .filter-tabs, .filter-tabs-top.border-none .filter-tabs {
				padding: .5rem 1.5rem;
				width: 100%;
		}
		.filter-tab {
				font-size: var(--font-size-sm);
				line-height: 1.35;
				margin: auto;
		}
		.filter-tabs.is-height .filter-tab::after {
				height: 25px;
		}
}