/* ==========================================================================
   Cart drawer & search overlay
   ========================================================================== */

/* ---------- Scrim ---------- */
.bv-scrim {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(4, 11, 36, .55);
	backdrop-filter: blur(4px);
	opacity: 0;
	visibility: hidden;
	transition: opacity .45s, visibility .45s;
}

.bv-drawer-open .bv-scrim { opacity: 1; visibility: visible; }

/* ---------- Cart drawer ---------- */
.bv-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 100001;
	display: flex;
	flex-direction: column;
	width: min(440px, 100vw);
	background: #fff;
	box-shadow: -30px 0 80px -20px rgba(4, 11, 36, .45);
	transform: translateX(105%);
	visibility: hidden;
	transition: transform .6s var(--bv-ease), visibility .6s;
}

.bv-drawer-open .bv-drawer { transform: none; visibility: visible; }
.bv-drawer-open .woocommerce-multi-currency { opacity: 0; pointer-events: none; }

.bv-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 22px 24px;
	border-bottom: 1px solid var(--bv-line);
}

.bv-drawer__head h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 20px; }
.bv-drawer__head .bv-cart-count { box-shadow: none; }

.bv-drawer__close,
.bv-search__close {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--bv-bg);
	color: var(--bv-ink);
	cursor: pointer;
	transition: transform .4s var(--bv-ease), background .3s;
}

.bv-drawer__close:hover,
.bv-search__close:hover { transform: rotate(90deg); background: var(--bv-line); }

.bv-drawer__body { flex: 1; overflow-y: auto; padding: 8px 24px 24px; }
.bv-drawer__body .widget_shopping_cart_content { display: flex; flex-direction: column; min-height: 100%; }

.bv-drawer .woocommerce-mini-cart { margin: 0; padding: 0; list-style: none; }

.bv-drawer ul.woocommerce-mini-cart li.woocommerce-mini-cart-item {
	position: relative;
	min-height: 104px;
	padding: 18px 28px 18px 100px;
	border-bottom: 1px solid var(--bv-line);
	animation: bv-item-in .6s var(--bv-ease) both;
}

@keyframes bv-item-in { from { opacity: 0; transform: translateX(30px); } }

.bv-drawer ul.woocommerce-mini-cart li.woocommerce-mini-cart-item > a:not(.remove) {
	display: block;
	color: var(--bv-ink);
	font-weight: 600;
	font-size: 15px;
	line-height: 1.35;
}

.bv-drawer ul.woocommerce-mini-cart li.woocommerce-mini-cart-item img {
	position: absolute;
	top: 18px;
	left: 0;
	width: 84px !important;
	height: 84px !important;
	margin: 0 !important;
	border-radius: 14px;
	object-fit: cover;
	background: var(--bv-bg);
}

.bv-drawer ul.woocommerce-mini-cart li.woocommerce-mini-cart-item .remove {
	position: absolute;
	top: 16px;
	right: 0;
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	color: var(--bv-muted) !important;
	font-size: 18px;
	text-decoration: none;
	transition: background .25s, color .25s;
}

.bv-drawer ul.woocommerce-mini-cart li.woocommerce-mini-cart-item .remove:hover { background: #ffe5ea; color: #d7263d !important; }

.bv-drawer dl.variation { margin: 4px 0 8px; color: var(--bv-muted); font-size: 13px; }
.bv-drawer dl.variation dt, .bv-drawer dl.variation dd, .bv-drawer dl.variation p { display: inline; margin: 0; }

.bv-mini-qty {
	display: inline-flex;
	align-items: center;
	margin-top: 6px;
	border: 1.5px solid var(--bv-line);
	border-radius: 999px;
}

.bv-mini-qty button {
	width: 32px;
	height: 30px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--bv-ink);
	font-size: 16px;
	cursor: pointer;
}

.bv-mini-qty button:hover { color: var(--bv-blue); background: none; }
.bv-mini-qty span { min-width: 22px; text-align: center; font-weight: 600; font-size: 14px; }
.bv-mini-qty.is-busy { opacity: .5; pointer-events: none; }

.bv-mini-price { float: right; margin-top: 10px; font-weight: 700; }

.bv-drawer .woocommerce-mini-cart__total {
	display: flex;
	justify-content: space-between;
	margin: auto 0 0;
	padding: 20px 0 14px;
	font-size: 17px;
}

.bv-drawer .woocommerce-mini-cart__total .amount { font-size: 22px; font-weight: 700; color: var(--bv-blue); }

.bv-drawer .woocommerce-mini-cart__buttons { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin: 0; }
.bv-drawer .woocommerce-mini-cart__buttons .button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	margin: 0 !important;
	border-radius: 999px;
	background: var(--bv-grad);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	box-shadow: var(--bv-glow);
	transition: transform .35s var(--bv-ease), box-shadow .35s;
}

.bv-drawer .woocommerce-mini-cart__buttons .button:hover { color: #fff; transform: translateY(-2px); }

.bv-drawer .woocommerce-mini-cart__buttons .button:not(.checkout) {
	background: var(--bv-bg);
	color: var(--bv-ink);
	box-shadow: none;
}

.bv-drawer .woocommerce-mini-cart__buttons .button:not(.checkout):hover { color: var(--bv-blue); }

.bv-drawer .woocommerce-mini-cart__empty-message {
	margin: 60px 0 20px;
	text-align: center;
	color: var(--bv-muted);
	font-size: 16px;
}

.bv-drawer .woocommerce-mini-cart__empty-message::before {
	content: "🛍️";
	display: block;
	margin-bottom: 14px;
	font-size: 56px;
	animation: bv-float-y 3s ease-in-out infinite;
}

.bv-drawer__empty-cta { display: none; width: 100%; }
.bv-drawer__body:has(.woocommerce-mini-cart__empty-message) .bv-drawer__empty-cta { display: flex; }

.bv-drawer__trust {
	display: flex;
	justify-content: space-around;
	padding: 14px 24px;
	background: var(--bv-bg);
	color: var(--bv-muted);
	font-size: 12px;
}

/* ---------- Search overlay ---------- */
.bv-search {
	position: fixed;
	inset: 0;
	z-index: 100003;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 28px;
	padding: 24px;
	background: rgba(4, 11, 36, .9);
	backdrop-filter: blur(20px);
	opacity: 0;
	visibility: hidden;
	transition: opacity .45s, visibility .45s;
}

.bv-search-open .bv-search { opacity: 1; visibility: visible; }
.bv-search__close { position: absolute; top: 24px; right: 24px; }

.bv-search__form {
	display: flex;
	width: min(760px, 100%);
	border-bottom: 2px solid rgba(255, 255, 255, .25);
	transform: translateY(30px);
	transition: transform .6s var(--bv-ease), border-color .3s;
}

.bv-search-open .bv-search__form { transform: none; }
.bv-search__form:focus-within { border-color: var(--bv-cyan); }

.bv-search__form input[type="search"] {
	flex: 1;
	padding: 18px 4px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #fff;
	font-size: clamp(22px, 4vw, 40px);
	box-shadow: none !important;
}

.bv-search__form input::placeholder { color: rgba(255, 255, 255, .35); }

.bv-search__form button {
	padding: 0 8px;
	border: 0;
	background: none;
	color: #fff;
	cursor: pointer;
}

.bv-search__form button:hover { background: none; color: var(--bv-cyan); }

.bv-search__hot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; max-width: 760px; color: rgba(255, 255, 255, .5); }

.bv-search__hot a {
	padding: 8px 16px;
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 999px;
	color: #fff;
	font-size: 14px;
	transition: background .3s, border-color .3s;
}

.bv-search__hot a:hover { background: var(--bv-blue); border-color: var(--bv-blue); color: #fff; }

