/* SmartCart Builder Pro — front-end styles */

.scbp-widget {
	position: relative;
	display: inline-block;
	line-height: 0;
}

/* ---------- Trigger / Icon ---------- */
.scbp-cart-trigger {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 8px;
	border-radius: 50%;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.scbp-cart-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.scbp-cart-icon svg,
.scbp-cart-icon i {
	display: block;
	font-size: 24px;
	line-height: 1;
}

/* ---------- Badge ---------- */
.scbp-cart-badge {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 999px;
	background-color: #e53935;
	color: #ffffff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	transform: scale(1);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.scbp-cart-badge.scbp-badge-hidden {
	transform: scale(0);
	opacity: 0;
}

.scbp-widget.scbp-badge-pos-top-right .scbp-cart-badge,
.scbp-badge-pos-top-right .scbp-cart-badge {
	top: -2px;
	right: -2px;
}

.scbp-badge-pos-top-left .scbp-cart-badge {
	top: -2px;
	left: -2px;
}

.scbp-badge-pos-bottom-right .scbp-cart-badge {
	bottom: -2px;
	right: -2px;
}

.scbp-badge-pos-bottom-left .scbp-cart-badge {
	bottom: -2px;
	left: -2px;
}

/* default position fallback */
.scbp-cart-badge {
	top: -2px;
	right: -2px;
}

/* ---------- Overlay ---------- */
.scbp-drawer-overlay {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.5);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease;
	z-index: 100000;
}

/* ---------- Drawer ---------- */
.scbp-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 400px;
	max-width: 100vw;
	background-color: #ffffff;
	box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
	z-index: 100001;
	line-height: 1.5;
}

.scbp-widget.scbp-drawer-open .scbp-drawer-overlay {
	opacity: 1;
	visibility: visible;
}

.scbp-widget.scbp-drawer-open .scbp-drawer {
	transform: translateX(0);
}

body.scbp-no-scroll {
	overflow: hidden;
}

.scbp-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	flex-shrink: 0;
}

.scbp-drawer-title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
}

.scbp-drawer-close {
	background: transparent;
	border: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px;
	border-radius: 50%;
	color: #1e1e1e;
	transition: background-color 0.2s ease;
}

.scbp-drawer-close:hover {
	background-color: rgba(0, 0, 0, 0.06);
}

.scbp-drawer-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 16px 24px;
	position: relative;
}

.scbp-widget.scbp-loading .scbp-drawer-body::after {
	content: '';
	position: absolute;
	inset: 0;
	background-color: rgba(255, 255, 255, 0.5);
	cursor: progress;
}

/* ---------- Cart Items ---------- */
.scbp-cart-items {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.scbp-cart-item {
	display: flex;
	gap: 14px;
	padding-bottom: 18px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.scbp-item-image {
	flex-shrink: 0;
	width: 72px;
}

.scbp-item-image img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	display: block;
}

.scbp-item-details {
	flex: 1 1 auto;
	min-width: 0;
}

.scbp-item-name {
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 4px;
}

.scbp-item-name a {
	color: inherit;
	text-decoration: none;
}

.scbp-item-variation {
	font-size: 12px;
	color: #757575;
	margin-bottom: 4px;
}

.scbp-item-variation p {
	margin: 0;
}

.scbp-item-price {
	font-size: 13px;
	font-weight: 500;
	margin-bottom: 8px;
}

.scbp-item-qty-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}

.scbp-qty-stepper {
	display: inline-flex;
	align-items: center;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 6px;
	overflow: hidden;
}

.scbp-qty-stepper button {
	width: 26px;
	height: 26px;
	border: none;
	background: transparent;
	cursor: pointer;
	font-size: 15px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.scbp-qty-stepper button:hover {
	background-color: rgba(0, 0, 0, 0.05);
}

.scbp-qty-input {
	width: 36px;
	height: 26px;
	border: none;
	border-left: 1px solid rgba(0, 0, 0, 0.15);
	border-right: 1px solid rgba(0, 0, 0, 0.15);
	text-align: center;
	font-size: 13px;
	-moz-appearance: textfield;
}

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

.scbp-remove-item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: transparent;
	border: none;
	cursor: pointer;
	color: #b3261e;
	font-size: 12px;
	padding: 4px 0;
}

.scbp-remove-item svg {
	flex-shrink: 0;
}

.scbp-remove-item:hover {
	text-decoration: underline;
}

/* ---------- Summary ---------- */
.scbp-cart-summary {
	padding: 18px 24px 22px;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	flex-shrink: 0;
}

.scbp-subtotal-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 15px;
	font-weight: 600;
	margin-bottom: 14px;
}

.scbp-checkout-btn,
.scbp-shop-btn {
	display: block;
	width: 100%;
	text-align: center;
	padding: 13px 20px;
	border-radius: 6px;
	background-color: #1e1e1e;
	color: #ffffff;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
	box-sizing: border-box;
}

.scbp-checkout-btn:hover,
.scbp-shop-btn:hover {
	opacity: 0.85;
	color: #ffffff;
}

/* ---------- Empty State ---------- */
.scbp-cart-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 60px 20px;
	color: #1e1e1e;
}

.scbp-empty-illustration {
	color: rgba(0, 0, 0, 0.25);
	margin-bottom: 18px;
}

.scbp-empty-text {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 20px;
}

.scbp-cart-empty .scbp-shop-btn {
	width: auto;
	padding: 12px 28px;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
	.scbp-drawer {
		width: 100% !important;
	}
}
