/* Slide-out mini cart */
.sri-mcart {
	position: fixed;
	inset: 0;
	z-index: 100060;
	pointer-events: none;
}

.sri-mcart.is-open {
	pointer-events: auto;
}

.sri-mcart[hidden] {
	display: none !important;
}

.sri-mcart__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 20, 14, 0.55);
	opacity: 0;
	transition: opacity 0.28s ease;
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}

.sri-mcart.is-open .sri-mcart__backdrop {
	opacity: 1;
}

.sri-mcart__panel {
	position: absolute;
	top: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	width: min(400px, 100%);
	height: 100%;
	max-height: 100dvh;
	background: #fbfaf6;
	box-shadow: -16px 0 48px rgba(0, 0, 0, 0.22);
	transform: translateX(104%);
	transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
	box-sizing: border-box;
}

.sri-mcart.is-open .sri-mcart__panel {
	transform: translateX(0);
}

.sri-mcart__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 1rem 1.1rem;
	border-bottom: 1px solid rgba(18, 59, 42, 0.1);
	background: #fff;
	flex-shrink: 0;
}

.sri-mcart__title {
	margin: 0;
	font-family: var(--sri-serif, "Cormorant Garamond", serif);
	font-size: 1.35rem;
	font-weight: 700;
	color: #123b2a;
}

.sri-mcart__close {
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 999px;
	background: #eef3ec;
	color: #123b2a;
	font-size: 1.45rem;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.sri-mcart__close:hover {
	background: #123b2a;
	color: #fff;
}

.sri-mcart__toast {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0.75rem 1rem 0;
	padding: 0.65rem 0.85rem;
	border-radius: 12px;
	background: #e7f3ea;
	border: 1px solid rgba(49, 92, 69, 0.25);
	color: #123b2a;
	font-size: 0.86rem;
	font-weight: 700;
	flex-shrink: 0;
}

.sri-mcart__toast[hidden] {
	display: none !important;
}

.sri-mcart__toast i {
	color: #315c45;
}

.sri-mcart__body {
	flex: 1 1 auto;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 0.85rem 1rem 1rem;
}

.sri-mcart__empty {
	text-align: center;
	padding: 2.5rem 1rem;
	color: #5a655c;
}

.sri-mcart__empty i {
	display: block;
	margin: 0 auto 0.75rem;
	font-size: 1.75rem;
	color: #b89555;
}

.sri-mcart__empty p {
	margin: 0 0 1rem;
	font-weight: 600;
}

.sri-mcart__shop {
	display: inline-flex;
	padding: 0.65rem 1.2rem;
	border-radius: 999px;
	background: #123b2a;
	color: #fff;
	text-decoration: none;
	font-weight: 700;
	font-size: 0.88rem;
}

.sri-mcart__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.sri-mcart__item {
	display: grid;
	grid-template-columns: 72px 1fr auto;
	gap: 0.7rem;
	align-items: center;
	padding: 0.7rem;
	border-radius: 14px;
	background: #fff;
	border: 1px solid rgba(18, 59, 42, 0.08);
	box-shadow: 0 6px 16px rgba(18, 59, 42, 0.04);
}

.sri-mcart__thumb {
	display: block;
	width: 72px;
	height: 72px;
	border-radius: 12px;
	overflow: hidden;
	background: #eef3ec;
}

.sri-mcart__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 4px;
	box-sizing: border-box;
}

.sri-mcart__meta {
	min-width: 0;
}

.sri-mcart__name {
	display: block;
	margin: 0 0 0.35rem;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.3;
	color: #123b2a;
	text-decoration: none;
	overflow-wrap: break-word;
}

.sri-mcart__name:hover {
	color: #315c45;
}

.sri-mcart__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.45rem 0.65rem;
	font-size: 0.8rem;
}

.sri-mcart__qtybox {
	display: inline-flex;
	align-items: center;
	gap: 0;
	border: 1px solid rgba(18, 59, 42, 0.14);
	border-radius: 999px;
	background: #f7f4ec;
	overflow: hidden;
	height: 32px;
}

.sri-mcart__qty-btn {
	width: 30px;
	height: 32px;
	border: 0;
	background: transparent;
	color: #123b2a;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.sri-mcart__qty-btn:hover {
	background: rgba(18, 59, 42, 0.08);
	color: #315c45;
}

.sri-mcart__qty-input {
	width: 2.1rem;
	height: 32px;
	border: 0;
	border-left: 1px solid rgba(18, 59, 42, 0.1);
	border-right: 1px solid rgba(18, 59, 42, 0.1);
	background: #fff;
	text-align: center;
	font-size: 0.82rem;
	font-weight: 700;
	color: #123b2a;
	padding: 0;
	-moz-appearance: textfield;
	appearance: textfield;
}

.sri-mcart__qty-input::-webkit-outer-spin-button,
.sri-mcart__qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.sri-mcart__line {
	font-weight: 800;
	color: #123b2a;
	white-space: nowrap;
}

.sri-mcart__remove {
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 999px;
	background: #f4eee4;
	color: #8a5a2b;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.sri-mcart__remove:hover {
	background: #123b2a;
	color: #fff;
}

.sri-mcart__footer {
	flex-shrink: 0;
	padding: 1rem 1.1rem calc(1rem + env(safe-area-inset-bottom));
	border-top: 1px solid rgba(18, 59, 42, 0.1);
	background: #fff;
}

.sri-mcart__footer[hidden] {
	display: none !important;
}

.sri-mcart__subtotal {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.35rem;
	font-size: 0.95rem;
	color: #315c45;
	font-weight: 600;
}

.sri-mcart__subtotal strong {
	font-size: 1.2rem;
	font-weight: 800;
	color: #123b2a;
}

.sri-mcart__note {
	margin: 0 0 0.85rem;
	font-size: 0.74rem;
	color: #7a857e;
}

.sri-mcart__checkout {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	margin-bottom: 0.55rem;
	border-radius: 999px;
	background: #123b2a;
	color: #fff !important;
	text-decoration: none;
	font-weight: 700;
	font-size: 0.95rem;
	border: 1px solid #b89555;
	box-sizing: border-box;
}

.sri-mcart__checkout:hover {
	background: #315c45;
	color: #fff !important;
}

.sri-mcart__view {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 42px;
	border-radius: 999px;
	background: transparent;
	color: #123b2a;
	text-decoration: none;
	font-weight: 700;
	font-size: 0.88rem;
	border: 1px solid rgba(184, 149, 85, 0.55);
	box-sizing: border-box;
}

.sri-mcart__view:hover {
	background: rgba(184, 149, 85, 0.12);
}

body.sri-mcart-open {
	overflow: hidden;
}

@media (max-width: 480px) {
	.sri-mcart__panel {
		width: 100%;
	}

	.sri-mcart__item {
		grid-template-columns: 64px 1fr auto;
	}

	.sri-mcart__thumb {
		width: 64px;
		height: 64px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sri-mcart__backdrop,
	.sri-mcart__panel {
		transition: none;
	}
}
