/*
Theme Name: LPX Auto
Template: blocksy
Description: Child theme của Blocksy cho LPX Auto. Chỉ chứa phần giao diện riêng; chức năng nằm trong plugin LPX Core.
Version: 1.0.5
Text Domain: lpx-child
*/

:root {
	--lpx-primary: #d62828;
}

/* Logo LPX ở đầu trang: thay chữ tên web bằng ảnh logo (chữ vẫn giữ cho Google và trình đọc màn hình) */
.ct-header [data-id="logo"] .site-title a {
	display: block;
	width: 141px;
	height: 52px;
	background: url("assets/logo.svg") no-repeat left center / contain;
	font-size: 0;
	color: transparent;
	overflow: hidden;
}

@media (max-width: 689.98px) {
	.ct-header [data-id="logo"] .site-title a {
		width: 109px;
		height: 40px;
	}
}

/* Thanh đầu trang nền đen, chữ trắng để logo nổi bật */
.ct-header [data-row*="middle"] {
	background-color: #0b0b0b !important;
}
#header [data-id="menu"] > ul > li > a {
	--theme-link-initial-color: #ffffff;
	--theme-link-hover-color: #e2bc84;
	--theme-link-active-color: #e2bc84;
}
#header [data-id="search"],
#header [data-id="trigger"],
#header [data-id="cart"] {
	--theme-icon-color: #ffffff;
	--theme-icon-hover-color: #e2bc84;
}

/* Bỏ gạch chân của liên kết trên toàn web, chỉ đổi màu khi rê chuột */
body {
	--has-link-decoration: var(--false);
}
.entry-content a:hover {
	color: var(--lpx-primary);
}

/* Chân trang: dòng bản quyền nằm dưới cùng, cùng nền tối với khối thông tin */
.ct-footer {
	background-color: #1e293b !important;
	color: #94a3b8;
	padding-bottom: 16px;
}
.ct-footer [data-row*="bottom"] {
	border-top: 1px solid #334155;
}
#footer [data-id="copyright"] {
	--theme-text-color: #94a3b8;
	color: #94a3b8;
}

/* Trang sản phẩm: chừa chỗ cho thanh "Mua ngay" dính đáy để không che chân trang */
.single-product .ct-footer {
	padding-bottom: 110px;
}

/* Giá sản phẩm nổi bật */
.woocommerce .price {
	color: var(--lpx-primary);
	font-weight: 700;
}

/* Nhãn Giảm giá / Khuyến mãi theo màu đỏ thương hiệu LPX */
.onsale,
[class*="ct-woo-badge-"] {
	background-color: var(--lpx-primary, #d62828) !important;
	color: #ffffff !important;
	font-weight: 700;
	letter-spacing: 0.5px;
	box-shadow: 0 2px 6px rgba(214, 40, 40, 0.35);
}

/* Đường dẫn breadcrumbs tinh tế, không in hoa gắt và không lấn át tiêu đề H1 */
.ct-breadcrumbs {
	--theme-text-transform: none;
	--theme-font-size: 13px;
	--theme-font-weight: 400;
	margin-bottom: 14px;
	color: #64748b;
}
.ct-breadcrumbs a {
	color: #64748b;
	text-decoration: none;
	transition: color 0.15s ease;
}
.ct-breadcrumbs a:hover {
	color: var(--lpx-primary, #d62828);
}
.ct-breadcrumbs .ct-separator {
	opacity: 0.5;
	margin: 0 6px;
}
.single-product .ct-breadcrumbs .last-item {
	color: #94a3b8;
	font-weight: 400;
	display: inline-block;
	max-width: 360px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	vertical-align: bottom;
}
@media (max-width: 768px) {
	.single-product .ct-breadcrumbs .last-item,
	.single-product .ct-breadcrumbs span:nth-last-child(2) .ct-separator {
		display: none;
	}
}

/* Tắt hiệu ứng phóng to (zoom) khi di chuột và giữ tỉ lệ ảnh vuông 1:1 chuẩn theo ảnh gốc */
.zoomImg {
	display: none !important;
	pointer-events: none !important;
	opacity: 0 !important;
}
.woocommerce-product-gallery .ct-media-container {
	cursor: default !important;
}
.woocommerce-product-gallery .flexy-items img {
	aspect-ratio: 1 / 1 !important;
	object-fit: contain !important;
}

/* Ảnh thumbnail con xếp đúng 1 hàng duy nhất, có thể cuộn ngang nhẹ nhàng khi có nhiều ảnh */
.flexy-pills[data-type="thumbs"] ol {
	display: flex !important;
	flex-wrap: nowrap !important;
	overflow-x: auto !important;
	overflow-y: hidden !important;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
	gap: 10px !important;
	padding: 4px 2px 8px !important;
	margin: 14px 0 0 !important;
}

.flexy-pills[data-type="thumbs"] ol li {
	flex: 0 0 72px !important;
	width: 72px !important;
	height: 72px !important;
	max-width: 72px !important;
	padding: 0 !important;
	border-radius: 8px;
	overflow: hidden;
	border: 2px solid #e2e8f0;
	background: #f8fafc;
	transition: border-color 0.2s ease, opacity 0.2s ease;
	cursor: pointer;
	box-sizing: border-box;
}

.flexy-pills[data-type="thumbs"] ol li:hover {
	opacity: 0.9;
	border-color: #cbd5e1;
}

.flexy-pills[data-type="thumbs"] ol li.active {
	border-color: var(--lpx-primary, #d62828) !important;
	box-shadow: 0 0 0 1px var(--lpx-primary, #d62828);
}

.flexy-pills[data-type="thumbs"] ol li .ct-media-container {
	width: 100% !important;
	height: 100% !important;
	display: flex !important;
}

.flexy-pills[data-type="thumbs"] ol li img {
	width: 100% !important;
	height: 100% !important;
	aspect-ratio: 1 / 1 !important;
	object-fit: cover !important;
	display: block !important;
}

/* Thanh cuộn ngang thanh mảnh, tinh tế */
.flexy-pills[data-type="thumbs"] ol::-webkit-scrollbar {
	height: 4px;
}
.flexy-pills[data-type="thumbs"] ol::-webkit-scrollbar-track {
	background: #f1f5f9;
	border-radius: 4px;
}
.flexy-pills[data-type="thumbs"] ol::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 4px;
}
.flexy-pills[data-type="thumbs"] ol::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}
