/* ==========================================================================
   Colihue Aventura – Productos que se venden por WhatsApp
   Carga en todo el sitio: el botón y el precio en dólares aparecen también en
   la tienda, en las categorías y en los relacionados.
   ========================================================================== */
:root { --ca-radio-chico: 12px; --ca-display: "Oswald", "Arial Narrow", sans-serif; --ca-texto: "Krona One", Arial, sans-serif; }

/* --------------------------------------------------------------------------
   11. Producto que se vende por WhatsApp (tipo Externo/Afiliado)
   -------------------------------------------------------------------------- */
/* Aviso y botón: dos piezas separadas, una al lado de la otra, como el boceto.
   El aviso es un recuadro claro con barra naranja; el botón va suelto. */
.product-type-external form.cart {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin: 14px 0 0;
	padding: 0;
	background: transparent;
	box-shadow: none;
}
.ca-aviso-whatsapp {
	flex: 1 1 250px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	margin: 0;
	padding: 12px 16px 12px 14px;
	border-radius: 6px;
	border-left: 4px solid #ff6d00;
	background: #f2f2f2;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
	font-family: var(--ca-display);
	line-height: 1.2;
}
.ca-aviso-whatsapp strong {
	font-weight: 600;
	font-size: 13.5px;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: #1a1a1a;
}
.ca-aviso-whatsapp em {
	font-style: normal;
	font-weight: 400;
	font-size: 11.5px;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: #8a8a8a;
}

/* Botón de WhatsApp, en la ficha y en los listados. */
.woocommerce .ca-btn-whatsapp,
.woocommerce div.product .ca-pdp button.ca-btn-whatsapp,
.woocommerce a.button.ca-btn-whatsapp {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 52px;
	padding: 12px 24px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: #111111 !important;
	color: #ffffff !important;
	font-family: var(--ca-display) !important;
	font-weight: 600 !important;
	font-size: 17px !important;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none !important;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
	transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.woocommerce .ca-btn-whatsapp::before {
	content: "";
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M12.04 2C6.58 2 2.13 6.45 2.13 11.91c0 1.75.46 3.45 1.32 4.95L2 22l5.25-1.38a9.9 9.9 0 0 0 4.79 1.22h.01c5.46 0 9.91-4.45 9.91-9.91 0-2.65-1.03-5.14-2.9-7.01A9.82 9.82 0 0 0 12.04 2zm0 18.15h-.01a8.2 8.2 0 0 1-4.19-1.15l-.3-.18-3.12.82.83-3.04-.2-.31a8.23 8.23 0 0 1-1.26-4.38c0-4.54 3.7-8.23 8.25-8.23 2.2 0 4.27.86 5.83 2.41a8.19 8.19 0 0 1 2.41 5.83c0 4.54-3.7 8.23-8.24 8.23zm4.52-6.16c-.25-.12-1.47-.72-1.69-.81-.23-.08-.39-.12-.56.13-.16.25-.64.8-.79.97-.14.16-.29.19-.54.06-.25-.12-1.05-.39-1.99-1.23-.74-.66-1.23-1.47-1.38-1.72-.14-.25-.01-.38.11-.5.11-.11.25-.29.37-.43.12-.15.16-.25.25-.41.08-.17.04-.31-.02-.43-.06-.12-.56-1.34-.76-1.84-.2-.48-.4-.42-.56-.43h-.47c-.17 0-.43.06-.66.31-.23.25-.86.85-.86 2.07 0 1.22.89 2.4 1.01 2.56.12.17 1.75 2.67 4.23 3.74.59.26 1.05.41 1.41.52.59.19 1.13.16 1.56.1.48-.07 1.47-.6 1.68-1.18.21-.58.21-1.07.14-1.18-.06-.1-.22-.16-.47-.29z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.woocommerce .ca-btn-whatsapp:hover {
	background: #25d366 !important;
	transform: translateY(-2px);
	box-shadow: 0 10px 26px rgba(37, 211, 102, .4);
}
.woocommerce .ca-btn-whatsapp:focus-visible { outline: 3px solid #111; outline-offset: 3px; }

/* En los listados el botón es más chico. */
.woocommerce ul.products li.product a.button.ca-btn-whatsapp {
	min-height: 44px;
	padding: 10px 14px !important;
	font-size: 13px !important;
}

/* Precio en dólares: mismo peso visual que el precio en pesos. */
.woocommerce .ca-precio-usd,
.woocommerce .ca-precio-usd .amount,
.woocommerce div.product p.price.ca-precio-usd {
	font-family: var(--ca-display) !important;
	font-weight: 700 !important;
	color: #ff6d00 !important;
	line-height: 1.1;
}
/* El widget de precio de Elementor fija su propio tamaño: hay que ganarle. */
.woocommerce div.product .ca-precio-usd,
.woocommerce div.product p.price.ca-precio-usd,
.elementor-widget-woocommerce-product-price .ca-precio-usd,
.elementor-widget-woocommerce-product-price p.price.ca-precio-usd {
	font-size: 38px !important;
	line-height: 1.05 !important;
	letter-spacing: -.01em;
}
.woocommerce div.product .ca-precio-usd .amount,
.elementor-widget-woocommerce-product-price .ca-precio-usd .amount { font-size: inherit !important; }
.woocommerce ul.products li.product .ca-precio-usd,
.woocommerce ul.products li.product .ca-precio-usd .amount { font-size: 19px !important; }
@media (max-width: 767px) {
	.woocommerce div.product .ca-precio-usd,
	.elementor-widget-woocommerce-product-price .ca-precio-usd { font-size: 32px !important; }
}
.ca-precio-usd .woocommerce-Price-currencySymbol {
	font-size: .72em;
	font-weight: 700;
	letter-spacing: 0;
	color: #ff6d00 !important;
	opacity: 1;
	margin-right: 2px;
}


/* --------------------------------------------------------------------------
   En un producto que se vende por WhatsApp no queda NADA de compra web.
   WooCommerce le pone al contenedor la clase .product-type-external, así que
   todo lo que sigue se apaga sólo en esos productos.
   -------------------------------------------------------------------------- */
/* Cuotas y avisos de Mercado Pago */
.product-type-external .mp-credits-tooltip-container,
.product-type-external #mp-credits-modal,
.product-type-external .mp-credits-checkout-benefits,
.product-type-external [class*="mp-credits"],
.product-type-external [id*="mp-credits"] { display: none !important; }

/* Cantidad y cualquier botón de agregar al carrito que no sea el de WhatsApp */
.product-type-external .quantity,
.product-type-external form.cart .quantity,
.product-type-external .single_add_to_cart_button:not(.ca-btn-whatsapp),
.product-type-external .add_to_cart_button:not(.ca-btn-whatsapp),
.product-type-external .ajax_add_to_cart:not(.ca-btn-whatsapp) { display: none !important; }

/* Selectores de variante y carrusel: un producto externo no tiene variaciones */
.product-type-external .ca-variantes,
.product-type-external #ca-variantes,
.product-type-external form.variations_form,
.product-type-external table.variations,
.product-type-external .ca-pills { display: none !important; }

/* El precio en pesos se esconde cuando hay precio en dólares */
.product-type-external.ca-tiene-usd .elementor-widget-woocommerce-product-price,
.product-type-external.ca-tiene-usd .summary > .price:not(.ca-precio-usd) { display: none !important; }

/* El botón, al lado del aviso, sin estirarse de más. */
.product-type-external form.cart .ca-btn-whatsapp,
.product-type-external form.cart button.single_add_to_cart_button {
	flex: 0 0 auto;
	width: auto;
	min-width: 210px;
}


/* --------------------------------------------------------------------------
   Ficha del producto por WhatsApp: la descripción corta, en tarjeta
   -------------------------------------------------------------------------- */
.ca-ficha-wa {
	margin: 16px 0 0;
	padding: 18px 20px;
	border-radius: 16px;
	background: #ffffff;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .07);
}
.ca-ficha-wa-tit {
	position: relative;
	margin: 0 0 14px;
	padding: 0 0 12px;
	border-bottom: 1px solid rgba(0, 0, 0, .07);
	font-family: var(--ca-display);
	font-weight: 600;
	font-size: 16px;
	line-height: 1.2;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: #111;
}
.ca-ficha-wa-tit::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 54px;
	height: 3px;
	border-radius: 999px;
	background: #ff6d00;
}
.ca-ficha-wa-cuerpo {
	font-family: var(--ca-texto);
	font-size: 12px;
	line-height: 1.7;
	color: #333;
	overflow-wrap: break-word;
}
.ca-ficha-wa-cuerpo p { margin: 0 0 10px; }
.ca-ficha-wa-cuerpo p:last-child { margin-bottom: 0; }
.ca-ficha-wa-cuerpo strong, .ca-ficha-wa-cuerpo b { font-weight: 700; color: #111; }
.ca-ficha-wa-cuerpo a { color: #e05f00; text-decoration: underline; }
.ca-ficha-wa-cuerpo img { max-width: 100%; height: auto; border-radius: 10px; }

/* Listas: mismo tilde naranja que "Qué incluye". */
.ca-ficha-wa-cuerpo ul { margin: 0 0 10px; padding: 0; list-style: none; display: grid; gap: 7px; }
.ca-ficha-wa-cuerpo ul li {
	position: relative;
	margin: 0;
	padding: 0 0 0 26px;
	list-style: none;
	line-height: 1.5;
}
.ca-ficha-wa-cuerpo ul li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: rgba(255, 109, 0, .12);
	box-shadow: inset 0 0 0 1px rgba(255, 109, 0, .35);
}
.ca-ficha-wa-cuerpo ul li::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 6px;
	width: 4px;
	height: 7px;
	border-right: 2px solid #ff6d00;
	border-bottom: 2px solid #ff6d00;
	transform: rotate(45deg);
}
.ca-ficha-wa-cuerpo ol { margin: 0 0 10px; padding-left: 20px; }

/* Tablas pegadas desde el editor: mismo trato que en la descripción larga. */
.ca-ficha-wa-cuerpo table { width: 100% !important; max-width: 100% !important; border-collapse: collapse; }
.ca-ficha-wa-cuerpo table td,
.ca-ficha-wa-cuerpo table th {
	width: auto !important;
	padding: 9px 10px;
	border: 0;
	border-bottom: 1px solid rgba(0, 0, 0, .07);
	background-color: transparent !important;
	vertical-align: top;
	overflow-wrap: anywhere;
}
.ca-ficha-wa-cuerpo table td:first-child {
	font-size: 10px;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: #8a8a8a;
	width: 40% !important;
}
.ca-ficha-wa-cuerpo table td:not(:first-child) { font-weight: 700; color: #111; }

@media (max-width: 767px) {
	.ca-ficha-wa { padding: 16px; }
	.ca-ficha-wa-tit { font-size: 15px; }
	.ca-ficha-wa-cuerpo { font-size: 12.5px; }
}


/* Celular: aviso y botón apilados, botón a todo el ancho. */
@media (max-width: 767px) {
	.product-type-external form.cart { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; }
	.ca-aviso-whatsapp { flex: 1 1 auto; }
	.ca-aviso-whatsapp strong { font-size: 13.5px; }
	.ca-aviso-whatsapp em { font-size: 11.5px; }
	/* En columna el botón crecía a lo alto: se fija su altura. */
	.product-type-external form.cart .ca-btn-whatsapp,
	.product-type-external form.cart button.single_add_to_cart_button {
		flex: 0 0 auto !important;
		width: 100%;
		min-width: 0;
		height: 54px !important;
		min-height: 54px;
		max-height: 54px;
		align-self: stretch;
	}
}
