/**
 * Global mobile bottom navigation + WhatsApp clearance (v1.6.166).
 * Hidden by default — fixed bar only on mobile (≤767px).
 */

.rw-mobile-bottom-nav {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
	height: 0 !important;
	max-height: 0 !important;
	overflow: hidden !important;
	position: absolute !important;
	left: -9999px !important;
	width: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	opacity: 0 !important;
}

@media (min-width: 768px) {
	body.rw-has-mobile-bottom-nav,
	body:has(.rw-mobile-bottom-nav) {
		padding-bottom: 0 !important;
	}
}

@media (max-width: 767px) {
	.rw-mobile-bottom-nav {
		display: flex !important;
		visibility: visible !important;
		pointer-events: auto !important;
		position: fixed !important;
		left: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		width: 100% !important;
		height: 56px !important;
		max-height: none !important;
		margin: 0 !important;
		opacity: 1 !important;
		align-items: stretch;
		background: #ffffff;
		border-top: 1px solid #e8e0d6;
		z-index: 9999;
		padding-bottom: env(safe-area-inset-bottom, 0px);
		overflow: visible;
	}

	.rw-mobile-bottom-nav__item,
	.rw-mobile-nav-item {
		flex: 1;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 3px;
		color: #9e9e9e;
		text-decoration: none;
		font-size: 10px;
		letter-spacing: 0.05em;
		border: none;
		background: transparent;
		cursor: pointer;
		padding: 0.25rem;
		transition: color 0.2s ease;
		position: relative;
	}

	.rw-mobile-bottom-nav__icon--wishlist {
		position: relative;
		width: 26px;
		height: 22px;
		margin-bottom: 1px;
	}

	.rw-mobile-bottom-nav__heart {
		display: block;
		width: 22px;
		height: 22px;
		color: #b0b0b0;
		transition: color 0.2s ease, fill 0.2s ease;
	}

	.rw-mobile-bottom-nav__item--wishlist.has-wishlist-items .rw-mobile-bottom-nav__heart,
	.rw-mobile-bottom-nav__item--wishlist.is-active .rw-mobile-bottom-nav__heart,
	.rw-mobile-bottom-nav__item--wishlist.active .rw-mobile-bottom-nav__heart {
		color: #8b1a1a;
		fill: #8b1a1a;
	}

	.rw-mobile-bottom-nav__badge {
		position: absolute;
		top: -7px;
		right: -9px;
		min-width: 18px;
		height: 18px;
		padding: 0 4px;
		border-radius: 999px;
		background: #8b1a1a;
		color: #fff;
		font-size: 10px;
		font-weight: 700;
		line-height: 18px;
		text-align: center;
		box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
		border: 1.5px solid #fff;
		z-index: 2;
		pointer-events: none;
	}

	.rw-mobile-bottom-nav__item.is-active,
	.rw-mobile-bottom-nav__item.active,
	.rw-mobile-nav-item.active,
	.rw-mobile-nav-item:active {
		color: #4a5240;
	}

	.rw-mobile-bottom-nav__label,
	.rw-mobile-nav-label {
		font-size: 9px;
		text-transform: uppercase;
		letter-spacing: 0.08em;
		line-height: 1;
	}

	.rw-mobile-bottom-nav__icon,
	.rw-mobile-nav-icon {
		display: flex;
		align-items: center;
		justify-content: center;
		line-height: 0;
	}

	.rw-mobile-bottom-nav__icon svg,
	.rw-mobile-nav-icon svg {
		display: block;
		width: 20px;
		height: 20px;
	}

	.rw-mobile-bottom-nav__icon {
		position: relative;
	}

	.rw-mobile-bottom-nav__badge[hidden] {
		display: none;
	}

	.rw-mob-wishlist-grid .rw-mob-products--wishlist {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
		padding: 12px 14px 24px;
	}

	.rw-wishlist-fallback--empty {
		padding: 24px 16px 32px;
		text-align: center;
	}

	/* Body clearance on all mobile pages (class + fallback when cache omits body_class) */
	body.rw-has-mobile-bottom-nav,
	body:has(.rw-mobile-bottom-nav) {
		padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
	}

	body.rw-has-mobile-bottom-nav.single-product {
		padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
	}

	body.rw-has-mobile-bottom-nav.woocommerce-wishlist,
	body.rw-has-mobile-bottom-nav.wishlist {
		padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
	}

	body.rw-has-mobile-bottom-nav.archive.woocommerce,
	body.rw-has-mobile-bottom-nav.post-type-archive-product {
		padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
	}

	/* Homepage mobile layout uses global body padding */
	body.rw-has-mobile-bottom-nav .rw-mobile-home {
		padding-bottom: 0;
	}

	/* WhatsApp / chat floats above bottom nav */
	.regal-whatsapp-float,
	.whatsapp-float,
	.wp-whatsapp-button,
	.whatsapp-chat-button,
	.concierge-button,
	a[href*="wa.me"],
	a[href*="whatsapp.com"] {
		bottom: 85px !important;
		left: 16px !important;
		z-index: 9998 !important;
	}

	body.admin-bar .regal-whatsapp-float {
		bottom: 85px !important;
	}
}
