/* =========================================================
   کارت مشترک محصولات
   در صفحه اصلی، پیشنهادات محصول و آرشیوهای ووکامرس یکسان است.
   ========================================================= */
.mytheme-product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    min-width: 0;
    padding: 8px;
}
.mytheme-product-card__image {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	background: #fafafa;
	overflow: hidden;
	flex-shrink: 0;
	border-radius: var(--radius) var(--radius) 0 0;
}
.mytheme-product-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.mytheme-product-card__sale-percent {
position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    background: #ff3e3e;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    box-shadow: none;
}
.mytheme-product-card__body {
	display: flex;
	flex-direction: column;
	gap: 5px;
	padding: 13px 2px 0;
	flex: 1;
}
.mytheme-product-card__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.65;
	color: var(--color-text);
	text-decoration: none;    max-width: 100%;
    overflow: hidden;
    position: relative;
	/*--------
    text-decoration: none;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
	-------*/
}
.mytheme-product-card__category {
	font-size: 12px;
	line-height: 1.5;
	color: var(--color-text-light);
}
.mytheme-product-card__footer {
margin-top: 7px;
    padding-top: 11px;
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 38px;
    flex-direction: row-reverse;
}
.mytheme-product-card__footer .mytheme-product-card__price {
margin: 0;
    min-height: 0;
    font-size: 14px;
    color: var(--color-text);
    text-align: right;
    display: block;
    align-items: center;
    gap: 8px;
}
.mytheme-product-card__footer .mytheme-product-card__price del {
	display: block;
	font-size: 11px;
	color: var(--color-text-light);
	font-weight: 400;
	margin-bottom: 1px;
}
.mytheme-product-card__footer .mytheme-product-card__price ins { text-decoration: none; }
.mytheme-product-card__label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	height: 25px;
	padding: 0 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}
.mytheme-product-card__label--green { background: #e9f7ec; color: #258044; }
.mytheme-product-card__label--gold { background: #fff4d6; color: #a87808; }
.mytheme-product-card__label--blue { background: #e8f4fb; color: #3b83a8; }
.mytheme-product-card__label--empty { visibility: hidden; }

/* گرید آرشیو: همان کارت صفحه اصلی، بدون تغییر در ساختار خود قالب. */
.woocommerce ul.products.mytheme-archive-products,
.woocommerce .mytheme-archive-products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 28px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.woocommerce ul.products.mytheme-archive-products::before,
.woocommerce ul.products.mytheme-archive-products::after { display: none; }
.woocommerce ul.products.mytheme-archive-products > li.mytheme-archive-product {
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
}
.mytheme-archive-product__action { margin-top: 10px; }
.mytheme-archive-product__action .button {
	display: block;
	width: 100%;
	margin: 0;
	padding: 9px 12px;
	border: 0;
	border-radius: var(--radius);
	background: var(--color-primary);
	color: #fff;
	font-family: inherit;
	font-size: 12px;
	line-height: 1.5;
	text-align: center;
	cursor: pointer;
}
.mytheme-archive-product__action .button:hover { background: var(--color-primary-dark); }

@media (max-width: 999px) {
	.woocommerce ul.products.mytheme-archive-products,
	.woocommerce .mytheme-archive-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.mytheme-product-card__footer .mytheme-product-card__price {
            font-size: 12px !important;
        font-weight: 500;
}
	.mytheme-product-card__footer {
        justify-content: flex-end;
        flex-direction: row-reverse;
}
	.mytheme-product-card__label {

    position: absolute;
    top: 14px;
    left: 14px;
}
	.mytheme-product-card__sale-percent {
    top: 4px;
    right: 4px;
}
	.woocommerce .woocommerce-ordering select {
    background: #ffffff;
}
}
@media (max-width: 700px) {
	.woocommerce ul.products.mytheme-archive-products,
	.woocommerce .mytheme-archive-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 8px; }
	.mytheme-product-card__body { padding-top: 12px; }
	.mytheme-product-card__title { font-size: 12px; }
}
.woocommerce .woocommerce-ordering select {
    font-family: inherit;
    border-radius: 8px;
    padding: 8px;
}
/* وضعیت ناموجود */
.mytheme-product-card__stock-status {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 26px;
	padding: 4px 10px;
	border-radius: 999px;
	background: #f1f1f1;
	color: #666;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}
.mytheme-product-card.is-out-of-stock .mytheme-product-card__image,
.mytheme-recommended-card.is-out-of-stock .mytheme-recommended-card__image {
	position: relative;
}
