/**
 * Add-to-cart counter on the cards, the bottom order bar ("Ver mi pedido") and the small toast.
 * Colors come from the brand variables (--fdk-*). Home page only.
 * Touch screens never get hover styles (hover only with a real mouse).
 */

/* ---------- Counter "- 1 +" on a card ---------- */
.fdk-card__qty {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 4px;
	background: #F6EEEB;
	border-radius: 999px;
}

.fdk-card__qty[hidden],
.fdk-card__add[hidden] {
	display: none;
}

.fdk-card__qty button {
	appearance: none;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--fdk-brand);
	cursor: pointer;
	font-family: inherit;
	font-weight: 700;
	font-size: 20px;
	line-height: 1;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	-webkit-tap-highlight-color: transparent;
}

.fdk-card__qty button:disabled {
	cursor: default;
	opacity: 0.35;
}

.fdk-card__qty button:focus-visible {
	outline: 2px solid var(--fdk-brand);
	outline-offset: 2px;
}

.fdk-card__qty output {
	min-width: 34px;
	text-align: center;
	font-weight: 800;
	font-size: 16px;
	color: #1B1011;
}

/* ---------- Bottom order bar ---------- */
body.fdk-has-orderbar {
	padding-bottom: calc(var(--fdk-orderbar-h, 96px) + 16px);
}

.fdk-orderbar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 40;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
	font-family: var(--fdk-font-text);
	pointer-events: none;
	transform: translateY(140%);
	visibility: hidden;
	transition: transform 0.28s ease, visibility 0s linear 0.28s;
}

.fdk-orderbar[data-show="true"] {
	transform: none;
	visibility: visible;
	transition: transform 0.28s ease, visibility 0s;
}

.fdk-orderbar > * {
	box-sizing: border-box;
	width: 100%;
	max-width: 640px;
	pointer-events: auto;
}

.fdk-orderbar__gift {
	background: var(--fdk-promo);
	color: #143A12;
	border: 1px solid #111;
	border-radius: 14px;
	padding: 10px 16px;
	text-align: center;
	font-weight: 700;
	font-size: 13.5px;
	box-shadow: 0 6px 18px rgba(30, 60, 30, 0.18);
}

.fdk-orderbar__gift[hidden],
.fdk-orderbar__notice[hidden],
.fdk-orderbar__total s[hidden] {
	display: none;
}

.fdk-orderbar__cta,
.fdk-orderbar__cta:link,
.fdk-orderbar__cta:visited,
.fdk-orderbar__cta:hover,
.fdk-orderbar__cta:focus,
.fdk-orderbar__cta:active {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	background: var(--fdk-accent);
	color: #2E2000;
	border: 1px solid #111;
	border-radius: 18px;
	padding: 14px 20px;
	font-weight: 800;
	font-size: 16px;
	text-decoration: none;
	text-align: left;
	box-shadow: 0 10px 28px rgba(90, 60, 0, 0.3);
	-webkit-tap-highlight-color: transparent;
}

.fdk-orderbar__cta:focus-visible {
	outline: 2px solid #111;
	outline-offset: 3px;
}

.fdk-orderbar__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.fdk-orderbar__title {
	line-height: 1.2;
}

.fdk-orderbar__text small {
	font-weight: 600;
	font-size: 12.5px;
	line-height: 1.3;
}

.fdk-orderbar__notice {
	color: #6b1a1a;
}

.fdk-orderbar__total {
	display: flex;
	align-items: baseline;
	gap: 6px;
	flex: none;
	background: #fff;
	border: 1px solid #111;
	border-radius: 999px;
	padding: 7px 16px;
	font-size: 17px;
	white-space: nowrap;
}

.fdk-orderbar__total s {
	font-weight: 500;
	font-size: 13px;
	opacity: 0.6;
}

/* ---------- Toast (short messages: out of stock, limit reached, errors) ---------- */
.fdk-toast {
	position: fixed;
	left: 50%;
	bottom: calc(var(--fdk-orderbar-h, 0px) + 28px + env(safe-area-inset-bottom, 0px));
	z-index: 45;
	box-sizing: border-box;
	width: max-content;
	max-width: min(92vw, 520px);
	transform: translateX(-50%);
	background: #1B1011;
	color: #fff;
	border-radius: 14px;
	padding: 10px 16px;
	font-family: var(--fdk-font-text);
	font-weight: 600;
	font-size: 13.5px;
	line-height: 1.35;
	text-align: center;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.fdk-toast[hidden] {
	display: none;
}

@media (hover: hover) and (pointer: fine) {
	.fdk-orderbar__cta:hover {
		filter: brightness(0.97);
	}

	.fdk-card__qty button:not(:disabled):hover {
		background: #FBF6F4;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fdk-orderbar,
	.fdk-orderbar[data-show="true"] {
		transition: none;
	}
}

/* ---------- Phones: all text one point larger ---------- */
@media (max-width: 859px) {
	.fdk-card__qty output {
		font-size: 17px;
	}

	.fdk-card__qty button {
		width: 42px;
		height: 42px;
		font-size: 22px;
	}

	.fdk-orderbar__gift {
		font-size: 14.5px;
	}

	.fdk-orderbar__cta,
	.fdk-orderbar__cta:link,
	.fdk-orderbar__cta:visited,
	.fdk-orderbar__cta:hover,
	.fdk-orderbar__cta:focus,
	.fdk-orderbar__cta:active {
		font-size: 17px;
	}

	.fdk-orderbar__text small {
		font-size: 13.5px;
	}

	.fdk-orderbar__total {
		font-size: 18px;
	}

	.fdk-toast {
		font-size: 14.5px;
	}
}
