/* ─────────────────────────────────────────────────────────────────────────────
   TT Slide Cart — Total Tools Namibia
   Replaces the Elementor Menu Cart drawer entirely.
───────────────────────────────────────────────────────────────────────────── */

/* Hide Elementor's own drawer so ours is the only one */
.elementor-menu-cart__main {
	display: none !important;
}

/* ── Overlay ────────────────────────────────────────────────────────────────── */

.tt-sc-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 99998;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}
.tt-sc-overlay.tt-sc-open {
	opacity: 1;
	pointer-events: auto;
}

/* ── Drawer ─────────────────────────────────────────────────────────────────── */

.tt-sc-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 380px;
	max-width: 100vw;
	background: #ffffff;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
}
.tt-sc-drawer.tt-sc-open {
	transform: translateX(0);
}
body.tt-sc-no-scroll {
	overflow: hidden;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */

.tt-sc-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	background: #00737A;
	color: #ffffff;
	flex-shrink: 0;
}
.tt-sc-header__title {
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: #ffffff;
}
.tt-sc-header__count {
	font-weight: 400;
}
.tt-sc-close {
	background: none;
	border: none;
	color: #ffffff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 6px;
	opacity: 0.85;
	transition: opacity 0.2s;
}
.tt-sc-close:hover {
	opacity: 1;
}

/* ── Scrollable body ────────────────────────────────────────────────────────── */

.tt-sc-body {
	flex: 1 1 auto;
	overflow-y: auto;
	overflow-x: hidden;
}

/* ── Loading / empty states ─────────────────────────────────────────────────── */

.tt-sc-loading,
.tt-sc-empty {
	padding: 36px 20px;
	text-align: center;
	color: #888888;
	font-size: 14px;
}

/* ── Cart items ─────────────────────────────────────────────────────────────── */

.tt-sc-item {
	display: flex;
	gap: 12px;
	padding: 14px 20px;
	border-bottom: 1px solid #efefef;
}
.tt-sc-item:last-child {
	border-bottom: none;
}
.tt-sc-item__thumb {
	flex-shrink: 0;
	width: 72px;
	height: 72px;
	display: block;
	overflow: hidden;
	border-radius: 6px;
	border: 1px solid #e0e0e0;
	background: #f9f9f9;
}
.tt-sc-item__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.tt-sc-item__info {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}
.tt-sc-item__name {
	font-size: 13px;
	line-height: 1.35;
	color: #222222;
	text-decoration: none;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.tt-sc-item__name:hover {
	color: #00737A;
}
.tt-sc-item__price {
	font-size: 14px;
	font-weight: 700;
	color: #222222;
}
.tt-sc-item__price .woocommerce-Price-currencySymbol {
	color: #222222;
}
.tt-sc-item__controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 6px;
}

/* Quantity stepper */
.tt-sc-qty {
	display: flex;
	align-items: center;
	border: 1px solid #dddddd;
	border-radius: 6px;
	overflow: hidden;
}
.tt-sc-qty__btn {
	background: #f4f4f4;
	border: none;
	width: 28px;
	height: 28px;
	font-size: 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
	color: #333333;
	line-height: 1;
}
.tt-sc-qty__btn:hover {
	background: #e2e2e2;
	color: #00737A;
}
.tt-sc-qty__val {
	min-width: 28px;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	color: #222222;
	padding: 0 4px;
}
.tt-sc-remove {
	background: none;
	border: none;
	font-size: 12px;
	color: #aaaaaa;
	cursor: pointer;
	text-decoration: underline;
	padding: 0;
	transition: color 0.15s;
}
.tt-sc-remove:hover {
	color: #cc0000;
}

/* ── Related products ───────────────────────────────────────────────────────── */

.tt-sc-related-wrap {
	padding: 16px 20px 20px;
	border-top: 2px solid #00737A;
	background: #f7f9f9;
}
.tt-sc-related-wrap__heading {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: #00737A;
	margin: 0 0 12px;
}
.tt-sc-related-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}
.tt-sc-related-item {
	display: flex;
	flex-direction: column;
	gap: 5px;
	background: #ffffff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 10px;
	overflow: hidden;
}
.tt-sc-related-item__thumb {
	display: block;
	border-radius: 4px;
	overflow: hidden;
	background: #f4f4f4;
	margin-bottom: 2px;
}
.tt-sc-related-item__thumb img {
	width: 100%;
	height: auto;
	display: block;
}
.tt-sc-related-item__name {
	font-size: 12px;
	line-height: 1.3;
	color: #222222;
	text-decoration: none;
	font-weight: 500;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.tt-sc-related-item__name:hover {
	color: #00737A;
}
.tt-sc-related-item__price {
	font-size: 13px;
	font-weight: 700;
	color: #222222;
}
.tt-sc-related-item__price del {
	font-weight: 400;
	opacity: 0.55;
	font-size: 11px;
	margin-right: 2px;
}
.tt-sc-related-item__price ins {
	text-decoration: none;
}
.tt-sc-related-item__btn {
	display: block;
	text-align: center;
	font-size: 12px;
	padding: 7px 8px;
	background: #00737A;
	color: #ffffff !important;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	text-decoration: none !important;
	margin-top: auto;
	line-height: 1.3;
	transition: background 0.2s;
	font-weight: 600;
}
.tt-sc-related-item__btn:hover {
	background: #005a60;
	color: #ffffff !important;
}
.tt-sc-related-item__btn.loading {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */

.tt-sc-footer {
	flex-shrink: 0;
	padding: 16px 20px;
	border-top: 1px solid #e0e0e0;
	background: #ffffff;
}
.tt-sc-subtotal {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
}
.tt-sc-subtotal__label {
	font-size: 14px;
	color: #666666;
}
.tt-sc-subtotal__price {
	font-size: 16px;
	font-weight: 700;
	color: #222222;
}
.tt-sc-subtotal__price .woocommerce-Price-currencySymbol {
	color: #222222;
}
.tt-sc-btn {
	display: block;
	text-align: center;
	padding: 12px 16px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
	margin-bottom: 8px;
	line-height: 1.2;
}
.tt-sc-btn:last-child {
	margin-bottom: 0;
}
.tt-sc-btn--primary {
	background: #00737A;
	color: #ffffff !important;
	border: 2px solid #00737A;
}
.tt-sc-btn--primary:hover {
	background: #005a60;
	border-color: #005a60;
	color: #ffffff !important;
}
.tt-sc-btn--secondary {
	background: #ffffff;
	color: #00737A !important;
	border: 2px solid #00737A;
}
.tt-sc-btn--secondary:hover {
	background: #00737A;
	color: #ffffff !important;
}

/* ── Mobile ─────────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
	.tt-sc-drawer {
		width: 100vw;
	}
}
