/* Compound archive - Savoy integration
   Only styles what Savoy's theme CSS doesn't already cover.
   Enqueue conditionally, e.g.:
   add_action( 'wp_enqueue_scripts', function () {
       if ( is_post_type_archive( 'compound' ) || is_tax( 'compound_category' ) ) {
           wp_enqueue_style( 'hoino-compound', get_stylesheet_directory_uri() . '/compound-archive.css' );
       }
   }, 20 ); // after Savoy's own styles so overrides apply if needed
*/

/* Sidebar widgets: Categories list */
.hoino-compound-category-list,
.hoino-compound-sort-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hoino-compound-category-list li,
.hoino-compound-sort-list li {
	margin-bottom: 8px;
}

.hoino-compound-category-list a,
.hoino-compound-sort-list a {
	display: flex;
	align-items: center;
	gap: 8px;
}

.hoino-compound-category-list li.current-cat a,
.hoino-compound-sort-list li.current-sort a {
	font-weight: 600;
}

.hoino-compound-category-list img {
	width: 18px;
	height: 18px;
	object-fit: contain;
}

/* Horizontal categories widget (icon above title, evenly spaced) */
.hoino-compound-category-horizontal {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 50px 0;
	padding: 0;
}

.hoino-compound-category-horizontal li {
	flex: 1 1 0;
	min-width: 0; /* allow items to shrink evenly instead of overflowing */
	margin: 0;
	padding: 0 24px;
	text-align: center;
	border-right: 1px solid #eee;
}

.hoino-compound-category-horizontal li:last-child {
	border-right: 0;
}

.hoino-compound-category-horizontal a {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0;
	text-decoration: none;
	font-size: 18px;
}

.hoino-compound-category-horizontal img {
	width: 70px;
	height: 70px;
	object-fit: contain;
	border-radius: 50%;
	margin: 0 auto;
}

.hoino-compound-category-horizontal li.current-cat a {
	font-weight: 600;
}

@media (max-width: 768px) {
	.hoino-compound-category-horizontal {
		margin: 30px 0;
	}
	.hoino-compound-category-horizontal li {
		padding: 0 14px;
	}
	.hoino-compound-category-horizontal img {
		width: 50px;
		height: 50px;
	}
	.hoino-compound-category-horizontal a {
		font-size: 14px;
	}
}

@media (max-width: 480px) {
	.hoino-compound-category-horizontal {
		flex-wrap: wrap;
		gap: 20px 0;
	}
	.hoino-compound-category-horizontal li {
		flex: 1 1 33.333%; /* 3 per row on small phones instead of squeezing all in one row */
		border-right: 0;
		padding: 0 10px;
	}
	.hoino-compound-category-horizontal img {
		width: 40px;
		height: 40px;
	}
}

/* Card - score bars (the one visual piece with no Savoy equivalent) */
.hoino-compound-card__category {
	font-size: 13px;
	opacity: .7;
	margin: 0 0 10px;
}

.hoino-compound-card__scores {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 10px;
}

.hoino-score {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
}

.hoino-score__label {
	flex: 0 0 64px;
	font-weight: 600;
}

.hoino-score__bar {
	flex: 1;
	height: 5px;
	background: rgba(0,0,0,.08);
	border-radius: 3px;
	overflow: hidden;
	display: block;
}

.hoino-score__fill {
	display: block;
	height: 100%;
	background: currentColor; /* inherits theme's link/accent color */
}

.hoino-compound-card__desc {
	font-size: 13px;
	line-height: 1.5;
	opacity: .8;
	margin: 0 0 12px;
}

.hoino-compound-card__forms {
	font-size: 11px;
	opacity: .6;
	margin-left: 12px;
}

.hoino-compound-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	min-height: 220px;
	background: #0e2240;
	color: #fff;
	font-weight: 700;
	text-align: center;
	padding: 16px;
}

/* Wishlist heart button (top-right of the card) */
.hoino-compound-card {
	position: relative;
}

.hoino-compound-card__wishlist {
	position: absolute;
	top: 4px;
	right: 4px;
	z-index: 2;
	background: none;
	border: none;
	padding: 6px;
	cursor: pointer;
	color: #282828;
	opacity: .6;
	transition: opacity .2s ease;
}

.hoino-compound-card__wishlist:hover {
	opacity: 1;
}

/* Category label */
.hoino-compound-card__category strong {
	font-weight: 600;
}

/* Score bar marker (small triangle above the fill, matches the reference
   screenshot's pointer indicating the current score position) */
.hoino-score__bar {
	position: relative;
	overflow: visible !important; /* allow the marker to show above the bar */
}

.hoino-score__marker {
	position: absolute;
	top: -9px;
	transform: translateX(-50%);
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid #282828;
}

/* Available forms line */
.hoino-compound-card__forms {
	font-size: 12px;
	opacity: .65;
	margin: 10px 0 0;
}

/* Fix: vertically align details to top instead of center in list layout
   (Savoy's default grid-list CSS centers .nm-shop-loop-details, which
   looks odd once the card has this much content) */
.products.grid-list .nm-shop-loop-details {
	align-self: flex-start !important;
}

/* Single Compound page (single-compound.php) */
.nm-single-compound {
	padding: 40px 0 60px;
}

.nm-compound-title {
	margin: 0 0 8px;
	font-size: 32px;
}

.nm-compound-cas {
	font-size: 13px;
	opacity: .6;
	margin: 0 0 16px;
}

.nm-compound-scores {
	margin: 20px 0;
}

.nm-compound-use h3,
.nm-compound-benefits h3 {
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: .03em;
	margin: 20px 0 8px;
}

.nm-compound-benefits ul {
	margin: 0;
	padding-left: 18px;
}

.nm-compound-benefits li {
	margin-bottom: 6px;
}

.nm-compound-forms {
	margin: 20px 0;
}

.nm-compound-jump-to-products {
	display: inline-block;
	margin-top: 10px;
}

.nm-compound-image,
.nm-compound-image-placeholder {
	width: 100%;
	border-radius: 6px;
}

.nm-compound-image-placeholder {
	min-height: 380px;
}

.nm-compound-description {
	margin-top: 40px;
	max-width: 800px;
}

.nm-compound-products {
	margin-top: 60px;
	padding-top: 40px;
	border-top: 1px solid #eee;
}

.nm-compound-products h2 {
	margin-bottom: 24px;
}

@media (max-width: 991px) {
	.nm-compound-gallery {
		margin-bottom: 24px;
	}
}