﻿/*
 * ============================================================
 * TABLE OF CONTENTS (目錄)
 * ============================================================
 *
 *  1.  主容器（specs-table-container-in）
 *
 *  2.  Compare Table 欄式佈局
 *      2-1. Compare Table & Col
 *      2-2. Label Col
 *      2-3. Compare Cell
 *      2-4. Cell Header
 *      2-5. Cell Category
 *      2-6. Cell Header Placeholder
 *
 *  3.  Sticky Header
 *      3-1. full-mode Sticky
 *      3-2. high-mode Sticky
 *
 *  4.  規格表格（specs-table）
 *      4-1. 分類圖示
 *
 *  5.  產品卡片
 *      5-1. 產品圖片
 *      5-2. 產品標題
 *      5-3. Get Quote 按鈕
 *      5-4. 刪除按鈕
 *      5-5. has-check 按鈕
 *
 *  6.  拖曳提示
 *
 *  7.  RWD: min-width: 1200px
 *
 *  8.  RWD: min-width: 1440px
 *
 *  9.  RWD: max-width: 1199px
 *
 * 10.  RWD: max-width: 991px
 *
 * 11.  RWD: max-width: 767px
 *
 * 12.  RWD: max-width: 576px
 *
 * ============================================================
 */

/* ============================================================
 * 1. 主容器（specs-table-container-in）
 * ============================================================ */
.specs-table-container-in {
    position: static !important;
    width: 100%;
    padding-left: 200px !important;
    border: 0;
    border-radius: 8px;
    background-color: var(--color-white);
    margin-bottom: 50px;
    margin-right: 0;
    margin-left: auto;
    cursor: -webkit-grab;
    cursor: grab;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: calc(100% - (100% - 1280px) / 2);
    overflow-x: auto;
    overflow-y: visible;     
}
.specs-table-container-in.unmove {
    cursor: default;
}
.specs-table-container-in::-webkit-scrollbar {
		display: none;
}
.specs-table-container-in:active {
		cursor: -webkit-grabbing;
		cursor: grabbing;
}
.specs-table-container.wide .specs-table-container-in {
		overflow-x: auto;
		padding-left: 200px;
		max-width: calc(100%);
}
.specs-table-container-in.empty-mode {
		padding: 1rem !important;
}
.specs-table-container-in.dragging {
		cursor: -webkit-grabbing;
		cursor: grabbing;
		-webkit-user-select: none;
		-moz-user-select: none;
		-ms-user-select: none;
		user-select: none;
}

/* ============================================================
 * 2. Compare Table 欄式佈局
 * ============================================================ */
/* ---- 2-1. Compare Table & Col ---- */
.compare-table {
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-align: start;
		-ms-flex-align: start;
		align-items: flex-start;
		position: static;
}
.compare-col {
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-orient: vertical;
		-webkit-box-direction: normal;
		-ms-flex-direction: column;
		flex-direction: column;
		-ms-flex-negative: 0;
		flex-shrink: 0;
}
/* ---- 2-2. Label Col ---- */
.label-col {
		position: absolute !important;
		left: auto;
		top: 0;
		margin-left: -200px;
		width: 200px !important;
		min-width: 200px;
		z-index: 10;
		background-color: var(--color-white);
		will-change: transform;
		-webkit-backface-visibility: hidden;
		backface-visibility: hidden;
		-webkit-transition: none;
		transition: none;
}
/* ---- 2-3. Compare Cell ---- */
.compare-cell {
		padding: 10px 14px;
		border-bottom: 1px solid #e5e5e5;
		border-right: 1px solid #e5e5e5;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
		font-size: var(--font-size-sm);
}
.compare-cell.hidden {
		display: none;
}
.label-col .compare-cell {
		text-align: center;
}
.compare-cell .active {
		color: var(--secondary-blue);
		font-weight: bold;
}
.cell-header:not(.label-header),
.product-col {
		min-width: 280px !important;
		max-width: 100%;
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
}
/* ---- 2-4. Cell Header ---- */
.cell-header {
	 min-height: 280px !important;
		height: 280px !important;
		border: 0;
		margin: auto;
		background-color: var(--color-white);
		will-change: transform;
		-webkit-backface-visibility: hidden;
		backface-visibility: hidden;
		-webkit-transition: none;
		transition: none;
}
.label-col .cell-header.label-header {
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-orient: horizontal;
		-webkit-box-direction: normal;
		-ms-flex-direction: row;
		flex-direction: row;
		-webkit-box-pack: center !important;
		-ms-flex-pack: center !important;
		justify-content: center !important;
		font-weight: bold;
		min-width: 200px !important;
		width: 200px !important;
		z-index: 4;
		padding-left: 0;
}
.label-header-clone {
		padding-left: 0 !important;
}
.cell-header .specs-product-card {
		/*width: 100%;*/
	 margin: auto;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
	 text-align: center;
}
.cell-header .specs-product-name {
		text-align: center;
}
/* ---- 2-5. Cell Category ---- */
.cell-category {
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-align: center;
		-ms-flex-align: center;
		align-items: center;
		-webkit-box-pack: justify;
		-ms-flex-pack: justify;
		justify-content: flex-start;
		background-color: var(--border-color);
		color: var(--color-white);
		font-weight: bold;
		cursor: pointer;
		font-size: var(--font-size-base);
}
.cell-category span {
		-webkit-box-ordinal-group: 2;
		    -ms-flex-order: 1;
		        order: 1;
		padding-left: .75rem;
}
.cell-category img {
		-webkit-box-ordinal-group: 1;
		    -ms-flex-order: 0;
		        order: 0;
}
.cell-category-spacer {
		display: block !important;
		height: 45px !important;
		min-height: 45px !important;
		background-color: var(--border-color);
		pointer-events: none;
}
/* ---- 2-6. Cell Header Placeholder ---- */
.cell-header-placeholder {
		display: none;
}
.high-mode.is-sticky .cell-header-placeholder,
.full-mode.is-sticky .cell-header-placeholder {
		display: block;
}

/* ============================================================
 * 3. Sticky Header
 * ============================================================ */
.is-sticky .specs-product-img {
		-webkit-transform: scale(0);
		-ms-transform: scale(0);
		transform: scale(0);
		opacity: 0;
		max-height: 0;
		margin: 0;
}
.is-sticky .label-header {
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-align: end;
		-ms-flex-align: end;
		align-items: flex-end;
		-webkit-box-pack: center;
		-ms-flex-pack: center;
		justify-content: center;
}
.is-sticky .label-header.cell-header {
		position: fixed;
		background-color: rgb(255, 255, 255);
		z-index: 11;
		width: 200px;
}
/* ---- 3-1. full-mode Sticky ---- */
.full-mode.is-sticky .product-col .cell-header,
.full-mode.is-sticky .label-col .cell-header {
		position: fixed;
		top: 70px;
		background-color: var(--color-white);
	 border-bottom: 1px solid #e5e5e5;
}
.full-mode.is-sticky .label-header,
.full-mode.is-sticky .compare-col:not(.label-col) .cell-header {
		height: 90px !important;
	 min-height: 90px !important;
	 border-bottom: 1px solid #e5e5e5;
}
.full-mode.is-sticky .cell-header.label-header {
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-align: end !important;
		-ms-flex-align: end !important;
		align-items: flex-end !important;
		z-index: 11;
		top: 70px !important;
		left: 0 !important;
		width: 200px !important;
		height: 90px !important;
}
/* ---- 3-2. high-mode Sticky ---- */
.high-mode.is-sticky .product-col .cell-header,
.high-mode.is-sticky .label-col .cell-header {
		position: fixed;
		top: 180px !important;
		background-color: var(--color-white);
}
.high-mode.is-sticky .label-header,
.high-mode.is-sticky .compare-col:not(.label-col) .cell-header {
		height: 90px !important;
	 min-height: 90px !important;
	 border-bottom: 1px solid #e5e5e5;
}
.high-mode.is-sticky .cell-header.label-header {
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-align: end !important;
		-ms-flex-align: end !important;
		align-items: flex-end !important;
		z-index: 11;
		width: 200px !important;
		height: 90px !important;
		top: 180px !important;
}
.high-mode.is-sticky .cell-header.label-header.label-header-clone::after {
		content: '';
		width: 400%;
		height: calc(100% + 2px);
		background-color: var(--color-white);
		display: block;
		position: absolute;
		left: -400%;
		top: 0;
		margin: auto;
}

/* ============================================================
 * 4. 規格表格（specs-table）
 * ============================================================ */
/* ---- 4-1. 分類圖示 ---- */
.specs-category-icon {
		width: 20px;
		height: 20px;
		-ms-flex-negative: 0;
		flex-shrink: 0;
		pointer-events: none;
		-webkit-filter: var(--svg-hover-white);
		filter: var(--svg-hover-white);
		-webkit-transition: -webkit-transform 0.3s;
		transition: -webkit-transform 0.3s;
		transition: transform 0.3s;
		transition: transform 0.3s, -webkit-transform 0.3s;
}

/* ============================================================
 * 5. 產品卡片
 * ============================================================ */
.specs-product-card {
		position: relative;
}
.specs-product-card .product-delete {
		bottom: -2px;
		right: -10px;
		top: auto;
}
.specs-product-card .btn-learn-more {
		max-width: calc(100% - 30px);
		padding: 0.5rem;
	 text-wrap: nowrap;
}
.specs-product-in-card {
		position: relative;
}
/* ---- 5-1. 產品圖片 ---- */
.specs-product-img {
		display: block;
		width: 100%;
		max-width: 180px;
		height: auto;
		margin: 0 auto 15px;
		pointer-events: none;
		-webkit-transform-origin: top center;
		-ms-transform-origin: top center;
		transform-origin: top center;
		-webkit-transition: all 0.3s ease;
		transition: all 0.3s ease;
}
/* ---- 5-2. 產品標題 ---- */
.specs-product-name {
		font-size: var(--font-size-base-lg);
		font-weight: 600;
		margin: 5px auto;
}
/* ---- 5-3. Get Quote 按鈕 ---- */
.specs-quote-btn {
		display: inline-block;
		padding: 8px 20px;
		background-color: var(--secondary-blue);
		color: var(--color-white);
		border-radius: 4px;
		text-decoration: none;
		font-size: var(--font-size-sm);
		cursor: pointer;
		-webkit-transition: all 0.3s;
		transition: all 0.3s;
}
.specs-quote-btn:hover {
		background-color: var(--primary-blue);
		color: var(--color-white);
}
/* ---- 5-4. 刪除按鈕 ---- */
.specs-delete-btn {
		position: absolute;
		bottom: 0;
		right: -10px;
		width: 35px;
		height: 35px;
		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;
		border: none;
		border-radius: 4px;
		background-color: transparent;
		cursor: pointer;
		pointer-events: auto;
		z-index: 3;
		-webkit-transition: all 0.3s;
		transition: all 0.3s;
}
/* ---- 5-5. has-check 按鈕 ---- */
.btn.has-check.active {
		color: var(--secondary-blue);
		font-weight: bold;
		border: 1px solid var(--color-gray);
		background-color: var(--color-white);
}

/* ============================================================
 * 6. 拖曳提示
 * ============================================================ */
.drag-hint {
		position: fixed;
		top: calc(50% - 22px);
		right: 80px;
		margin-bottom: 40px;
		padding: 8px 15px;
		background-color: rgba(0, 0, 0, 0.7);
		color: var(--color-white);
		border-radius: 20px;
		font-size: var(--font-size-xs);
		pointer-events: none;
		opacity: 0;
		z-index: 20;
		-webkit-transition: opacity 0.3s;
		transition: opacity 0.3s;
}
.specs-table-container-in:hover .drag-hint {
		opacity: 1;
}
.specs-table-container-in:focus .drag-hint,
.specs-table-container-in.dragging .drag-hint {
		opacity: 0 !important;
		pointer-events: none !important;
}

/* ============================================================
 * 7. RWD: min-width: 1200px
 * ============================================================ */
@media (min-width: 1200px) {
		.specs-table-container-in {
				max-width: calc(100% - 7rem);
		}
}

/* ============================================================
 * 8. RWD: min-width: 1440px
 * ============================================================ */
@media (min-width: 1440px) {
		.specs-table-container-in {
				max-width: calc(100% - (100% - 1345px + 4rem) / 2);
		}
}

/* ============================================================
 * 9. RWD: max-width: 1199px
 * ============================================================ */
@media (max-width: 1199px) {
		.full-mode.is-sticky .cell-header.label-header,
		.full-mode.is-sticky .product-col .cell-header,
		.full-mode.is-sticky .label-col .cell-header {
				top: 62px !important;
		}
		.high-mode.is-sticky .cell-header.label-header,
		.high-mode.is-sticky .product-col .cell-header,
		.high-mode.is-sticky .label-col .cell-header {
				top: 160px !important;
		}
		.specs-table-container-in {
				max-width: calc(100% - 4rem);
		}
}

/* ============================================================
 * 10. RWD: max-width: 991px
 * ============================================================ */
@media (max-width: 991px) {
		.full-mode.is-sticky .cell-header.label-header,
		.full-mode.is-sticky .product-col .cell-header,
		.full-mode.is-sticky .label-col .cell-header {
				top: 50px !important;
		}
		.specs-table-container-in {
				max-width: calc(100% - 3rem);
		}
}

/* ============================================================
 * 11. RWD: max-width: 767px
 * ============================================================ */
@media (max-width: 767px) {
		.specs-table-container-in {
				max-width: calc(100% - 1rem);
		}
}

/* ============================================================
 * 12. RWD: max-width: 576px
 * ============================================================ */
@media (max-width: 576px) {
		.cell-category {
				font-size: var(--font-size-sm);
				padding: 5px 5px 5px 10px;
		}
		.specs-category-icon {
				width: 15px;
				height: 15px;
		}
		.cell-header:not(.label-header),
		.product-col {
				min-width: 200px !important;
		}
		.label-col .cell-header.label-header {
				padding-left: 1rem;
		}
		.specs-table-container-in {
				max-width: 100%;
		}
		.specs-table-container.wide .specs-table-container-in:not(.empty-mode),
		.specs-table-container-in:not(.empty-mode) {
				padding-left: 130px !important;
		}
		.label-header-clone {
				padding-left: 10px !important;
		}
		.label-col {
				margin-left: -130px;
				width: 130px !important;
				min-width: 130px;
		}
		.label-col .cell-header.label-header {
				min-width: 130px !important;
				width: 130px !important;
		}
		.is-sticky .label-header.cell-header {
				width: 130px;
		}
		.full-mode.is-sticky .cell-header.label-header {
				top: 50px !important;
				width: 130px !important;
				height: 90px !important;
		}
		.high-mode.is-sticky .cell-header.label-header {
				width: 130px !important;
				height: 90px !important;
				top: 200px !important;
		}
		.high-mode.is-sticky .cell-header.label-header,
		.high-mode.is-sticky .product-col .cell-header,
		.high-mode.is-sticky .label-col .cell-header {
				top: 200px !important;
		}
}