/*
Theme Name: Betheme Child
Theme URI: https://themes.muffingroup.com/betheme
Author: Muffin group
Author URI: https://muffingroup.com
Description: Child Theme for Betheme
Template: betheme
Version: 2.0.2
*/

/* =========================================================================
 * MDSHOP — Codici prodotto (Minsan/EAN/Barcode) — stile discreto
 * Aggiunto: 2026-04-21
 * ========================================================================= */
.medically-product-codes {
	margin: 6px 0 8px;
	font-size: 12px;
	line-height: 1.4;
	color: #7a7a7a;
	letter-spacing: 0.3px;
	word-break: break-word;
}
.medically-product-codes .mpc-item {
	display: inline;
	white-space: nowrap;
}
.medically-product-codes .mpc-val {
	font-weight: 600;
	color: #555;
	font-variant-numeric: tabular-nums;
}
.medically-product-codes .mpc-sep {
	margin: 0 6px;
	opacity: 0.6;
}

/* Scheda singolo prodotto: leggermente piu' leggibile */
.single-product .medically-product-codes {
	font-size: 13px;
	margin: 8px 0 12px;
}

/* Mobile: una voce per riga, senza separatori */
@media (max-width: 480px) {
	.medically-product-codes .mpc-item { display: block; }
	.medically-product-codes .mpc-sep  { display: none; }
}

/* =========================================================================
 * MDSHOP — Fix layout pulsanti griglia prodotti (cart + wishlist)
 * Aggiunto: 2026-04-25
 * Problema: Betheme applica margin-right:-48px al container dei pulsanti in
 * griglia, causando la wishlist fuori dal box card (soprattutto su mobile
 * dove la cuore finisce clippata oltre il <li> genitore).
 * Fix: flex layout con cart flessibile (shrinks) + wishlist icona fissa.
 * ========================================================================= */
.mfn-li-product-row.mfn-li-product-row-button {
	margin: 10px 0 0 !important;   /* annulla il margin-right: -48px del tema */
	display: flex !important;
	flex-wrap: nowrap;
	align-items: center;
	gap: 8px;
	width: 100%;
	box-sizing: border-box;
}

.mfn-li-product-row.mfn-li-product-row-button > .button.add_to_cart_button,
.mfn-li-product-row.mfn-li-product-row-button > .add_to_cart_button {
	flex: 1 1 auto;
	min-width: 0;                  /* consente lo shrink senza overflow del testo */
	padding-left: 16px;
	padding-right: 16px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-align: center;
}

.mfn-li-product-row.mfn-li-product-row-button > .mfn-wish-button {
	flex: 0 0 40px;
	margin: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(0,0,0,0.08);
	border-radius: 6px;
	transition: background-color .2s ease, border-color .2s ease;
}
.mfn-li-product-row.mfn-li-product-row-button > .mfn-wish-button:hover {
	background: rgba(0,0,0,0.04);
	border-color: rgba(0,0,0,0.2);
}
.mfn-li-product-row.mfn-li-product-row-button > .mfn-wish-button svg {
	width: 20px;
	height: 20px;
	display: block;
}

/* La <span class="screen-reader-text"> che WooCommerce inserisce tra cart
   e wishlist non deve rubare spazio nel layout flex */
.mfn-li-product-row.mfn-li-product-row-button > .screen-reader-text {
	flex: 0 0 0;
	width: 0;
	height: 0;
	overflow: hidden;
}

/* Mobile: padding ridotto per il cart e wishlist piu' compatta */
@media (max-width: 767px) {
	.mfn-li-product-row.mfn-li-product-row-button {
		gap: 6px;
	}
	.mfn-li-product-row.mfn-li-product-row-button > .button.add_to_cart_button {
		padding: 12px 10px;
		font-size: 12px;
		letter-spacing: 0;
	}
	.mfn-li-product-row.mfn-li-product-row-button > .mfn-wish-button {
		flex: 0 0 36px;
		width: 36px;
		height: 36px;
	}
}
