/* ==========================================================================
   Pop-in Cart Slide-in panel
   ========================================================================== */

.bs-popincart-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--color-overlay, rgba(0, 0, 0, 0.5));
	z-index: 99998;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bs-popincart-overlay.open {
	opacity: 1;
	visibility: visible;
}

.bs-popincart {
	position: fixed;
	top: 0;
	right: 0;
	width: 420px;
	max-width: 80vw;
	height: 100%;
	background: var(--color-content-area-background, #fff);
	z-index: 99999;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	display: flex;
	flex-direction: column;
	box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}
@media (max-width: 768px) {
	.bs-popincart {
		width: 276px;
	}
}

.bs-popincart.open {
	transform: translateX(0);
}

body.bs-popincart-open {
	overflow: hidden;
}

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

.bs-popincart-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 24px;
	border-bottom: 1px solid var(--color-stroke, #e5e7eb);
	flex-shrink: 0;
	flex-wrap: wrap;
}

.bs-popincart-header h3 {
	margin: 0;
	color: var(--color-heading-dark, #111827);
}

.bs-popincart-close {
	background: none;
	border: none;
	font-size: 1.8rem;
	cursor: pointer;
	line-height: 1;
	padding: 0 4px;
	color: var(--color-text-dark, #666)
}
.bs-popincart-close.bs-shopmoretext {
	font-size: 16px;
	flex-basis: 100%;
	border: var(--default-border);
	margin-top: 8px;
	background: white;
	flex-grow:  0;
	padding: 12px 24px;;
	border-radius: var(--border-radius-button, 50px);
}

.bs-popincart-close:hover {
	opacity: 0.7;
}

/* ---- Content area (replaced as a cart fragment) ---- */

.bs-popincart-content {
	flex: 1;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
}

.bs-popincart-items {
	flex: 1;
	padding: 16px 24px;
	overflow-y: auto;
}

.bs-popincart-empty {
	text-align: center;
	color: #999;
	padding: 40px 0;
}

/* ---- Individual item ---- */

.bs-popincart-item {
	display: flex;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--color-stroke, #f0f0f0);
	align-items: flex-start;
	transition: opacity 0.2s ease;
}

.bs-popincart-item:last-of-type {
	border-bottom: none;
}

.bs-popincart-item-image {
	flex-shrink: 0;
	width: 64px;
	height: 64px;
}
@media (max-width: 768px) {
	.bs-popincart-item-image {
		display: none;
	}
}

.bs-popincart-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--border-radius-default, 4px);
}

.bs-popincart-item-details {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.bs-popincart-item-name {
	font-weight: 500;
	color: var(--color-text-dark, inherit);
	text-decoration: none;
	font-size: 0.95rem;
}

.bs-popincart-item-name:hover {
	text-decoration: underline;
}

.bs-popincart-item-qty {
	font-size: 0.85rem;
	color: #888;
}

/* ---- Pop-in cart qty +/- ---- */

.bs-popincart-item-qty-wrap {
	display: flex;
	align-items: center;
	gap: 0;
	border: 1px solid var(--color-stroke, #d1d5db);
	border-radius: var(--border-radius-default, 4px);
	overflow: hidden;
	margin-top: 2px;
	width: fit-content;
}

.bs-popincart-item-qty-wrap .bs-qty-btn {
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	/* background: var(--color-background-1, #f3f4f6); */
	border: none;
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
	/* color: var(--color-text-dark, #333); */
	padding: 0;
	/* transition: background 0.15s ease; */
}

.bs-popincart-item-qty-wrap .bs-qty-btn:hover {
	background: var(--color-background-3, #d1d5db);
}

.bs-popincart-item-qty-input {
	width: 46px !important;
	height: 28px;
	text-align: center;
	border: none;
	border-left: 1px solid var(--color-stroke, #d1d5db);
	border-right: 1px solid var(--color-stroke, #d1d5db);
	font-size: 0.85rem;
	padding: 0;
	margin: 0;
	-moz-appearance: textfield;
	appearance: textfield;
	border-radius: unset !important;
}

.bs-popincart-item-qty-input::-webkit-inner-spin-button,
.bs-popincart-item-qty-input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.bs-popincart-item-price {
	font-size: 0.9rem;
	font-weight: 500;
}

.bs-popincart-item-remove {
	flex-shrink: 0;
	color: #999;
	text-decoration: none;
	font-size: 1.4rem;
	line-height: 1;
	padding: 4px;
}

.bs-popincart-item-remove:hover {
	color: #e00;
}

/* ---- Subtotal ---- */

.bs-popincart-subtotal {
	display: flex;
	justify-content: space-between;
	padding: 16px 0 0;
	margin-top: 8px;
	border-top: 2px solid var(--color-stroke, #e5e7eb);
	font-weight: 600;
	font-size: 1.05rem;
	color: var(--color-heading-dark, #111827);
}

/* ---- Action buttons ---- */

.bs-popincart-actions {
	padding: 16px 24px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	border-top: 1px solid var(--color-stroke, #e5e7eb);
	flex-shrink: 0;
}

.bs-popincart-actions .button {
	display: block;
	text-align: center;
	padding: var(--button-padding, 0.75rem 1.5rem);
	text-decoration: none;
	border-radius: var(--border-radius-button, 50px);
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
	transition: opacity 0.2s ease, background 0.2s ease;
}

.bs-popincart-btn-cart {
	background: var(--color-background-1, #f3f4f6);
	color: var(--color-text-dark, #1f2937);
	border: 1px solid var(--color-stroke, #d1d5db);
}

.bs-popincart-btn-cart:hover {
	opacity: 0.8;
}

a.bs-popincart-btn-checkout {
	color: var(--color-main, #3b82f6) !important;
	border: none;
	flex-basis: 100%;
	font: var(--p-small-font);
	
}
.bs-popincart-btn-checkout::after {
	content: " ->";
}

.bs-popincart-btn-checkout:hover {
	opacity: 0.9;
}
