/* Side Cart Modal Styles */

/* Offcanvas styling */
.offcanvas.offcanvas-end {
	width: 420px;
	max-width: 100vw;
}

@media (max-width: 768px) {
	.offcanvas.offcanvas-end {
		width: 300px;
	}
}

/* Cart header */
.offcanvas-header {
	background: linear-gradient(135deg, #BE4F90 0%, #a83d7a 100%);
	color: white;
	border-bottom: none;
}

.offcanvas-title {
	font-weight: 100;
	font-size: 1.25rem;
}

.offcanvas-header .btn-close {
	filter: brightness(0) invert(1);
	opacity: 0.8;
}

.offcanvas-header .btn-close:hover {
	opacity: 1;
}

/* Cart body */
.offcanvas-body {
	padding: 1rem;
	background-color: #fafafa;
}

/* Cart items */
#sideCartItems {
	max-height: calc(100vh - 200px);
	overflow-y: auto;
	padding-right: 5px;
}

#sideCartItems::-webkit-scrollbar {
	width: 4px;
}

#sideCartItems::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 2px;
}

#sideCartItems::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 2px;
}

#sideCartItems::-webkit-scrollbar-thumb:hover {
	background: #a8a8a8;
}

/* Individual cart item */
.cart-item {
	background: white;
	border-radius: 12px;
	/* padding: 1rem;
	margin-bottom: 1rem; */
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transition: all 0.3s ease;
	border: 1px solid #e9ecef;
	padding: 5px;
	margin-bottom: 5px;
}

.cart-item:hover {
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
	transform: translateY(-1px);
}

.cart-item:last-child {
	margin-bottom: 0;
}

/* Cart item image */
.cart-item img {
	border-radius: 8px;
	object-fit: cover;
	transition: transform 0.2s ease;
}

.cart-item img:hover {
	transform: scale(1.05);
}

/* Cart item placeholder */
.cart-item .bg-light {
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #6c757d;
}

/* Cart item details */
.cart-item h6 {
	color: purple;
	font-weight: 100 !important;
	margin-bottom: 0.5rem;
	line-height: 1.3;
}

.cart-item .text-muted {
	color: #6c757d !important;
	font-size: 12px;
}

.cart-item .fw-bold {
	color: #BE4F90;
	font-weight: 100 !important;
	font-size: 12px;
}

/* Remove button */
.remove-cart-item-btn {
	border: none;
	color: maroon;
	background: white;
	transition: all 0.2s ease;
	border-radius: 6px;
	padding: 0.375rem 0.5rem;
}

.remove-cart-item-btn:hover {
	background: #dc3545;
	color: white;
	transform: scale(1.05);
}

.remove-cart-item-btn:focus {
	box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Empty cart state */
#sideCartEmpty {
	padding: 2rem 1rem;
}

#sideCartEmpty .bi-cart-x {
	color: #6c757d;
	opacity: 0.6;
}

#sideCartEmpty p {
	font-size: 1.1rem;
	margin-bottom: 0;
}

/* Cart footer */
.offcanvas-footer {
	background: white;
	border-top: 2px solid #e9ecef;
	padding: 1.25rem !important;
}

.offcanvas-footer .d-flex:first-child {
	font-size: 1.1rem;
	margin-bottom: 1rem;
}

.offcanvas-footer strong {
	color: maroon;
	padding: auto;
	font-size: 20px;
	font-weight: 100 !important;
	text-shadow: 2px 2px 4px gray;
}

/* Footer buttons */
#viewCartBtn {
	border-color: #6c757d;
	color: #6c757d;
	font-weight: 500;
	transition: all 0.2s ease;
}

#viewCartBtn:hover {
	background: #6c757d;
	border-color: #6c757d;
	color: white;
}

#checkoutBtn {
	background: linear-gradient(135deg, #BE4F90 0%, #a83d7a 100%);
	border: none;
	font-weight: 100;
	transition: all 0.2s ease;
}

#checkoutBtn:hover {
	background: linear-gradient(135deg, #a83d7a 0%, #952f65 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(190, 79, 144, 0.3);
}

#checkoutBtn:focus {
	box-shadow: 0 0 0 0.2rem rgba(190, 79, 144, 0.25);
}

/* Loading states */
.btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.spinner-border-sm {
	width: 1rem;
	height: 1rem;
}

/* Animations */
@keyframes slideInRight {
	from {
		opacity: 0;
		transform: translateX(20px);
	}

	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.cart-item {
	animation: slideInRight 0.3s ease forwards;
}

/* Badge styling for cart icon */
.cart-badge {
	background: #dc3545;
	color: white;
	font-size: 0.75rem;
	min-width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: -8px;
	right: -8px;
	font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 576px) {
	.offcanvas.offcanvas-end {
		width: 280px;
	}

	.cart-item {
		padding: 0.75rem;
	}

	.cart-item h6 {
		font-size: 0.9rem;
	}

	.cart-item .text-muted {
		font-size: 0.8rem;
	}

	.offcanvas-footer {
		padding: 1rem !important;
	}

	.offcanvas-footer .d-flex button {
		font-size: 0.9rem;
		padding: 0.5rem 0.75rem;
	}
}

/* Custom scrollbar for webkit browsers */
.offcanvas-body::-webkit-scrollbar {
	width: 6px;
}

.offcanvas-body::-webkit-scrollbar-track {
	background: #f1f1f1;
}

.offcanvas-body::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 3px;
}

.offcanvas-body::-webkit-scrollbar-thumb:hover {
	background: #a8a8a8;
}

/* Smooth transitions */
* {
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* Focus states for accessibility */
button:focus,
.btn:focus {
	outline: 2px solid #BE4F90;
	outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.cart-item {
		border: 2px solid #000;
	}

	.offcanvas-header {
		background: #000;
	}

	#checkoutBtn {
		background: #000;
	}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

	.cart-item,
	.remove-cart-item-btn,
	#checkoutBtn {
		transition: none;
		animation: none;
	}

	.cart-item:hover {
		transform: none;
	}

	#checkoutBtn:hover {
		transform: none;
	}
}