.csc {
	--csc-accent: #0284c7;
	--csc-accent-dark: #0369a1;
	--csc-text: #1b2431;
	--csc-muted: #6b7280;
	--csc-line: #e5e7eb;
	--csc-surface: #f3f4f6;
	--csc-ok-bg: #e6f4ec;
	--csc-ok: #1d7a4b;
	--csc-warn-bg: #eaf4fb;
	--csc-err: #b42318;

	position: fixed;
	inset: 0;
	z-index: 99999;
	visibility: hidden;
	pointer-events: none;
	color: var(--csc-text);
	font-size: 16px;
	line-height: 1.4;
	transition: visibility 0s linear .3s;
}
.csc.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
.csc *, .csc *::before, .csc *::after { box-sizing: border-box; }
.csc-lock { overflow: hidden; }

.csc__overlay {
	position: absolute; inset: 0;
	background: rgba(15, 23, 42, .5);
	opacity: 0; transition: opacity .3s;
}
.csc.is-open .csc__overlay { opacity: 1; }

.csc__panel {
	position: absolute; top: 0; right: 0;
	width: 440px; max-width: 100%;
	height: 100vh; height: 100dvh;
	background: #fff;
	box-shadow: -10px 0 30px rgba(0, 0, 0, .15);
	transform: translateX(100%);
	transition: transform .3s ease;
}
.csc.is-open .csc__panel { transform: none; }
.csc__inner { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.csc.is-loading .csc__inner { opacity: .6; pointer-events: none; transition: opacity .15s; }

/* Free shipping */
.csc-fs { background: var(--csc-warn-bg); flex: none; }
.csc-fs.is-unlocked { background: var(--csc-ok-bg); }
.csc-fs__text { margin: 0; padding: 14px 16px 12px; text-align: center; font-weight: 600; color: var(--csc-accent-dark); }
.csc-fs.is-unlocked .csc-fs__text { color: var(--csc-ok); }
.csc-fs__bar { height: 4px; background: rgba(2, 132, 199, .18); }
.csc-fs__bar span { display: block; height: 100%; background: var(--csc-accent); transition: width .4s ease; }
.csc-fs.is-unlocked .csc-fs__bar span { background: var(--csc-accent); }

/* Header */
.csc-head {
	flex: none; display: flex; align-items: center; justify-content: space-between;
	padding: 18px 16px; border-bottom: 1px solid var(--csc-line);
}
.csc-head__close { background: none; border: 0; padding: 4px; cursor: pointer; color: var(--csc-text); display: flex; }
.csc-head__title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: .01em; }
.csc-head__count {
	min-width: 38px; padding: 4px 10px; text-align: center; border-radius: 6px;
	background: #e8edf2; font-weight: 600; font-size: 15px;
}

/* Notice */
.csc-notice { flex: none; margin: 0; padding: 10px 16px; font-size: 14px; background: var(--csc-ok-bg); color: var(--csc-ok); }
.csc-notice--error { background: #fdecea; color: var(--csc-err); }

/* Items */
.csc-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.csc-items { list-style: none; margin: 0; padding: 0; }
.csc-item {
	display: grid; grid-template-columns: 92px 1fr auto; gap: 16px;
	padding: 20px 16px; border-bottom: 1px solid var(--csc-line); align-items: start;
}
.csc-item__img img { display: block; width: 92px; height: 92px; object-fit: contain; background: #f7f7f8; border-radius: 6px; }
.csc-item__name { margin: 0 0 4px; font-size: 17px; font-weight: 600; letter-spacing: .02em; }
.csc-item__name a { color: inherit; text-decoration: none; }
.csc-item__info dl { margin: 0 0 4px; font-size: 13px; color: var(--csc-muted); }
.csc-item__info dl p { margin: 0; display: inline; }
.csc-item__info dt, .csc-item__info dd { display: inline; margin: 0; }
.csc-item__price { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.csc-item__price--promo { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; }
.csc-price-original { color: #777; font-size: .9em; font-weight: 500; text-decoration: line-through; }
.csc-price-discounted { color: #64152a; font-weight: 800; }
.csc-price-saving { margin: 1px 0 4px; color: #267344; font-size: 12px; font-weight: 750; line-height: 1.35; }
.csc-price-code { margin: 0 0 7px; color: #666; font-size: 11px; line-height: 1.35; }
.csc-remove { background: none; border: 0; padding: 0; font-size: 14px; color: var(--csc-text); text-decoration: underline; cursor: pointer; }

.csc-qty { display: flex; flex-direction: column; border: 1px solid var(--csc-line); border-radius: 4px; width: 40px; overflow: hidden; background: #fff; }
.csc-qty button { height: 32px; border: 0; background: #fff; font-size: 20px; line-height: 1; cursor: pointer; color: var(--csc-text); padding: 0; }
.csc-qty button:hover:not(:disabled) { background: var(--csc-surface); }
.csc-qty button:disabled { color: #c3c7cd; cursor: not-allowed; }
.csc-qty input {
	width: 100%; height: 32px; padding: 0; text-align: center; border: 0;
	border-top: 1px solid var(--csc-line); border-bottom: 1px solid var(--csc-line);
	border-radius: 0; font-size: 15px; background: #fff; color: var(--csc-text);
	-moz-appearance: textfield; appearance: textfield;
}
.csc-qty input::-webkit-outer-spin-button, .csc-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Upsell */
.csc-upsell { margin: 16px; padding: 14px; border: 1px dashed #b7d7ea; border-radius: 8px; background: #f7fbfe; }
.csc-upsell__title { margin: 0; font-size: 17px; font-weight: 700; }
.csc-upsell__sub { margin: 2px 0 12px; font-size: 13px; color: var(--csc-muted); }
.csc-up { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; }
.csc-up + .csc-up { border-top: 1px solid var(--csc-line); }
.csc-up__img img { display: block; width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 6px; }
.csc-up__name { display: block; font-weight: 600; font-size: 15px; color: inherit; text-decoration: none; }
.csc-up__price { display: block; font-size: 14px; color: var(--csc-muted); }
.csc-up__add {
	display: inline-block; padding: 8px 14px; border: 1.5px solid var(--csc-accent); border-radius: 6px;
	background: #fff; color: var(--csc-accent-dark); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.csc-up__add:hover:not(:disabled) { background: var(--csc-accent); color: #fff; }
.csc-up__add:disabled { opacity: .5; cursor: wait; }

/* Footer */
.csc-foot { flex: none; border-top: 1px solid var(--csc-line); background: #fff; box-shadow: 0 -6px 14px rgba(0, 0, 0, .04); }
.csc-coupon { border-bottom: 1px solid var(--csc-line); }
.csc-coupon summary {
	display: flex; justify-content: space-between; align-items: center; list-style: none;
	padding: 16px; cursor: pointer; font-size: 16px;
}
.csc-coupon summary::-webkit-details-marker { display: none; }
.csc-coupon summary::after {
	content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(45deg); margin-right: 4px; transition: transform .2s;
}
.csc-coupon[open] summary::after { transform: rotate(-135deg); }
.csc-coupon__row { display: flex; gap: 8px; padding: 0 16px 14px; }
.csc-coupon__input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid var(--csc-line); border-radius: 6px; font-size: 15px; }
.csc-coupon__apply { padding: 0 18px; border: 0; border-radius: 6px; background: var(--csc-text); color: #fff; font-weight: 600; cursor: pointer; }
.csc-coupon__list { list-style: none; margin: 0; padding: 0 16px 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.csc-coupon__list li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; background: var(--csc-surface); border-radius: 999px; font-size: 13px; font-weight: 600; }
.csc-coupon__remove { border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer; color: var(--csc-muted); }

.csc-totals { margin: 0; }
.csc-totals > div { display: flex; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--csc-line); font-size: 17px; font-weight: 600; }
.csc-totals dt, .csc-totals dd { margin: 0; }
.csc-totals dd { text-align: right; }
.csc-totals__total dd { font-weight: 700; }

.csc-btn {
	display: block; text-align: center; text-decoration: none; cursor: pointer;
	background: var(--csc-accent); color: #fff; border-radius: 6px; padding: 14px 18px; font-size: 18px; font-weight: 600;
}
.csc-btn:hover { background: var(--csc-accent-dark); color: #fff; }
.csc-btn--checkout { margin: 16px; }

.csc-empty { padding: 48px 24px; text-align: center; }
.csc-empty .csc-btn { display: inline-block; margin-top: 8px; }

/* Cart icon shortcode */
.csc-trigger { position: relative; background: none; border: 0; padding: 6px; cursor: pointer; color: inherit; display: inline-flex; }
.csc-trigger .csc-count {
	position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
	background: var(--csc-accent, #0284c7); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

.csc button:focus-visible, .csc a:focus-visible, .csc input:focus-visible, .csc summary:focus-visible {
	outline: 2px solid var(--csc-accent); outline-offset: 2px;
}

@media (max-width: 480px) {
	.csc__panel { width: 100%; }
	.csc-item { grid-template-columns: 80px 1fr auto; gap: 12px; }
	.csc-item__img img { width: 80px; height: 80px; }
}
@media (prefers-reduced-motion: reduce) {
	.csc, .csc__overlay, .csc__panel, .csc-fs__bar span { transition: none; }
}

/* Custom header badge hidden while the cart is empty */
[data-csc-count][hidden] { display: none !important; }

/* Bundle savings row */
.csc-totals__bundle-savings dd { color: var(--csc-ok); font-weight: 700; }
