/* Simple Side Cart Styles */

/* Overlay */
#ssc-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9998;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 0.3s ease,
		visibility 0.3s ease;
}

#ssc-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* Side Cart Container */
#ssc-side-cart {
	position: fixed;
	top: 0;
	left: -100%;
	width: 400px;
	max-width: 90%;
	height: 100%;
	background: #ffffff;
	z-index: 9999;
	transition: left 0.3s ease;
	display: flex;
	flex-direction: column;
	box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
	direction: rtl;
}

#ssc-side-cart.active {
	left: 0;
}

/* Header */
.ssc-header {
	padding: 20px;
	border-bottom: 1px solid #e5e5e5;
	background: #ffffff;
}

.ssc-header h3 {
	margin: 0;
	font-size: 16px;
}

.ssc-close {
	background: transparent;
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: #999;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s ease;
}

.ssc-close:hover {
	color: #333;
}

/* Cart Items Container */
.ssc-items {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
}

.ssc-items::-webkit-scrollbar {
	width: 6px;
}

.ssc-items::-webkit-scrollbar-track {
	background: #f1f1f1;
}

.ssc-items::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 3px;
}

.ssc-items::-webkit-scrollbar-thumb:hover {
	background: #999;
}

/* Individual Cart Item */
.ssc-item {
	display: flex;
	gap: 15px;
	padding: 15px 0;
	border-bottom: 1px solid #f0f0f0;
	align-items: flex-start;
}

.ssc-item:last-child {
	border-bottom: none;
}

.ssc-item-image {
	flex-shrink: 0;
	width: 80px;
	height: 80px;
}

.ssc-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 4px;
}

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

.ssc-item-title {
	font-size: 14px;
	font-weight: 500;
	color: #333;
	margin: 0 0 8px 0;
	line-height: 1.4;
}

.ssc-item-title a {
	color: #333;
	text-decoration: none;
}

.ssc-item-title a:hover {
	color: #b8956a;
}

.ssc-item-meta {
	font-size: 13px;
	color: #666;
	margin-bottom: 8px;
}

.ssc-item-price {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
}

.ssc-item-subtotal {
	font-size: 15px;
	font-weight: 600;
	color: #333;
}

.ssc-item-quantity {
	font-size: 13px;
	color: #666;
}

.ssc-remove {
	flex-shrink: 0;
	background: transparent;
	border: none;
	color: #999;
	cursor: pointer;
	font-size: 18px;
	padding: 5px;
	transition: color 0.2s ease;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ssc-remove:hover {
	color: #d32f2f;
}

/* Empty Cart */
.ssc-empty {
	text-align: center;
	padding: 40px 20px;
	color: #999;
}

.ssc-empty p {
	margin: 0;
	font-size: 15px;
}

/* Footer */
.ssc-footer {
	border-top: 1px solid #e5e5e5;
	background: #ffffff;
	padding: 20px;
	flex-shrink: 0;
}

.ssc-subtotal {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	font-size: 16px;
}

.ssc-subtotal-label {
	color: #666;
}

.ssc-subtotal-amount {
	font-size: 18px;
	font-weight: 600;
	color: #333;
}

.ssc-buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ssc-button {
	padding: 14px 24px;
	border: none;
	border-radius: 4px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	display: block;
	transition: all 0.2s ease;
}

.ssc-button-checkout {
	background: #b8956a;
	color: #ffffff;
}

.ssc-button-checkout:hover {
	background: #a07d54;
}

.ssc-button-continue {
	background: transparent;
	color: #666;
	border: 1px solid #e5e5e5;
}

.ssc-button-continue:hover {
	background: #f9f9f9;
	border-color: #d0d0d0;
}

/* Loading State */
.ssc-loading {
	pointer-events: none;
	opacity: 0.6;
}

.ssc-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 40px;
	height: 40px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid #b8956a;
	border-radius: 50%;
	animation: ssc-spin 1s linear infinite;
}

@keyframes ssc-spin {
	0% {
		transform: translate(-50%, -50%) rotate(0deg);
	}
	100% {
		transform: translate(-50%, -50%) rotate(360deg);
	}
}

/* Auto-close notification (optional) */
.ssc-notification {
	position: fixed;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	background: #4caf50;
	color: white;
	padding: 12px 24px;
	border-radius: 4px;
	z-index: 10000;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 0.3s ease,
		visibility 0.3s ease;
}

.ssc-notification.show {
	opacity: 1;
	visibility: visible;
}

/* Responsive */
@media (max-width: 480px) {
	#ssc-side-cart {
		width: 100%;
		max-width: 100%;
	}

	.ssc-item-image {
		width: 60px;
		height: 60px;
	}

	.ssc-item-title {
		font-size: 13px;
	}
}

/* Fix for WooCommerce add to cart button */
.added_to_cart {
	display: none !important;
}
