/* ==============================
   Hover Tabs Products Widget
   ============================== */

.htp-hover-tabs-products {
	width: 100%;
}

/* --- Tab Navigation Wrap (full width background) --- */
.htp-tabs-nav-wrap {
	width: 100%;
}

/* --- Tab Navigation (constrained width, centered) --- */
.htp-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0 auto;
	padding: 0;
	justify-content: center;
	gap: 0;
	max-width: 1200px;
}

.htp-tab-item {
	margin: 0;
}

.htp-tab-link {
	display: block;
	padding: 12px 24px;
	text-decoration: none;
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: background-color 0.25s ease, color 0.25s ease;
	white-space: nowrap;
}

.htp-tab-link:hover,
.htp-tab-link:focus {
	text-decoration: none;
}

.htp-tab-item.active .htp-tab-link {
	position: relative;
}

.htp-tab-item.active .htp-tab-link::after {
	content: '';
	position: absolute;
	bottom: -8px;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 0;
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
	border-top: 8px solid #1e73be;
}

/* --- Tab Panels --- */
.htp-tabs-content {
	margin-top: 8px;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

.htp-tab-panel {
	display: none;
}

.htp-tab-panel.active {
	display: block;
}

/* --- Fade in from top animation --- */
@keyframes htpFadeInDown {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.htp-tab-panel.active .htp-panel-inner {
	animation: htpFadeInDown 0.4s ease forwards;
}

.htp-panel-inner {
	display: flex;
	align-items: stretch;
	min-height: 300px;
}

/* --- Left Panel --- */
.htp-panel-left {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	text-align: center;
	padding: 30px 25px;
	border-right: 1px solid #ddd;
	box-sizing: border-box;
}

.htp-left-image {
	margin-bottom: 15px;
	max-width: 100%;
}

.htp-left-image img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
}

.htp-left-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 12px;
	line-height: 1.3;
}

.htp-left-link {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	text-decoration: none;
	border-bottom: 2px solid currentColor;
	padding-bottom: 2px;
	transition: opacity 0.2s ease;
}

.htp-left-link:hover {
	opacity: 0.7;
	text-decoration: none;
}

/* --- Right Panel --- */
.htp-panel-right {
	flex: 1;
	min-width: 0;
	padding: 15px;
}

/* --- Custom Products Grid --- */
.htp-products-grid {
	display: grid;
	gap: 20px;
}

.htp-products-grid.htp-cols-2 {
	grid-template-columns: repeat(2, 1fr);
}

.htp-products-grid.htp-cols-3 {
	grid-template-columns: repeat(3, 1fr);
}

.htp-products-grid.htp-cols-4 {
	grid-template-columns: repeat(4, 1fr);
}

.htp-product-item {
	display: flex;
	flex-direction: column;
}

.htp-product-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.htp-product-link:hover,
.htp-product-link:focus {
	text-decoration: none;
	color: inherit;
}

.htp-product-thumb {
	position: relative;
	overflow: hidden;
	background: #fff;
	margin-bottom: 10px;
}

.htp-product-thumb img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.htp-product-link:hover .htp-product-thumb img {
	transform: scale(1.03);
}

.htp-product-title {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	margin: 0 0 6px;
	color: #222;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.htp-product-price {
	font-size: 14px;
	font-weight: 600;
	color: #222;
	line-height: 1.4;
}

.htp-product-price del {
	color: #999;
	font-weight: 400;
	margin-right: 6px;
}

.htp-product-price ins {
	text-decoration: none;
	font-weight: 700;
}

/* --- Image Ratio Variants --- */
.htp-ratio-1-1 .htp-product-thumb,
.htp-ratio-4-3 .htp-product-thumb,
.htp-ratio-3-4 .htp-product-thumb,
.htp-ratio-16-9 .htp-product-thumb,
.htp-ratio-custom .htp-product-thumb {
	overflow: hidden;
}

.htp-ratio-1-1 .htp-product-thumb {
	aspect-ratio: 1 / 1;
}

.htp-ratio-4-3 .htp-product-thumb {
	aspect-ratio: 4 / 3;
}

.htp-ratio-3-4 .htp-product-thumb {
	aspect-ratio: 3 / 4;
}

.htp-ratio-16-9 .htp-product-thumb {
	aspect-ratio: 16 / 9;
}

.htp-ratio-1-1 .htp-product-thumb img,
.htp-ratio-4-3 .htp-product-thumb img,
.htp-ratio-3-4 .htp-product-thumb img,
.htp-ratio-16-9 .htp-product-thumb img,
.htp-ratio-custom .htp-product-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* --- Responsive --- */
@media (max-width: 767px) {
	.htp-tabs-nav {
		flex-direction: column;
	}

	.htp-tab-link {
		text-align: center;
		padding: 10px 16px;
		font-size: 13px;
	}

	.htp-tab-item.active .htp-tab-link::after {
		display: none;
	}

	.htp-panel-inner {
		flex-direction: column;
	}

	.htp-panel-left {
		border-right: none;
		border-bottom: 1px solid #ddd;
		width: 100% !important;
		flex: none !important;
		padding: 20px;
	}

	.htp-panel-right {
		padding: 15px 0;
	}

	.htp-products-grid.htp-cols-3,
	.htp-products-grid.htp-cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}
