/* Mobile bottom navigation — ReYES */

:root {
	--reyes-bottom-nav-height: 56px;
	--reyes-bottom-nav-bg: #ffffff;
	--reyes-bottom-nav-border: #e8e8e8;
	--reyes-bottom-nav-text: #666666;
	--reyes-bottom-nav-active: #111111;
	--reyes-bottom-nav-badge: #e53935;
}

.reyes-bottom-nav {
	display: none;
}

@media (max-width: 849px) {
	.reyes-bottom-nav {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9990;
		background: var(--reyes-bottom-nav-bg);
		border-top: 1px solid var(--reyes-bottom-nav-border);
		box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
		padding-bottom: env(safe-area-inset-bottom, 0);
	}

	.reyes-bottom-nav__list {
		display: flex;
		align-items: stretch;
		justify-content: space-around;
		list-style: none;
		margin: 0;
		padding: 0;
		min-height: var(--reyes-bottom-nav-height);
	}

	.reyes-bottom-nav__item {
		flex: 1 1 0;
		min-width: 0;
	}

	.reyes-bottom-nav__link {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 2px;
		height: var(--reyes-bottom-nav-height);
		padding: 6px 4px 4px;
		color: var(--reyes-bottom-nav-text);
		text-decoration: none;
		-webkit-tap-highlight-color: transparent;
	}

	.reyes-bottom-nav__link:active {
		opacity: 0.75;
	}

	.reyes-bottom-nav__item.is-active .reyes-bottom-nav__link,
	.reyes-bottom-nav__link:focus-visible {
		color: var(--reyes-bottom-nav-active);
	}

	.reyes-bottom-nav__icon-wrap {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 24px;
		height: 24px;
	}

	.reyes-bottom-nav__icon-wrap svg {
		width: 22px;
		height: 22px;
		display: block;
	}

	.reyes-bottom-nav__label {
		font-size: 10px;
		line-height: 1.2;
		font-weight: 500;
		white-space: nowrap;
	}

	.reyes-bottom-nav__badge {
		position: absolute;
		top: -4px;
		right: -8px;
		min-width: 16px;
		height: 16px;
		padding: 0 4px;
		border-radius: 999px;
		background: var(--reyes-bottom-nav-badge);
		color: #fff;
		font-size: 10px;
		font-weight: 700;
		line-height: 16px;
		text-align: center;
	}

	body.reyes-has-bottom-nav {
		padding-bottom: calc(var(--reyes-bottom-nav-height) + env(safe-area-inset-bottom, 0));
	}

	/* Hide on checkout to avoid covering payment actions */
	body.woocommerce-checkout .reyes-bottom-nav {
		display: none;
	}

	body.woocommerce-checkout.reyes-has-bottom-nav {
		padding-bottom: 0;
	}

	/* Raise floating contact widget above bottom nav */
	#button-contact-ntbox,
	.button-contact-ntbox {
		bottom: calc(var(--reyes-bottom-nav-height) + env(safe-area-inset-bottom, 0) + 12px) !important;
	}

	/* Flatsome sticky add-to-cart above bottom nav */
	.sticky-add-to-cart,
	.product-page .sticky-add-to-cart-wrapper {
		bottom: calc(var(--reyes-bottom-nav-height) + env(safe-area-inset-bottom, 0)) !important;
	}
}
