/**
 * Goodlight Cart Popup
 * Floating bottom-right cart button + slide-in cart panel.
 */

.goodlight-cart-widget {
	font-family: 'HelveticaNeueRoman', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============ Floating toggle button ============ */
.goodlight-cart-toggle {
	position: fixed;
	right: 28px;
	bottom: 28px;
	z-index: 999998;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: none;
	background: #111;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
	transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
	-webkit-tap-highlight-color: transparent;
}

.goodlight-cart-toggle:hover,
.goodlight-cart-toggle:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
	outline: none;
}

.goodlight-cart-toggle-icon {
	width: 24px;
	height: 24px;
}

.goodlight-cart-count {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: #e94b3c;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	font-family: 'Inter', sans-serif;
	display: none;
	align-items: center;
	justify-content: center;
	line-height: 1;
	box-shadow: 0 2px 6px rgba(233, 75, 60, 0.4);
}

.goodlight-cart-count.is-visible {
	display: flex;
}

/* ============ Overlay ============ */
.goodlight-cart-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	z-index: 999997;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.24s ease;
}

.goodlight-cart-widget[data-state="open"] .goodlight-cart-overlay {
	opacity: 1;
	pointer-events: auto;
}

/* ============ Slide-in panel ============ */
.goodlight-cart-panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(420px, 92vw);
	background: #fff;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: -12px 0 40px rgba(0, 0, 0, 0.15);
}

.goodlight-cart-widget[data-state="open"] .goodlight-cart-panel {
	transform: translateX(0);
}

/* ============ Header ============ */
.goodlight-cart-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 24px 28px;
	border-bottom: 1px solid #f0f0f0;
}

.goodlight-cart-title {
	margin: 0;
	font-family: 'HelveticaNeueMedium', sans-serif;
	font-size: 18px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #111;
}

.goodlight-cart-close {
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	color: #111;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background 0.15s ease;
}

.goodlight-cart-close:hover,
.goodlight-cart-close:focus-visible {
	background: #f4f4f4;
	outline: none;
}

/* ============ Items ============ */
.goodlight-cart-items {
	flex: 1;
	overflow-y: auto;
	padding: 8px 28px;
}

.goodlight-cart-empty {
	margin: 40px 0;
	text-align: center;
	color: #888;
	font-size: 14px;
}

.goodlight-cart-item {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 18px 0;
	border-bottom: 1px solid #f5f5f5;
}

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

.goodlight-cart-item-thumb {
	flex-shrink: 0;
	width: 64px;
	height: 64px;
	border-radius: 4px;
	overflow: hidden;
	background: #f6f6f6;
}

.goodlight-cart-item-image,
.goodlight-cart-item-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.goodlight-cart-item-info {
	flex: 1;
	min-width: 0;
	padding-right: 28px;
}

.goodlight-cart-item-title {
	display: block;
	font-family: 'HelveticaNeueMedium', sans-serif;
	font-size: 14px;
	color: #111;
	text-decoration: none;
	line-height: 1.3;
	margin-bottom: 6px;
	word-wrap: break-word;
}

a.goodlight-cart-item-title:hover {
	text-decoration: underline;
}

.goodlight-cart-item-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	color: #777;
}

.goodlight-cart-item-qty {
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.goodlight-cart-item-price {
	font-family: 'HelveticaNeueMedium', sans-serif;
	color: #111;
}

.goodlight-cart-item-remove {
	position: absolute;
	top: 18px;
	right: 0;
	width: 22px;
	height: 22px;
	border: none;
	background: transparent;
	color: #aaa;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	transition: color 0.15s ease;
}

.goodlight-cart-item-remove:hover {
	color: #111;
}

/* ============ Footer ============ */
.goodlight-cart-footer {
	padding: 20px 28px 28px;
	border-top: 1px solid #f0f0f0;
	background: #fafafa;
}

.goodlight-cart-subtotal-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 16px;
	font-size: 14px;
}

.goodlight-cart-subtotal-label {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #777;
}

.goodlight-cart-subtotal-amount {
	font-family: 'HelveticaNeueMedium', sans-serif;
	font-size: 16px;
	color: #111;
}

.goodlight-cart-checkout {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 14px 20px;
	background: #111;
	color: #fff !important;
	text-decoration: none !important;
	font-family: 'Inter', sans-serif;
	font-weight: 500;
	font-size: 13px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	border-radius: 8px;
	box-sizing: border-box;
	transition: background 0.18s ease;
}

.goodlight-cart-checkout:hover,
.goodlight-cart-checkout:focus-visible {
	background: #333;
	color: #fff !important;
	outline: none;
}

/* ============ Loading state on add buttons ============ */
.goodlight-add-to-cart.is-loading,
.goodlight-related-add.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

/* ============ Mobile ============ */
@media (max-width: 600px) {
	.goodlight-cart-toggle {
		right: 18px;
		bottom: 18px;
		width: 52px;
		height: 52px;
	}

	.goodlight-cart-header,
	.goodlight-cart-items,
	.goodlight-cart-footer {
		padding-left: 20px;
		padding-right: 20px;
	}
}

/* Showit mobile class */
.m .goodlight-cart-toggle {
	right: 18px;
	bottom: 18px;
}
