/**
 * Share — botón de compartir con menú desplegable.
 *
 * Se usa en la ficha de producto (bc-product__share). Dispara Web Share API
 * nativa si está disponible; en caso contrario abre un popover con enlaces
 * directos a WhatsApp, Facebook, X, Pinterest, email y copiar enlace.
 */

.bc-share { position: relative; display: inline-flex; }

.bc-share__trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.625rem 1rem;
	background: transparent;
	border: 1px solid var(--bc-border);
	color: var(--bc-text);
	font-family: var(--bc-font-sans);
	font-size: var(--bc-fs-sm);
	letter-spacing: 0.02em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color var(--bc-transition), border-color var(--bc-transition);
}

.bc-share__trigger:hover,
.bc-share__trigger:focus-visible {
	background: var(--bc-light-gray);
	border-color: var(--bc-text);
}

.bc-share__trigger svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.bc-share__menu {
	position: absolute;
	bottom: calc(100% + 0.5rem);
	left: 0;
	min-width: 220px;
	padding: 0.5rem;
	background: var(--bc-white, #fff);
	border: 1px solid var(--bc-border);
	box-shadow: 0 10px 30px rgba(26, 23, 20, 0.12);
	list-style: none;
	margin: 0;
	z-index: 20;
	opacity: 0;
	transform: translateY(4px);
	pointer-events: none;
	transition: opacity var(--bc-transition), transform var(--bc-transition);
}

.bc-share[data-open='true'] .bc-share__menu {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.bc-share__menu li { margin: 0; }

.bc-share__option {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	min-height: 44px;
	padding: 0.5rem 0.75rem;
	background: transparent;
	border: 0;
	color: var(--bc-text);
	font-family: var(--bc-font-sans);
	font-size: var(--bc-fs-sm);
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--bc-transition);
}

.bc-share__option:hover,
.bc-share__option:focus-visible {
	background: var(--bc-light-gray);
	outline: none;
}

.bc-share__option svg {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	color: var(--bc-text-muted);
}

.bc-share__option--copied {
	color: var(--bc-accent, #8B2E26);
}

@media (max-width: 480px) {
	.bc-share__menu {
		left: auto;
		right: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bc-share__menu,
	.bc-share__trigger { transition: none; }
}
