/* Side cart drawer (inc/thor-side-cart.php) */

.thor-sc {
	position: fixed;
	inset: 0;
	z-index: 100001;
	font-family: var(--thor-sans);
	color: var(--thor-ink);
}

.thor-sc[hidden] {
	display: none;
}

.thor-sc__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 46, 37, .45);
	opacity: 0;
	transition: opacity .25s ease;
}

.thor-sc__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	width: min(100vw, 420px);
	background: var(--thor-surface);
	box-shadow: -20px 0 60px rgba(15, 46, 37, .18);
	transform: translateX(100%);
	transition: transform .28s cubic-bezier(.2, .8, .2, 1);
	outline: none;
}

.thor-sc.is-open .thor-sc__backdrop {
	opacity: 1;
}

.thor-sc.is-open .thor-sc__panel {
	transform: none;
}

.thor-sc__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	transition: opacity .15s ease;
}

.thor-sc.is-syncing .thor-sc__totals dd,
.thor-sc__item.is-stale .thor-sc__price {
	opacity: .45;
	transition: opacity .15s ease;
}

.thor-sc.is-syncing .thor-sc__checkout {
	pointer-events: none;
	opacity: .75;
}

.thor-sc__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid var(--thor-line);
}

.thor-sc__title {
	margin: 0;
	font-family: var(--thor-serif);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
}

.thor-sc__title span {
	color: var(--thor-muted);
	font-family: var(--thor-sans);
	font-size: 15px;
	font-weight: 500;
}

.thor-sc__close,
.thor-sc__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--thor-pill);
	background: var(--thor-bg);
	color: var(--thor-ink);
	cursor: pointer;
	transition: background-color .15s ease;
}

.thor-sc__close:hover,
.thor-sc__remove:hover {
	background: var(--thor-soft);
}

.thor-sc__close .thor-icon {
	width: 20px;
	height: 20px;
}

.thor-sc__msg {
	margin: 12px 20px 0;
	padding: 10px 14px;
	border-radius: 12px;
	background: #fdecea;
	color: #9b2c1f;
	font-size: 14px;
}

.thor-sc__loading {
	display: grid;
	gap: 16px;
	padding: 20px;
}

.thor-sc__loading span {
	height: 80px;
	border-radius: 14px;
	background: linear-gradient(90deg, var(--thor-bg) 25%, var(--thor-soft) 50%, var(--thor-bg) 75%);
	background-size: 200% 100%;
	animation: thor-sc-shimmer 1.2s linear infinite;
}

@keyframes thor-sc-shimmer {
	to {
		background-position: -200% 0;
	}
}

.thor-sc__scroll {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 4px 20px 20px;
}

.thor-sc__items {
	margin: 0;
	padding: 0;
	list-style: none;
}

.thor-sc__item {
	display: grid;
	grid-template-columns: 80px 1fr auto;
	gap: 14px;
	align-items: start;
	margin: 0;
	padding: 16px 0;
	border-bottom: 1px solid var(--thor-line);
	transition: opacity .2s ease;
}

.thor-sc__item.is-removing,
.thor-sc__chips .is-removing {
	display: none;
}

.thor-sc__thumb img {
	display: block;
	width: 80px;
	height: 80px;
	border-radius: 12px;
	background: var(--thor-bg);
	object-fit: cover;
}

.thor-sc__info {
	min-width: 0;
}

.thor-sc__name {
	display: -webkit-box;
	overflow: hidden;
	color: var(--thor-ink);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.thor-sc__name:hover {
	color: var(--thor-accent-text);
}

.thor-sc__meta {
	margin: 4px 0 0;
	color: var(--thor-muted);
	font-size: 13px;
	line-height: 1.4;
}

.thor-sc__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 10px;
}

.thor-sc__qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--thor-line);
	border-radius: var(--thor-pill);
}

.thor-sc__qty button {
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--thor-ink);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.thor-sc__qty span {
	min-width: 22px;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
}

.thor-sc__price {
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
}

.thor-sc__remove {
	width: 30px;
	height: 30px;
	background: none;
	color: var(--thor-muted);
}

.thor-sc__remove .thor-icon {
	width: 16px;
	height: 16px;
}

.thor-sc__recs {
	margin-top: 22px;
}

.thor-sc__recs-title {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .02em;
}

.thor-sc__recs-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.thor-sc__rec {
	display: flex;
	flex-direction: column;
	gap: 4px;
	color: var(--thor-ink);
	text-decoration: none;
}

.thor-sc__rec img {
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	border-radius: 12px;
	background: var(--thor-bg);
	object-fit: cover;
}

.thor-sc__rec-name {
	display: -webkit-box;
	overflow: hidden;
	font-size: 12px;
	line-height: 1.3;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.thor-sc__rec-price {
	font-size: 13px;
	font-weight: 700;
}

.thor-sc__rec-price del {
	color: var(--thor-muted);
	font-weight: 400;
}

.thor-sc__foot {
	display: grid;
	gap: 12px;
	padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--thor-line);
	background: var(--thor-surface);
}

.thor-sc__coupon {
	display: flex;
	gap: 8px;
	margin: 0;
}

.thor-sc__coupon input {
	flex: 1;
	min-width: 0;
	height: 44px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--thor-line);
	border-radius: 12px;
	background: var(--thor-bg);
	box-shadow: none;
	font-size: 15px;
}

.thor-sc__coupon input:focus {
	border-color: var(--thor-accent);
	outline: none;
}

.thor-sc__coupon button {
	height: 44px;
	margin: 0;
	padding: 0 18px;
	border: 0;
	border-radius: 12px;
	background: var(--thor-deep);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.thor-sc__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.thor-sc__chips button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 5px 10px;
	border: 1px dashed var(--thor-accent);
	border-radius: var(--thor-pill);
	background: var(--thor-sand);
	color: var(--thor-accent-dark);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	cursor: pointer;
}

.thor-sc__chips .thor-icon {
	width: 12px;
	height: 12px;
}

.thor-sc__totals {
	display: grid;
	gap: 6px;
	margin: 0;
}

.thor-sc__totals div {
	display: flex;
	justify-content: space-between;
	font-size: 15px;
}

.thor-sc__totals dt,
.thor-sc__totals dd {
	margin: 0;
	font-weight: 600;
}

.thor-sc__totals dd {
	font-weight: 700;
}

.thor-sc__totals .is-discount {
	color: var(--thor-accent-text);
}

.thor-sc__note {
	margin: -4px 0 0;
	color: var(--thor-muted);
	font-size: 13px;
}

.thor-sc__checkout {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 52px;
	border-radius: var(--thor-pill);
	background: var(--thor-accent);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	text-decoration: none;
	transition: background-color .15s ease;
}

.thor-sc__checkout:hover,
.thor-sc__checkout:focus-visible {
	background: var(--thor-accent-dark);
	color: #fff;
}

.thor-sc__checkout .thor-icon {
	width: 18px;
	height: 18px;
}

.thor-sc__view {
	color: var(--thor-muted);
	font-size: 14px;
	text-align: center;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.thor-sc__empty {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 40px 28px;
	text-align: center;
}

.thor-sc__empty > .thor-icon {
	width: 56px;
	height: 56px;
	padding: 16px;
	border-radius: var(--thor-pill);
	background: var(--thor-bg);
	color: var(--thor-accent);
}

.thor-sc__empty p {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
}

.thor-sc__empty .thor-sc__checkout {
	align-self: stretch;
}

@media (prefers-reduced-motion: reduce) {
	.thor-sc__panel,
	.thor-sc__backdrop {
		transition: none;
	}
}

/* Checkout order bump (includes/order-bump.php) */
.thor-bump {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 18px;
	padding: 14px 16px;
	border: 2px dashed var(--thor-accent);
	border-radius: 14px;
	background: var(--thor-sun-soft);
	cursor: pointer;
	transition: background-color .15s ease, opacity .15s ease;
}

.thor-bump.is-on {
	border-style: solid;
	background: var(--thor-sand);
}

.thor-bump.is-busy {
	opacity: .6;
	pointer-events: none;
}

.thor-bump input[type="checkbox"] {
	flex: none;
	width: 22px;
	height: 22px;
	margin: 0;
	accent-color: var(--thor-accent);
}

.thor-bump img {
	flex: none;
	width: 64px;
	height: 64px;
	border-radius: 10px;
	object-fit: cover;
}

.thor-bump__text {
	display: grid;
	gap: 3px;
	font-size: 14px;
	line-height: 1.4;
}

.thor-bump__text strong {
	color: var(--thor-ink);
	font-size: 15px;
}

.thor-bump__text del {
	color: var(--thor-muted);
	font-weight: 400;
}

.thor-bump__text span {
	color: var(--thor-muted);
}

/* Offers list and progress bar (includes/coupons.php) */
.thor-cp {
	margin-top: 20px;
}

.thor-cp--cart,
.thor-cp--checkout {
	margin: 0 0 18px;
}

.thor-cp__title {
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .02em;
}

.thor-cp__list {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.thor-cp__item {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 12px 14px;
	border: 1px dashed var(--thor-accent, #12805c);
	border-radius: 14px;
	background: var(--thor-sand, #dcefe4);
}

.thor-cp__item.is-locked {
	border-color: var(--thor-line, #dfdbcd);
	background: var(--thor-bg, #f7f5ee);
}

.thor-cp__icon {
	display: inline-flex;
	flex: none;
	color: var(--thor-accent, #12805c);
}

.thor-cp__icon .thor-icon {
	width: 22px;
	height: 22px;
}

.thor-cp__item.is-locked .thor-cp__icon {
	color: var(--thor-muted, #5d6a64);
}

.thor-cp__text {
	display: grid;
	flex: 1;
	gap: 2px;
	min-width: 0;
	font-size: 13px;
	line-height: 1.35;
}

.thor-cp__text strong {
	color: var(--thor-ink, #1d2b26);
	font-size: 14px;
}

.thor-cp__text span {
	color: var(--thor-muted, #5d6a64);
}

.thor-cp__text code {
	padding: 0;
	background: none;
	color: var(--thor-ink, #1d2b26);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
}

.thor-cp__apply {
	flex: none;
	min-width: 72px;
	height: 34px;
	margin: 0;
	padding: 0 14px;
	border: 0;
	border-radius: 9999px;
	background: var(--thor-accent, #12805c);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 34px;
	cursor: pointer;
}

.thor-cp__apply:hover {
	background: var(--thor-accent-dark, #0b6447);
}

.thor-cp__done,
.thor-cp__lock {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 4px;
	color: var(--thor-accent-dark, #0b6447);
	font-size: 13px;
	font-weight: 700;
}

.thor-cp__done .thor-icon {
	width: 16px;
	height: 16px;
}

.thor-cp__lock {
	color: var(--thor-muted, #5d6a64);
	font-weight: 600;
}

.thor-cp-bar {
	margin: 14px 0 4px;
	padding: 12px 14px;
	border-radius: 14px;
	background: var(--thor-sun-soft, #fff1c2);
	font-size: 14px;
}

.thor-cp-bar p {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	margin: 0 0 8px;
}

.thor-cp-bar.is-done {
	background: var(--thor-sand, #dcefe4);
}

.thor-cp-bar.is-done p {
	margin: 0;
	color: var(--thor-accent-dark, #0b6447);
}

.thor-cp-bar .thor-icon {
	width: 18px;
	height: 18px;
}

.thor-cp-bar__track {
	display: block;
	overflow: hidden;
	height: 8px;
	border-radius: 9999px;
	background: rgba(15, 46, 37, .1);
}

.thor-cp-bar__track span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--thor-accent, #12805c);
	transition: width .4s ease;
}

/* Coupon link message */
.thor-toast {
	position: fixed;
	left: 50%;
	bottom: calc(20px + env(safe-area-inset-bottom));
	z-index: 100002;
	max-width: min(92vw, 440px);
	padding: 12px 18px;
	border-radius: 14px;
	background: var(--thor-deep, #0f2e25);
	box-shadow: 0 12px 40px rgba(15, 46, 37, .25);
	color: #fff;
	font-family: var(--thor-sans, system-ui, sans-serif);
	font-size: 14px;
	font-weight: 500;
	opacity: 0;
	transform: translate(-50%, 12px);
	transition: opacity .25s ease, transform .25s ease;
}

.thor-toast.is-in {
	opacity: 1;
	transform: translate(-50%, 0);
}

.thor-toast.is-error {
	background: #9b2c1f;
}