/* Mediterrane Casa: carrito lateral (inc/warenkorb.php, assets/js/warenkorb.js). 11/10, en pruebas.
   Blanco y negro, Newsreader en nombres y títulos, Hanken Grotesk en el texto, líneas de 1 px, azul Klein #002FA7 en la barra (opción C, 11/10). */

html.mfc-wk-lock { overflow: hidden; }
html.mfc-wk-lock body { padding-right: var(--mfc-sbw, 0px); }

.mfc-wk { position: fixed; inset: 0; z-index: 1000; font-family: var(--sans, "Hanken Grotesk", Arial, sans-serif); color: var(--ink, #111); }
.mfc-wk[hidden] { display: none; }

.mfc-wk__backdrop { position: absolute; inset: 0; background: rgba(17, 17, 17, .42); opacity: 0; transition: opacity .3s var(--ease, ease); cursor: pointer; }
.mfc-wk.is-open .mfc-wk__backdrop { opacity: 1; }

.mfc-wk__panel {
	position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%);
	display: flex; flex-direction: column; background: #fff; outline: none;
	border-left: 1px solid var(--line, #d9d9d9);
	transform: translateX(100%); transition: transform .32s var(--ease, cubic-bezier(.2, .6, .2, 1));
}
.mfc-wk.is-open .mfc-wk__panel { transform: none; }
@media (max-width: 559px) {
	.mfc-wk__panel { width: 100%; border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.mfc-wk__backdrop, .mfc-wk__panel { transition: none; }
}

/* Cabecera */
.mfc-wk__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 12px 14px 24px; border-bottom: 1px solid var(--line, #d9d9d9); }
.mfc-wk__title { margin: 0; font: 500 12px/1.4 var(--sans, Arial, sans-serif); letter-spacing: .2em; text-transform: uppercase; }
.mfc-wk__close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.mfc-wk__close svg { width: 22px; height: 22px; }
.mfc-wk__close:hover { opacity: .6; }

/* Contenido */
.mfc-wk__inner { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.mfc-wk__inner.is-loading, .mfc-wk__loading { min-height: 120px; }
.mfc-wk__inner.is-loading::before, .mfc-wk__loading::before { content: ""; display: block; width: 28px; height: 28px; margin: 48px auto; border: 1px solid var(--line, #d9d9d9); border-top-color: #111; border-radius: 50%; animation: mfc-wk-spin .8s linear infinite; }
@keyframes mfc-wk-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mfc-wk__inner.is-loading::before, .mfc-wk__loading::before { animation-duration: 3s; } }
.mfc-wk.is-busy .mfc-wk__scroll, .mfc-wk.is-busy .mfc-wk__foot { opacity: .55; pointer-events: none; transition: opacity .15s; }

.mfc-wk__notice { margin: 16px 24px 0 !important; font-size: 14px; }

/* Envío gratis */
.mfc-wk__ship { padding: 16px 24px 18px; border-bottom: 1px solid var(--line, #d9d9d9); }
.mfc-wk__ship p { margin: 0 0 10px; font-size: 14px; line-height: 1.4; text-align: center; }
.mfc-wk__ship strong { font-weight: 600; }
.mfc-wk__bar { height: 4px; background: #ECEAE5; overflow: hidden; }
.mfc-wk__bar span { display: block; height: 100%; background: #002FA7; transition: width .4s var(--ease, ease); }
@media (prefers-reduced-motion: reduce) { .mfc-wk__bar span { transition: none; } }

.mfc-wk__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* Líneas */
.mfc-wk__items { list-style: none; margin: 0; padding: 0 24px; }
.mfc-wk__item { display: grid; grid-template-columns: 88px 1fr 32px; gap: 16px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--line, #d9d9d9); }
.mfc-wk__img { display: block; aspect-ratio: 1; background: var(--soft, #F2EEE7); }
.mfc-wk__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.mfc-wk__info { min-width: 0; }
.mfc-wk__name { margin: 0; font: 400 18px/1.25 var(--serif, Georgia, serif); }
.mfc-wk__name a { text-decoration: none; }
.mfc-wk__name a:hover { text-decoration: underline; }
.mfc-wk__var { margin: 4px 0 0; font-size: 13px; color: var(--muted, #6e6e6e); }
.mfc-wk__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.mfc-wk__price { margin: 0; font-size: 15px; font-weight: 500; white-space: nowrap; }
.mfc-wk__unit { margin: 4px 0 0; font-size: 12px; color: var(--muted, #6e6e6e); text-align: right; }
.mfc-wk__qty-solo { font-size: 13px; color: var(--muted, #6e6e6e); }
.mfc-wk__del { display: grid; place-items: center; width: 32px; height: 32px; margin-top: -4px; padding: 0; border: 0; background: none; color: var(--muted, #6e6e6e); cursor: pointer; }
.mfc-wk__del:hover { color: #111; }

.mfc-qty { display: inline-flex; align-items: center; border: 1px solid var(--line, #d9d9d9); }
.mfc-qty button { width: 36px; height: 36px; padding: 0; border: 0; background: none; color: #111; font: 400 18px/1 var(--sans, Arial, sans-serif); cursor: pointer; }
.mfc-qty button:hover:not(:disabled) { background: var(--soft, #F2EEE7); }
.mfc-qty button:disabled { color: #c4c4c4; cursor: default; }
.mfc-qty__n { min-width: 28px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }

/* Passt dazu */
.mfc-wk__recs { padding: 24px 24px 28px; }
.mfc-wk__recs-t { margin: 0 0 16px; font: 500 12px/1.4 var(--sans, Arial, sans-serif); letter-spacing: .2em; text-transform: uppercase; }
.mfc-wk__recs-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mfc-rec { display: flex; flex-direction: column; min-width: 0; }
.mfc-rec__img { display: block; aspect-ratio: 1; background: var(--soft, #F2EEE7); margin-bottom: 10px; }
.mfc-rec__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.mfc-rec__name { margin: 0; font: 400 16px/1.25 var(--serif, Georgia, serif); }
.mfc-rec__name a { text-decoration: none; }
.mfc-rec__name a:hover { text-decoration: underline; }
.mfc-rec__var { margin: 3px 0 0; font-size: 12px; color: var(--muted, #6e6e6e); }
.mfc-rec__price { margin: 6px 0 0; font-size: 14px; font-weight: 500; }
.mfc-rec__unit { margin: 2px 0 0; font-size: 11px; color: var(--muted, #6e6e6e); }
.mfc-rec__add {
	margin-top: auto; min-height: 40px; padding: 8px 12px; border: 1px solid #111; background: #fff; color: #111;
	font: 500 11px/1.2 var(--sans, Arial, sans-serif); letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
	transition: background-color .2s, color .2s;
}
.mfc-rec__price + .mfc-rec__add, .mfc-rec__unit + .mfc-rec__add { margin-top: 12px; }
.mfc-rec__add:hover { background: #111; color: #fff; }
.mfc-rec__add.is-loading { opacity: .6; }

/* Pie fijo */
.mfc-wk__foot { flex: 0 0 auto; padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line, #d9d9d9); background: #fff; }
.mfc-wk__sum { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; font-size: 15px; }
.mfc-wk__sum-v { font-weight: 600; white-space: nowrap; }
.mfc-wk__tax { margin: 2px 0 14px; font-size: 12px; color: var(--muted, #6e6e6e); }
.mfc-wk__tax a { color: inherit; }
.mfc-wk__checkout.btn { display: flex; width: 100%; min-height: 54px; background: #111; border-color: #111; color: #fff; font-size: 13px; letter-spacing: .18em; }
.mfc-wk__checkout.btn:hover { background: #2b2b2b; color: #fff; }
.mfc-wk__continue { display: block; margin: 10px auto 0; padding: 8px 12px; border: 0; background: none; color: var(--muted, #6e6e6e); font: 400 13px/1.4 var(--sans, Arial, sans-serif); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.mfc-wk__continue:hover { color: #111; }

/* Vacío */
.mfc-wk__empty { padding: 48px 24px; text-align: center; }
.mfc-wk__empty p { margin: 0 0 20px; font: 400 22px/1.3 var(--serif, Georgia, serif); }

@media (max-width: 559px) {
	.mfc-wk__head { padding-left: 16px; }
	.mfc-wk__ship, .mfc-wk__recs, .mfc-wk__foot { padding-left: 16px; padding-right: 16px; }
	.mfc-wk__items { padding: 0 16px; }
	.mfc-wk__item { grid-template-columns: 76px 1fr 32px; gap: 12px; }
	.mfc-wk__recs-list { gap: 12px; }
}

/* Aviso de error junto al formulario de la ficha (sin stock, variante sin elegir…). */
.mfc-wk-notice:empty { display: none; }
.mfc-wk-notice .woocommerce-error { margin: 0 0 16px; outline: none; }
.mfc-wk__notice { list-style: none; padding: 12px 14px; border: 1px solid #b3261e; color: #8c1d18; background: #fff; }
.mfc-wk__notice li + li { margin-top: 6px; }

/* Restricción de entrega y medios de pago (revisión legal 11/10: § 312j Abs. 1 BGB). */
.mfc-wk__liefer { margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: #111; }
.mfc-rec__unit a { color: inherit; }
.mfc-wk__pay { margin: 12px 0 0; }
.mfc-wk__pay ul { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mfc-wk__pay-i { padding: 3px 8px; border: 1px solid var(--line, #d9d9d9); font-size: 11px; line-height: 1.3; color: var(--muted, #6e6e6e); }
.mfc-wk__pay-i.has-icon { padding: 0; border: 0; display: inline-flex; gap: 4px; }
.mfc-wk__pay-i img { height: 20px; width: auto; max-width: 60px; margin: 0 !important; display: inline-block; }
.mfc-wk__checkout.btn { border-radius: 0; }
@media (max-width: 559px) {
	.mfc-wk__ship { padding-top: 12px; padding-bottom: 14px; }
	.mfc-wk__ship p { font-size: 13px; margin-bottom: 8px; }
	.mfc-wk__foot { padding-top: 12px; }
	.mfc-wk__tax { margin-bottom: 10px; }
	.mfc-wk__checkout.btn { min-height: 50px; }
	.mfc-wk__pay { margin-top: 8px; }
	.mfc-wk__continue { margin-top: 4px; }
	.mfc-rec__img { max-height: 150px; aspect-ratio: auto; height: 150px; }
}

/* ---------------------------------------------------------------------------
   Botón rápido de las tarjetas (11/10). La foto es la primera caja de la tarjeta, a todo el ancho y en 4:5:
   con unidades de contenedor (cqw) el botón se coloca sobre su parte baja sin tocar el HTML de la tarjeta.
   --------------------------------------------------------------------------- */
.card-product, .woocommerce ul.products li.product { position: relative; container-type: inline-size; }
.mfc-qa {
	--mfc-qa-h: 44px;
	position: absolute; z-index: 3; left: 5cqw; right: 5cqw; top: calc(125cqw - var(--mfc-qa-h) - 5cqw);
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	height: var(--mfc-qa-h); margin: 0; padding: 0 18px;
	border: 1.5px solid #111; border-radius: 999px; background: rgba(255, 255, 255, .94); color: #111;
	font: 500 11px/1 var(--sans, "Hanken Grotesk", Arial, sans-serif); letter-spacing: .16em; text-transform: uppercase;
	text-decoration: none; white-space: nowrap; cursor: pointer;
	opacity: 0; transform: translateY(6px);
	transition: opacity .25s var(--ease, ease), transform .25s var(--ease, ease), background-color .2s, color .2s, border-color .2s;
}
.mfc-qa__t { overflow: hidden; text-overflow: ellipsis; }
.mfc-qa__p { letter-spacing: .04em; text-transform: none; font-size: 13px; font-variant-numeric: tabular-nums; }
.mfc-qa__i { display: none; }
.card-product:hover .mfc-qa, .card-product:focus-within .mfc-qa,
.woocommerce ul.products li.product:hover .mfc-qa, .woocommerce ul.products li.product:focus-within .mfc-qa { opacity: 1; transform: none; }
.mfc-qa:hover, .mfc-qa:focus-visible { background: #111111; border-color: #111111; color: #fff; text-decoration: none; }
.mfc-qa:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.mfc-qa.is-loading { opacity: .6 !important; cursor: progress; }
@media (prefers-reduced-motion: reduce) {
	.mfc-qa { transform: none; transition: opacity .01s, background-color .01s, color .01s; }
}

/* Táctil (sin hover): un «+» redondo y discreto en la esquina inferior derecha de la foto, siempre visible.
   En la rejilla de 2 columnas del móvil (unos 170 px) «IN DEN WARENKORB · 26,90 €» no cabe sin partir líneas,
   y una fila de botón más alargaría todas las tarjetas. El nombre y el precio siguen en el aria-label.
   Los variables no llevan «+»: tocar la tarjeta ya lleva a la ficha, que es lo mismo que haría el botón. */
@media (hover: none) {
	.mfc-qa {
		--mfc-qa-h: 40px;
		left: auto; right: 3cqw; top: calc(125cqw - var(--mfc-qa-h) - 3cqw); width: var(--mfc-qa-h);
		justify-content: center; padding: 0; border-width: 1px;
		opacity: 1; transform: none;
	}
	.mfc-qa::after { content: ""; position: absolute; inset: -4px; } /* 48 px de zona táctil */
	.mfc-qa__t, .mfc-qa__p { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.mfc-qa__i { display: block; }
	.mfc-qa--opt { display: none; }
	.mfc-qa:hover { background: rgba(255, 255, 255, .94); border-color: #111; color: #111; }
	.mfc-qa:active { background: #111111; border-color: #111111; color: #fff; }
}
