/* Kitchenu - Mobile bottom dock (shop + chat) */

@media (max-width: 849px) {
	#top-link.back-to-top,
	button#top-link.back-to-top {
		display: none !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}

	body.ku-mobile-dock-active {
		padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px)) !important;
	}

	body.ku-mobile-dock-active #footer .ku-footer-mobile-strip {
		display: none !important;
	}

	/* Hide floating chat buttons â dock handles contact */
	body.ku-mobile-dock-active .contact-widget .contact-toggle,
	body.ku-mobile-dock-active .contact-widget .pulse,
	body.ku-mobile-dock-active .whatsapp-chat {
		opacity: 0 !important;
		visibility: hidden !important;
		pointer-events: none !important;
		width: 0 !important;
		height: 0 !important;
		overflow: hidden !important;
	}

	/* Hide floating Chaty trigger — dock handles chat */
	body.ku-mobile-dock-active #chaty-widget-_1 button.open-chaty,
	body.ku-mobile-dock-active .chaty-widget button.open-chaty {
		opacity: 0 !important;
		visibility: hidden !important;
		pointer-events: none !important;
		width: 0 !important;
		height: 0 !important;
		overflow: hidden !important;
		position: absolute !important;
	}

	body.ku-mobile-dock-active #chaty-widget-_1,
	body.ku-mobile-dock-active .chaty-widget {
		bottom: calc(55px + env(safe-area-inset-bottom, 0px)) !important;
		z-index: 10050 !important;
	}

	body.ku-mobile-dock-active .contact-widget {
		bottom: calc(55px + env(safe-area-inset-bottom, 0px)) !important;
		left: auto !important;
		right: 10px !important;
		z-index: 10050 !important;
	}

	body.ku-mobile-dock-active .contact-widget .contact-options {
		bottom: 0 !important;
		left: auto !important;
		right: 0 !important;
		width: min(240px, calc(100vw - 24px)) !important;
	}

	body.ku-mobile-dock-active .contact-widget.active .contact-options {
		opacity: 1 !important;
		visibility: visible !important;
		transform: translateY(0) !important;
	}

	.ku-mobile-dock {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 10040;
		pointer-events: none;
		font-family: 'Vazirmatn', Tahoma, sans-serif;
	}

	.ku-mobile-dock__inner {
		display: flex;
		align-items: stretch;
		justify-content: stretch;
		gap: 4px;
		width: 100%;
		min-height: 46px;
		padding: 5px 6px calc(5px + env(safe-area-inset-bottom, 0px));
		box-sizing: border-box;
		background: rgba(255, 255, 255, 0.84);
		backdrop-filter: blur(28px) saturate(180%);
		-webkit-backdrop-filter: blur(28px) saturate(180%);
		border-top: 1px solid rgba(255, 255, 255, 0.95);
		box-shadow:
			0 -8px 32px rgba(15, 23, 42, 0.1),
			inset 0 1px 0 rgba(255, 255, 255, 0.92);
		pointer-events: auto;
	}

	.ku-mobile-dock__hub-panel {
		position: absolute;
		right: 10px;
		bottom: calc(100% + 8px);
		left: 10px;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		padding: 10px;
		border-radius: 18px;
		border: 1px solid rgba(255, 255, 255, 0.12);
		background: linear-gradient(165deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
		box-shadow:
			0 16px 40px rgba(15, 23, 42, 0.42),
			inset 0 1px 0 rgba(255, 255, 255, 0.08);
		pointer-events: auto;
		opacity: 0;
		transform: translateY(8px) scale(0.98);
		transition: opacity 0.18s ease, transform 0.18s ease;
	}

	.ku-mobile-dock__hub-panel[hidden] {
		display: none !important;
	}

	.ku-mobile-dock__hub-panel.is-open {
		opacity: 1;
		transform: translateY(0) scale(1);
	}

	.ku-mobile-dock__hub-action {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 6px;
		min-height: 72px;
		padding: 10px 8px;
		border: 1px solid rgba(255, 255, 255, 0.1);
		border-radius: 14px;
		background: rgba(255, 255, 255, 0.05);
		color: #e2e8f0;
		font-size: 11px;
		font-weight: 800;
		line-height: 1.35;
		text-align: center;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
		transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
	}

	.ku-mobile-dock__hub-action svg {
		width: 20px;
		height: 20px;
		flex-shrink: 0;
	}

	.ku-mobile-dock__hub-action:active {
		transform: scale(0.97);
	}

	.ku-mobile-dock__hub-action--chat {
		color: #bbf7d0;
		border-color: rgba(74, 222, 128, 0.28);
		background: linear-gradient(145deg, rgba(34, 197, 94, 0.16) 0%, rgba(255, 255, 255, 0.04) 100%);
	}

	.ku-mobile-dock__hub-action--chat svg {
		color: #4ade80;
	}

	.ku-mobile-dock__tab,
	a.ku-mobile-dock__tab,
	button.ku-mobile-dock__tab {
		display: flex;
		flex: 1 1 0;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 2px;
		min-width: 0;
		height: auto;
		min-height: 0;
		max-height: none;
		margin: 0;
		padding: 2px 1px;
		border: 1px solid transparent;
		border-radius: 14px;
		background: transparent;
		color: #64748b;
		font-family: inherit;
		font-size: 8px;
		font-weight: 800;
		line-height: 1.15;
		text-decoration: none;
		cursor: pointer;
		box-sizing: border-box;
		-webkit-tap-highlight-color: transparent;
		transition:
			transform 0.16s ease,
			background 0.16s ease,
			border-color 0.16s ease,
			box-shadow 0.16s ease;
		position: relative;
	}

	a.ku-mobile-dock__tab--home,
	a.ku-mobile-dock__tab--home:link,
	a.ku-mobile-dock__tab--home:visited,
	a.ku-mobile-dock__tab--home:hover,
	a.ku-mobile-dock__tab--home:active,
	a.ku-mobile-dock__tab--blog,
	a.ku-mobile-dock__tab--blog:link,
	a.ku-mobile-dock__tab--blog:visited,
	a.ku-mobile-dock__tab--blog:hover,
	a.ku-mobile-dock__tab--blog:active,
	a.ku-mobile-dock__tab--shop,
	a.ku-mobile-dock__tab--shop:link,
	a.ku-mobile-dock__tab--shop:visited,
	a.ku-mobile-dock__tab--shop:hover,
	a.ku-mobile-dock__tab--shop:active {
		display: flex;
		color: #64748b;
		text-decoration: none;
		transform: none;
	}

	.ku-mobile-dock__icon {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 27px;
		height: 27px;
		border-radius: 9px;
		color: #ffffff;
		box-shadow:
			0 4px 14px rgba(15, 23, 42, 0.14),
			inset 0 1px 0 rgba(255, 255, 255, 0.42);
		position: relative;
		transition: transform 0.16s ease, box-shadow 0.16s ease;
	}

	.ku-mobile-dock__icon svg {
		display: block;
		width: 14px;
		height: 14px;
		flex: 0 0 14px;
	}

	.ku-mobile-dock__label {
		display: block;
		width: 100%;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		text-align: center;
		line-height: 1.15;
		color: #64748b;
	}

	.ku-mobile-dock__tab--chaty .ku-mobile-dock__icon {
		background: linear-gradient(145deg, #22c55e 0%, #0d9488 100%);
	}

	.ku-mobile-dock__tab--home .ku-mobile-dock__icon {
		background: linear-gradient(145deg, #3b82f6 0%, #6366f1 100%);
	}

	.ku-mobile-dock__tab--blog .ku-mobile-dock__icon {
		background: linear-gradient(145deg, #a855f7 0%, #ec4899 100%);
	}

	.ku-mobile-dock__tab--menu .ku-mobile-dock__icon {
		background: linear-gradient(145deg, #6366f1 0%, #2563eb 100%);
	}

	.ku-mobile-dock__tab--shop .ku-mobile-dock__icon {
		background: linear-gradient(145deg, #fbbf24 0%, #f97316 100%);
		box-shadow:
			0 6px 18px rgba(249, 115, 22, 0.34),
			inset 0 1px 0 rgba(255, 255, 255, 0.45);
	}

	.ku-mobile-dock__tab--cart .ku-mobile-dock__icon {
		background: linear-gradient(145deg, #f43f5e 0%, #e11d48 100%);
	}

	.ku-mobile-dock__tab:active {
		transform: scale(0.97);
	}

	.ku-mobile-dock__tab:active .ku-mobile-dock__icon {
		transform: scale(0.95);
	}

	.ku-mobile-dock__tab.is-active {
		background: rgba(255, 255, 255, 0.92);
		border-color: rgba(226, 232, 240, 0.95);
		box-shadow:
			0 2px 12px rgba(15, 23, 42, 0.08),
			inset 0 1px 0 rgba(255, 255, 255, 0.95);
	}

	.ku-mobile-dock__tab.is-active .ku-mobile-dock__label {
		color: #0f172a;
	}

	.ku-mobile-dock__tab--chaty.is-chaty-open {
		background: rgba(240, 253, 244, 0.95);
		border-color: rgba(134, 239, 172, 0.7);
	}

	.ku-mobile-dock__tab--chaty.is-chaty-open .ku-mobile-dock__label {
		color: #166534;
	}

	.ku-mobile-dock__tab--menu.is-menu-open {
		background: rgba(238, 242, 255, 0.95);
		border-color: rgba(165, 180, 252, 0.75);
	}

	.ku-mobile-dock__tab--menu.is-menu-open .ku-mobile-dock__label {
		color: #3730a3;
	}

	.ku-mobile-dock__tab--hub.is-active,
	.ku-mobile-dock__tab--hub.is-hub-open {
		background: rgba(238, 242, 255, 0.95);
		border-color: rgba(165, 180, 252, 0.75);
	}

	.ku-mobile-dock__tab--hub.is-chat-open {
		background: rgba(240, 253, 244, 0.95);
		border-color: rgba(134, 239, 172, 0.7);
	}

	.ku-mobile-dock__fab-slot,
	.ku-mobile-dock__fab {
		display: none !important;
	}

	.ku-mobile-dock__badge {
		position: absolute;
		top: -4px;
		left: -4px;
		transform: none;
		min-width: 16px;
		height: 16px;
		padding: 0 4px;
		border-radius: 999px;
		background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
		color: #ffffff;
		font-size: 8px;
		font-weight: 900;
		line-height: 16px;
		text-align: center;
		box-shadow: 0 2px 8px rgba(220, 38, 38, 0.45);
		border: 1.5px solid #ffffff;
	}

	.ku-mobile-dock__badge[hidden] {
		display: none !important;
	}

	#footer .ku-footer-cart-link {
		display: none;
		align-items: center;
		justify-content: center;
		gap: 10px;
		width: calc(100% - 20px);
		max-width: 420px;
		margin: 0 auto 8px;
		padding: 12px 16px;
		border: 1px solid rgba(251, 113, 133, 0.35);
		border-radius: 16px;
		background: linear-gradient(135deg, #fff1f2 0%, #ffffff 58%, #fff7ed 100%);
		box-shadow:
			0 1px 2px rgba(15, 23, 42, 0.04),
			0 8px 22px rgba(244, 63, 94, 0.12);
		color: #be123c;
		font-family: inherit;
		font-size: 14px;
		font-weight: 800;
		cursor: pointer;
		box-sizing: border-box;
	}

	#footer .ku-footer-cart-link__icon {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 36px;
		height: 36px;
		border-radius: 12px;
		background: linear-gradient(145deg, #f43f5e 0%, #e11d48 100%);
		color: #ffffff;
		box-shadow: 0 6px 16px rgba(225, 29, 72, 0.28);
	}

	#footer .ku-footer-cart-link__icon svg {
		width: 18px;
		height: 18px;
	}

	body.ku-mobile-dock-active #footer .ku-footer-cart-link {
		margin-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
	}

	/* Sticky add-to-cart above dock on product pages */
	body.ku-mobile-dock-active.single-product.ku-sticky-atc-visible {
		padding-bottom: calc(167px + env(safe-area-inset-bottom, 0px)) !important;
	}

	body.ku-mobile-dock-active .sticky-add-to-cart.sticky-add-to-cart--active {
		bottom: calc(55px + env(safe-area-inset-bottom, 0px)) !important;
	}
}

@media (min-width: 850px) {
	.ku-mobile-dock {
		display: none !important;
	}
}

