/* Mesato — Encomendas (carrinho + botões). Namespaced mst-, glassmorphism. */

:root {
	--mst-brand: #B0703E;
	--mst-brand-dark: #8a5630;
	--mst-ink: #2c2420;
	--mst-line: rgba(120, 90, 60, .18);
	--mst-glass: rgba(255, 255, 255, .72);
}

/* ---- Botão "Adicionar" no cartão ---- */
.mst-cta {
	margin-top: 12px;
}
.mst-add {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font: 600 14px/1 Inter, system-ui, -apple-system, sans-serif;
	color: #fff;
	background: var(--mst-brand);
	border: 0;
	border-radius: 11px;
	padding: 10px 16px;
	cursor: pointer;
	transition: background .18s ease, transform .12s ease;
}
.mst-add:hover { background: var(--mst-brand-dark); }
.mst-add:active { transform: scale(.97); }
.mst-add .mst-ic { width: 17px; height: 17px; }
.mst-add.is-added { background: #2f8f5b; }

/* ---- Botão flutuante do carrinho ---- */
.mst-cart-fab {
	position: fixed;
	right: 22px;
	bottom: 22px;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	border: 0;
	background: var(--mst-brand);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 12px 30px rgba(60, 40, 25, .32);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	transition: transform .15s ease, background .18s ease;
}
.mst-cart-fab:hover { background: var(--mst-brand-dark); transform: translateY(-2px); }
.mst-cart-fab svg { width: 24px; height: 24px; }
.mst-cart-count {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 11px;
	background: #2c2420;
	color: #fff;
	font: 700 12px/22px Inter, system-ui, sans-serif;
	text-align: center;
	box-shadow: 0 0 0 2px #fff;
}

/* ---- Overlay + drawer ---- */
.mst-cart-overlay {
	position: fixed;
	inset: 0;
	background: rgba(28, 20, 14, .42);
	backdrop-filter: blur(2px);
	z-index: 100001;
}
.mst-cart-drawer {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: min(420px, 92vw);
	background: var(--mst-glass);
	backdrop-filter: blur(18px) saturate(1.4);
	-webkit-backdrop-filter: blur(18px) saturate(1.4);
	border-left: 1px solid var(--mst-line);
	box-shadow: -24px 0 60px rgba(60, 40, 25, .22);
	transform: translateX(100%);
	transition: transform .28s cubic-bezier(.4, 0, .2, 1);
	z-index: 100002;
	display: flex;
	flex-direction: column;
	font-family: Inter, system-ui, -apple-system, sans-serif;
	color: var(--mst-ink);
}
.mst-cart-drawer.is-open { transform: translateX(0); }
.mst-cart-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 22px;
	border-bottom: 1px solid var(--mst-line);
}
.mst-cart-head h3 {
	margin: 0;
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 26px;
	font-weight: 700;
}
.mst-cart-close {
	background: none;
	border: 0;
	font-size: 28px;
	line-height: 1;
	color: var(--mst-ink);
	cursor: pointer;
	opacity: .6;
}
.mst-cart-close:hover { opacity: 1; }
.mst-cart-body {
	flex: 1;
	overflow-y: auto;
	padding: 14px 18px;
}
.mst-cart-empty {
	text-align: center;
	color: #8a8079;
	padding: 48px 12px;
	font-size: 15px;
}

/* ---- Linha do carrinho ---- */
.mst-ci {
	display: grid;
	grid-template-columns: 52px 1fr auto;
	gap: 12px;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid var(--mst-line);
}
.mst-ci-thumb img {
	width: 52px;
	height: 52px;
	object-fit: cover;
	border-radius: 10px;
	display: block;
}
.mst-ci-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mst-ci-name { font-weight: 600; font-size: 14.5px; }
.mst-ci-price { color: var(--mst-brand-dark); font-size: 13.5px; font-weight: 600; }
.mst-ci-qty { display: inline-flex; align-items: center; gap: 4px; }
.mst-ci-qty button {
	width: 26px;
	height: 26px;
	border: 1px solid var(--mst-line);
	background: #fff;
	border-radius: 8px;
	cursor: pointer;
	font-size: 15px;
	line-height: 1;
	color: var(--mst-ink);
}
.mst-ci-qty button:hover { border-color: var(--mst-brand); color: var(--mst-brand-dark); }
.mst-ci-n { min-width: 20px; text-align: center; font-weight: 600; font-size: 14px; }
.mst-ci-rm { margin-left: 4px; opacity: .55; }
.mst-ci-rm:hover { opacity: 1; color: #b3261e !important; border-color: #b3261e !important; }

/* ---- Rodapé ---- */
.mst-cart-foot {
	border-top: 1px solid var(--mst-line);
	padding: 18px 22px calc(18px + env(safe-area-inset-bottom));
	background: rgba(255, 255, 255, .55);
}
.mst-cart-subtotal {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 14px;
	font-size: 15px;
}
.mst-cart-subtotal strong { font-size: 20px; font-family: 'Cormorant Garamond', Georgia, serif; }
.mst-cart-checkout {
	display: block;
	text-align: center;
	background: var(--mst-brand);
	color: #fff !important;
	text-decoration: none;
	font-weight: 600;
	font-size: 15.5px;
	padding: 14px;
	border-radius: 12px;
	transition: background .18s ease;
}
.mst-cart-checkout:hover { background: var(--mst-brand-dark); }

/* ---- Contexto de encomenda no checkout ---- */
.mst-order-context {
	background: var(--mst-glass);
	border: 1px solid var(--mst-line);
	border-radius: 16px;
	padding: 20px 22px;
	margin: 0 0 26px;
}
.mst-oc-title {
	margin: 0 0 14px;
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 22px;
}
.mst-oc-types { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.mst-oc-type {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 1px solid var(--mst-line);
	border-radius: 11px;
	padding: 10px 14px;
	cursor: pointer;
	font-size: 14.5px;
	background: #fff;
}
.mst-oc-type:has(input:checked) {
	border-color: var(--mst-brand);
	background: color-mix( in srgb, var(--mst-brand) 8%, transparent );
	box-shadow: 0 0 0 1px var(--mst-brand) inset;
}
.mst-oc-field { margin: 0 0 14px; }
.mst-oc-field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.mst-oc-field input {
	width: 100%;
	padding: 14px 16px;
	min-height: 52px;
	border: 1px solid var(--mst-line);
	border-radius: 12px;
	font-size: 16px;
	box-sizing: border-box;
}
.mst-oc-field input:focus {
	outline: none;
	border-color: var(--mst-brand);
	box-shadow: 0 0 0 3px color-mix( in srgb, var(--mst-brand) 22%, transparent );
}
.mst-oc-addr-note { font-size: 13.5px; color: #8a5630; }

@media (max-width: 600px) {
	.mst-cart-fab { right: 16px; bottom: 16px; }
}
