/* Redec Basket Panel — slide-in basket */

.redec-bp {
	--bp-accent: #e8262e;
	--bp-ink: #1d1d1f;
	--bp-muted: #8a8a8a;
	--bp-line: #eeeeee;
	--bp-soft: #faf9f6;
	--bp-thumb: #f3f1ec;
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: hidden;
	pointer-events: none;
}

.redec-bp.is-open {
	visibility: visible;
	pointer-events: auto;
}

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

/* The theme's own basket dropdown is replaced by the panel. */
.redec-bp-on .cart-item.has-dropdown > .nav-dropdown {
	display: none !important;
}

.redec-bp__dim {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .38);
	opacity: 0;
	transition: opacity .25s ease;
}

.redec-bp.is-open .redec-bp__dim {
	opacity: 1;
}

.redec-bp__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 460px;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	background: #fff;
	color: var(--bp-ink);
	box-shadow: -12px 0 32px rgba(0, 0, 0, .12);
	transform: translateX(100%);
	transition: transform .28s cubic-bezier(.2, .8, .2, 1);
	font-size: 14px;
	line-height: 1.4;
	text-transform: none;
	letter-spacing: 0;
	font-style: normal;
	outline: none;
}

.redec-bp.is-open .redec-bp__panel {
	transform: none;
}

.redec-bp__body {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
}

/* ---------- Header ---------- */

.redec-bp__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--bp-line);
	flex: 0 0 auto;
}

.redec-bp__title {
	margin: 0;
	padding: 0;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	text-transform: none;
	letter-spacing: 0;
	font-style: normal;
	color: var(--bp-ink);
}

.redec-bp__count {
	font-size: 13px;
	font-weight: 400;
	color: var(--bp-muted);
}

.redec-bp button.redec-bp__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: none;
	color: var(--bp-muted);
	box-shadow: none;
	cursor: pointer;
}

.redec-bp button.redec-bp__close:hover {
	background: #f4f4f4;
	color: var(--bp-ink);
}

/* ---------- Items ---------- */

.redec-bp__items {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 0 20px;
	-webkit-overflow-scrolling: touch;
}

.redec-bp__item {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr) 92px;
	gap: 14px;
	align-items: start;
	padding: 14px 0;
	border-bottom: 1px solid #f2f2f2;
	transition: opacity .15s ease;
}

.redec-bp__item.is-busy {
	opacity: .5;
	pointer-events: none;
}

.redec-bp__thumb {
	width: 52px;
	height: 52px;
	border-radius: 8px;
	overflow: hidden;
	background: var(--bp-thumb);
}

.redec-bp__thumb img,
.redec-bp__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	margin: 0;
}

.redec-bp__info {
	min-width: 0;
}

.redec-bp__name {
	font-weight: 600;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.redec-bp__name a {
	color: inherit;
	text-decoration: none;
}

.redec-bp__name a:hover {
	color: var(--bp-accent);
}

.redec-bp__meta,
.redec-bp__sku,
.redec-bp__single {
	margin-top: 3px;
	font-size: 12px;
	color: var(--bp-muted);
}

.redec-bp__meta p,
.redec-bp__meta dl,
.redec-bp__meta dt,
.redec-bp__meta dd {
	display: inline;
	margin: 0;
	font-size: inherit;
}

.redec-bp__sku .woocommerce-Price-amount {
	color: var(--bp-muted);
	font-weight: 400;
}

/* Quantity stepper: fixed, compact size whatever the theme does to inputs. */
.redec-bp__qty {
	display: inline-flex;
	align-items: stretch;
	height: 30px;
	margin-top: 8px;
	border: 1px solid #dddddd;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
}

.redec-bp .redec-bp__qty button {
	width: 28px;
	min-width: 0;
	height: 100%;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #fff;
	color: #555555;
	font-size: 16px;
	line-height: 1;
	box-shadow: none;
	cursor: pointer;
}

.redec-bp .redec-bp__qty button:hover {
	background: #f6f6f6;
	color: var(--bp-ink);
}

.redec-bp .redec-bp__qty input {
	box-sizing: border-box;
	width: 52px;
	max-width: 52px;
	height: 100%;
	min-height: 0;
	margin: 0;
	padding: 0 2px;
	border: 0;
	border-left: 1px solid #eeeeee;
	border-right: 1px solid #eeeeee;
	border-radius: 0;
	background: #fff;
	color: var(--bp-ink);
	font-size: 14px;
	text-align: center;
	box-shadow: none;
	-moz-appearance: textfield;
}

.redec-bp .redec-bp__qty input::-webkit-outer-spin-button,
.redec-bp .redec-bp__qty input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.redec-bp__price {
	text-align: right;
	white-space: nowrap;
}

.redec-bp__line {
	font-size: 15px;
	font-weight: 600;
}

.redec-bp__ex {
	font-size: 11px;
	color: var(--bp-muted);
}

.redec-bp button.redec-bp__remove {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: 0;
	margin: 20px 0 0;
	padding: 0;
	border: 0;
	background: none;
	color: #a0a0a0;
	font-size: 12px;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
	cursor: pointer;
}

.redec-bp button.redec-bp__remove:hover {
	color: var(--bp-accent);
}

/* ---------- Totals + buttons ---------- */

.redec-bp__totals {
	flex: 0 0 auto;
	padding: 14px 20px;
	background: var(--bp-soft);
	border-top: 1px solid var(--bp-line);
}

.redec-bp__trow {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 3px 0;
	color: #666666;
}

.redec-bp__trow--discount {
	color: #2f7d43;
}

.redec-bp__trow--total {
	margin-top: 8px;
	color: var(--bp-ink);
	font-size: 17px;
	font-weight: 600;
}

.redec-bp__note {
	margin-top: 4px;
	font-size: 11px;
	color: var(--bp-muted);
}

.redec-bp__actions {
	flex: 0 0 auto;
	display: grid;
	gap: 8px;
	padding: 12px 20px 20px;
}

.redec-bp .redec-bp__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin: 0;
	padding: 12px 14px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	letter-spacing: 0;
	white-space: nowrap;
	box-shadow: none;
	cursor: pointer;
}

.redec-bp .redec-bp__btn--primary {
	background: var(--bp-accent);
	border: 1px solid var(--bp-accent);
	color: #fff;
}

.redec-bp .redec-bp__btn--primary:hover {
	filter: brightness(.94);
	color: #fff;
}

.redec-bp .redec-bp__btn--primary .woocommerce-Price-amount {
	color: #fff;
}

.redec-bp .redec-bp__btn--ghost {
	background: #fff;
	border: 1px solid #dddddd;
	color: #333333;
	font-weight: 500;
}

.redec-bp .redec-bp__btn--ghost:hover {
	border-color: #bbbbbb;
	color: var(--bp-ink);
}

/* ---------- Empty + messages ---------- */

.redec-bp__empty {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 40px 20px;
	color: var(--bp-muted);
	text-align: center;
}

.redec-bp__empty p {
	margin: 0;
}

.redec-bp__empty .redec-bp__btn {
	width: auto;
	padding: 10px 18px;
}

.redec-bp__toast {
	margin: 10px 20px 0;
	padding: 8px 10px;
	border-radius: 6px;
	background: #fff6e5;
	color: #7a4b00;
	font-size: 13px;
}

/* ---------- Phones ---------- */

@media (max-width: 549px) {
	.redec-bp__panel { width: 100%; }
	.redec-bp__item { grid-template-columns: 48px minmax(0, 1fr) 84px; gap: 12px; }
	.redec-bp__thumb { width: 48px; height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
	.redec-bp__panel,
	.redec-bp__dim { transition: none; }
}
