/* Imprima Mobile: vale só até 767px (breakpoint mobile do Elementor). */

.imm { display: none; }

@media (max-width: 767px) {

	.imm {
		--imm-bg: #F9F7F2;
		--imm-surface: #FFFFFF;
		--imm-text: #333333;
		--imm-muted: #99968F;
		--imm-line: #E7E3DA;
		--imm-accent: #0CB69C;
		--imm-accent-dark: #0C8B78;
		--imm-header-h: 60px;
		display: block;
		font-family: "Urbanist", sans-serif;
		color: var(--imm-text);
	}

	/* O cabeçalho do Elementor sai no mobile só quando o plugin está ativo nesta página. */
	body.imm-active .elementor-location-header { display: none !important; }

	body.imm-lock { overflow: hidden; }
	/* O balão do chat da Brevo (z-index 9999) ficaria por cima do menu e da busca. */
	body.imm-lock #brevo-conversations { display: none !important; }

	.imm *, .imm *::before, .imm *::after { box-sizing: border-box; }

	.imm button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-transform: none; letter-spacing: normal; border-radius: 0; box-shadow: none; }
	.imm button:hover, .imm button:focus { background: none; color: inherit; }
	.imm a { color: inherit; text-decoration: none; }

	/* Barra de anúncio */
	.imm .imm-bar {
		padding: 7px 16px;
		font-size: 13px;
		line-height: 1.35;
		text-align: center;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.imm .imm-bar strong { font-weight: 700; }

	/* Cabeçalho em uma linha */
	.imm-header {
		position: sticky;
		top: 0;
		z-index: 9990;
		display: flex;
		align-items: center;
		gap: 4px;
		height: var(--imm-header-h);
		padding: 0 8px;
		background: var(--imm-bg);
		border-bottom: 1px solid var(--imm-line);
	}
	/* Entre 601 e 767px a barra de admin do WP fica fixa (46px); abaixo disso ela rola junto. */
	@media (min-width: 601px) { .admin-bar .imm-header { top: 46px; } }

	.imm .imm-icon-btn {
		position: relative;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		flex: 0 0 44px;
		color: var(--imm-text);
		border-radius: 50%;
		-webkit-tap-highlight-color: transparent;
	}
	.imm .imm-icon-btn:active { background: rgba(0, 0, 0, .05); }
	.imm .imm-icon-btn:focus-visible,
	.imm .imm-list__link:focus-visible,
	.imm .imm-panel__back:focus-visible,
	.imm .imm-search__close:focus-visible { outline: 2px solid var(--imm-accent); outline-offset: 2px; }
	.imm-ico { width: 24px; height: 24px; display: block; }

	.imm .imm-logo { display: flex; align-items: center; height: 100%; padding: 0 4px; }
	.imm-start { display: flex; align-items: center; }

	/* Logo à esquerda: Menu | Logo ......... Busca Conta Carrinho */
	.imm-header--left .imm-logo { margin-right: auto; }

	/* Logo centralizado: colunas laterais iguais mantêm o logo no centro exato da tela */
	.imm .imm-header--center { display: grid; grid-template-columns: 1fr auto 1fr; }
	.imm-header--center .imm-start { justify-self: start; }
	.imm-header--center .imm-logo { justify-self: center; }
	.imm-header--center .imm-actions { justify-self: end; }
	/* Templates de página (ex.: carrinho) aplicam regras próprias em img; aqui o tamanho é fixo. */
	.imm .imm-logo .imm-logo-img { display: block; height: 42px !important; width: auto !important; max-width: 140px !important; max-height: 42px; margin: 0; object-fit: contain; }
	.imm-logo-text { font-weight: 700; font-size: 20px; }

	.imm-actions { display: flex; align-items: center; gap: 0; }

	.imm .imm-cart-count {
		position: absolute;
		top: 4px;
		right: 2px;
		min-width: 18px;
		height: 18px;
		padding: 0 5px;
		border-radius: 9px;
		background: var(--imm-accent);
		color: #fff;
		font-size: 11px;
		font-weight: 700;
		line-height: 18px;
		text-align: center;
	}
	.imm .imm-cart-count.is-empty { display: none; }

	/* Overlay */
	.imm-overlay {
		position: fixed;
		inset: 0;
		z-index: 9995;
		background: rgba(30, 28, 25, .45);
		opacity: 0;
		transition: opacity .25s ease;
	}
	.imm-overlay.is-visible { opacity: 1; }

	/* Gaveta lateral (menu) */
	.imm-drawer {
		position: fixed;
		top: 0;
		bottom: 0;
		z-index: 9996;
		display: flex;
		flex-direction: column;
		width: min(86vw, 360px);
		background: var(--imm-surface);
		box-shadow: 0 0 24px rgba(0, 0, 0, .15);
		visibility: hidden;
		transition: transform .28s ease, visibility 0s linear .28s;
	}
	.imm-drawer--left { left: 0; transform: translateX(-100%); }
	.imm-drawer--right { right: 0; transform: translateX(100%); width: min(92vw, 400px); }
	.imm-drawer.is-open { transform: none; visibility: visible; transition: transform .28s ease; }

	.imm-drawer__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: var(--imm-header-h);
		padding: 0 8px 0 20px;
		border-bottom: 1px solid var(--imm-line);
		flex: 0 0 auto;
	}
	.imm-drawer__title { font-size: 18px; font-weight: 700; }

	.imm-panels { position: relative; flex: 1 1 auto; overflow: hidden; }
	.imm-panel {
		position: absolute;
		inset: 0;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		background: var(--imm-surface);
		transform: translateX(100%);
		transition: transform .25s ease;
	}
	.imm-panel.is-current { transform: none; }
	.imm-panel.is-behind { transform: translateX(-30%); }
	.imm-panel[hidden] { display: block; visibility: hidden; }

	.imm .imm-panel__back {
		display: flex;
		align-items: center;
		gap: 6px;
		width: 100%;
		padding: 14px 20px 6px 14px;
		font-size: 15px;
		color: var(--imm-muted);
	}
	.imm .imm-panel__back .imm-ico { width: 20px; height: 20px; }
	.imm .imm-panel__title { margin: 0; padding: 4px 20px 12px; font-size: 20px; font-weight: 700; border-bottom: 1px solid var(--imm-line); }

	.imm-list { list-style: none; margin: 0; padding: 0; }
	.imm-list li { margin: 0; border-bottom: 1px solid var(--imm-line); }
	.imm .imm-list__link {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		width: 100%;
		min-height: 54px;
		padding: 12px 16px 12px 20px;
		font-size: 17px;
		font-weight: 500;
		line-height: 1.3;
		text-align: left;
		color: var(--imm-text);
	}
	.imm .imm-list__link:active { background: #F2EFEA; }
	.imm .imm-list__link .imm-ico { width: 20px; height: 20px; flex: 0 0 20px; color: var(--imm-muted); }
	.imm .imm-list__link--all { font-weight: 700; color: var(--imm-accent-dark); }

	.imm-drawer__foot {
		flex: 0 0 auto;
		padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
		background: #F2EFEA;
		border-top: 1px solid var(--imm-line);
	}
	.imm .imm-drawer__foot a { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 20px; font-size: 16px; }
	.imm-drawer__foot .imm-ico { width: 20px; height: 20px; }

	/* Tela de busca */
	.imm-search {
		position: fixed;
		inset: 0;
		z-index: 9997;
		display: flex;
		flex-direction: column;
		background: var(--imm-surface);
		visibility: hidden;
		opacity: 0;
		transform: translateY(-8px);
		transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
	}
	.imm-search.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .2s ease, transform .2s ease; }

	.imm-search__form {
		display: flex;
		align-items: center;
		gap: 10px;
		margin: 12px 16px 0;
		padding: 0 0 0 4px;
		border-bottom: 2px solid var(--imm-text);
		flex: 0 0 auto;
	}
	.imm-search__form .imm-ico { color: var(--imm-muted); flex: 0 0 24px; }
	.imm .imm-search__input {
		flex: 1 1 auto;
		min-width: 0;
		height: 52px;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
		font: inherit;
		font-size: 17px; /* >= 16px evita o zoom automático do iOS */
		color: var(--imm-text);
		outline: none;
	}
	.imm-search__input::-webkit-search-cancel-button { -webkit-appearance: none; }
	.imm .imm-search__close { padding: 8px 4px; font-size: 16px; font-weight: 600; }
	.imm-search__body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 20px 0 calc(24px + env(safe-area-inset-bottom)); }
	.imm-suggest[hidden], .imm-showcase[hidden] { display: none; }

	/* Vitrine */
	.imm .imm-sc-title { margin: 0 0 12px; padding: 0 16px; font-family: "Urbanist", sans-serif; font-size: 20px; font-weight: 700; line-height: 1.2; color: var(--imm-text); }
	.imm-sc-terms { margin-bottom: 24px; }
	.imm-chips { display: flex; gap: 8px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
	.imm-chips::-webkit-scrollbar { display: none; }
	.imm .imm-chip { flex: 0 0 auto; padding: 8px 14px; border: 1px solid var(--imm-line); border-radius: 999px; background: var(--imm-bg); font-size: 15px; white-space: nowrap; }

	.imm .imm-sc-track {
		display: flex;
		gap: 12px;
		margin: 0;
		padding: 0 16px 4px;
		list-style: none;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding: 0 16px;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	.imm .imm-sc-track::-webkit-scrollbar { display: none; }
	.imm .imm-sc-card { flex: 0 0 44%; max-width: 180px; margin: 0; scroll-snap-align: start; }
	.imm .imm-sc-card a { display: flex; flex-direction: column; gap: 6px; }
	.imm .imm-sc-img { display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 10px; background: #F2EFEA; }
	.imm .imm-sc-img img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }
	.imm .imm-sc-name {
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
		font-size: 15px;
		font-weight: 600;
		line-height: 1.3;
		color: var(--imm-text);
	}
	.imm .imm-sc-price { font-size: 14px; line-height: 1.3; color: var(--imm-text); }
	.imm .imm-sc-price del { color: var(--imm-muted); margin-right: 4px; }
	.imm .imm-sc-price ins { text-decoration: none; font-weight: 700; }

	.imm-sc-loading { display: flex; gap: 12px; padding: 0 16px; }
	.imm-sc-loading span { flex: 0 0 44%; aspect-ratio: 1 / 1.35; border-radius: 10px; background: linear-gradient(90deg, #F2EFEA 25%, #F9F7F2 50%, #F2EFEA 75%); background-size: 200% 100%; animation: imm-shimmer 1.2s infinite; }
	@keyframes imm-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

	/* Sugestões enquanto digita */
	.imm .imm-suggest__list { list-style: none; margin: 0; padding: 0; }
	.imm .imm-suggest__list li { margin: 0; border-bottom: 1px solid var(--imm-line); }
	.imm .imm-suggest__item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
	.imm .imm-suggest__img { flex: 0 0 56px; width: 56px; height: 56px; overflow: hidden; border-radius: 8px; background: #F2EFEA; }
	.imm .imm-suggest__img img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }
	.imm .imm-suggest__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
	.imm .imm-suggest__name { font-size: 15px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
	.imm .imm-suggest__price { font-size: 14px; color: var(--imm-muted); }
	.imm .imm-suggest__empty { margin: 0; padding: 8px 16px 16px; font-size: 15px; color: var(--imm-muted); }
	.imm .imm-suggest__all { display: block; margin: 16px 16px 0; padding: 14px; border-radius: 999px; background: var(--imm-accent); color: #fff; font-size: 16px; font-weight: 700; text-align: center; }
	.imm-suggest[aria-busy="true"] { opacity: .6; }

	/* Botões */
	.imm .imm-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 999px; font-size: 16px; font-weight: 700; text-align: center; text-transform: none; }
	.imm .imm-btn--primary { background: var(--imm-accent); color: #fff; }
	.imm .imm-btn--primary:active { background: var(--imm-accent-dark); }
	.imm .imm-btn--ghost { margin-top: 8px; border: 1px solid var(--imm-line); background: transparent; color: var(--imm-text); }

	/* Gaveta do carrinho */
	.imm-cart-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
	.imm-cart-skeleton { padding: 16px; }
	.imm-cart-skeleton span { display: block; height: 88px; margin-bottom: 12px; border-radius: 10px; background: linear-gradient(90deg, #F2EFEA 25%, #F9F7F2 50%, #F2EFEA 75%); background-size: 200% 100%; animation: imm-shimmer 1.2s infinite; }

	.imm .imm-cart-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 24px; text-align: center; color: var(--imm-muted); }
	.imm .imm-cart-empty .imm-ico { width: 48px; height: 48px; }
	.imm .imm-cart-empty p { margin: 0 0 8px; font-size: 17px; color: var(--imm-text); }

	.imm .imm-cart-notice { margin: 12px 16px 0; padding: 10px 12px; border-radius: 8px; background: #FDECEA; color: #A5483D; font-size: 14px; }
	.imm .imm-cart-notice[hidden] { display: none; }

	.imm .imm-cart-items { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; list-style: none; margin: 0; padding: 0 16px; }
	.imm .imm-cart-item { display: flex; gap: 12px; margin: 0; padding: 16px 0; border-bottom: 1px solid var(--imm-line); transition: opacity .2s; }
	.imm .imm-cart-item.is-busy { opacity: .45; pointer-events: none; }
	.imm .imm-cart-item__img { flex: 0 0 76px; width: 76px; height: 76px; overflow: hidden; border-radius: 10px; background: #F2EFEA; }
	.imm .imm-cart-item__img img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }
	.imm .imm-cart-item__info { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-width: 0; }
	.imm .imm-cart-item__top { display: flex; align-items: flex-start; gap: 8px; }
	.imm .imm-cart-item__name { flex: 1 1 auto; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--imm-text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
	.imm .imm-cart-item__remove { flex: 0 0 32px; width: 32px; height: 32px; margin: -6px -6px 0 0; display: inline-flex; align-items: center; justify-content: center; color: var(--imm-muted); }
	.imm .imm-cart-item__remove .imm-ico { width: 20px; height: 20px; }
	.imm .imm-cart-item__meta { font-size: 13px; line-height: 1.35; color: var(--imm-muted); }
	.imm .imm-cart-item__bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
	.imm .imm-cart-item__prices { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
	.imm .imm-cart-item__total { font-size: 16px; font-weight: 700; }
	.imm .imm-cart-item__unit { font-size: 12px; color: var(--imm-muted); }
	.imm .imm-cart-item__qty-fixed { font-size: 14px; color: var(--imm-muted); }

	.imm .imm-stepper { display: inline-flex; align-items: center; height: 36px; border: 1px solid var(--imm-line); border-radius: 999px; overflow: hidden; }
	.imm .imm-stepper button { width: 36px; height: 36px; font-size: 18px; line-height: 1; color: var(--imm-text); }
	.imm .imm-stepper button:disabled { color: #CFCAC0; cursor: default; }
	.imm .imm-stepper__value { min-width: 32px; font-size: 15px; font-weight: 700; text-align: center; }

	.imm .imm-cart-foot { flex: 0 0 auto; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--imm-line); background: var(--imm-surface); box-shadow: 0 -6px 16px rgba(0, 0, 0, .04); }
	.imm .imm-cart-subtotal { display: flex; align-items: baseline; justify-content: space-between; font-size: 16px; }
	.imm .imm-cart-subtotal strong { font-size: 20px; }
	.imm .imm-cart-hint { margin: 4px 0 12px; font-size: 13px; line-height: 1.35; color: var(--imm-muted); }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
	.imm-drawer, .imm-panel, .imm-search, .imm-overlay { transition: none !important; }
	.imm-sc-loading span, .imm-cart-skeleton span { animation: none; }
}
