/**
 * Post Products — frontend recommendation card.
 * All selectors are scoped under .post-products so nothing here can leak
 * into the site's global h1/h2/h3/a/button/img styles.
 * Uses CSS logical properties (margin-inline-*, inset-inline-*) so the
 * component works correctly in both RTL and LTR contexts.
 */

.post-products {
	display: grid;
	gap: 16px;
	margin-block: 24px;
	max-width: 100%;
}

.post-product-card {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 16px;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	background: #fff;
	direction: rtl;
	max-width: 100%;
	box-sizing: border-box;
}

.post-product-card__image {
	flex: 0 0 160px;
	display: block;
	border-radius: 8px;
	overflow: hidden;
	background: #f7f7f7;
}

.post-product-card__image img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: contain;
	aspect-ratio: 1 / 1;
}

.post-product-card__content {
	flex: 1;
	min-width: 0;
}

.post-product-card__title {
	margin: 0 0 6px;
	font-size: 17px;
	line-height: 1.4;
	font-weight: 700;
}

.post-product-card__title a {
	color: inherit;
	text-decoration: none;
}

.post-product-card__title a:hover {
	text-decoration: underline;
}

.post-product-card__description {
	margin: 0 0 10px;
	font-size: 13px;
	line-height: 1.6;
	color: #666;
}

.post-product-card__stock {
	display: inline-block;
	margin: 0 0 10px;
	padding: 2px 10px;
	border-radius: 999px;
	background: #fbeaea;
	color: #a33;
	font-size: 12px;
}

.post-product-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-block-start: 8px;
}

.post-product-card__price {
	font-size: 16px;
	font-weight: 700;
	color: #1a1a1a;
}

.post-product-card__price del {
	color: #999;
	font-weight: 400;
	margin-inline-end: 6px;
}

.post-product-card__price ins {
	text-decoration: none;
}

.post-product-card__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 18px;
	border-radius: 8px;
	background: #1a1a1a;
	color: #fff !important;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
	white-space: nowrap;
	transition: opacity 0.15s ease;
}

.post-product-card__button:hover {
	opacity: 0.85;
}

@media ( max-width: 640px ) {
	.post-product-card {
		flex-direction: column;
		align-items: stretch;
	}
	.post-product-card__button {
	width: 100%!important;
	font-size: 14px !important;
}

	.post-product-card__image {
		flex-basis: auto;
		;
		margin-inline: auto;
	}

	.post-product-card__footer {
		flex-wrap: wrap;
	}

	.post-product-card__title,
	.post-product-card__description {
		text-align: center;
	}

	.post-product-card__footer {
		justify-content: left;
		text-align: center;
	}
}
