/* Mobile bottom navigation (active state, sizes) and the All Categories popup. */

.zcat {
	display: none;
}

@media (max-width: 767px) {
	/* ---------- Bottom navigation ---------- */

	/* Each item gets its colour from --zbn-c: gray by default, black when active. */
	.mobile-header-bottom [class*="zbn-"] {
		--zbn-c: #9ca3af;
	}

	html body.zbn-home .mobile-header-bottom .zbn-home,
	html body.zbn-categories .mobile-header-bottom .zbn-categories,
	html body.zbn-bag .mobile-header-bottom .zbn-bag,
	html body.zbn-profile .mobile-header-bottom .zbn-profile,
	html body.zbn-track .mobile-header-bottom .zbn-track {
		--zbn-c: #111;
	}

	/* While the category popup is open only Categories is active, whatever the page. */
	html.zcat-open body .mobile-header-bottom [class*="zbn-"] {
		--zbn-c: #9ca3af;
	}

	html.zcat-open body .mobile-header-bottom .zbn-categories {
		--zbn-c: #111;
	}

	html body .mobile-header-bottom [class*="zbn-"] .elementor-icon-box-icon a,
	html body .mobile-header-bottom [class*="zbn-"] .elementor-icon-box-icon svg,
	html body .mobile-header-bottom [class*="zbn-"] .elementor-icon-box-title,
	html body .mobile-header-bottom [class*="zbn-"] .elementor-icon-box-title a,
	html body .mobile-header-bottom [class*="zbn-"] .elementor-heading-title {
		color: var(--zbn-c) !important;
	}

	/* Outline (stroke) icons: no fill, stroke follows the item colour. */
	html body .mobile-header-bottom [class*="zbn-"] .elementor-icon-box-icon svg,
	html body .mobile-header-bottom [class*="zbn-"] .cart-icon .elementor-button-icon > svg {
		fill: none !important;
		stroke: var(--zbn-c) !important;
		stroke-width: 2 !important;
	}

	html body .mobile-header-bottom [class*="zbn-"] svg circle[fill="currentColor"] {
		fill: var(--zbn-c) !important;
		stroke: none !important;
	}

	/* Sizes: 10px labels with proportionate 20px icons (the bar's original scale). */
	html body .mobile-header-bottom .elementor-icon-box-icon a,
	html body .mobile-header-bottom .elementor-icon-box-icon > span {
		width: 24px !important;
		height: 24px !important;
	}

	html body .mobile-header-bottom .elementor-icon-box-icon svg,
	html body .mobile-header-bottom .elementor-element-02bd65b .elementor-icon-box-icon svg,
	html body .mobile-header-bottom .cart-icon .elementor-button-icon > svg {
		width: 20px !important;
		height: 20px !important;
		max-width: 20px !important;
		max-height: 20px !important;
	}

	html body .mobile-header-bottom .elementor-icon-box-title,
	html body .mobile-header-bottom .elementor-icon-box-title a,
	html body .mobile-header-bottom .elementor-heading-title {
		font-size: 10px !important;
		font-weight: 500 !important;
		line-height: 14px !important;
	}

	/* Cart badge: black circle, white number, top-right of the icon. */
	html body .mobile-header-bottom .cart-icon .elementor-button-icon-qty {
		top: -6px !important;
		right: -7px !important;
		width: 16px !important;
		height: 16px !important;
		min-width: 16px !important;
		font-size: 9px !important;
		line-height: 16px !important;
	}

	html body {
		padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
	}

	/* ---------- All Categories popup ---------- */

	html.zcat-lock,
	html.zcat-lock body {
		overflow: hidden;
	}

	.zcat {
		position: fixed;
		inset: 0;
		z-index: 99998; /* below the bottom navigation (99999) so it stays visible */
		display: block;
		pointer-events: none;
	}

	.zcat[hidden] {
		display: none;
	}

	.zcat__backdrop {
		position: absolute;
		inset: 0;
		background: rgba(17, 17, 17, 0.45);
		backdrop-filter: blur(2px);
		opacity: 0;
		transition: opacity 0.25s ease;
	}

	.zcat__sheet {
		position: absolute;
		top: 0;
		right: 0;
		bottom: calc(62px + env(safe-area-inset-bottom, 0px));
		left: 0;
		display: flex;
		flex-direction: column;
		background: #fff;
		border-radius: 0 !important;
		box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
		transform: translateY(24px);
		opacity: 0;
		transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
	}

	html.zcat-open .zcat {
		pointer-events: auto;
	}

	html.zcat-open .zcat__backdrop {
		opacity: 1;
	}

	html.zcat-open .zcat__sheet {
		transform: none;
		opacity: 1;
	}

	.zcat__head {
		flex: 0 0 auto;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 8px 20px;
	}

	.zcat .zcat__title {
		margin: 0;
		color: #111;
		font-size: 16px;
		font-weight: 700;
		line-height: 1.2;
	}

	.zcat button.zcat__close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 36px;
		height: 36px;
		min-height: 0;
		padding: 0;
		color: #111;
		background: transparent;
		border: 0;
		border-radius: 50%;
		box-shadow: none;
		cursor: pointer;
	}

	.zcat button.zcat__close:hover,
	.zcat button.zcat__close:focus-visible {
		color: #111;
		background: #f1f1f1;
	}

	.zcat__search-wrap {
		flex: 0 0 auto;
		padding: 6px 16px 14px;
		border-bottom: 1px solid #ececec;
	}

	/* Same look as the header search on phones. */
	.zcat form.zcat__search {
		display: flex;
		align-items: center;
		box-sizing: border-box;
		width: 100%;
		height: 42px;
		min-height: 42px;
		margin: 0;
		padding: 0 14px;
		overflow: hidden;
		background: #fafaf9;
		border: 1px solid #e9e3e1;
		border-radius: 999px !important;
		box-shadow: none;
	}

	.zcat form.zcat__search:focus-within {
		background: #fbf9f8;
		border-color: #e9e3e1;
	}

	.zcat__search-icon {
		flex: 0 0 15px;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 15px;
		height: 15px;
		margin: 0 12px 0 0;
		color: #b7aaa8;
	}

	.zcat input.zcat__search-input {
		display: block;
		flex: 1 1 0%;
		width: 0;
		min-width: 0;
		max-width: 100%;
		height: 100%;
		margin: 0;
		padding: 0;
		overflow: hidden;
		color: #8f8585;
		background: transparent !important;
		border: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		outline: none;
		font-family: inherit;
		font-size: 12px;
		font-weight: 400;
		line-height: normal;
		text-overflow: ellipsis;
		white-space: nowrap;
		appearance: none;
		-webkit-appearance: none;
	}

	.zcat input.zcat__search-input::placeholder {
		color: #8f8585;
		opacity: 1;
	}

	.zcat input.zcat__search-input::-webkit-search-cancel-button {
		display: none;
	}

	.zcat button.zcat__search-clear {
		flex: 0 0 22px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 22px;
		height: 22px;
		min-height: 0;
		margin: 0 0 0 6px;
		padding: 0;
		color: #8f8585;
		background: transparent;
		border: 0;
		border-radius: 50%;
		box-shadow: none;
		cursor: pointer;
	}

	.zcat button.zcat__search-clear[hidden] {
		display: none;
	}

	.zcat__scroll {
		flex: 1 1 auto;
		min-height: 0;
		padding: 16px 16px 24px;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
	}

	/* Browse all */
	.zcat a.zcat__browse {
		display: flex;
		align-items: center;
		gap: 14px;
		margin: 0 0 14px;
		padding: 16px;
		color: #fff;
		background: #111;
		border-radius: 16px !important;
		text-decoration: none;
	}

	.zcat__browse-icon {
		flex: 0 0 auto;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		color: #fff;
		background: rgba(255, 255, 255, 0.14);
		border-radius: 12px !important;
	}

	.zcat__browse-text {
		flex: 1 1 auto;
		display: flex;
		flex-direction: column;
		gap: 3px;
		min-width: 0;
	}

	.zcat__browse-text strong {
		color: #fff;
		font-size: 11px;
		font-weight: 700;
		letter-spacing: 0.04em;
		line-height: 1.2;
	}

	.zcat__browse-text small {
		color: rgba(255, 255, 255, 0.7);
		font-size: 10px;
		line-height: 1.3;
	}

	.zcat__chev {
		flex: 0 0 auto;
		color: #9ca3af;
	}

	.zcat a.zcat__browse .zcat__chev {
		color: #fff;
	}

	/* Category cards */
	.zcat__list,
	.zcat__children {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.zcat__list {
		display: flex;
		flex-direction: column;
		gap: 10px;
	}

	.zcat__item {
		margin: 0;
		background: #fff;
		border: 1px solid #ececec;
		border-radius: 16px !important;
		overflow: hidden;
	}

	.zcat__item[hidden] {
		display: none;
	}

	.zcat__card {
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 10px 14px 10px 10px;
	}

	.zcat a.zcat__link {
		flex: 1 1 auto;
		display: flex;
		align-items: center;
		gap: 12px;
		min-width: 0;
		color: #111;
		text-decoration: none;
	}

	.zcat__thumb {
		flex: 0 0 auto;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 56px;
		height: 56px;
		overflow: hidden;
		color: #b4b9c2;
		background: #f4f4f5;
		border-radius: 12px !important;
	}

	.zcat__thumb img {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.zcat__text {
		display: flex;
		flex-direction: column;
		gap: 3px;
		min-width: 0;
	}

	.zcat__text strong {
		color: #111;
		font-size: 12px;
		font-weight: 700;
		line-height: 1.25;
	}

	.zcat__text small {
		overflow: hidden;
		color: #6b7280;
		font-size: 10px;
		line-height: 1.3;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.zcat button.zcat__expand {
		flex: 0 0 auto;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 32px;
		height: 32px;
		min-height: 0;
		padding: 0;
		color: #4b5563;
		background: #f1f1f2;
		border: 0;
		border-radius: 50%;
		box-shadow: none;
		cursor: pointer;
		transition: transform 0.2s ease, background-color 0.15s ease;
	}

	.zcat button.zcat__expand:hover,
	.zcat button.zcat__expand:focus-visible {
		color: #111;
		background: #e7e7e9;
	}

	.zcat__item.is-open button.zcat__expand {
		transform: rotate(180deg);
	}

	/* Subcategories */
	.zcat__children {
		display: none;
		padding: 0 10px 10px;
	}

	.zcat__item.is-open .zcat__children {
		display: block;
	}

	.zcat__children li {
		margin: 0;
	}

	.zcat .zcat__children a {
		display: flex;
		align-items: center;
		min-height: 40px;
		padding: 0 12px;
		color: #4b5563;
		border-radius: 8px !important;
		font-size: 12px;
		text-decoration: none;
	}

	.zcat .zcat__children a:hover,
	.zcat .zcat__children li.is-hit a {
		color: #111;
		background: #f4f4f5;
	}

	.zcat .zcat__children li.is-hit a {
		font-weight: 600;
	}

	.zcat a:focus-visible,
	.zcat button:focus-visible {
		outline: 2px solid #111;
		outline-offset: 2px;
	}

	.zcat__empty {
		margin: 32px 0 0;
		color: #6b7280;
		font-size: 12px;
		text-align: center;
	}

	.zcat__empty[hidden] {
		display: none;
	}
}

@media (min-width: 768px) {
	.zcat {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.zcat__backdrop,
	.zcat__sheet,
	.zcat button.zcat__expand {
		transition-duration: 0.01s;
	}
}
