/**
 * Summary meta row: Sell Tag (left) + product rating (right), above the title.
 * Loaded on variable product pages only (see inc/product-rating.php).
 */

.konte-pdp-meta-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 0.5rem;
}

/* Sell Tag inside the row: the row owns the spacing. */
.konte-pdp-meta-row .konte-sell-tag {
	margin: 0;
}

/* Rating: star + average + review count. `margin-left:auto` keeps it pinned to
   the right even when no Sell Tag is present in the row. */
.konte-product-rating {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	line-height: 1;
	white-space: nowrap;
}

.konte-product-rating__star {
	color: var(--ink_text);
	font-size: 13px;
	line-height: 1;
}

.konte-product-rating__average {
	font-size: 12px;
	font-weight: 300;
	color: var(--ink_text);
	line-height: normal;
	font-family: var(--font2);
}

.konte-product-rating__count {
	margin-left: 4px;
	font-size: 12px;
	font-weight: 300;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--h_clr);
	text-decoration: none;
	line-height: normal;
	font-family: var(--font2);
}

.konte-product-rating__count:hover,
.konte-product-rating__count:focus {
	color: var(--ink_text);
	text-decoration: none;
}

/*
 * Variable PDP: the summary's top gap (previously the title's 3.5rem top
 * margin) now sits above the meta row, with the title pulled up close beneath.
 * Higher specificity + !important overrides the existing title top-margin rule.
 */
/*body.konte-variable-pdp .product-type-variable .summary .konte-pdp-meta-row {
	margin-top: 0.5rem;
	margin-bottom: 0.5rem;
}*/

body.konte-variable-pdp .product-type-variable .summary .konte-pdp-meta-row + .product_title {
	margin-top: 0 !important;
}

/*
 * Mobile: the reference design has no Sell Tag ("BEST SELLER") and no compact
 * rating above the title — that slot belongs to the colour summary row instead
 * (see css/pdp-color-summary.css). One rule covers both, because
 * konte_child_pdp_summary_meta_row() renders the tag and the rating inside this
 * single wrapper. Display-layer only: the PHP still runs, so WooCommerce's own
 * rating stays suppressed and the full reviews section is unaffected. Desktop
 * keeps the row.
 */
@media (max-width: 767.98px) {
	body.konte-variable-pdp .konte-pdp-meta-row {
		display: none;
	}
}

/*
 * "PRODUCT TECH SPEC" row + rating (mobile only).
 *
 * With the meta row hidden above, the mobile rating moves down to the first row
 * of the short description, which renders directly below BUY NOW. The wrapper is
 * built in inc/product-rating.php, which pairs the product's own .pdt_01 div with
 * the rating; .pdt_01 itself keeps its existing styling (style.css) untouched.
 *
 * Hidden at every other width, because desktop already shows the rating in
 * .konte-pdp-meta-row above the title. Products whose short description has no
 * .pdt_01 row get no wrapper here at all — their rating falls back to the first
 * Product Info Panel trigger row (css/product-info-panel.css).
 */
.konte-pdt-spec-row .konte-product-rating {
	display: none;
}

@media (max-width: 767.98px) {
	.konte-pdt-spec-row {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
	}

	.konte-pdt-spec-row .pdt_01 {
		flex: 1 1 auto;
	}

	.konte-pdt-spec-row .konte-product-rating {
		display: inline-flex;
		flex: 0 0 auto;
	}
}
