/* Mime Guru — aviso de cookies, WhatsApp e Instagram */

/* ----------------------------------------------------------- Cookies */
.mg-cookies {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 99990;
	width: min(420px, calc(100vw - 32px));
	opacity: 0;
	transform: translateY(24px);
	transition: opacity .3s ease, transform .4s cubic-bezier(.34, 1.56, .64, 1);
}
.mg-cookies.is-on { opacity: 1; transform: none; }
.mg-cookies[hidden] { display: none; }
.mg-cookies__main {
	background: #fff;
	border: 2.5px solid var(--mg-ink);
	border-radius: 22px;
	box-shadow: 0 6px 0 var(--mg-ink), 0 20px 50px #1f1b1d33;
	padding: 18px 18px 16px;
	color: var(--mg-ink);
}
.mg-cookies__title { margin: 0 0 6px; font-family: var(--mg-font-head); font-weight: 700; font-size: 1.1rem; }
.mg-cookies__text { margin: 0 0 12px; font-size: .9rem; line-height: 1.45; color: #2E2A2C; }
.mg-cookies__text a { color: var(--mg-pink-dark); font-weight: 700; }
.mg-cookies__prefs { display: grid; gap: 8px; margin: 0 0 12px; }
.mg-cookies__prefs[hidden] { display: none; }
.mg-cookies__opt {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 10px 12px;
	border-radius: 14px;
	background: var(--mg-paper);
	cursor: pointer;
	font-size: .9rem;
}
.mg-cookies__opt input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--mg-pink); flex-shrink: 0; }
.mg-cookies__opt strong { display: block; }
.mg-cookies__opt small { display: block; color: #5A5254; font-size: .8rem; }
.mg-cookies__opt.is-locked { opacity: .75; cursor: default; }
.mg-cookies__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mg-cookies__btn {
	flex: 1 1 auto;
	border: 2px solid var(--mg-ink);
	border-radius: 999px;
	padding: 10px 14px;
	font-family: var(--mg-font-head);
	font-weight: 600;
	font-size: .92rem;
	cursor: pointer;
	transition: background .2s, transform .15s;
}
.mg-cookies__btn[hidden] { display: none; }
.mg-cookies__btn:hover { transform: translateY(-1px); }
.mg-cookies__btn--ghost { background: #fff; color: var(--mg-ink); }
.mg-cookies__btn--ghost:hover { background: var(--mg-peach-soft); }
.mg-cookies__btn--pink { background: var(--mg-pink); color: #fff; box-shadow: 0 3px 0 var(--mg-ink); }
.mg-cookies__btn--pink:hover { background: var(--mg-pink-dark); }
.mg-footer__cookies { color: inherit; text-decoration: underline; }

/* ---------------------------------------------------------- WhatsApp */
.mg-wa {
	position: fixed;
	left: 18px;
	bottom: 18px;
	z-index: 9980;
	display: flex;
	align-items: center;
	height: 56px;
	padding: 0;
	border: 2.5px solid var(--mg-ink);
	border-radius: 999px;
	background: #25D366;
	color: #fff !important;
	text-decoration: none;
	box-shadow: 0 4px 0 var(--mg-ink);
	overflow: hidden;
	transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s, opacity .3s;
	animation: mg-wa-in .6s cubic-bezier(.34, 1.56, .64, 1) 1.2s backwards;
}
.mg-wa__icon { width: 51px; height: 51px; display: grid; place-items: center; flex-shrink: 0; }
.mg-wa__label {
	max-width: 0;
	white-space: nowrap;
	overflow: hidden;
	font-size: .92rem;
	transition: max-width .35s ease, padding .35s ease;
}
.mg-wa:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--mg-ink); }
.mg-wa:hover .mg-wa__label,
.mg-wa:focus-visible .mg-wa__label { max-width: 180px; padding-right: 18px; }
/* Mientras se muestra el aviso de cookies, el botón se aparta */
.mg-cookies-on .mg-wa { opacity: 0; pointer-events: none; }
/* Con la barra fija de compra (ficha), sube */
.mg-buybar-on .mg-wa { transform: translateY(-84px); }

/* Ficha: "Pregúntanos por WhatsApp" */
.mg-pdp-wa {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 18px;
	padding: 12px 14px;
	border: 2px solid #1fa855;
	border-radius: 18px;
	background: #EAFBF0;
	color: var(--mg-ink) !important;
	text-decoration: none;
	line-height: 1.25;
	transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), background .2s;
}
.mg-pdp-wa:hover { transform: translateY(-2px); background: #dcf7e6; }
.mg-pdp-wa__icon { width: 40px; height: 40px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.mg-pdp-wa strong { display: block; font-size: .95rem; }
.mg-pdp-wa small { display: block; font-size: .82rem; color: #5A5254; }
.mg-pdp-wa__go { margin-left: auto; font-weight: 800; font-size: 1.2rem; color: #1fa855; transition: transform .2s; }
.mg-pdp-wa:hover .mg-pdp-wa__go { transform: translateX(4px); }

/* ---------------------------------------------------------- Instagram */
.mg-ig__kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; font-weight: 800; color: var(--mg-pink-dark); }
.mg-ig__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.mg-ig__banner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	gap: clamp(18px, 3vw, 40px);
	align-items: center;
	padding: clamp(22px, 4vw, 44px);
	border: 3px solid var(--mg-ink);
	border-radius: 30px;
	box-shadow: 0 7px 0 var(--mg-ink);
	background: linear-gradient(125deg, #F9C6D7 0%, #F7C9B1 45%, #FBE6A2 100%);
	color: var(--mg-ink) !important;
	text-decoration: none;
	overflow: hidden;
	transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s;
}
.mg-ig__banner:hover { transform: translateY(-4px); box-shadow: 0 11px 0 var(--mg-ink); }
.mg-ig__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.mg-ig__copy .mg-ig__kicker { background: #fff; border: 2px solid var(--mg-ink); border-radius: 999px; padding: 4px 12px; margin: 0; color: var(--mg-ink); }
.mg-ig__title { font-family: var(--mg-font-head); font-weight: 700; font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.02; }
.mg-ig__text { font-size: 1.02rem; max-width: 30em; }
.mg-ig__copy .mg-btn { margin-top: 6px; }
.mg-ig__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; transform: rotate(3deg); }
.mg-ig__tile {
	display: block;
	aspect-ratio: 1;
	border-radius: 16px;
	overflow: hidden;
	border: 2.5px solid var(--mg-ink);
	background: #fff;
	box-shadow: 0 4px 0 var(--mg-ink);
	transform: rotate(calc((var(--i) - 2.5) * 1.6deg));
	transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.mg-ig__tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mg-ig__banner:hover .mg-ig__tile { transform: rotate(0) scale(1.03); }
.mg-ig__banner:hover .mg-ig__tile:nth-child(odd) { transform: rotate(-2deg) translateY(-4px) scale(1.04); }
.mg-ig__feed #sb_instagram { padding: 0 !important; }

@keyframes mg-wa-in { from { opacity: 0; transform: scale(.4) translateY(20px); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
	.mg-ig__banner { grid-template-columns: 1fr; }
	.mg-ig__head { flex-direction: column; align-items: flex-start; }
	.mg-wa { height: 52px; left: 14px; bottom: 14px; }
	.mg-wa__icon { width: 47px; height: 47px; }
	.mg-cookies { left: 10px; bottom: 10px; width: calc(100vw - 20px); }
	/* En el móvil la barra fija de compra ocupa el ancho: WhatsApp se esconde */
	.mg-buybar-on .mg-wa { opacity: 0; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) {
	.mg-cookies, .mg-wa, .mg-wa *, .mg-ig__banner, .mg-ig__tile, .mg-pdp-wa { animation: none !important; transition: none !important; }
}
