/**
 * DAF Marketplace — Header Mobile
 * Location: /wp-content/plugins/daf-marketplace/assets/css/header/header-mobile.css
 *
 * Purpose:
 * - Style the compact plugin-based mobile/tablet header bar.
 * - Style the mobile second-row search area.
 * - Normalize mobile header action slots for notify, compare, wishlist, cart, and account.
 * - Normalize header widget badges across desktop, tablet, mobile, and all devices.
 * - Center cart and wishlist dropdowns on tablet/mobile without breaking notify/compare/account.
 */

:root {
	--daf-mp-accent-green: #8cc63f;
	--daf-mp-accent-green-dark: #7fb238;
	--daf-mp-header-border: #e2e8f0;
	--daf-mp-header-text: #0f172a;
	--daf-mp-header-muted: #64748b;
	--daf-mp-header-soft: #f8fafc;
	--daf-mp-widget-mobile-gap: 14px;
	--daf-mp-widget-mobile-top: 126px;
	--daf-mp-widget-tablet-gap: 18px;
	--daf-mp-widget-tablet-top: 142px;
}

/* Visibility is controlled by header-responsive.css */
.daf-mp-header__mobile-bar,
.daf-mp-header__mobile-search {
	display: none;
	background: #ffffff;
}

/* ==========================================================================
   Mobile Header Bar
   ========================================================================== */

.daf-mp-header__mobile-bar {
	position: relative;
	z-index: 10020;
	border-bottom: 1px solid var(--daf-mp-header-border);
	background: #ffffff;
	box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.daf-mp-header__mobile-bar-inner {
	display: grid;
	grid-template-columns: auto minmax(78px, 1fr) auto;
	align-items: center;
	min-height: 62px;
	gap: 8px;
}

.daf-mp-header__mobile-toggle,
.daf-mp-header__mobile-branding,
.daf-mp-header__mobile-actions {
	min-width: 0;
}

.daf-mp-header__mobile-toggle {
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

.daf-mp-header__mobile-branding {
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

/* ==========================================================================
   Hamburger + Search Toggle
   ========================================================================== */

.daf-mp-mobile-toggle,
.daf-mp-mobile-search-toggle {
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #000000;
	box-shadow: none;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: color 0.18s ease, transform 0.18s ease;
}

.daf-mp-mobile-toggle {
	flex: 0 0 34px;
	min-width: 34px;
	visibility: visible;
	opacity: 1;
}

.daf-mp-mobile-toggle:hover,
.daf-mp-mobile-toggle:focus,
.daf-mp-mobile-search-toggle:hover,
.daf-mp-mobile-search-toggle:focus {
	color: var(--daf-mp-accent-green-dark);
	background: transparent;
	box-shadow: none;
	transform: translateY(-1px);
	outline: none;
}

.daf-mp-mobile-toggle__icon,
.daf-mp-mobile-search-toggle__icon {
	width: 18px;
	height: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	color: #000000;
}

.daf-mp-mobile-toggle__icon::before {
	content: "";
	width: 18px;
	height: 2px;
	display: block;
	border-radius: 999px;
	background: #000000;
	box-shadow: 0 6px 0 #000000, 0 12px 0 #000000;
}

.daf-mp-mobile-toggle__icon svg,
.daf-mp-mobile-search-toggle__icon svg {
	width: 100%;
	height: 100%;
	display: block;
	fill: currentColor;
	visibility: visible;
	opacity: 1;
}

.daf-mp-mobile-toggle__icon svg {
	position: absolute;
	inset: 0;
	color: #000000;
	fill: #000000;
}

/* ==========================================================================
   Mobile Branding
   ========================================================================== */

.daf-mp-mobile-branding {
	width: 100%;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

.daf-mp-header-logo--mobile,
.daf-mp-header-logo--mobile a {
	min-width: 0;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
}

.daf-mp-header-logo--mobile .daf-mp-header-logo__image {
	display: block;
	max-height: 28px;
	width: auto;
}

.daf-mp-header-logo--mobile .daf-mp-header-logo__text {
	max-width: 112px;
	color: var(--daf-mp-header-text);
	font-size: 18px;
	font-weight: 850;
	letter-spacing: -0.035em;
	line-height: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ==========================================================================
   Mobile Header Actions
   ========================================================================== */

.daf-mp-mobile-actions {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 5px;
	min-width: 0;
}

.daf-mp-mobile-action-slot {
	position: relative;
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Same size for all widget trigger wrappers */
.daf-mp-mobile-actions .daf-menu-hook-wrapper,
.daf-mp-mobile-actions .daf-module-trigger,
.daf-mp-mobile-actions .daf-wishlist-trigger-wrapper,
.daf-mp-mobile-actions .daf-wishlist-trigger,
.daf-mp-mobile-actions .daf-notify-master-anchor,
.daf-mp-mobile-actions .daf-cart-trigger,
.daf-mp-mobile-actions .daf-account-trigger {
	position: relative !important;
	width: 34px !important;
	height: 34px !important;
	min-width: 34px !important;
	min-height: 34px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid var(--daf-mp-header-border) !important;
	border-radius: 11px !important;
	background: #ffffff !important;
	color: var(--daf-mp-header-text) !important;
	box-shadow: none !important;
	filter: none !important;
	text-decoration: none !important;
	cursor: pointer !important;
	overflow: visible !important;
	transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.daf-mp-mobile-actions .daf-menu-hook-wrapper:hover,
.daf-mp-mobile-actions .daf-menu-hook-wrapper:focus-within,
.daf-mp-mobile-actions .daf-wishlist-trigger-wrapper:hover,
.daf-mp-mobile-actions .daf-wishlist-trigger-wrapper:focus-within,
.daf-mp-mobile-actions .daf-wishlist-trigger:hover,
.daf-mp-mobile-actions .daf-notify-master-anchor:hover,
.daf-mp-mobile-actions .daf-notify-master-anchor:focus,
.daf-mp-mobile-actions .daf-cart-trigger:hover,
.daf-mp-mobile-actions .daf-cart-trigger:focus-within,
.daf-mp-mobile-actions .daf-account-trigger:hover,
.daf-mp-mobile-actions .daf-account-trigger:focus-within {
	background: #f8fbf5 !important;
	border-color: rgba(140, 198, 63, 0.42) !important;
	color: var(--daf-mp-accent-green-dark) !important;
	transform: translateY(-1px);
	outline: none;
}

/* Icon images */
.daf-mp-mobile-actions .daf-menu-svg,
.daf-mp-mobile-actions .daf-header-wl-icon {
	width: 17px !important;
	height: 17px !important;
	display: block !important;
	object-fit: contain !important;
	filter: none !important;
	box-shadow: none !important;
	transform: none !important;
}

/* Cart can stay slightly larger but still centered */
.daf-mp-mobile-actions .daf-mp-mobile-action-slot--cart .daf-menu-svg,
.daf-mp-mobile-actions #daf-hook-cart .daf-menu-svg {
	width: 18px !important;
	height: 18px !important;
}

/* Account avatar: clean profile photo, no box border/shadow/filter */
.daf-mp-mobile-action-slot--account,
.daf-mp-mobile-action-slot--account .daf-menu-hook-wrapper,
.daf-mp-mobile-action-slot--account .daf-account-trigger {
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	filter: none !important;
}

.daf-mp-mobile-actions .daf-mini-avatar-icon {
	width: 30px !important;
	height: 30px !important;
	display: block !important;
	border: 0 !important;
	border-radius: 50% !important;
	object-fit: cover !important;
	box-shadow: none !important;
	filter: none !important;
	background: transparent !important;
}

/* Hide helper labels/placeholders */
.daf-mp-mobile-actions .daf-menu-label-hidden,
.daf-mp-mobile-actions .daf-mp-mobile-module-placeholder,
.daf-mp-mobile-actions .daf-mp-mobile-module-placeholder__label {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Notification widget can add extra internal visual spacing; keep only trigger/icon clean */
.daf-mp-mobile-actions .daf-notify-master-anchor > svg,
.daf-mp-mobile-actions .daf-notify-master-anchor > img,
.daf-mp-mobile-actions .daf-notify-master-anchor > .daf-menu-svg {
	width: 17px !important;
	height: 17px !important;
	display: block !important;
	filter: none !important;
	box-shadow: none !important;
}

.daf-mp-mobile-actions .daf-notify-master-anchor::before,
.daf-mp-mobile-actions .daf-notify-master-anchor::after {
	display: none !important;
	content: none !important;
}

/* Dropdown widgets should stay above header/off-canvas */
.daf-mp-mobile-actions .daf-ghost-notify-widget,
.daf-mp-mobile-actions .daf-ghost-compare-widget,
.daf-mp-mobile-actions .daf-ghost-wishlist-widget,
.daf-mp-mobile-actions .daf-cart-dropdown-wrapper,
.daf-mp-mobile-actions .daf-premium-widget-dropdown {
	z-index: 10040 !important;
	top: calc(100% + 12px) !important;
	left: auto !important;
	right: 0 !important;
}

/*
 * Notify + Compare old positioning preserved.
 * Wishlist removed from this group because it needs viewport-center behavior.
 */
.daf-mp-mobile-action-slot--notify .daf-ghost-notify-widget,
.daf-mp-mobile-action-slot--compare .daf-ghost-compare-widget {
	right: -110px !important;
}

.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget {
	right: 0 !important;
}

.daf-mp-mobile-action-slot--cart .daf-cart-dropdown-wrapper {
	right: auto !important;
}

.daf-mp-mobile-action-slot--account .daf-premium-widget-dropdown {
	right: -4px !important;
}

/* ==========================================================================
   Mobile Search Row
   ========================================================================== */

.daf-mp-header__mobile-search {
	position: relative;
	z-index: 10010;
	display: block;
	padding: 10px 0 12px;
	border-bottom: 1px solid var(--daf-mp-header-border);
	background: #ffffff;
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
}

.daf-mp-header__mobile-search .daf-mp-container {
	width: 100%;
	max-width: 100%;
	padding-inline: 14px;
	box-sizing: border-box;
}

/*
 * Desktop header-search.css sets .daf-mp-search-form width:0.
 * This mobile scope fully neutralizes that desktop inline behavior.
 */
.daf-mp-header__mobile-search .daf-mp-search-form,
.daf-mp-header__mobile-search .daf-mp-search-form--mobile,
.daf-mp-header__mobile-search .daf-mp-header-mobile-search-form {
	position: relative;
	width: 100% !important;
	max-width: 100% !important;
	opacity: 1 !important;
	overflow: visible !important;
	display: flex !important;
	align-items: center !important;
	margin: 0 !important;
	padding: 0 !important;
}

.daf-mp-header__mobile-search .daf-mp-header-mobile-search-form__inner {
	position: relative;
	width: 100%;
	min-width: 0;
	display: flex;
	align-items: center;
}

.daf-mp-header__mobile-search .daf-mp-search-form--mobile,
.daf-mp-header__mobile-search .daf-mp-header-mobile-search-form__inner {
	min-height: 46px;
	border: 1px solid var(--daf-mp-header-border);
	border-radius: 14px;
	background: #ffffff;
	box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.daf-mp-header__mobile-search .daf-mp-search-form--mobile:focus-within,
.daf-mp-header__mobile-search .daf-mp-header-mobile-search-form__inner:focus-within {
	border-color: rgba(140, 198, 63, 0.42);
	box-shadow: 0 0 0 4px rgba(140, 198, 63, 0.11);
}

.daf-mp-header__mobile-search .daf-mp-search-form--mobile .search-field,
.daf-mp-header__mobile-search .daf-mp-header-mobile-search-form__input,
.daf-mp-header__mobile-search .daf-mp-search-input {
	flex: 1 1 auto !important;
	width: 100% !important;
	min-width: 0 !important;
	height: 44px !important;
	padding: 0 48px 0 13px !important;
	border: 0 !important;
	background: transparent !important;
	color: var(--daf-mp-header-text) !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 44px !important;
	box-shadow: none !important;
	outline: none !important;
}

.daf-mp-header__mobile-search .daf-mp-search-form--mobile .search-field::placeholder,
.daf-mp-header__mobile-search .daf-mp-header-mobile-search-form__input::placeholder,
.daf-mp-header__mobile-search .daf-mp-search-input::placeholder {
	color: #94a3b8;
	opacity: 1;
}

/* Search button inside the search bar on the right */
.daf-mp-header__mobile-search .daf-mp-search-form--mobile .search-submit,
.daf-mp-header__mobile-search .daf-mp-header-mobile-search-form__button {
	position: absolute !important;
	top: 5px !important;
	right: 5px !important;
	width: 34px !important;
	min-width: 34px !important;
	height: 34px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #ffffff !important;
	color: var(--daf-mp-header-muted) !important;
	font-size: 0 !important;
	line-height: 1 !important;
	box-shadow: none !important;
	cursor: pointer !important;
	transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

/* Draw a search icon if button text is present instead of SVG */
.daf-mp-header__mobile-search .daf-mp-search-form--mobile .search-submit::before,
.daf-mp-header__mobile-search .daf-mp-header-mobile-search-form__button::before {
	content: "";
	width: 15px;
	height: 15px;
	display: block;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 4a6 6 0 1 0 4.472 10.001l4.763 4.763 1.414-1.414-4.763-4.763A6 6 0 0 0 10 4zm0 2a4 4 0 1 1 0 8 4 4 0 0 1 0-8z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 4a6 6 0 1 0 4.472 10.001l4.763 4.763 1.414-1.414-4.763-4.763A6 6 0 0 0 10 4zm0 2a4 4 0 1 1 0 8 4 4 0 0 1 0-8z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.daf-mp-header__mobile-search .daf-mp-search-form--mobile .search-submit:hover,
.daf-mp-header__mobile-search .daf-mp-search-form--mobile .search-submit:focus,
.daf-mp-header__mobile-search .daf-mp-header-mobile-search-form__button:hover,
.daf-mp-header__mobile-search .daf-mp-header-mobile-search-form__button:focus {
	background: #f8fbf5 !important;
	color: var(--daf-mp-accent-green-dark) !important;
	transform: translateY(-1px);
	outline: none;
}

/* Live results mobile width */
.daf-mp-header__mobile-search .daf-live-results-dropdown {
	left: 0 !important;
	right: 0 !important;
	width: 100% !important;
	max-width: none !important;
	margin-top: 8px !important;
	border-radius: 14px !important;
	z-index: 10060 !important;
}

/* ==========================================================================
   Badge Normalization
   ========================================================================== */

.daf-mp-header .daf-wl-count-badge,
.daf-mp-header .daf-notify-badge,
.daf-mp-header .daf-compare-count-badge,
.daf-mp-header .daf-cart-count-badge,
.daf-mp-header .daf-cart-badge,
.daf-mp-header .daf-badge,
.daf-mp-header .daf-mp-header-action__badge {
	position: absolute !important;
	top: -5px !important;
	right: -5px !important;
	min-width: 17px !important;
	height: 17px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 4px !important;
	border: 2px solid #ffffff !important;
	border-radius: 999px !important;
	background: var(--daf-mp-accent-green) !important;
	color: #ffffff !important;
	font-size: 9px !important;
	font-weight: 850 !important;
	line-height: 13px !important;
	letter-spacing: -0.02em !important;
	box-shadow: 0 5px 10px rgba(140, 198, 63, 0.25) !important;
	z-index: 50 !important;
	box-sizing: border-box !important;
}

/* Account avatar should never receive badge-style effects */
.daf-mp-mobile-action-slot--account .daf-mini-avatar-icon,
.daf-mp-mobile-action-slot--account img {
	box-shadow: none !important;
	filter: none !important;
	border: 0 !important;
}

/* Old mobile panel compatibility: visual layout lives in header-offcanvas.css */
.daf-mp-mobile-panel__dialog {
	max-width: none;
	background: #ffffff;
}

/* ==========================================================================
   Cart + Wishlist Viewport Center Fix
   ========================================================================== */

@media (max-width: 1199px) {
	/*
	 * Only active/open cart and wishlist dropdowns are centered.
	 * Closed state is not touched, so no vertical line appears.
	 */

	.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget.active,
	.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget.open,
	.daf-mp-mobile-action-slot--wishlist.daf-wishlist-active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.daf-wishlist-active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger.daf-wishlist-active + .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.open .daf-ghost-wishlist-widget,
	.daf-mp-mobile-actions .daf-cart-dropdown-wrapper.active,
	.daf-mp-mobile-actions .daf-cart-dropdown-wrapper.open,
	.daf-mp-mobile-action-slot--cart .daf-cart-dropdown-wrapper.active,
	.daf-mp-mobile-action-slot--cart .daf-cart-dropdown-wrapper.open,
	.daf-mp-mobile-action-slot--cart.daf-active .daf-cart-dropdown-wrapper,
	.daf-mp-mobile-action-slot--cart.daf-cart-active .daf-cart-dropdown-wrapper,
	body > .daf-cart-mobile-portal.active,
	body > .daf-cart-mobile-portal.open,
	body > #daf-cart-dropdown.daf-cart-dropdown-wrapper.active,
	body > #daf-cart-dropdown.daf-cart-dropdown-wrapper.open {
		position: fixed !important;
		top: var(--daf-mp-widget-tablet-top) !important;
		left: var(--daf-mp-widget-tablet-gap) !important;
		right: var(--daf-mp-widget-tablet-gap) !important;
		bottom: auto !important;
		width: auto !important;
		max-width: none !important;
		max-height: calc(100vh - 170px) !important;
		transform: none !important;
		transform-origin: top center !important;
		z-index: 2147483646 !important;
		box-sizing: border-box !important;
		overflow: hidden !important;
		opacity: 1 !important;
		visibility: visible !important;
		pointer-events: auto !important;
	}

	.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget.active .daf-wishlist-widget-scroll,
	.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget.open .daf-wishlist-widget-scroll,
	.daf-mp-mobile-action-slot--wishlist.daf-wishlist-active .daf-ghost-wishlist-widget .daf-wishlist-widget-scroll,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.daf-wishlist-active .daf-ghost-wishlist-widget .daf-wishlist-widget-scroll,
	.daf-mp-mobile-actions .daf-cart-dropdown-wrapper .daf-cart-widget-scroll,
	.daf-mp-mobile-action-slot--cart .daf-cart-dropdown-wrapper .daf-cart-widget-scroll,
	body > .daf-cart-mobile-portal .daf-cart-widget-scroll {
		max-height: min(420px, calc(100vh - 250px)) !important;
	}

	.daf-mp-mobile-actions .daf-cart-dropdown-wrapper .daf-dropdown-actions,
	.daf-mp-mobile-action-slot--cart .daf-cart-dropdown-wrapper .daf-dropdown-actions,
	body > .daf-cart-mobile-portal .daf-dropdown-actions {
		grid-template-columns: 1fr !important;
	}
}

@media (max-width: 767px) {
	.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget.active,
	.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget.open,
	.daf-mp-mobile-action-slot--wishlist.daf-wishlist-active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.daf-wishlist-active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger.daf-wishlist-active + .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.open .daf-ghost-wishlist-widget,
	.daf-mp-mobile-actions .daf-cart-dropdown-wrapper.active,
	.daf-mp-mobile-actions .daf-cart-dropdown-wrapper.open,
	.daf-mp-mobile-action-slot--cart .daf-cart-dropdown-wrapper.active,
	.daf-mp-mobile-action-slot--cart .daf-cart-dropdown-wrapper.open,
	.daf-mp-mobile-action-slot--cart.daf-active .daf-cart-dropdown-wrapper,
	.daf-mp-mobile-action-slot--cart.daf-cart-active .daf-cart-dropdown-wrapper,
	body > .daf-cart-mobile-portal.active,
	body > .daf-cart-mobile-portal.open,
	body > #daf-cart-dropdown.daf-cart-dropdown-wrapper.active,
	body > #daf-cart-dropdown.daf-cart-dropdown-wrapper.open {
		top: var(--daf-mp-widget-mobile-top) !important;
		left: var(--daf-mp-widget-mobile-gap) !important;
		right: var(--daf-mp-widget-mobile-gap) !important;
		width: auto !important;
		max-width: none !important;
		max-height: calc(100vh - 146px) !important;
		transform: none !important;
	}
}

@media (max-width: 389px) {
	.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget.active,
	.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget.open,
	.daf-mp-mobile-action-slot--wishlist.daf-wishlist-active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.daf-wishlist-active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger.daf-wishlist-active + .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.open .daf-ghost-wishlist-widget,
	.daf-mp-mobile-actions .daf-cart-dropdown-wrapper.active,
	.daf-mp-mobile-actions .daf-cart-dropdown-wrapper.open,
	.daf-mp-mobile-action-slot--cart .daf-cart-dropdown-wrapper.active,
	.daf-mp-mobile-action-slot--cart .daf-cart-dropdown-wrapper.open,
	.daf-mp-mobile-action-slot--cart.daf-active .daf-cart-dropdown-wrapper,
	.daf-mp-mobile-action-slot--cart.daf-cart-active .daf-cart-dropdown-wrapper,
	body > .daf-cart-mobile-portal.active,
	body > .daf-cart-mobile-portal.open,
	body > #daf-cart-dropdown.daf-cart-dropdown-wrapper.active,
	body > #daf-cart-dropdown.daf-cart-dropdown-wrapper.open {
		left: 10px !important;
		right: 10px !important;
		max-height: calc(100vh - 138px) !important;
	}
}

/* ==========================================================================
   Responsive Tuning
   ========================================================================== */

@media (min-width: 768px) and (max-width: 1199px) {
	.daf-mp-header__mobile-bar-inner {
		min-height: 68px;
		gap: 10px;
	}

	.daf-mp-mobile-toggle,
	.daf-mp-mobile-search-toggle,
	.daf-mp-mobile-action-slot,
	.daf-mp-mobile-actions .daf-menu-hook-wrapper,
	.daf-mp-mobile-actions .daf-module-trigger,
	.daf-mp-mobile-actions .daf-wishlist-trigger-wrapper,
	.daf-mp-mobile-actions .daf-wishlist-trigger,
	.daf-mp-mobile-actions .daf-notify-master-anchor,
	.daf-mp-mobile-actions .daf-cart-trigger,
	.daf-mp-mobile-actions .daf-account-trigger {
		width: 38px !important;
		height: 38px !important;
		min-width: 38px !important;
		min-height: 38px !important;
		border-radius: 12px !important;
	}

	.daf-mp-mobile-actions {
		gap: 7px;
	}

	.daf-mp-header-logo--mobile .daf-mp-header-logo__image {
		max-height: 34px;
	}

	.daf-mp-header-logo--mobile .daf-mp-header-logo__text {
		max-width: 190px;
		font-size: 23px;
	}

	.daf-mp-mobile-actions .daf-mini-avatar-icon {
		width: 32px !important;
		height: 32px !important;
	}
}

@media (max-width: 767px) {
	.daf-mp-header__mobile-bar-inner {
		min-height: 58px;
		gap: 6px;
	}

	.daf-mp-header-logo--mobile .daf-mp-header-logo__image {
		max-height: 26px;
	}

	.daf-mp-header-logo--mobile .daf-mp-header-logo__text {
		max-width: 105px;
		font-size: 17px;
	}

	.daf-mp-mobile-actions {
		gap: 4px;
	}

	.daf-mp-mobile-toggle,
	.daf-mp-mobile-search-toggle,
	.daf-mp-mobile-action-slot,
	.daf-mp-mobile-actions .daf-menu-hook-wrapper,
	.daf-mp-mobile-actions .daf-module-trigger,
	.daf-mp-mobile-actions .daf-wishlist-trigger-wrapper,
	.daf-mp-mobile-actions .daf-wishlist-trigger,
	.daf-mp-mobile-actions .daf-notify-master-anchor,
	.daf-mp-mobile-actions .daf-cart-trigger,
	.daf-mp-mobile-actions .daf-account-trigger {
		width: 32px !important;
		height: 32px !important;
		min-width: 32px !important;
		min-height: 32px !important;
		border-radius: 10px !important;
	}

	.daf-mp-mobile-toggle__icon,
	.daf-mp-mobile-search-toggle__icon,
	.daf-mp-mobile-actions .daf-menu-svg,
	.daf-mp-mobile-actions .daf-header-wl-icon {
		width: 15px !important;
		height: 15px !important;
	}

	.daf-mp-mobile-actions .daf-mini-avatar-icon {
		width: 29px !important;
		height: 29px !important;
	}

	.daf-mp-header__mobile-search {
		padding: 8px 0 10px;
	}

	.daf-mp-header__mobile-search .daf-mp-search-form--mobile {
		min-height: 44px;
		border-radius: 13px;
	}

	.daf-mp-header__mobile-search .daf-mp-search-form--mobile .search-field,
	.daf-mp-header__mobile-search .daf-mp-header-mobile-search-form__input,
	.daf-mp-header__mobile-search .daf-mp-search-input {
		height: 42px !important;
		padding-left: 12px !important;
		padding-right: 46px !important;
		font-size: 13px !important;
		line-height: 42px !important;
	}

	.daf-mp-header__mobile-search .daf-mp-search-form--mobile .search-submit,
	.daf-mp-header__mobile-search .daf-mp-header-mobile-search-form__button {
		top: 5px !important;
		right: 5px !important;
		width: 32px !important;
		min-width: 32px !important;
		height: 32px !important;
	}

	/*
	 * Notify + compare old offset preserved.
	 * Wishlist and cart are intentionally excluded from this old right-offset rule.
	 */
	.daf-mp-mobile-action-slot--notify .daf-ghost-notify-widget,
	.daf-mp-mobile-action-slot--compare .daf-ghost-compare-widget {
		right: -118px !important;
	}
}

@media (max-width: 389px) {
	.daf-mp-header__mobile-bar-inner {
		grid-template-columns: auto minmax(70px, 1fr) auto;
		gap: 4px;
	}

	.daf-mp-header-logo--mobile .daf-mp-header-logo__text {
		max-width: 86px;
		font-size: 16px;
	}

	.daf-mp-mobile-actions {
		gap: 3px;
	}

	.daf-mp-mobile-toggle,
	.daf-mp-mobile-search-toggle,
	.daf-mp-mobile-action-slot,
	.daf-mp-mobile-actions .daf-menu-hook-wrapper,
	.daf-mp-mobile-actions .daf-module-trigger,
	.daf-mp-mobile-actions .daf-wishlist-trigger-wrapper,
	.daf-mp-mobile-actions .daf-wishlist-trigger,
	.daf-mp-mobile-actions .daf-notify-master-anchor,
	.daf-mp-mobile-actions .daf-cart-trigger,
	.daf-mp-mobile-actions .daf-account-trigger {
		width: 30px !important;
		height: 30px !important;
		min-width: 30px !important;
		min-height: 30px !important;
	}

	.daf-mp-mobile-actions .daf-mini-avatar-icon {
		width: 28px !important;
		height: 28px !important;
	}

	.daf-mp-header .daf-wl-count-badge,
	.daf-mp-header .daf-notify-badge,
	.daf-mp-header .daf-compare-count-badge,
	.daf-mp-header .daf-cart-count-badge,
	.daf-mp-header .daf-cart-badge,
	.daf-mp-header .daf-badge,
	.daf-mp-header .daf-mp-header-action__badge {
		top: -6px !important;
		right: -6px !important;
		min-width: 16px !important;
		height: 16px !important;
		font-size: 8.5px !important;
		line-height: 12px !important;
	}

	/*
	 * Preserve old small-screen behavior for notify/compare/account only.
	 * Wishlist is excluded to avoid vertical line and broken panel.
	 */
	.daf-mp-mobile-action-slot--notify .daf-ghost-notify-widget,
	.daf-mp-mobile-action-slot--compare .daf-ghost-compare-widget,
	.daf-mp-mobile-action-slot--account .daf-premium-widget-dropdown {
		position: fixed !important;
		top: 60px !important;
		left: 10px !important;
		right: 10px !important;
		width: auto !important;
		max-width: none !important;
	}
}
