/* Bottom Nav for WooCommerce — front end */

.dbn-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Bar ---------- */

.dbn {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999000;
	display: grid;
	gap: 6px;
	padding: 8px max(10px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-right));
	background: var(--dbn-bg, #fff);
	border-top: 1px solid var(--dbn-border, rgba(60, 60, 67, 0.16));
	box-shadow: 0 -8px 18px rgba(0, 0, 0, 0.08), 0 -1px 4px rgba(0, 0, 0, 0.06);
	-webkit-tap-highlight-color: transparent;
}

.dbn-item {
	appearance: none;
	border: 1px solid var(--dbn-border, rgba(60, 60, 67, 0.16));
	background: var(--dbn-surface, #f8f9fb);
	color: var(--dbn-text, #0b0b0f);
	border-radius: var(--dbn-radius, 12px);
	padding: 8px 6px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font: 700 var(--dbn-label, 10px) / 1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	text-align: center;
	cursor: pointer;
	text-decoration: none;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
	transition: transform 0.12s cubic-bezier(0.2, 0.6, 0.2, 1), box-shadow 0.16s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.dbn-item svg {
	width: var(--dbn-icon, 20px);
	height: var(--dbn-icon, 20px);
	fill: currentColor;
	opacity: 0.9;
	display: block;
}

.dbn-item:hover,
.dbn-item:focus-visible {
	background: var(--dbn-bg, #fff);
	border-color: var(--dbn-accent, #38bdf8);
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.dbn-item:active {
	transform: scale(0.97);
}

.dbn-item[aria-current="page"] {
	border-color: var(--dbn-accent, #38bdf8);
}

.dbn-icon-wrap {
	position: relative;
	display: inline-flex;
}

.dbn-badge {
	position: absolute;
	top: -6px;
	right: -10px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--dbn-accent, #38bdf8);
	color: #fff;
	font-size: 10px;
	line-height: 17px;
	font-weight: 700;
	text-align: center;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.3);
}

.dbn-badge.is-empty {
	display: none;
}

/* ---------- Search overlay ---------- */

.dbn-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.dbn-overlay.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.2s ease, visibility 0s linear 0s;
}

.dbn-backdrop {
	position: absolute;
	inset: 0;
	background: var(--dbn-overlay-bg, rgba(15, 23, 42, 0.7));
	backdrop-filter: saturate(130%) blur(16px);
	-webkit-backdrop-filter: saturate(130%) blur(16px);
}

.dbn-dialog {
	position: absolute;
	left: 50%;
	top: 8vh;
	transform: translateX(-50%);
	width: min(900px, 92vw);
	padding: 0 8px;
}

.dbn-searchbar {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #020617;
	color: #fff;
	border-radius: 9999px;
	padding: 12px 14px;
	border: 1px solid rgba(148, 163, 184, 0.45);
	box-shadow: 0 20px 45px rgba(15, 23, 42, 0.7);
}

.dbn-searchbar svg {
	flex: none;
	color: #fff;
}

.dbn-searchbar input[type="search"] {
	flex: 1;
	appearance: none;
	border: 0;
	background: transparent;
	outline: 0;
	color: #fff;
	font-size: clamp(16px, 2.4vw, 20px);
	box-shadow: none;
	padding: 0;
	min-width: 0;
}

.dbn-searchbar input::placeholder {
	color: rgba(248, 250, 252, 0.75);
}

.dbn-close {
	appearance: none;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 0 2px;
}

.dbn-suggest {
	margin: 12px 0 0;
	list-style: none;
	padding: 0;
	max-height: 62vh;
	overflow-y: auto;
	background: rgba(255, 255, 255, 0.96);
	border-radius: 16px;
	border: 1px solid rgba(148, 163, 184, 0.55);
}

.dbn-suggest:empty {
	display: none;
}

.dbn-suggest li {
	border-top: 1px solid rgba(226, 232, 240, 0.9);
	margin: 0;
	list-style: none;
}

.dbn-suggest li:first-child {
	border-top: 0;
}

.dbn-suggest a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	color: #020617;
	text-decoration: none;
	transition: background-color 0.12s ease;
}

.dbn-suggest a:hover,
.dbn-suggest a:focus-visible {
	background-color: rgba(226, 232, 240, 0.6);
}

.dbn-thumb {
	width: 56px;
	height: 56px;
	flex: none;
	border-radius: 10px;
	object-fit: cover;
	background: #fff;
}

.dbn-title {
	font-weight: 700;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.dbn-price {
	opacity: 0.85;
	font-size: 0.92rem;
}

.dbn-price s {
	opacity: 0.6;
	margin-left: 4px;
}

/* ---------- Categories panel ---------- */

.dbn-sheet {
	position: fixed;
	inset: 0;
	z-index: 2147483600;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.22s ease, visibility 0s linear 0.22s;
}

.dbn-sheet.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.22s ease, visibility 0s linear 0s;
}

.dbn-sheet-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.dbn-sheet-panel {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 100vw;
	max-width: 480px;
	background: var(--dbn-panel-bg, #fff);
	border-right: 1px solid var(--dbn-border, rgba(148, 163, 184, 0.5));
	box-shadow: 18px 0 40px rgba(15, 23, 42, 0.35);
	transform: translateX(-100%);
	transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
	display: flex;
	flex-direction: column;
}

.dbn-sheet.is-open .dbn-sheet-panel {
	transform: translateX(0);
}

@media (min-width: 900px) {
	.dbn-sheet-panel {
		max-width: none;
		width: 50vw;
	}
}

.dbn-sheet-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	border-bottom: 1px solid rgba(226, 232, 240, 0.9);
	background: var(--dbn-panel-bg, #fff);
}

.dbn-sheet-titles {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.dbn-sheet-head h3 {
	margin: 0;
	font: 800 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--dbn-text, #0b0b0f);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.dbn-sheet-close,
.dbn-sheet-back {
	appearance: none;
	border: 0;
	background: #0f172a;
	color: #e5e7eb;
	width: 28px;
	height: 28px;
	flex: none;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.4);
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.dbn-sheet-back {
	visibility: hidden;
}

.dbn-sheet.is-single .dbn-sheet-back {
	display: none;
}

.dbn-sheet-close:hover,
.dbn-sheet-back:hover {
	background-color: #020617;
	transform: translateY(-1px);
}

.dbn-layer {
	padding: 14px 16px 18px;
	overflow-y: auto;
	flex: 1;
	display: none;
}

.dbn-layer.is-active {
	display: block;
}

.dbn-empty {
	color: #6b7280;
	font-size: 13px;
}

.dbn-root-card {
	width: 100%;
	text-align: left;
	appearance: none;
	border-radius: 18px;
	border: 1px solid rgba(148, 163, 184, 0.6);
	padding: 14px 16px;
	margin-bottom: 12px;
	cursor: pointer;
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 4px;
	color: #020617;
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
	transition: box-shadow 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.dbn-root-card:hover,
.dbn-root-card:focus-visible {
	transform: translateY(-2px);
	border-color: var(--dbn-accent, #38bdf8);
	box-shadow: 0 16px 38px rgba(15, 23, 42, 0.16);
}

.dbn-root-main {
	font-weight: 800;
	font-size: 15px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.dbn-root-sub {
	font-size: 12px;
	color: #6b7280;
	letter-spacing: 0;
	text-transform: none;
}

.dbn-cats {
	display: grid;
	grid-template-columns: 1fr;
}

.dbn-cats a {
	display: block;
	padding: 12px 14px;
	border-radius: 12px;
	margin-bottom: 8px;
	background: #fff;
	color: #020617;
	text-decoration: none;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-size: 13px;
	border: 1px solid rgba(148, 163, 184, 0.6);
	transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.dbn-cats a:hover,
.dbn-cats a:focus-visible {
	transform: translateY(-1px);
	border-color: var(--dbn-accent, #38bdf8);
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
}

.dbn-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
}

.dbn-grid-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 14px;
	border: 1px solid rgba(148, 163, 184, 0.6);
	background: #fff;
	text-decoration: none;
	color: #020617;
	box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1);
	transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.dbn-grid-item:hover,
.dbn-grid-item:focus-visible {
	transform: translateY(-1px);
	border-color: var(--dbn-accent, #38bdf8);
	box-shadow: 0 16px 38px rgba(15, 23, 42, 0.18);
}

.dbn-grid-img {
	width: 46px;
	height: 46px;
	flex: none;
	border-radius: 12px;
	object-fit: contain;
	background: #f9fafb;
}

.dbn-grid-label {
	font-weight: 600;
	font-size: 13px;
}

@media (max-width: 420px) {
	.dbn-item span {
		font-size: calc(var(--dbn-label, 10px) - 1px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.dbn-item,
	.dbn-root-card,
	.dbn-cats a,
	.dbn-grid-item,
	.dbn-sheet-panel,
	.dbn-overlay,
	.dbn-sheet {
		transition: none !important;
	}
}

html.dbn-lock,
body.dbn-lock {
	overflow: hidden;
	touch-action: none;
}
