/* =========================================================
   J-Tech WooCommerce Enhance — Category Menu
   Mobile-first category cards: white + red premium UI.
   ========================================================= */

ul.products.jthwe-category-tiles,
ul.products:has(> li.product-category){
	display:grid!important;
	grid-template-columns:1fr!important;
	gap:10px!important;
	list-style:none!important;
	margin:0 0 28px!important;
	padding:0!important;
	width:100%!important;
}

ul.products li.product-category{
	position:relative!important;
	width:100%!important;
	max-width:none!important;
	margin:0!important;
	padding:0!important;
	background:#fff!important;
	border:1px solid #ececef!important;
	border-radius:16px!important;
	overflow:hidden!important;
	box-sizing:border-box!important;
	box-shadow:0 3px 12px rgba(20,20,30,.07)!important;
	transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease!important;
	animation:jthwe-cat-enter .32s cubic-bezier(.22,1,.36,1) both!important;
}

@keyframes jthwe-cat-enter{
	from{opacity:0;transform:translateY(8px)}
	to{opacity:1;transform:translateY(0)}
}

ul.products li.product-category:hover{
	transform:translateY(-2px)!important;
	box-shadow:0 8px 22px rgba(20,20,30,.11)!important;
	border-color:#f0caca!important;
}

ul.products li.product-category > a{
	display:grid!important;
	grid-template-columns:62px minmax(0,1fr) 28px!important;
	align-items:center!important;
	column-gap:12px!important;
	position:relative!important;
	width:100%!important;
	min-height:88px!important;
	padding:12px 14px!important;
	box-sizing:border-box!important;
	text-decoration:none!important;
	color:inherit!important;
}

/* Ti blok wouj dèyè imaj kategori a. */
ul.products li.product-category > a::after{
	content:'›';
	grid-column:3!important;
	grid-row:1!important;
	justify-self:end!important;
	width:28px!important;
	height:28px!important;
	border-radius:50%!important;
	background:#fff1f1!important;
	color:#e50914!important;
	display:flex!important;
	align-items:center!important;
	justify-content:center!important;
	font-size:22px!important;
	font-weight:700!important;
	line-height:1!important;
}

ul.products li.product-category img{
	grid-column:1!important;
	grid-row:1!important;
	width:62px!important;
	height:62px!important;
	aspect-ratio:1/1!important;
	object-fit:cover!important;
	object-position:center!important;
	display:block!important;
	margin:0!important;
	padding:0!important;
	border:0!important;
	border-radius:14px!important;
	box-shadow:0 0 0 1px #f2f2f2!important;
}

ul.products li.product-category .woocommerce-loop-category__title{
	grid-column:2!important;
	grid-row:1!important;
	align-self:start!important;
	min-width:0!important;
	min-height:0!important;
	padding:2px 0 0!important;
	margin:0!important;
	color:#15151a!important;
	font-size:14px!important;
	font-weight:800!important;
	line-height:1.25!important;
	letter-spacing:-.01em!important;
	text-align:left!important;
	white-space:normal!important;
	overflow:visible!important;
}

ul.products li.product-category .woocommerce-loop-category__title .count{
	display:none!important;
}

ul.products li.product-category .jthwe-cat-meta{
	grid-column:2!important;
	grid-row:1!important;
	align-self:end!important;
	min-width:0!important;
	padding:0 34px 1px 0!important;
	margin:0!important;
	text-align:left!important;
	display:flex!important;
	flex-direction:column!important;
	gap:2px!important;
}

ul.products li.product-category .jthwe-cat-description{
	font-size:10.5px!important;
	line-height:1.25!important;
	color:#666a73!important;
	white-space:nowrap!important;
	overflow:hidden!important;
	text-overflow:ellipsis!important;
}

ul.products li.product-category .jthwe-cat-count{
	font-size:10px!important;
	line-height:1.2!important;
	font-weight:700!important;
	color:#e50914!important;
}

ul.products li.product-category .jthwe-cat-price{
	font-size:10px!important;
	line-height:1.2!important;
	font-weight:700!important;
	color:#858891!important;
}

ul.products li.product-category .jthwe-cat-price .woocommerce-Price-amount{
	font-weight:800!important;
	color:#858891!important;
}

ul.products li.product-category .jthwe-cat-badge{
	position:absolute!important;
	top:8px!important;
	right:8px!important;
	z-index:5!important;
	display:inline-flex!important;
	align-items:center!important;
	justify-content:center!important;
	min-height:18px!important;
	padding:3px 7px!important;
	border-radius:999px!important;
	background:var(--jthwe-badge-color,#e50914)!important;
	color:#fff!important;
	font-size:8px!important;
	font-weight:800!important;
	line-height:1!important;
	text-transform:uppercase!important;
	letter-spacing:.02em!important;
	box-shadow:0 2px 7px rgba(0,0,0,.16)!important;
}

/* Desktop: 2 gwo cards pa liy pou kategori yo pa sanble ak yon grid pwodwi. */
@media (min-width:768px){
	ul.products.jthwe-category-tiles,
	ul.products:has(> li.product-category){
		grid-template-columns:repeat(2,minmax(0,1fr))!important;
		gap:14px!important;
	}

	ul.products li.product-category > a{
		grid-template-columns:76px minmax(0,1fr) 32px!important;
		min-height:104px!important;
		padding:14px 16px!important;
		column-gap:14px!important;
	}

	ul.products li.product-category img{
		width:76px!important;
		height:76px!important;
		border-radius:16px!important;
	}

	ul.products li.product-category .woocommerce-loop-category__title{
		font-size:15px!important;
	}

	ul.products li.product-category .jthwe-cat-description{
		font-size:11.5px!important;
	}

	ul.products li.product-category .jthwe-cat-count,
	ul.products li.product-category .jthwe-cat-price{
		font-size:10.5px!important;
	}
}

@media (max-width:380px){
	ul.products li.product-category > a{
		grid-template-columns:56px minmax(0,1fr) 26px!important;
		min-height:80px!important;
		padding:10px 11px!important;
		column-gap:10px!important;
	}

	ul.products li.product-category img{
		width:56px!important;
		height:56px!important;
		border-radius:12px!important;
	}

	ul.products li.product-category .woocommerce-loop-category__title{
		font-size:13px!important;
	}

	ul.products li.product-category .jthwe-cat-description{
		font-size:9.5px!important;
	}

	ul.products li.product-category .jthwe-cat-count,
	ul.products li.product-category .jthwe-cat-price{
		font-size:9px!important;
	}
}

/* Fallback pou shortcode ki gen class la. */
ul.products.jthwe-category-tiles{
	display:grid!important;
}
