/* Product card */
.product-card { position: relative; display: flex; flex-direction: column; height: 100%; }
.product-card__media { position: relative; display: block; aspect-ratio: 1; padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: #fff; overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease; }
.product-card:hover .product-card__media { border-color: var(--color-border-strong); box-shadow: var(--shadow); }
.product-card__img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s ease; }
.product-card:hover .product-card__img { transform: scale(1.04); }

.product-card__badges { position: absolute; top: var(--space-3); left: var(--space-3); display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); }
.badge { display: inline-block; padding: 0.25em 0.55em; border-radius: var(--radius-sm); font-size: var(--fs-xs); font-weight: var(--fw-semibold); line-height: 1.2; color: #fff; background: var(--color-primary); }
.badge--new { background: var(--color-secondary); }
.badge--out { background: var(--color-muted); }

.product-card__body { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-4); flex: 1; }
.product-card__title { font-size: var(--fs-sm); font-weight: var(--fw-medium); line-height: 1.4; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card__rating { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-xs); color: var(--color-muted); }

.product-card__buy { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-top: auto; }
.product-card__price { display: flex; flex-direction: column; font-size: var(--fs-md); line-height: 1.25; }
.product-card__price del { font-size: var(--fs-sm); margin: 0; }

/* Cart button: icon-only square */
.product-card .product-card__cart.button,
.product-card a.product-card__cart {
	flex: none; width: 2.5rem; height: 2.5rem; padding: 0; border-radius: var(--radius);
	background: var(--color-bg-soft); color: var(--color-text); font-size: 0; position: relative;
}
.product-card a.product-card__cart::before {
	content: ""; display: block; width: 1.15rem; height: 1.15rem; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h2l2.4 12.2a2 2 0 0 0 2 1.6h8.8a2 2 0 0 0 2-1.6L21 7H6M10 21a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm8 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h2l2.4 12.2a2 2 0 0 0 2 1.6h8.8a2 2 0 0 0 2-1.6L21 7H6M10 21a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm8 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.product-card a.product-card__cart:hover { background: var(--color-action); color: var(--color-action-text); }
.product-card a.product-card__cart.loading { opacity: .5; }
.product-card a.product-card__cart.added::before { -webkit-mask-image: none; mask-image: none; background: none; content: "✓"; font-size: 1rem; width: auto; height: auto; }
.product-card .added_to_cart { display: none; }

.product-card__stock { display: flex; align-items: center; gap: var(--space-1); margin: 0; font-size: var(--fs-xs); color: var(--color-success); }
.product-card__stock .icon { width: 0.9rem; height: 0.9rem; }

@media (max-width: 640px) {
	.product-card__media { padding: var(--space-2); border-radius: var(--radius); }
	.product-card__price { font-size: var(--fs-base); }
	.product-card__stock { display: none; }
}
