/**
 * NS Side Cart
 * Maatwerk side cart drawer ter vervanging van Xoo Side Cart Premium.
 * Huisstijl: --maincolor #2C4329, --subcolor #ccdc46, accent #006f3b.
 */

/* ===== Header toggle knop ===== */
.ns-sc-toggle {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	color: #2C4329;
	cursor: pointer;
}

.ns-sc-toggle .ns-sc-toggle-inner {
	position: relative;
	display: inline-block;
}

.ns-sc-toggle i {
	font-size: 20px;
}

.ns-sc-toggle p {
	margin: 2px 0 0;
	font-size: 12px;
}

.ns-sc-count {
	position: absolute;
	top: -8px;
	right: -10px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: #006f3b;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	box-sizing: border-box;
}

.ns-sc-count:not(.has-items) {
	display: none;
}

/* ===== Overlay ===== */
.ns-sc-overlay {
	position: fixed;
	inset: 0;
	background: rgba(44, 67, 41, 0.45);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	z-index: 99998;
}

.ns-sc-overlay.ns-sc-open {
	opacity: 1;
	visibility: visible;
}

/* ===== Drawer ===== */
.ns-sc-drawer {
	position: fixed;
	top: 0;
	right: 0;
	width: 400px;
	max-width: 100%;
	height: 100%;
	background: #fff;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	z-index: 99999;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
	font-family: 'Urbanist', sans-serif;
}

.ns-sc-drawer.ns-sc-open {
	transform: translateX(0);
}

body.ns-sc-locked {
	overflow: hidden;
}

/* Header */
.ns-sc-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 22px;
	background: #2C4329;
	color: #fff;
	flex: 0 0 auto;
}

.ns-sc-title {
	margin: 0;
	font-size: 18px;
	color: #fff;
}

.ns-sc-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	padding: 4px 8px;
	line-height: 1;
}

.ns-sc-close:hover {
	color: #ccdc46;
}

/* Body */
.ns-sc-body,
.ns-sc-body-inner {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.ns-sc-items {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 12px 22px;
}

/* Busy state */
.ns-sc-busy .ns-sc-body-inner {
	opacity: 0.5;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

/* ===== Item ===== */
.ns-sc-item {
	position: relative;
	display: flex;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid #e8e7e7;
}

.ns-sc-item-thumb {
	flex: 0 0 64px;
	width: 64px;
}

.ns-sc-item-thumb img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid #f0f0f0;
}

.ns-sc-item-details {
	flex: 1 1 auto;
	min-width: 0;
	padding-right: 18px;
}

.ns-sc-item-name {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}

.ns-sc-item-name a {
	color: #2C4329;
	text-decoration: none;
}

.ns-sc-item-name a:hover {
	text-decoration: underline;
}

.ns-sc-item-meta {
	font-size: 12px;
	color: #777;
	margin-top: 3px;
}

.ns-sc-item-meta p {
	margin: 1px 0;
	font-size: 12px;
	line-height: 1.4;
}

.ns-sc-item-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 8px;
}

/* Qty selector */
.ns-sc-qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid #d4d4d4;
	border-radius: 6px;
	overflow: hidden;
}

.ns-sc-qty-btn {
	width: 28px;
	height: 28px;
	border: none;
	background: #f5f5f5;
	color: #2C4329;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease;
}

.ns-sc-qty-btn:hover {
	background: #ccdc46;
}

.ns-sc-qty-val {
	min-width: 30px;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
}

.ns-sc-item-price {
	font-size: 14px;
	font-weight: 700;
	color: #2C4329;
	white-space: nowrap;
}

/* Remove */
.ns-sc-remove {
	position: absolute;
	top: 14px;
	right: 0;
	background: none;
	border: none;
	color: #b0b0b0;
	font-size: 14px;
	cursor: pointer;
	padding: 2px;
	line-height: 1;
}

.ns-sc-remove:hover {
	color: #fd2828;
}

/* ===== Footer ===== */
.ns-sc-footer {
	flex: 0 0 auto;
	padding: 18px 22px;
	border-top: 1px solid #e8e7e7;
	background: #fafafa;
}

.ns-sc-totals {
	margin-bottom: 14px;
}

.ns-sc-total-row {
	display: flex;
	justify-content: space-between;
	font-size: 14px;
	padding: 4px 0;
	color: #444;
}

.ns-sc-total-strong {
	font-size: 17px;
	font-weight: 700;
	color: #2C4329;
	border-top: 1px solid #e0e0e0;
	margin-top: 4px;
	padding-top: 10px;
}

.ns-sc-actions {
	display: flex;
	gap: 10px;
}

.ns-sc-cart-btn,
.ns-sc-checkout-btn {
	flex: 1 1 50%;
	display: block;
	text-align: center;
	padding: 12px 8px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
	box-sizing: border-box;
}

.ns-sc-cart-btn {
	background: #fff;
	color: #2C4329;
	border: 2px solid #2C4329;
}

.ns-sc-cart-btn:hover {
	background: #2C4329;
	color: #fff;
}

.ns-sc-checkout-btn {
	background: #006f3b;
	color: #fff;
	border: 2px solid #006f3b;
}

.ns-sc-checkout-btn:hover {
	background: #2C4329;
	border-color: #2C4329;
}

/* ===== Lege staat ===== */
.ns-sc-empty {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 40px 22px;
	color: #777;
}

.ns-sc-empty i {
	font-size: 48px;
	color: #d4d4d4;
	margin-bottom: 16px;
}

.ns-sc-empty span {
	font-size: 15px;
	margin-bottom: 20px;
}

.ns-sc-shop-btn {
	display: inline-block;
	padding: 12px 24px;
	background: #006f3b;
	color: #fff;
	border-radius: 6px;
	font-weight: 700;
	text-decoration: none;
	transition: background 0.15s ease;
}

.ns-sc-shop-btn:hover {
	background: #2C4329;
}

/* ===== Floating cart-knop (alleen mobiel) ===== */
.ns-sc-float {
	display: none; /* desktop: verborgen, mainbar-knop is er al */
	position: fixed;
	bottom: 20px;
	right: 20px;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: #2C4329;
	color: #fff;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
	z-index: 99990;
}

.ns-sc-float i {
	font-size: 22px;
	line-height: 1;
}

.ns-sc-float .ns-sc-count {
	position: absolute;
	top: -2px;
	right: -2px;
}

@media screen and (max-width: 800px) {
	.ns-sc-float {
		display: flex;
	}
}

/* ===== Responsive ===== */
@media screen and (max-width: 480px) {
	.ns-sc-drawer {
		width: 100%;
	}
}

/* ===== Add-to-cart laadstatus ===== */
.single_add_to_cart_button.ns-sc-loading {
	opacity: 0.65;
	pointer-events: none;
	cursor: wait;
}

.single_add_to_cart_button.ns-sc-loading i {
	animation: ns-sc-spin 0.6s linear infinite;
	display: inline-block;
}

@keyframes ns-sc-spin {
	to {
		transform: rotate(360deg);
	}
}
