/* Hoja «Elegir opciones» del botón de las tarjetas de la categoría (addons 1.1.480, WC_Orem_Cat_CTA).
 * Celular: hoja inferior. Escritorio: modal. Mismo lenguaje que el panel «Agregaste al carrito» (reco-panel.css),
 * para que el paso hoja → panel se lea como uno solo. El botón de la tarjeta va en línea en <head>
 * (WC_Orem_Cat_CTA::css_linea). Fuera de RUCSS por handle: el HTML anónimo no trae la hoja.
 * Toda regla que pone display lleva su guarda [hidden]. */

.orem-cat-hoja[hidden],
.orem-cat-hoja [hidden] { display: none !important; }

.orem-cat-hoja {
	position: fixed;
	inset: 0;
	z-index: 2147482000; /* el del panel: debajo del banner de consentimiento (2147483000) */
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: rgba( 20, 10, 14, .45 );
	font-family: "Prompt", system-ui, sans-serif;
	color: #2b2b2b;
}

.orem-cat-hoja__caja {
	position: relative;
	width: 100%;
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 16px 16px 0 0;
	box-shadow: 0 -8px 32px rgba( 0, 0, 0, .18 );
	outline: none;
	padding-bottom: env( safe-area-inset-bottom );
	animation: orem-och-sube .22s ease-out;
}

.orem-cat-hoja__cuerpo {
	overflow-y: auto;
	padding: 20px 16px 18px;
}

/* El tema pinta todo <button>: aquí se fija cada estado. */
#orem-cat-hoja .orem-cat-hoja__cerrar,
#orem-cat-hoja .orem-cat-hoja__cerrar:hover,
#orem-cat-hoja .orem-cat-hoja__cerrar:focus {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	font-size: 26px;
	line-height: 1;
	color: #555;
	cursor: pointer;
}

/* Foto y nombre (los pone el JS desde la tarjeta: salen al instante, antes de la respuesta). */
#orem-cat-hoja .och-cab { display: flex; gap: 12px; align-items: center; padding-right: 36px; margin: 0 0 12px; }
#orem-cat-hoja .och-cab__img img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; display: block; margin: 0; }
#orem-cat-hoja .och-cab__titulo { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; color: #2b2b2b; }

/* Cargando */
#orem-cat-hoja .och-cargando { margin: 0 0 6px; font-size: 12.5px; color: #7a6f6c; }
#orem-cat-hoja .och-esqueleto {
	height: 38px;
	margin: 8px 0;
	border-radius: 99px;
	background: linear-gradient( 90deg, #f4ece4 0%, #faf6f1 50%, #f4ece4 100% );
	background-size: 200% 100%;
	animation: orem-och-brillo 1.2s linear infinite;
}

/* Selector: el aspecto de .orc-* (reco-tarjetas.css), sin la caja de color de la tarjeta de complemento. */
#orem-cat-hoja .orc-caja.och-opc { margin: 0; padding: 0; background: none; border-radius: 0; }
#orem-cat-hoja .och-precio { margin: 0 0 12px; font-size: 17px; font-weight: 600; color: #4c1520; }
#orem-cat-hoja .och-precio del { margin-right: 6px; font-weight: 400; opacity: .6; }
#orem-cat-hoja .och-precio ins { text-decoration: none; }
#orem-cat-hoja .och-detalle { margin: 0 0 8px; font-size: 13px; color: #4c1520; }
#orem-cat-hoja .orc-pick.och-pick { margin: 0; padding: 0; border: 0; }
#orem-cat-hoja .orc-attr { margin: 0 0 12px; }
#orem-cat-hoja .orc-attr__nom { margin: 0 0 6px; font-size: 13px; color: #8a4a57; }
#orem-cat-hoja .orc-ops { gap: 8px; }
#orem-cat-hoja .orc-caja .orc-op,
#orem-cat-hoja .orc-caja .orc-op:hover,
#orem-cat-hoja .orc-caja .orc-op:focus { min-height: 42px; padding: 6px 14px; font-size: 13.5px; }
#orem-cat-hoja .orc-caja .orc-op--foto { padding-left: 5px; }
#orem-cat-hoja .orc-caja .orc-op img { width: 30px; height: 30px; }
#orem-cat-hoja .orc-caja .orc-op[aria-pressed="true"] { background: #4c1520; border-color: #4c1520; color: #f8f4ee; }
#orem-cat-hoja .orc-caja .orc-op:focus-visible,
#orem-cat-hoja .orc-caja .orc-confirmar:focus-visible { outline: 2px solid #4c1520; outline-offset: 2px; }

/* El mismo botón burdeos de la tarjeta. */
#orem-cat-hoja .orc-caja .orc-confirmar,
#orem-cat-hoja .orc-caja .orc-confirmar:hover,
#orem-cat-hoja .orc-caja .orc-confirmar:focus {
	min-height: 48px;
	margin-top: 14px;
	background: #6b1d33;
	color: #fff;
	font-size: 14.5px;
}
#orem-cat-hoja .orc-caja .orc-confirmar:hover { background: #4c1520; }
#orem-cat-hoja .orc-caja .orc-confirmar:disabled { background: #e8d5c4; color: #6e6461; opacity: 1; }

/* «Ponle un nombre» (el componente de la ficha, orem-perso.css) entre las opciones y el botón (1.1.488). */
#orem-cat-hoja .och-perso { margin: 4px 0 0; }
#orem-cat-hoja .och-perso[hidden] { display: none !important; }
#orem-cat-hoja .och-nota { margin: 10px 0 0; font-size: 12.5px; line-height: 1.4; color: #7a6f6c; }
#orem-cat-hoja .och-error { margin: 10px 0 0; font-size: 13px; line-height: 1.4; color: #8a2c3f; }
#orem-cat-hoja .och-detalles {
	display: block;
	margin: 14px 0 0;
	text-align: center;
	font-size: 13.5px;
	color: #6b1d33;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Mientras la hoja está abierta: sin desplazar la página detrás y sin el botón de WhatsApp encima. */
body.orem-cat-hoja-abierta { overflow: hidden; }
body.orem-cat-hoja-abierta .button-whatsapp,
body.orem-cat-hoja-abierta #cgkit-mobile-commercekit-sticky-atc { display: none !important; }

@media ( min-width: 768px ) {
	.orem-cat-hoja { align-items: center; }
	.orem-cat-hoja__caja {
		max-width: 480px;
		border-radius: 16px;
		animation-name: orem-och-aparece;
	}
	.orem-cat-hoja__cuerpo { padding: 24px 24px 22px; }
}

@keyframes orem-och-sube { from { transform: translateY( 24px ); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes orem-och-aparece { from { transform: scale( .97 ); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes orem-och-brillo { from { background-position: 100% 0; } to { background-position: -100% 0; } }

@media ( prefers-reduced-motion: reduce ) {
	.orem-cat-hoja__caja { animation: none; }
	#orem-cat-hoja .och-esqueleto { animation: none; }
}
