/* Backefix Sticky Add-to-Cart (Mobile) – yfood-Stil
   Sichtbar nur auf kleinen Screens; auf Desktop ausgeblendet. */

#bx-sticky-atc.bx-sticky-atc {
	display: none;
}

/* Nur Mobil/Tablet anzeigen */
@media (max-width: 768px) {

	#bx-sticky-atc.bx-sticky-atc {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9990;
		background: #ffffff;
		box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
		border-top: 1px solid rgba(0, 0, 0, 0.06);
		/* iPhone Safe-Area */
		padding-bottom: env(safe-area-inset-bottom, 0px);
		transform: translateY(120%);
		transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
		will-change: transform;
	}

	#bx-sticky-atc.bx-sticky-atc.is-visible {
		transform: translateY(0);
	}

	.bx-sticky-atc__inner {
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 8px 12px;
		max-width: 720px;
		margin: 0 auto;
	}

	/* Produktbild links – dezenter runder Rahmen, falls Foto keinen weißen BG hat */
	.bx-sticky-atc__media {
		flex: 0 0 auto;
		width: 48px;
		height: 48px;
		border-radius: 10px;
		overflow: hidden;
		background: #f5f5f5;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.bx-sticky-atc__media .bx-sticky-atc__img {
		width: 100%;
		height: 100%;
		object-fit: contain;
		display: block;
	}

	/* Name + Preis */
	.bx-sticky-atc__info {
		flex: 1 1 auto;
		min-width: 0;
		display: flex;
		flex-direction: column;
		line-height: 1.2;
	}

	.bx-sticky-atc__title {
		font-family: inherit;
		font-weight: 600;
		font-size: 14px;
		color: #1a1a1a;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.bx-sticky-atc__price {
		font-size: 13px;
		color: #444;
		margin-top: 2px;
	}

	.bx-sticky-atc__price del {
		color: #999;
		font-weight: 400;
		margin-right: 5px;
	}

	.bx-sticky-atc__price ins {
		text-decoration: none;
		font-weight: 700;
		color: #1a1a1a;
	}

	/* CTA-Button rechts – Markenfarbe #282828, abgerundetes Pill */
	.bx-sticky-atc__btn {
		flex: 0 0 auto;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		padding: 12px 18px;
		border: 0;
		border-radius: 999px;
		background: #282828;
		color: #ffffff;
		font-family: inherit;
		font-weight: 700;
		font-size: 14px;
		line-height: 1;
		cursor: pointer;
		white-space: nowrap;
		transition: background 0.15s ease, transform 0.08s ease;
		-webkit-tap-highlight-color: transparent;
	}

	.bx-sticky-atc__btn:active {
		transform: scale(0.97);
	}

	.bx-sticky-atc__icon {
		flex: 0 0 auto;
	}

	/* Lade-/Erfolgs-Zustand */
	.bx-sticky-atc__btn.is-loading {
		opacity: 0.7;
		pointer-events: none;
	}

	.bx-sticky-atc__btn.is-added {
		background: #2e7d32;
	}

	/* Brevo-Chat ausblenden, solange die Sticky-Leiste sichtbar ist.
	   Sobald der echte Add-to-Cart-Button wieder im Bild ist, kommt der Chat zurück. */
	body.bx-sticky-atc-active #brevo-conversations,
	body.bx-sticky-atc-active .brevo-conversations,
	body.bx-sticky-atc-active .sib-conversations {
		opacity: 0 !important;
		pointer-events: none !important;
		transition: opacity 0.2s ease;
	}
}

/* Sehr schmale Screens: CTA-Text ggf. kürzen lassen */
@media (max-width: 360px) {
	.bx-sticky-atc__btn {
		padding: 12px 14px;
	}
	.bx-sticky-atc__price {
		font-size: 12px;
	}
}
