/* =========================================================
   Glide — Popup Cart
   If your theme already defines global CSS variables for
   blue/gray/etc, swap the values below to reference those
   instead of the hex fallbacks.
========================================================= */

:root {
	--cart-popup-blue: #2FA8DF;
	--cart-popup-blue-dark: #1E7FB0;
	--cart-popup-pill-bg: #E8F5FD;
	--cart-popup-pill-text: #2C8FC9;
	--cart-popup-highlight: #F5E14E;
	--cart-popup-border: #EBEDF0;
	--cart-popup-gray-bg: #F7F8F9;
	--cart-popup-text: #14161A;
	--cart-popup-text-muted: #8B93A0;
	--cart-popup-width: 460px;
}

/* ---------- Overlay ---------- */
.cart-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 18, 22, 0.45);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease;
	z-index: 9998;
}
.cart-popup-overlay.is-active {
	opacity: 1;
	visibility: visible;
}

/* ---------- Panel ---------- */
.cart-popup-panel {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: var(--cart-popup-width);
	max-width: 100%;
	background: #fff;
	box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
	transform: translateX(100%);
	transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.35, 1);
	z-index: 9999;
	display: flex;
	flex-direction: column;
}
.cart-popup-panel.is-active {
	transform: translateX(0);
}

.cart-popup-panel-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
}

/* ---------- Header ---------- */
.cart-popup-header {
	padding: 28px 28px 16px;
	border-bottom: 1px solid var(--cart-popup-border);
}
.cart-popup-title-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
}
.cart-popup-title {
	font-size: 28px;
	font-weight: 700;
	line-height: 1.1;
	margin: 0;
	color: var(--cart-popup-text);
}
.cart-popup-title-highlight {
	background: var(--cart-popup-highlight);
	padding: 1px 8px;
	border-radius: 4px;
}
.cart-popup-close {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: none;
	background: var(--cart-popup-gray-bg);
	color: var(--cart-popup-text);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.2s ease;
}
.cart-popup-close:hover {
	background: #ececec;
}
.cart-popup-subtitle {
	margin: 6px 0 0;
	font-size: 14px;
	color: var(--cart-popup-text-muted);
}
.cart-popup-dot {
	margin: 0 4px;
}

/* ---------- Scrollable body ---------- */
.cart-popup-scroll-wrap {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 20px 28px;
}
.cart-popup-scroll-wrap::-webkit-scrollbar {
	width: 6px;
}
.cart-popup-scroll-wrap::-webkit-scrollbar-thumb {
	background: var(--cart-popup-border);
	border-radius: 3px;
}

.cart-popup-empty {
	text-align: center;
	padding: 48px 0;
	color: var(--cart-popup-text-muted);
}
.cart-popup-empty .cart-popup-btn {
	display: inline-flex;
	margin-top: 16px;
}

/* ---------- Items ---------- */
.cart-popup-items {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 20px;
}
.cart-popup-item {
	display: flex;
	gap: 14px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--cart-popup-border);
}
.cart-popup-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}
.cart-popup-item-image {
	width: 72px;
	height: 72px;
	border-radius: 12px;
	overflow: hidden;
	background: var(--cart-popup-gray-bg);
	flex-shrink: 0;
}
.cart-popup-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.cart-popup-item-body {
	flex: 1 1 auto;
	min-width: 0;
}
.cart-popup-item-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}
.cart-popup-item-name {
	font-size: 15px;
	font-weight: 700;
	margin: 0;
	color: var(--cart-popup-text);
}
.cart-popup-remove {
	border: none;
	background: none;
	padding: 0;
	font-size: 13px;
	color: var(--cart-popup-text-muted);
	cursor: pointer;
	white-space: nowrap;
	transition: color 0.2s ease;
}
.cart-popup-remove:hover {
	color: #E5484D;
}

.cart-popup-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 8px 0;
}
.cart-popup-pill {
	background: var(--cart-popup-pill-bg);
	color: var(--cart-popup-pill-text);
	font-size: 12px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 20px;
}

.cart-popup-item-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 10px;
}
.cart-popup-qty {
	display: flex;
	align-items: center;
	gap: 12px;
	border: 1px solid var(--cart-popup-border);
	border-radius: 20px;
	padding: 4px 6px;
}
.cart-popup-qty-btn {
	width: 22px;
	height: 22px;
	border: none;
	background: none;
	font-size: 15px;
	line-height: 1;
	color: var(--cart-popup-text);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.cart-popup-qty-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}
.cart-popup-qty-value {
	font-size: 14px;
	font-weight: 600;
	min-width: 14px;
	text-align: center;
}
.cart-popup-item-price {
	font-size: 15px;
	font-weight: 700;
	color: var(--cart-popup-text);
	white-space: nowrap;
}
.cart-popup-currency {
	font-size: 11px;
	font-weight: 600;
	color: var(--cart-popup-text-muted);
	margin-left: 2px;
}

/* ---------- Info boxes (shipping / note) ---------- */
.cart-popup-info-box {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	border: 1px solid var(--cart-popup-border);
	border-radius: 14px;
	padding: 14px 16px;
	margin-bottom: 12px;
}
.cart-popup-info-icon {
	color: var(--cart-popup-text-muted);
	flex-shrink: 0;
	display: flex;
	margin-top: 1px;
}
.cart-popup-info-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 13px;
	color: var(--cart-popup-text-muted);
	line-height: 1.45;
}
.cart-popup-info-text strong {
	font-size: 14px;
	color: var(--cart-popup-text);
	font-weight: 700;
}

/* ---------- Order summary ---------- */
.cart-popup-summary {
	border: 1px solid var(--cart-popup-border);
	border-radius: 14px;
	padding: 18px 18px 16px;
}
.cart-popup-summary-title {
	font-size: 15px;
	font-weight: 700;
	margin: 0 0 12px;
	color: var(--cart-popup-text);
}
.cart-popup-summary-row {
	display: flex;
	justify-content: space-between;
	font-size: 14px;
	color: var(--cart-popup-text);
	padding: 5px 0;
}
.cart-popup-summary-muted {
	color: var(--cart-popup-text-muted);
}
.cart-popup-summary-divider {
	height: 1px;
	background: var(--cart-popup-border);
	margin: 8px 0;
}
.cart-popup-summary-total {
	font-size: 17px;
	font-weight: 700;
}

/* ---------- Footer / CTAs ---------- */
.cart-popup-footer {
	padding: 18px 28px 24px;
	border-top: 1px solid var(--cart-popup-border);
	flex-shrink: 0;
}
.cart-popup-btn {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 20px;
	border-radius: 30px;
	font-size: 15px;
	font-weight: 600;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: filter 0.2s ease, background 0.2s ease;
}
.cart-popup-btn-primary {
	background: linear-gradient(90deg, var(--cart-popup-blue), var(--cart-popup-blue-dark));
	color: #fff;
	margin-bottom: 10px;
}
.cart-popup-btn-primary:hover {
	filter: brightness(1.05);
	color: #fff;
}
.cart-popup-btn-secondary {
	background: #fff;
	color: var(--cart-popup-text);
	border: 1px solid var(--cart-popup-border);
}
.cart-popup-btn-secondary:hover {
	background: var(--cart-popup-gray-bg);
}
.cart-popup-footnote {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 14px 0 0;
	font-size: 12px;
	color: var(--cart-popup-text-muted);
}

/* Lock background scroll while the popup is open (toggled via JS on <body>) */
body.cart-popup-open {
	overflow: hidden;
}

/* =========================================================
   Mobile
========================================================= */
@media (max-width: 600px) {
	.cart-popup-panel {
		width: 100%;
	}
	.cart-popup-header {
		padding: 22px 20px 14px;
	}
	.cart-popup-title {
		font-size: 24px;
	}
	.cart-popup-scroll-wrap {
		padding: 16px 20px;
	}
	.cart-popup-footer {
		padding: 16px 20px 20px;
	}
	.cart-popup-item-image {
		width: 64px;
		height: 64px;
	}
}