/**
 * honlax-products front-end styles.
 * All classes prefixed hlx-. Colors via WP preset CSS variables with hex fallbacks
 * (portable across themes, PM §5.9 / design guideline §5.4).
 */

/* ---------- Grid (shortcode + category) ---------- */
.hlx-products-grid {
	display: grid;
	grid-template-columns: repeat(var(--hlx-cols, 3), 1fr);
	gap: 24px;
	margin: 0 0 32px;
}

@media (max-width: 1024px) {
	.hlx-products-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.hlx-products-grid {
		grid-template-columns: repeat(1, 1fr);
	}
}

.hlx-products-empty {
	display: block;
}

.hlx-empty-message {
	text-align: center;
	padding: 24px 0;
	color: var(--wp--preset--color--body, #6B7280);
	font-size: 15px;
}

/* ---------- Card ---------- */
.hlx-product-card {
	background: var(--wp--preset--color--background, #FFFFFF);
	border: 1px solid var(--wp--preset--color--border, #E5E7EB);
	border-radius: 12px;
	overflow: hidden;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.hlx-product-card:hover {
	box-shadow: 0 12px 28px rgba(16, 32, 57, 0.14);
	transform: translateY(-3px);
}

.hlx-card-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.hlx-card-media {
	aspect-ratio: 4 / 3;
	background: var(--wp--preset--color--background, #FFFFFF);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.hlx-card-media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.hlx-product-card:hover .hlx-card-media img {
	transform: scale(1.05);
}

.hlx-card-placeholder {
	color: var(--wp--preset--color--muted, #9CA3AF);
	font-size: 14px;
}

.hlx-card-body {
	padding: 18px 18px 20px;
}

.hlx-card-title {
	font-size: 20px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--wp--preset--color--heading, #1F2937);
	margin: 0 0 6px;
}

.hlx-card-type {
	font-size: 14px;
	line-height: 1.7;
	color: var(--wp--preset--color--body, #6B7280);
	margin: 0 0 12px;
}

.hlx-card-power {
	display: inline-block;
	background: var(--wp--preset--color--surface, #F8FAFC);
	border: 1px solid var(--wp--preset--color--border, #E5E7EB);
	border-radius: 6px;
	color: var(--wp--preset--color--secondary, #102039);
	font-size: 14px;
	font-weight: 600;
	padding: 3px 10px;
}

.hlx-card-excerpt {
	margin-top: 10px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--wp--preset--color--body, #6B7280);
}

.hlx-card-cta {
	display: block;
	width: 100%;
	text-align: center;
	background: var(--wp--preset--color--secondary, #102039);
	color: #FFFFFF;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	border-radius: 6px;
	padding: 10px 14px;
	margin-top: 14px;
	transition: background 0.2s ease;
}

.hlx-product-card:hover .hlx-card-cta {
	background: var(--wp--preset--color--primary, #EA1826);
}

/* ---------- Breadcrumb ---------- */
.hlx-breadcrumb {
	font-size: 14px;
	color: var(--wp--preset--color--muted, #9CA3AF);
	line-height: 1.6;
}

.hlx-breadcrumb a {
	color: var(--wp--preset--color--secondary, #102039);
	text-decoration: none;
}

.hlx-breadcrumb a:hover {
	text-decoration: underline;
}

.hlx-breadcrumb-sep {
	margin: 0 8px;
	color: var(--wp--preset--color--muted, #9CA3AF);
}

.hlx-breadcrumb-current {
	color: var(--wp--preset--color--heading, #1F2937);
}

/* ---------- Single product ---------- */
.hlx-single-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 20px 56px;
}

.hlx-product-title h1 {
	font-size: 38px;
	font-weight: 400;
	line-height: 1.3;
	color: var(--wp--preset--color--heading, #1F2937);
	margin: 16px 0 4px;
}

.hlx-product-subtitle {
	font-size: 17px;
	line-height: 1.7;
	color: var(--wp--preset--color--body, #6B7280);
	margin: 0 0 24px;
}

.hlx-product-main {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
	margin-bottom: 28px;
	align-items: start;
}

@media (max-width: 768px) {
	.hlx-product-main {
		grid-template-columns: 1fr;
	}
}

.hlx-gallery-main {
	border: 1px solid var(--wp--preset--color--border, #E5E7EB);
	border-radius: 12px;
	background: var(--wp--preset--color--background, #FFFFFF);
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.hlx-gallery-main img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.hlx-gallery-thumbs {
	display: flex;
	gap: 10px;
	margin-top: 12px;
	flex-wrap: wrap;
}

.hlx-thumb {
	width: 74px;
	height: 74px;
	padding: 0;
	border: 2px solid var(--wp--preset--color--border, #E5E7EB);
	border-radius: 8px;
	background: var(--wp--preset--color--background, #FFFFFF);
	cursor: pointer;
	overflow: hidden;
}

.hlx-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.hlx-thumb.is-active {
	border-color: var(--wp--preset--color--primary, #EA1826);
}

/* ---------- Spec table ---------- */
.hlx-table-scroll {
	overflow-x: auto;
}

.hlx-spec-table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid var(--wp--preset--color--border, #E5E7EB);
	border-radius: 12px;
	overflow: hidden;
	font-size: 15px;
}

.hlx-spec-table th {
	width: 38%;
	background: var(--wp--preset--color--surface, #F8FAFC);
	color: var(--wp--preset--color--heading, #1F2937);
	font-weight: 600;
	text-align: left;
	padding: 14px 16px;
	vertical-align: top;
}

.hlx-spec-table td {
	width: 62%;
	color: var(--wp--preset--color--heading, #1F2937);
	padding: 14px 16px;
	vertical-align: top;
}

.hlx-spec-table tbody tr:nth-child(even) {
	background: var(--wp--preset--color--surface, #F8FAFC);
}

.hlx-spec-en {
	display: block;
	font-size: 13px;
	line-height: 1.6;
	color: var(--wp--preset--color--body, #6B7280);
	margin-top: 2px;
}

/* ---------- PDF button ---------- */
.hlx-pdf-row {
	margin-bottom: 32px;
}

.hlx-pdf-btn {
	display: inline-block;
	background: var(--wp--preset--color--primary, #EA1826);
	color: #FFFFFF;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	border-radius: 6px;
	padding: 12px 22px;
	text-decoration: none;
	transition: background 0.2s ease;
}

.hlx-pdf-btn:hover {
	background: var(--wp--preset--color--secondary, #102039);
	color: #FFFFFF;
}

/* ---------- Bilingual description ---------- */
.hlx-desc h2 {
	font-size: 24px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--wp--preset--color--heading, #1F2937);
	margin: 0 0 16px;
}

.hlx-desc-zh {
	font-size: 16px;
	line-height: 1.9;
	color: #374151;
	margin-bottom: 20px;
}

.hlx-desc-en {
	font-size: 14px;
	line-height: 1.7;
	color: var(--wp--preset--color--body, #6B7280);
	border-left: 3px solid var(--wp--preset--color--primary, #EA1826);
	padding-left: 16px;
}

/* ---------- Back link ---------- */
.hlx-back-link {
	margin-top: 32px;
}

.hlx-back-link a {
	color: var(--wp--preset--color--secondary, #102039);
	font-weight: 500;
	text-decoration: none;
}

.hlx-back-link a:hover {
	text-decoration: underline;
}

/* ---------- Category archive ---------- */
.hlx-cat-hero {
	background:
		linear-gradient(rgba(16, 32, 57, 0.88), rgba(16, 32, 57, 0.88)),
		var(--wp--preset--color--secondary, #102039);
	color: #FFFFFF;
	padding: 48px 20px;
}

.hlx-cat-hero-inner {
	max-width: 1200px;
	margin: 0 auto;
}

.hlx-cat-hero .hlx-breadcrumb {
	color: rgba(255, 255, 255, 0.65);
}

.hlx-cat-hero .hlx-breadcrumb a {
	color: rgba(255, 255, 255, 0.85);
}

.hlx-cat-hero .hlx-breadcrumb-current {
	color: #FFFFFF;
}

.hlx-cat-title {
	font-size: 38px;
	font-weight: 400;
	line-height: 1.3;
	color: #FFFFFF;
	margin: 10px 0 8px;
}

.hlx-cat-desc {
	font-size: 16px;
	line-height: 1.8;
	color: rgba(255, 255, 255, 0.92);
	margin: 0 0 16px;
	max-width: 720px;
}

.hlx-cat-count {
	display: inline-block;
	background: rgba(255, 255, 255, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	padding: 4px 14px;
	font-size: 14px;
	font-weight: 600;
}

.hlx-cat-content {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px 56px;
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
	.hlx-product-title h1,
	.hlx-cat-title {
		font-size: 28px;
	}

	.hlx-breadcrumb {
		line-height: 1.8;
	}

	.hlx-breadcrumb-sep {
		margin: 0 6px;
	}

	.hlx-single-wrap,
	.hlx-cat-content {
		padding-left: 16px;
		padding-right: 16px;
	}
}

/* --- Remove ALL underlines on product cards/buttons (2026-08-04) --- */
.hlx-products-wrap a,
.hlx-product-card a,
.hlx-card-link,
.hlx-card-link:hover,
.hlx-card-link:focus,
.hlx-card-link h3,
.hlx-card-link p,
.hlx-card-link span,
.hlx-single-product a,
.hlx-single-product a:hover,
.hlx-single-product a:focus,
.hlx-single-product .hlx-pdf-btn,
.hlx-single-product .hlx-pdf-btn:hover,
.hlx-cat-hero a,
.hlx-cat-hero a:hover {
	text-decoration: none !important;
}

/* ---------- Category tabs ([hlx_products_tabs]) ---------- */
.hlx-tabs-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 28px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0;
}
.hlx-tab {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
    color: #4b5563;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.hlx-tab:hover {
    background: #e5e7eb;
    color: #102039;
}
.hlx-tab-active,
.hlx-tab-active:hover {
    background: #EA1826;
    border-color: #EA1826;
    color: #ffffff;
}
.hlx-tab-panel {
    display: none;
}
.hlx-tab-panel-active {
    display: block;
}
@media (max-width: 640px) {
    .hlx-tab {
        padding: 8px 14px;
        font-size: 13px;
    }
}
