/* Widget Carrito para menú */
.meyerhof-menu-cart-widget {
	display: inline-block;
	line-height: 1;
}

.meyerhof-menu-cart__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	text-decoration: none;
	color: inherit;
	padding: 6px 4px;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.meyerhof-menu-cart__link:hover {
	opacity: 0.85;
}

.meyerhof-menu-cart__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.meyerhof-menu-cart__icon svg {
	display: block;
	vertical-align: middle;
}

.meyerhof-menu-cart__count {
	position: absolute;
	top: -2px;
	right: -2px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	border-radius: 9px;
	white-space: nowrap;
}

/* Barra lateral del carrito */
.meyerhof-cart-drawer {
	position: fixed;
	inset: 0;
	z-index: 999999999;
	visibility: hidden;
	opacity: 0;
	transition: visibility 0.3s ease, opacity 0.3s ease;
	pointer-events: none;
}

.meyerhof-cart-drawer.is-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.meyerhof-cart-drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	cursor: pointer;
}

.meyerhof-cart-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	width: 100%;
	max-width: 380px;
	height: 100%;
	background: #fff;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	overflow: hidden;
}

.meyerhof-cart-drawer.is-open .meyerhof-cart-drawer__panel {
	transform: translateX(0);
}

/* step1: ocupa el espacio restante y reparte entre lista (con scroll) y footer fijo */
.meyerhof-cart-drawer__step1 {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.meyerhof-cart-drawer__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px;
	border-bottom: 1px solid #eee;
	flex-shrink: 0;
}

.meyerhof-cart-drawer__title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
}

.meyerhof-cart-drawer__close {
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	color: #666;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: background 0.2s, color 0.2s;
}

.meyerhof-cart-drawer__close:hover {
	background: #f0f0f0;
	color: #333;
}

.meyerhof-cart-drawer__items {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 16px;
	-webkit-overflow-scrolling: touch;
}

.meyerhof-cart-drawer__item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid #eee;
}

.meyerhof-cart-drawer__item:last-child {
	border-bottom: none;
}

.meyerhof-cart-drawer__item-body {
	flex: 1;
	min-width: 0;
}

.meyerhof-cart-drawer__remove {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid #ddd;
	background: #fff;
	color: #888;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.meyerhof-cart-drawer__remove:hover {
	background: #fee;
	color: #c00;
	border-color: #fcc;
}

.meyerhof-cart-drawer__item-name {
	font-weight: 600;
	font-size: 1rem;
	color: inherit;
	text-decoration: none;
	display: block;
	margin-bottom: 4px;
}

.meyerhof-cart-drawer__item-name:hover {
	color: var(--e-global-color-primary, #71a100);
}

.meyerhof-cart-drawer__item-desc {
	margin: 0 0 6px;
	font-size: 0.875rem;
	color: #666;
	line-height: 1.4;
}

.meyerhof-cart-drawer__item-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 0.875rem;
}

.meyerhof-cart-drawer__item-price {
	font-weight: 600;
	color: var(--e-global-color-primary, #71a100);
}

.meyerhof-cart-drawer__item-price-unit {
	font-size: 0.8em;
	font-weight: 500;
	color: #888;
}

/* Contador de cantidad: botones + input */
.meyerhof-cart-drawer__item-qty {
	display: inline-flex;
	align-items: center;
	gap: 0;
	border: 1px solid #ddd;
	border-radius: 8px;
	background: #fafafa;
	overflow: hidden;
}

.meyerhof-cart-drawer__qty-btn {
	width: 32px;
	height: 32px;
	padding: 0;
	border: none;
	background: #fff;
	color: #555;
	font-size: 18px;
	line-height: 1;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, color 0.2s;
	flex-shrink: 0;
}

.meyerhof-cart-drawer__qty-btn:hover {
	background: var(--e-global-color-primary, #71a100);
	color: #fff;
}

.meyerhof-cart-drawer__qty-btn:active {
	background: #5a8500;
}

.meyerhof-cart-drawer__qty-input {
	width: 44px;
	height: 32px;
	padding: 0 4px;
	border: none;
	border-left: 1px solid #e0e0e0;
	border-right: 1px solid #e0e0e0;
	background: #fff;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	-moz-appearance: textfield;
	box-sizing: border-box;
}

.meyerhof-cart-drawer__qty-input::-webkit-outer-spin-button,
.meyerhof-cart-drawer__qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.meyerhof-cart-drawer__qty-input:focus {
	outline: none;
	background: #f9fdf5;
}

.meyerhof-cart-drawer__item-meta {
	flex-wrap: wrap;
}

.meyerhof-cart-drawer__item-meta .meyerhof-cart-drawer__item-qty {
	margin-top: 6px;
}

.meyerhof-cart-drawer__empty {
	padding: 24px 16px;
	text-align: center;
	color: #666;
	font-size: 0.95rem;
}

.meyerhof-cart-drawer__footer {
	padding: 20px;
	border-top: 1px solid #eee;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.meyerhof-cart-drawer__btn-cart,
.meyerhof-cart-drawer__btn-comprar-web,
.meyerhof-cart-drawer__btn-whatsapp,
.meyerhof-cart-drawer__btn-cotizacion {
	display: block;
	text-align: center;
	padding: 12px 20px;
	font-weight: 600;
	text-decoration: none;
	border-radius: 6px;
	transition: opacity 0.2s;
	border: none;
	cursor: pointer;
	font-size: 14px;
	font-family: inherit;
}

.meyerhof-cart-drawer__btn-cart {
	background: var(--e-global-color-primary, #71a100);
	color: #fff !important;
}

.meyerhof-cart-drawer__btn-cart:hover {
	opacity: 0.9;
	color: #fff;
}

.meyerhof-cart-drawer__btn-comprar-web {
	background: var(--e-global-color-primary, #71a100);
	color: #fff !important;
}

.meyerhof-cart-drawer__btn-comprar-web:hover {
	opacity: 0.9;
	color: #fff;
}

.meyerhof-cart-drawer__btn-whatsapp {
	background: #25d366;
	color: #fff;
}

.meyerhof-cart-drawer__btn-whatsapp:hover {
	opacity: 0.9;
}

.meyerhof-cart-drawer__btn-cotizacion {
	background: #333;
	color: #fff;
}

.meyerhof-cart-drawer__btn-cotizacion:hover {
	opacity: 0.9;
}

/* Paso 2: formulario cotización */
.meyerhof-cart-drawer__step2 {
	padding: 20px;
	flex: 1;
	overflow-y: auto;
}

.meyerhof-cart-drawer__form-title {
	margin: 0 0 16px;
	font-size: 1.1rem;
}

/* Honeypot: campo trampa anti-spam, oculto para usuarios reales */
.meyerhof-cart-drawer__form .meyerhof-cart-drawer__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	margin: 0;
	padding: 0;
	opacity: 0;
	pointer-events: none;
}

.meyerhof-cart-drawer__form p {
	margin: 0 0 14px;
}

.meyerhof-cart-drawer__form label {
	display: block;
	font-size: 0.9rem;
	font-weight: 500;
	margin-bottom: 4px;
}

.meyerhof-cart-drawer__form input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 14px;
	box-sizing: border-box;
}

.meyerhof-cart-drawer__btn-submit,
.meyerhof-cart-drawer__btn-back {
	display: block;
	width: 100%;
	padding: 12px 20px;
	margin-top: 8px;
	border: none;
	border-radius: 6px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	font-family: inherit;
}

.meyerhof-cart-drawer__btn-submit {
	background: var(--e-global-color-primary, #71a100);
	color: #fff;
	margin-top: 16px;
}

.meyerhof-cart-drawer__btn-back {
	background: #f0f0f0;
	color: #333;
}

.meyerhof-cart-drawer__form-message {
	margin-top: 12px;
	padding: 10px;
	border-radius: 6px;
	font-size: 0.9rem;
}

.meyerhof-cart-drawer__form-message.success {
	background: #e8f5e9;
	color: #2e7d32;
}

.meyerhof-cart-drawer__form-message.error {
	background: #ffebee;
	color: #c62828;
}

body.meyerhof-drawer-open {
	overflow: hidden;
}
