/**
 * Sales Plus Slide Cart Styles
 */

/* Overlay */
.sp-slide-cart-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 99998;
	opacity: 0;
	visibility: hidden;
	-webkit-transition: opacity 0.3s ease, visibility 0.3s ease;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sp-slide-cart-overlay.is-active {
	opacity: 1;
	visibility: visible;
}

/* Slide Cart Panel */
.sp-slide-cart {
	position: fixed;
	top: 0;
	right: 0;
	width: 380px;
	max-width: 100%;
	height: 100%;
	background: #fff;
	-webkit-box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
	box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
	z-index: 99999;
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-orient: vertical;
	-webkit-box-direction: normal;
	-webkit-flex-direction: column;
	-ms-flex-direction: column;
	flex-direction: column;
	-webkit-transform: translateX(100%);
	-ms-transform: translateX(100%);
	transform: translateX(100%);
	-webkit-transition: -webkit-transform 0.3s ease;
	transition: -webkit-transform 0.3s ease;
	transition: transform 0.3s ease;
	transition: transform 0.3s ease, -webkit-transform 0.3s ease;
	-webkit-overflow-scrolling: touch;
}

.sp-slide-cart.is-active {
	-webkit-transform: translateX(0);
	-ms-transform: translateX(0);
	transform: translateX(0);
}

/* Header */
.sp-slide-cart__header {
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-webkit-align-items: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: justify;
	-webkit-justify-content: space-between;
	-ms-flex-pack: justify;
	justify-content: space-between;
	padding: 8px 14px;
	border-bottom: none;
	background: #111;
	color: #fff;
}

.sp-slide-cart__title {
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-webkit-align-items: center;
	-ms-flex-align: center;
	align-items: center;
	gap: 5px;
	color: #fff;
}

.sp-slide-cart__icon {
	font-size: 14px;
}

.sp-slide-cart__count {
	background: rgba(255, 255, 255, 0.2);
	padding: 1px 5px;
	border-radius: 8px;
	font-size: 10px;
	font-weight: 500;
}

.sp-slide-cart__close {
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	padding: 4px;
	border-radius: 50%;
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-webkit-align-items: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: center;
	-webkit-justify-content: center;
	-ms-flex-pack: center;
	justify-content: center;
	-webkit-transition: background 0.2s ease;
	transition: background 0.2s ease;
}

.sp-slide-cart__close:hover {
	background: rgba(255, 255, 255, 0.2);
}

.sp-slide-cart__close svg {
	width: 18px;
	height: 18px;
}

/* Promo Banner */
.sp-slide-cart__promo {
	padding: 12px 20px;
	background: linear-gradient(90deg, #fff3e0 0%, #ffe0b2 100%);
	font-size: 13px;
	font-weight: 500;
	color: #e65100;
	text-align: center;
	border-bottom: 1px solid #ffcc80;
}

/* Content Area */
.sp-slide-cart__content {
	-webkit-box-flex: 1;
	-webkit-flex: 1;
	-ms-flex: 1;
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 16px;
	min-height: 0;
}

/* Empty State */
.sp-slide-cart__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #666;
	text-align: center;
	padding: 40px;
}

.sp-slide-cart__empty-icon {
	font-size: 48px;
	margin-bottom: 16px;
	opacity: 0.5;
}

.sp-slide-cart__empty-text {
	font-size: 15px;
}

/* Cart Items */
.sp-slide-cart__items {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.sp-slide-cart__item {
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	gap: 10px;
	padding: 10px;
	background: #fafafa;
	border-radius: 8px;
	border: 1px solid #eee;
	-webkit-transition: border-color 0.2s ease;
	transition: border-color 0.2s ease;
	-webkit-box-align: center;
	-webkit-align-items: center;
	-ms-flex-align: center;
	align-items: center;
}

.sp-slide-cart__item:hover {
	border-color: #ddd;
}

.sp-slide-cart__item--half-price {
	background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
	border-color: #a5d6a7;
}

.sp-slide-cart__item--full-price {
	background: #fff;
	border-color: #e0e0e0;
}

.sp-slide-cart__item-image {
	width: 50px;
	height: 50px;
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
}

/* Item Remove Button */
.sp-slide-cart__item-remove {
	-webkit-flex-shrink: 0;
	-ms-flex-negative: 0;
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	background: #f5f5f5;
	border: 1px solid #ddd;
	border-radius: 4px;
	color: #999;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-webkit-align-items: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: center;
	-webkit-justify-content: center;
	-ms-flex-pack: center;
	justify-content: center;
	-webkit-transition: all 0.2s ease;
	transition: all 0.2s ease;
	-webkit-align-self: center;
	-ms-flex-item-align: center;
	align-self: center;
}

.sp-slide-cart__item-remove:hover {
	background: #dc3232;
	border-color: #dc3232;
	color: #fff;
}

.sp-slide-cart__item-details {
	-webkit-box-flex: 1;
	-webkit-flex: 1;
	-ms-flex: 1;
	flex: 1;
	min-width: 0;
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-orient: vertical;
	-webkit-box-direction: normal;
	-webkit-flex-direction: column;
	-ms-flex-direction: column;
	flex-direction: column;
	-webkit-box-pack: center;
	-webkit-justify-content: center;
	-ms-flex-pack: center;
	justify-content: center;
}

.sp-slide-cart__item-name {
	font-size: 12px;
	font-weight: 500;
	color: #333;
	margin: 0 0 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sp-slide-cart__item-meta {
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-webkit-align-items: center;
	-ms-flex-align: center;
	align-items: center;
	gap: 8px;
}

.sp-slide-cart__item-qty {
	font-size: 11px;
	color: #666;
}

.sp-slide-cart__item-price {
	font-size: 12px;
	font-weight: 600;
	color: #333;
}

.sp-slide-cart__item-price--discounted {
	color: #2e7d32;
}

.sp-slide-cart__item-regular-price {
	font-size: 10px;
	color: #999;
	text-decoration: line-through;
	margin-left: 4px;
}

.sp-slide-cart__item-badge {
	font-size: 9px;
	font-weight: 600;
	padding: 1px 4px;
	border-radius: 3px;
	margin-left: 6px;
	display: inline-block;
	vertical-align: middle;
}

.sp-slide-cart__item-badge--half {
	background: #2e7d32;
	color: #fff;
}

.sp-slide-cart__item-badge--full {
	background: #757575;
	color: #fff;
}

/* More Items Notice */
.sp-slide-cart__more-items {
	margin-top: 12px;
	padding: 10px;
	background: #f5f5f5;
	border-radius: 6px;
	font-size: 13px;
	color: #666;
	text-align: center;
	display: none;
}

.sp-slide-cart__more-items.is-visible {
	display: block;
}

/* Extras (Mystery Box, Insurance) */
.sp-slide-cart__extras {
	display: none;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px dashed #ddd;
}

.sp-slide-cart__extras.is-visible {
	display: block;
}

.sp-slide-cart__extra-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	background: linear-gradient(90deg, #fff9e6 0%, #fff3cd 100%);
	border-radius: 6px;
	margin-bottom: 6px;
	border: 1px solid #ffe082;
}

.sp-slide-cart__extra-item:last-child {
	margin-bottom: 0;
}

.sp-slide-cart__extra-remove {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	color: #999;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.sp-slide-cart__extra-remove:hover {
	background: #dc3232;
	border-color: #dc3232;
	color: #fff;
}

.sp-slide-cart__extra-name {
	flex: 1;
	font-size: 12px;
	font-weight: 500;
	color: #5d4e37;
}

.sp-slide-cart__extra-price {
	font-size: 12px;
	font-weight: 600;
	color: #e65100;
}

/* Recommendations */
.sp-slide-cart__recommendations {
	display: none;
	margin-top: 16px;
	padding-top: 12px;
	border-top: 2px solid #eee;
}

.sp-slide-cart__recommendations.is-visible {
	display: block;
}

.sp-slide-cart__recommendations-title {
	font-size: 12px;
	font-weight: 600;
	color: #666;
	margin-bottom: 10px;
	text-align: center;
}

.sp-slide-cart__recommendations-items {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sp-slide-cart__rec-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px;
	background: #f8f9fa;
	border-radius: 6px;
	border: 1px solid #e9ecef;
	text-decoration: none !important;
	transition: all 0.2s ease;
}

.sp-slide-cart__rec-item:hover {
	background: #e9ecef;
	border-color: #dee2e6;
}

.sp-slide-cart__rec-image {
	width: 40px;
	height: 40px;
	border-radius: 4px;
	object-fit: cover;
	flex-shrink: 0;
}

.sp-slide-cart__rec-details {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.sp-slide-cart__rec-name {
	font-size: 11px;
	font-weight: 500;
	color: #333;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sp-slide-cart__rec-price {
	font-size: 11px;
	font-weight: 600;
	color: #e65100;
}

/* Footer */
.sp-slide-cart__footer {
	padding: 12px 16px;
	padding-bottom: 70px;
	border-top: 1px solid #e5e5e5;
	background: #fff;
	-webkit-flex-shrink: 0;
	-ms-flex-negative: 0;
	flex-shrink: 0;
}

.sp-slide-cart__subtotal {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
	font-size: 13px;
}

.sp-slide-cart__subtotal-label {
	color: #666;
}

.sp-slide-cart__subtotal-value {
	font-size: 15px;
	font-weight: 700;
	color: #333;
}

.sp-slide-cart__actions {
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-orient: horizontal;
	-webkit-box-direction: normal;
	-webkit-flex-direction: row;
	-ms-flex-direction: row;
	flex-direction: row;
	gap: 8px;
}

.sp-slide-cart__btn {
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-webkit-align-items: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: center;
	-webkit-justify-content: center;
	-ms-flex-pack: center;
	justify-content: center;
	-webkit-box-flex: 1;
	-webkit-flex: 1;
	-ms-flex: 1;
	flex: 1;
	padding: 12px 14px;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	border-radius: 6px;
	cursor: pointer;
	-webkit-transition: all 0.2s ease;
	transition: all 0.2s ease;
	text-decoration: none !important;
	border: none;
	text-transform: none;
	height: 44px;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
	line-height: 1;
}

.sp-slide-cart__btn--continue {
	background: #f5f5f5;
	color: #333 !important;
	border: 1px solid #ddd;
}

.sp-slide-cart__btn--continue:hover {
	background: #eee;
	border-color: #ccc;
	color: #333 !important;
}

.sp-slide-cart__btn--checkout {
	background: #46b450;
	color: #fff !important;
	border: 1px solid #46b450;
}

.sp-slide-cart__btn--checkout:hover {
	background: #3a9a42;
	color: #fff !important;
}

/* Loading State */
.sp-slide-cart__loading {
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-webkit-align-items: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: center;
	-webkit-justify-content: center;
	-ms-flex-pack: center;
	justify-content: center;
	height: 100px;
}

.sp-slide-cart__spinner {
	width: 32px;
	height: 32px;
	border: 3px solid #e5e5e5;
	border-top-color: #667eea;
	border-radius: 50%;
	-webkit-animation: sp-spin 0.8s linear infinite;
	animation: sp-spin 0.8s linear infinite;
}

@-webkit-keyframes sp-spin {
	to {
		-webkit-transform: rotate(360deg);
		transform: rotate(360deg);
	}
}

@keyframes sp-spin {
	to {
		-webkit-transform: rotate(360deg);
		transform: rotate(360deg);
	}
}

/* Mobile Responsive */
@media (max-width: 480px) {
	.sp-slide-cart {
		width: 100%;
	}

	.sp-slide-cart__header {
		padding: 10px 14px;
	}

	.sp-slide-cart__title {
		font-size: 13px;
	}

	.sp-slide-cart__promo {
		font-size: 11px;
		padding: 8px 14px;
	}

	.sp-slide-cart__content {
		padding: 10px;
	}

	.sp-slide-cart__item {
		padding: 8px;
		gap: 8px;
	}

	.sp-slide-cart__item-image {
		width: 45px;
		height: 45px;
	}

	.sp-slide-cart__item-name {
		font-size: 11px;
	}

	.sp-slide-cart__item-meta {
		flex-wrap: nowrap;
	}

	.sp-slide-cart__item-remove {
		width: 22px;
		height: 22px;
		font-size: 14px;
	}

	.sp-slide-cart__footer {
		padding: 10px 14px;
		padding-bottom: 70px;
	}

	.sp-slide-cart__subtotal {
		font-size: 12px;
		margin-bottom: 8px;
	}

	.sp-slide-cart__subtotal-value {
		font-size: 14px;
	}

	.sp-slide-cart__btn {
		padding: 10px 8px;
		font-size: 12px;
		height: 40px;
	}

	.sp-slide-cart__recommendations-title {
		font-size: 11px;
	}

	.sp-slide-cart__rec-image {
		width: 35px;
		height: 35px;
	}

	.sp-slide-cart__rec-name,
	.sp-slide-cart__rec-price {
		font-size: 10px;
	}

	.sp-slide-cart__extra-name,
	.sp-slide-cart__extra-price {
		font-size: 11px;
	}
}

/* Prevent body scroll when cart is open */
body.sp-slide-cart-open {
	overflow: hidden;
}
